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AAO,EAAIrf,EAAQktB,QAAQpO,IACtE,OAAO,EAAI9e,EAAQkgB,SAASsP,EAAS1L,SAASO,iBAAkBrE,IAEpEsE,iBAAkB,SAAUxF,GACxB,IAAIkB,EAAU,6BAA6BX,QAAO,EAAIrf,EAAQktB,QAAQpO,IACtE,OAAO,EAAI9e,EAAQkgB,SAASsP,EAAS1L,SAASQ,iBAAkBtE","sources":["../QRCodeStyling/webpack/universalModuleDefinition","../QRCodeStyling/node_modules/qrcode-generator/qrcode.js","../QRCodeStyling/src/tools/merge.ts","../QRCodeStyling/src/tools/downloadURI.ts","../QRCodeStyling/src/tools/toDataUrl.ts","../QRCodeStyling/src/constants/qrTypes.ts","../QRCodeStyling/src/constants/errorCorrectionPercents.ts","../QRCodeStyling/src/figures/dot/QRDot.ts","../QRCodeStyling/src/constants/dotTypes.ts","../QRCodeStyling/src/figures/cornerSquare/QRCornerSquare.ts","../QRCodeStyling/src/constants/cornerSquareTypes.ts","../QRCodeStyling/src/figures/cornerDot/QRCornerDot.ts","../QRCodeStyling/src/constants/cornerDotTypes.ts","../QRCodeStyling/src/constants/shapeTypes.ts","../QRCodeStyling/src/core/QRSVG.ts","../QRCodeStyling/src/tools/calculateImageSize.ts","../QRCodeStyling/src/constants/gradientTypes.ts","../QRCodeStyling/src/constants/drawTypes.ts","../QRCodeStyling/src/core/QROptions.ts","../QRCodeStyling/src/constants/errorCorrectionLevels.ts","../QRCodeStyling/src/tools/sanitizeOptions.ts","../QRCodeStyling/src/index.ts","../QRCodeStyling/src/core/QRCodeStyling.ts","../QRCodeStyling/src/tools/getMode.ts","../QRCodeStyling/src/constants/modes.ts","../QRCodeStyling/webpack/bootstrap","../QRCodeStyling/webpack/startup","../QRCodeStyling/webpack/runtime/compat get default export","../QRCodeStyling/webpack/runtime/define property getters","../QRCodeStyling/webpack/runtime/hasOwnProperty shorthand","../node_modules/runtypes/lib/asynccontract.js","../node_modules/runtypes/lib/contract.js","../node_modules/runtypes/lib/decorator.js","../node_modules/runtypes/lib/errors.js","../node_modules/runtypes/lib/index.js","../node_modules/runtypes/lib/match.js","../node_modules/runtypes/lib/reflect.js","../node_modules/runtypes/lib/result.js","../node_modules/runtypes/lib/runtype.js","../node_modules/runtypes/lib/show.js","../node_modules/runtypes/lib/types/array.js","../node_modules/runtypes/lib/types/bigint.js","../node_modules/runtypes/lib/types/boolean.js","../node_modules/runtypes/lib/types/brand.js","../node_modules/runtypes/lib/types/constraint.js","../node_modules/runtypes/lib/types/dictionary.js","../node_modules/runtypes/lib/types/function.js","../node_modules/runtypes/lib/types/instanceof.js","../node_modules/runtypes/lib/types/intersect.js","../node_modules/runtypes/lib/types/lazy.js","../node_modules/runtypes/lib/types/literal.js","../node_modules/runtypes/lib/types/never.js","../node_modules/runtypes/lib/types/number.js","../node_modules/runtypes/lib/types/optional.js","../node_modules/runtypes/lib/types/record.js","../node_modules/runtypes/lib/types/string.js","../node_modules/runtypes/lib/types/symbol.js","../node_modules/runtypes/lib/types/template.js","../node_modules/runtypes/lib/types/tuple.js","../node_modules/runtypes/lib/types/union.js","../node_modules/runtypes/lib/types/unknown.js","../node_modules/runtypes/lib/types/void.js","../node_modules/runtypes/lib/util.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"QRCodeStyling\"] = factory();\n\telse\n\t\troot[\"QRCodeStyling\"] = factory();\n})(self, function() {\nreturn ","//---------------------------------------------------------------------\n//\n// QR Code Generator for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n//  http://www.opensource.org/licenses/mit-license.php\n//\n// The word 'QR Code' is registered trademark of\n// DENSO WAVE INCORPORATED\n//  http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n\nvar qrcode = function() {\n\n  //---------------------------------------------------------------------\n  // qrcode\n  //---------------------------------------------------------------------\n\n  /**\n   * qrcode\n   * @param typeNumber 1 to 40\n   * @param errorCorrectionLevel 'L','M','Q','H'\n   */\n  var qrcode = function(typeNumber, errorCorrectionLevel) {\n\n    var PAD0 = 0xEC;\n    var PAD1 = 0x11;\n\n    var _typeNumber = typeNumber;\n    var _errorCorrectionLevel = QRErrorCorrectionLevel[errorCorrectionLevel];\n    var _modules = null;\n    var _moduleCount = 0;\n    var _dataCache = null;\n    var _dataList = [];\n\n    var _this = {};\n\n    var makeImpl = function(test, maskPattern) {\n\n      _moduleCount = _typeNumber * 4 + 17;\n      _modules = function(moduleCount) {\n        var modules = new Array(moduleCount);\n        for (var row = 0; row < moduleCount; row += 1) {\n          modules[row] = new Array(moduleCount);\n          for (var col = 0; col < moduleCount; col += 1) {\n            modules[row][col] = null;\n          }\n        }\n        return modules;\n      }(_moduleCount);\n\n      setupPositionProbePattern(0, 0);\n      setupPositionProbePattern(_moduleCount - 7, 0);\n      setupPositionProbePattern(0, _moduleCount - 7);\n      setupPositionAdjustPattern();\n      setupTimingPattern();\n      setupTypeInfo(test, maskPattern);\n\n      if (_typeNumber >= 7) {\n        setupTypeNumber(test);\n      }\n\n      if (_dataCache == null) {\n        _dataCache = createData(_typeNumber, _errorCorrectionLevel, _dataList);\n      }\n\n      mapData(_dataCache, maskPattern);\n    };\n\n    var setupPositionProbePattern = function(row, col) {\n\n      for (var r = -1; r <= 7; r += 1) {\n\n        if (row + r <= -1 || _moduleCount <= row + r) continue;\n\n        for (var c = -1; c <= 7; c += 1) {\n\n          if (col + c <= -1 || _moduleCount <= col + c) continue;\n\n          if ( (0 <= r && r <= 6 && (c == 0 || c == 6) )\n              || (0 <= c && c <= 6 && (r == 0 || r == 6) )\n              || (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {\n            _modules[row + r][col + c] = true;\n          } else {\n            _modules[row + r][col + c] = false;\n          }\n        }\n      }\n    };\n\n    var getBestMaskPattern = function() {\n\n      var minLostPoint = 0;\n      var pattern = 0;\n\n      for (var i = 0; i < 8; i += 1) {\n\n        makeImpl(true, i);\n\n        var lostPoint = QRUtil.getLostPoint(_this);\n\n        if (i == 0 || minLostPoint > lostPoint) {\n          minLostPoint = lostPoint;\n          pattern = i;\n        }\n      }\n\n      return pattern;\n    };\n\n    var setupTimingPattern = function() {\n\n      for (var r = 8; r < _moduleCount - 8; r += 1) {\n        if (_modules[r][6] != null) {\n          continue;\n        }\n        _modules[r][6] = (r % 2 == 0);\n      }\n\n      for (var c = 8; c < _moduleCount - 8; c += 1) {\n        if (_modules[6][c] != null) {\n          continue;\n        }\n        _modules[6][c] = (c % 2 == 0);\n      }\n    };\n\n    var setupPositionAdjustPattern = function() {\n\n      var pos = QRUtil.getPatternPosition(_typeNumber);\n\n      for (var i = 0; i < pos.length; i += 1) {\n\n        for (var j = 0; j < pos.length; j += 1) {\n\n          var row = pos[i];\n          var col = pos[j];\n\n          if (_modules[row][col] != null) {\n            continue;\n          }\n\n          for (var r = -2; r <= 2; r += 1) {\n\n            for (var c = -2; c <= 2; c += 1) {\n\n              if (r == -2 || r == 2 || c == -2 || c == 2\n                  || (r == 0 && c == 0) ) {\n                _modules[row + r][col + c] = true;\n              } else {\n                _modules[row + r][col + c] = false;\n              }\n            }\n          }\n        }\n      }\n    };\n\n    var setupTypeNumber = function(test) {\n\n      var bits = QRUtil.getBCHTypeNumber(_typeNumber);\n\n      for (var i = 0; i < 18; i += 1) {\n        var mod = (!test && ( (bits >> i) & 1) == 1);\n        _modules[Math.floor(i / 3)][i % 3 + _moduleCount - 8 - 3] = mod;\n      }\n\n      for (var i = 0; i < 18; i += 1) {\n        var mod = (!test && ( (bits >> i) & 1) == 1);\n        _modules[i % 3 + _moduleCount - 8 - 3][Math.floor(i / 3)] = mod;\n      }\n    };\n\n    var setupTypeInfo = function(test, maskPattern) {\n\n      var data = (_errorCorrectionLevel << 3) | maskPattern;\n      var bits = QRUtil.getBCHTypeInfo(data);\n\n      // vertical\n      for (var i = 0; i < 15; i += 1) {\n\n        var mod = (!test && ( (bits >> i) & 1) == 1);\n\n        if (i < 6) {\n          _modules[i][8] = mod;\n        } else if (i < 8) {\n          _modules[i + 1][8] = mod;\n        } else {\n          _modules[_moduleCount - 15 + i][8] = mod;\n        }\n      }\n\n      // horizontal\n      for (var i = 0; i < 15; i += 1) {\n\n        var mod = (!test && ( (bits >> i) & 1) == 1);\n\n        if (i < 8) {\n          _modules[8][_moduleCount - i - 1] = mod;\n        } else if (i < 9) {\n          _modules[8][15 - i - 1 + 1] = mod;\n        } else {\n          _modules[8][15 - i - 1] = mod;\n        }\n      }\n\n      // fixed module\n      _modules[_moduleCount - 8][8] = (!test);\n    };\n\n    var mapData = function(data, maskPattern) {\n\n      var inc = -1;\n      var row = _moduleCount - 1;\n      var bitIndex = 7;\n      var byteIndex = 0;\n      var maskFunc = QRUtil.getMaskFunction(maskPattern);\n\n      for (var col = _moduleCount - 1; col > 0; col -= 2) {\n\n        if (col == 6) col -= 1;\n\n        while (true) {\n\n          for (var c = 0; c < 2; c += 1) {\n\n            if (_modules[row][col - c] == null) {\n\n              var dark = false;\n\n              if (byteIndex < data.length) {\n                dark = ( ( (data[byteIndex] >>> bitIndex) & 1) == 1);\n              }\n\n              var mask = maskFunc(row, col - c);\n\n              if (mask) {\n                dark = !dark;\n              }\n\n              _modules[row][col - c] = dark;\n              bitIndex -= 1;\n\n              if (bitIndex == -1) {\n                byteIndex += 1;\n                bitIndex = 7;\n              }\n            }\n          }\n\n          row += inc;\n\n          if (row < 0 || _moduleCount <= row) {\n            row -= inc;\n            inc = -inc;\n            break;\n          }\n        }\n      }\n    };\n\n    var createBytes = function(buffer, rsBlocks) {\n\n      var offset = 0;\n\n      var maxDcCount = 0;\n      var maxEcCount = 0;\n\n      var dcdata = new Array(rsBlocks.length);\n      var ecdata = new Array(rsBlocks.length);\n\n      for (var r = 0; r < rsBlocks.length; r += 1) {\n\n        var dcCount = rsBlocks[r].dataCount;\n        var ecCount = rsBlocks[r].totalCount - dcCount;\n\n        maxDcCount = Math.max(maxDcCount, dcCount);\n        maxEcCount = Math.max(maxEcCount, ecCount);\n\n        dcdata[r] = new Array(dcCount);\n\n        for (var i = 0; i < dcdata[r].length; i += 1) {\n          dcdata[r][i] = 0xff & buffer.getBuffer()[i + offset];\n        }\n        offset += dcCount;\n\n        var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n        var rawPoly = qrPolynomial(dcdata[r], rsPoly.getLength() - 1);\n\n        var modPoly = rawPoly.mod(rsPoly);\n        ecdata[r] = new Array(rsPoly.getLength() - 1);\n        for (var i = 0; i < ecdata[r].length; i += 1) {\n          var modIndex = i + modPoly.getLength() - ecdata[r].length;\n          ecdata[r][i] = (modIndex >= 0)? modPoly.getAt(modIndex) : 0;\n        }\n      }\n\n      var totalCodeCount = 0;\n      for (var i = 0; i < rsBlocks.length; i += 1) {\n        totalCodeCount += rsBlocks[i].totalCount;\n      }\n\n      var data = new Array(totalCodeCount);\n      var index = 0;\n\n      for (var i = 0; i < maxDcCount; i += 1) {\n        for (var r = 0; r < rsBlocks.length; r += 1) {\n          if (i < dcdata[r].length) {\n            data[index] = dcdata[r][i];\n            index += 1;\n          }\n        }\n      }\n\n      for (var i = 0; i < maxEcCount; i += 1) {\n        for (var r = 0; r < rsBlocks.length; r += 1) {\n          if (i < ecdata[r].length) {\n            data[index] = ecdata[r][i];\n            index += 1;\n          }\n        }\n      }\n\n      return data;\n    };\n\n    var createData = function(typeNumber, errorCorrectionLevel, dataList) {\n\n      var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectionLevel);\n\n      var buffer = qrBitBuffer();\n\n      for (var i = 0; i < dataList.length; i += 1) {\n        var data = dataList[i];\n        buffer.put(data.getMode(), 4);\n        buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n        data.write(buffer);\n      }\n\n      // calc num max data.\n      var totalDataCount = 0;\n      for (var i = 0; i < rsBlocks.length; i += 1) {\n        totalDataCount += rsBlocks[i].dataCount;\n      }\n\n      if (buffer.getLengthInBits() > totalDataCount * 8) {\n        throw 'code length overflow. ('\n          + buffer.getLengthInBits()\n          + '>'\n          + totalDataCount * 8\n          + ')';\n      }\n\n      // end code\n      if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n        buffer.put(0, 4);\n      }\n\n      // padding\n      while (buffer.getLengthInBits() % 8 != 0) {\n        buffer.putBit(false);\n      }\n\n      // padding\n      while (true) {\n\n        if (buffer.getLengthInBits() >= totalDataCount * 8) {\n          break;\n        }\n        buffer.put(PAD0, 8);\n\n        if (buffer.getLengthInBits() >= totalDataCount * 8) {\n          break;\n        }\n        buffer.put(PAD1, 8);\n      }\n\n      return createBytes(buffer, rsBlocks);\n    };\n\n    _this.addData = function(data, mode) {\n\n      mode = mode || 'Byte';\n\n      var newData = null;\n\n      switch(mode) {\n      case 'Numeric' :\n        newData = qrNumber(data);\n        break;\n      case 'Alphanumeric' :\n        newData = qrAlphaNum(data);\n        break;\n      case 'Byte' :\n        newData = qr8BitByte(data);\n        break;\n      case 'Kanji' :\n        newData = qrKanji(data);\n        break;\n      default :\n        throw 'mode:' + mode;\n      }\n\n      _dataList.push(newData);\n      _dataCache = null;\n    };\n\n    _this.isDark = function(row, col) {\n      if (row < 0 || _moduleCount <= row || col < 0 || _moduleCount <= col) {\n        throw row + ',' + col;\n      }\n      return _modules[row][col];\n    };\n\n    _this.getModuleCount = function() {\n      return _moduleCount;\n    };\n\n    _this.make = function() {\n      if (_typeNumber < 1) {\n        var typeNumber = 1;\n\n        for (; typeNumber < 40; typeNumber++) {\n          var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, _errorCorrectionLevel);\n          var buffer = qrBitBuffer();\n\n          for (var i = 0; i < _dataList.length; i++) {\n            var data = _dataList[i];\n            buffer.put(data.getMode(), 4);\n            buffer.put(data.getLength(), QRUtil.getLengthInBits(data.getMode(), typeNumber) );\n            data.write(buffer);\n          }\n\n          var totalDataCount = 0;\n          for (var i = 0; i < rsBlocks.length; i++) {\n            totalDataCount += rsBlocks[i].dataCount;\n          }\n\n          if (buffer.getLengthInBits() <= totalDataCount * 8) {\n            break;\n          }\n        }\n\n        _typeNumber = typeNumber;\n      }\n\n      makeImpl(false, getBestMaskPattern() );\n    };\n\n    _this.createTableTag = function(cellSize, margin) {\n\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n      var qrHtml = '';\n\n      qrHtml += '<table style=\"';\n      qrHtml += ' border-width: 0px; border-style: none;';\n      qrHtml += ' border-collapse: collapse;';\n      qrHtml += ' padding: 0px; margin: ' + margin + 'px;';\n      qrHtml += '\">';\n      qrHtml += '<tbody>';\n\n      for (var r = 0; r < _this.getModuleCount(); r += 1) {\n\n        qrHtml += '<tr>';\n\n        for (var c = 0; c < _this.getModuleCount(); c += 1) {\n          qrHtml += '<td style=\"';\n          qrHtml += ' border-width: 0px; border-style: none;';\n          qrHtml += ' border-collapse: collapse;';\n          qrHtml += ' padding: 0px; margin: 0px;';\n          qrHtml += ' width: ' + cellSize + 'px;';\n          qrHtml += ' height: ' + cellSize + 'px;';\n          qrHtml += ' background-color: ';\n          qrHtml += _this.isDark(r, c)? '#000000' : '#ffffff';\n          qrHtml += ';';\n          qrHtml += '\"/>';\n        }\n\n        qrHtml += '</tr>';\n      }\n\n      qrHtml += '</tbody>';\n      qrHtml += '</table>';\n\n      return qrHtml;\n    };\n\n    _this.createSvgTag = function(cellSize, margin, alt, title) {\n\n      var opts = {};\n      if (typeof arguments[0] == 'object') {\n        // Called by options.\n        opts = arguments[0];\n        // overwrite cellSize and margin.\n        cellSize = opts.cellSize;\n        margin = opts.margin;\n        alt = opts.alt;\n        title = opts.title;\n      }\n\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n      // Compose alt property surrogate\n      alt = (typeof alt === 'string') ? {text: alt} : alt || {};\n      alt.text = alt.text || null;\n      alt.id = (alt.text) ? alt.id || 'qrcode-description' : null;\n\n      // Compose title property surrogate\n      title = (typeof title === 'string') ? {text: title} : title || {};\n      title.text = title.text || null;\n      title.id = (title.text) ? title.id || 'qrcode-title' : null;\n\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var c, mc, r, mr, qrSvg='', rect;\n\n      rect = 'l' + cellSize + ',0 0,' + cellSize +\n        ' -' + cellSize + ',0 0,-' + cellSize + 'z ';\n\n      qrSvg += '<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"';\n      qrSvg += !opts.scalable ? ' width=\"' + size + 'px\" height=\"' + size + 'px\"' : '';\n      qrSvg += ' viewBox=\"0 0 ' + size + ' ' + size + '\" ';\n      qrSvg += ' preserveAspectRatio=\"xMinYMin meet\"';\n      qrSvg += (title.text || alt.text) ? ' role=\"img\" aria-labelledby=\"' +\n          escapeXml([title.id, alt.id].join(' ').trim() ) + '\"' : '';\n      qrSvg += '>';\n      qrSvg += (title.text) ? '<title id=\"' + escapeXml(title.id) + '\">' +\n          escapeXml(title.text) + '</title>' : '';\n      qrSvg += (alt.text) ? '<description id=\"' + escapeXml(alt.id) + '\">' +\n          escapeXml(alt.text) + '</description>' : '';\n      qrSvg += '<rect width=\"100%\" height=\"100%\" fill=\"white\" cx=\"0\" cy=\"0\"/>';\n      qrSvg += '<path d=\"';\n\n      for (r = 0; r < _this.getModuleCount(); r += 1) {\n        mr = r * cellSize + margin;\n        for (c = 0; c < _this.getModuleCount(); c += 1) {\n          if (_this.isDark(r, c) ) {\n            mc = c*cellSize+margin;\n            qrSvg += 'M' + mc + ',' + mr + rect;\n          }\n        }\n      }\n\n      qrSvg += '\" stroke=\"transparent\" fill=\"black\"/>';\n      qrSvg += '</svg>';\n\n      return qrSvg;\n    };\n\n    _this.createDataURL = function(cellSize, margin) {\n\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var min = margin;\n      var max = size - margin;\n\n      return createDataURL(size, size, function(x, y) {\n        if (min <= x && x < max && min <= y && y < max) {\n          var c = Math.floor( (x - min) / cellSize);\n          var r = Math.floor( (y - min) / cellSize);\n          return _this.isDark(r, c)? 0 : 1;\n        } else {\n          return 1;\n        }\n      } );\n    };\n\n    _this.createImgTag = function(cellSize, margin, alt) {\n\n      cellSize = cellSize || 2;\n      margin = (typeof margin == 'undefined')? cellSize * 4 : margin;\n\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n\n      var img = '';\n      img += '<img';\n      img += '\\u0020src=\"';\n      img += _this.createDataURL(cellSize, margin);\n      img += '\"';\n      img += '\\u0020width=\"';\n      img += size;\n      img += '\"';\n      img += '\\u0020height=\"';\n      img += size;\n      img += '\"';\n      if (alt) {\n        img += '\\u0020alt=\"';\n        img += escapeXml(alt);\n        img += '\"';\n      }\n      img += '/>';\n\n      return img;\n    };\n\n    var escapeXml = function(s) {\n      var escaped = '';\n      for (var i = 0; i < s.length; i += 1) {\n        var c = s.charAt(i);\n        switch(c) {\n        case '<': escaped += '&lt;'; break;\n        case '>': escaped += '&gt;'; break;\n        case '&': escaped += '&amp;'; break;\n        case '\"': escaped += '&quot;'; break;\n        default : escaped += c; break;\n        }\n      }\n      return escaped;\n    };\n\n    var _createHalfASCII = function(margin) {\n      var cellSize = 1;\n      margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var min = margin;\n      var max = size - margin;\n\n      var y, x, r1, r2, p;\n\n      var blocks = {\n        '██': '█',\n        '█ ': '▀',\n        ' █': '▄',\n        '  ': ' '\n      };\n\n      var blocksLastLineNoMargin = {\n        '██': '▀',\n        '█ ': '▀',\n        ' █': ' ',\n        '  ': ' '\n      };\n\n      var ascii = '';\n      for (y = 0; y < size; y += 2) {\n        r1 = Math.floor((y - min) / cellSize);\n        r2 = Math.floor((y + 1 - min) / cellSize);\n        for (x = 0; x < size; x += 1) {\n          p = '█';\n\n          if (min <= x && x < max && min <= y && y < max && _this.isDark(r1, Math.floor((x - min) / cellSize))) {\n            p = ' ';\n          }\n\n          if (min <= x && x < max && min <= y+1 && y+1 < max && _this.isDark(r2, Math.floor((x - min) / cellSize))) {\n            p += ' ';\n          }\n          else {\n            p += '█';\n          }\n\n          // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n          ascii += (margin < 1 && y+1 >= max) ? blocksLastLineNoMargin[p] : blocks[p];\n        }\n\n        ascii += '\\n';\n      }\n\n      if (size % 2 && margin > 0) {\n        return ascii.substring(0, ascii.length - size - 1) + Array(size+1).join('▀');\n      }\n\n      return ascii.substring(0, ascii.length-1);\n    };\n\n    _this.createASCII = function(cellSize, margin) {\n      cellSize = cellSize || 1;\n\n      if (cellSize < 2) {\n        return _createHalfASCII(margin);\n      }\n\n      cellSize -= 1;\n      margin = (typeof margin == 'undefined')? cellSize * 2 : margin;\n\n      var size = _this.getModuleCount() * cellSize + margin * 2;\n      var min = margin;\n      var max = size - margin;\n\n      var y, x, r, p;\n\n      var white = Array(cellSize+1).join('██');\n      var black = Array(cellSize+1).join('  ');\n\n      var ascii = '';\n      var line = '';\n      for (y = 0; y < size; y += 1) {\n        r = Math.floor( (y - min) / cellSize);\n        line = '';\n        for (x = 0; x < size; x += 1) {\n          p = 1;\n\n          if (min <= x && x < max && min <= y && y < max && _this.isDark(r, Math.floor((x - min) / cellSize))) {\n            p = 0;\n          }\n\n          // Output 2 characters per pixel, to create full square. 1 character per pixels gives only half width of square.\n          line += p ? white : black;\n        }\n\n        for (r = 0; r < cellSize; r += 1) {\n          ascii += line + '\\n';\n        }\n      }\n\n      return ascii.substring(0, ascii.length-1);\n    };\n\n    _this.renderTo2dContext = function(context, cellSize) {\n      cellSize = cellSize || 2;\n      var length = _this.getModuleCount();\n      for (var row = 0; row < length; row++) {\n        for (var col = 0; col < length; col++) {\n          context.fillStyle = _this.isDark(row, col) ? 'black' : 'white';\n          context.fillRect(row * cellSize, col * cellSize, cellSize, cellSize);\n        }\n      }\n    }\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // qrcode.stringToBytes\n  //---------------------------------------------------------------------\n\n  qrcode.stringToBytesFuncs = {\n    'default' : function(s) {\n      var bytes = [];\n      for (var i = 0; i < s.length; i += 1) {\n        var c = s.charCodeAt(i);\n        bytes.push(c & 0xff);\n      }\n      return bytes;\n    }\n  };\n\n  qrcode.stringToBytes = qrcode.stringToBytesFuncs['default'];\n\n  //---------------------------------------------------------------------\n  // qrcode.createStringToBytes\n  //---------------------------------------------------------------------\n\n  /**\n   * @param unicodeData base64 string of byte array.\n   * [16bit Unicode],[16bit Bytes], ...\n   * @param numChars\n   */\n  qrcode.createStringToBytes = function(unicodeData, numChars) {\n\n    // create conversion map.\n\n    var unicodeMap = function() {\n\n      var bin = base64DecodeInputStream(unicodeData);\n      var read = function() {\n        var b = bin.read();\n        if (b == -1) throw 'eof';\n        return b;\n      };\n\n      var count = 0;\n      var unicodeMap = {};\n      while (true) {\n        var b0 = bin.read();\n        if (b0 == -1) break;\n        var b1 = read();\n        var b2 = read();\n        var b3 = read();\n        var k = String.fromCharCode( (b0 << 8) | b1);\n        var v = (b2 << 8) | b3;\n        unicodeMap[k] = v;\n        count += 1;\n      }\n      if (count != numChars) {\n        throw count + ' != ' + numChars;\n      }\n\n      return unicodeMap;\n    }();\n\n    var unknownChar = '?'.charCodeAt(0);\n\n    return function(s) {\n      var bytes = [];\n      for (var i = 0; i < s.length; i += 1) {\n        var c = s.charCodeAt(i);\n        if (c < 128) {\n          bytes.push(c);\n        } else {\n          var b = unicodeMap[s.charAt(i)];\n          if (typeof b == 'number') {\n            if ( (b & 0xff) == b) {\n              // 1byte\n              bytes.push(b);\n            } else {\n              // 2bytes\n              bytes.push(b >>> 8);\n              bytes.push(b & 0xff);\n            }\n          } else {\n            bytes.push(unknownChar);\n          }\n        }\n      }\n      return bytes;\n    };\n  };\n\n  //---------------------------------------------------------------------\n  // QRMode\n  //---------------------------------------------------------------------\n\n  var QRMode = {\n    MODE_NUMBER :    1 << 0,\n    MODE_ALPHA_NUM : 1 << 1,\n    MODE_8BIT_BYTE : 1 << 2,\n    MODE_KANJI :     1 << 3\n  };\n\n  //---------------------------------------------------------------------\n  // QRErrorCorrectionLevel\n  //---------------------------------------------------------------------\n\n  var QRErrorCorrectionLevel = {\n    L : 1,\n    M : 0,\n    Q : 3,\n    H : 2\n  };\n\n  //---------------------------------------------------------------------\n  // QRMaskPattern\n  //---------------------------------------------------------------------\n\n  var QRMaskPattern = {\n    PATTERN000 : 0,\n    PATTERN001 : 1,\n    PATTERN010 : 2,\n    PATTERN011 : 3,\n    PATTERN100 : 4,\n    PATTERN101 : 5,\n    PATTERN110 : 6,\n    PATTERN111 : 7\n  };\n\n  //---------------------------------------------------------------------\n  // QRUtil\n  //---------------------------------------------------------------------\n\n  var QRUtil = function() {\n\n    var PATTERN_POSITION_TABLE = [\n      [],\n      [6, 18],\n      [6, 22],\n      [6, 26],\n      [6, 30],\n      [6, 34],\n      [6, 22, 38],\n      [6, 24, 42],\n      [6, 26, 46],\n      [6, 28, 50],\n      [6, 30, 54],\n      [6, 32, 58],\n      [6, 34, 62],\n      [6, 26, 46, 66],\n      [6, 26, 48, 70],\n      [6, 26, 50, 74],\n      [6, 30, 54, 78],\n      [6, 30, 56, 82],\n      [6, 30, 58, 86],\n      [6, 34, 62, 90],\n      [6, 28, 50, 72, 94],\n      [6, 26, 50, 74, 98],\n      [6, 30, 54, 78, 102],\n      [6, 28, 54, 80, 106],\n      [6, 32, 58, 84, 110],\n      [6, 30, 58, 86, 114],\n      [6, 34, 62, 90, 118],\n      [6, 26, 50, 74, 98, 122],\n      [6, 30, 54, 78, 102, 126],\n      [6, 26, 52, 78, 104, 130],\n      [6, 30, 56, 82, 108, 134],\n      [6, 34, 60, 86, 112, 138],\n      [6, 30, 58, 86, 114, 142],\n      [6, 34, 62, 90, 118, 146],\n      [6, 30, 54, 78, 102, 126, 150],\n      [6, 24, 50, 76, 102, 128, 154],\n      [6, 28, 54, 80, 106, 132, 158],\n      [6, 32, 58, 84, 110, 136, 162],\n      [6, 26, 54, 82, 110, 138, 166],\n      [6, 30, 58, 86, 114, 142, 170]\n    ];\n    var G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0);\n    var G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0);\n    var G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1);\n\n    var _this = {};\n\n    var getBCHDigit = function(data) {\n      var digit = 0;\n      while (data != 0) {\n        digit += 1;\n        data >>>= 1;\n      }\n      return digit;\n    };\n\n    _this.getBCHTypeInfo = function(data) {\n      var d = data << 10;\n      while (getBCHDigit(d) - getBCHDigit(G15) >= 0) {\n        d ^= (G15 << (getBCHDigit(d) - getBCHDigit(G15) ) );\n      }\n      return ( (data << 10) | d) ^ G15_MASK;\n    };\n\n    _this.getBCHTypeNumber = function(data) {\n      var d = data << 12;\n      while (getBCHDigit(d) - getBCHDigit(G18) >= 0) {\n        d ^= (G18 << (getBCHDigit(d) - getBCHDigit(G18) ) );\n      }\n      return (data << 12) | d;\n    };\n\n    _this.getPatternPosition = function(typeNumber) {\n      return PATTERN_POSITION_TABLE[typeNumber - 1];\n    };\n\n    _this.getMaskFunction = function(maskPattern) {\n\n      switch (maskPattern) {\n\n      case QRMaskPattern.PATTERN000 :\n        return function(i, j) { return (i + j) % 2 == 0; };\n      case QRMaskPattern.PATTERN001 :\n        return function(i, j) { return i % 2 == 0; };\n      case QRMaskPattern.PATTERN010 :\n        return function(i, j) { return j % 3 == 0; };\n      case QRMaskPattern.PATTERN011 :\n        return function(i, j) { return (i + j) % 3 == 0; };\n      case QRMaskPattern.PATTERN100 :\n        return function(i, j) { return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 == 0; };\n      case QRMaskPattern.PATTERN101 :\n        return function(i, j) { return (i * j) % 2 + (i * j) % 3 == 0; };\n      case QRMaskPattern.PATTERN110 :\n        return function(i, j) { return ( (i * j) % 2 + (i * j) % 3) % 2 == 0; };\n      case QRMaskPattern.PATTERN111 :\n        return function(i, j) { return ( (i * j) % 3 + (i + j) % 2) % 2 == 0; };\n\n      default :\n        throw 'bad maskPattern:' + maskPattern;\n      }\n    };\n\n    _this.getErrorCorrectPolynomial = function(errorCorrectLength) {\n      var a = qrPolynomial([1], 0);\n      for (var i = 0; i < errorCorrectLength; i += 1) {\n        a = a.multiply(qrPolynomial([1, QRMath.gexp(i)], 0) );\n      }\n      return a;\n    };\n\n    _this.getLengthInBits = function(mode, type) {\n\n      if (1 <= type && type < 10) {\n\n        // 1 - 9\n\n        switch(mode) {\n        case QRMode.MODE_NUMBER    : return 10;\n        case QRMode.MODE_ALPHA_NUM : return 9;\n        case QRMode.MODE_8BIT_BYTE : return 8;\n        case QRMode.MODE_KANJI     : return 8;\n        default :\n          throw 'mode:' + mode;\n        }\n\n      } else if (type < 27) {\n\n        // 10 - 26\n\n        switch(mode) {\n        case QRMode.MODE_NUMBER    : return 12;\n        case QRMode.MODE_ALPHA_NUM : return 11;\n        case QRMode.MODE_8BIT_BYTE : return 16;\n        case QRMode.MODE_KANJI     : return 10;\n        default :\n          throw 'mode:' + mode;\n        }\n\n      } else if (type < 41) {\n\n        // 27 - 40\n\n        switch(mode) {\n        case QRMode.MODE_NUMBER    : return 14;\n        case QRMode.MODE_ALPHA_NUM : return 13;\n        case QRMode.MODE_8BIT_BYTE : return 16;\n        case QRMode.MODE_KANJI     : return 12;\n        default :\n          throw 'mode:' + mode;\n        }\n\n      } else {\n        throw 'type:' + type;\n      }\n    };\n\n    _this.getLostPoint = function(qrcode) {\n\n      var moduleCount = qrcode.getModuleCount();\n\n      var lostPoint = 0;\n\n      // LEVEL1\n\n      for (var row = 0; row < moduleCount; row += 1) {\n        for (var col = 0; col < moduleCount; col += 1) {\n\n          var sameCount = 0;\n          var dark = qrcode.isDark(row, col);\n\n          for (var r = -1; r <= 1; r += 1) {\n\n            if (row + r < 0 || moduleCount <= row + r) {\n              continue;\n            }\n\n            for (var c = -1; c <= 1; c += 1) {\n\n              if (col + c < 0 || moduleCount <= col + c) {\n                continue;\n              }\n\n              if (r == 0 && c == 0) {\n                continue;\n              }\n\n              if (dark == qrcode.isDark(row + r, col + c) ) {\n                sameCount += 1;\n              }\n            }\n          }\n\n          if (sameCount > 5) {\n            lostPoint += (3 + sameCount - 5);\n          }\n        }\n      };\n\n      // LEVEL2\n\n      for (var row = 0; row < moduleCount - 1; row += 1) {\n        for (var col = 0; col < moduleCount - 1; col += 1) {\n          var count = 0;\n          if (qrcode.isDark(row, col) ) count += 1;\n          if (qrcode.isDark(row + 1, col) ) count += 1;\n          if (qrcode.isDark(row, col + 1) ) count += 1;\n          if (qrcode.isDark(row + 1, col + 1) ) count += 1;\n          if (count == 0 || count == 4) {\n            lostPoint += 3;\n          }\n        }\n      }\n\n      // LEVEL3\n\n      for (var row = 0; row < moduleCount; row += 1) {\n        for (var col = 0; col < moduleCount - 6; col += 1) {\n          if (qrcode.isDark(row, col)\n              && !qrcode.isDark(row, col + 1)\n              &&  qrcode.isDark(row, col + 2)\n              &&  qrcode.isDark(row, col + 3)\n              &&  qrcode.isDark(row, col + 4)\n              && !qrcode.isDark(row, col + 5)\n              &&  qrcode.isDark(row, col + 6) ) {\n            lostPoint += 40;\n          }\n        }\n      }\n\n      for (var col = 0; col < moduleCount; col += 1) {\n        for (var row = 0; row < moduleCount - 6; row += 1) {\n          if (qrcode.isDark(row, col)\n              && !qrcode.isDark(row + 1, col)\n              &&  qrcode.isDark(row + 2, col)\n              &&  qrcode.isDark(row + 3, col)\n              &&  qrcode.isDark(row + 4, col)\n              && !qrcode.isDark(row + 5, col)\n              &&  qrcode.isDark(row + 6, col) ) {\n            lostPoint += 40;\n          }\n        }\n      }\n\n      // LEVEL4\n\n      var darkCount = 0;\n\n      for (var col = 0; col < moduleCount; col += 1) {\n        for (var row = 0; row < moduleCount; row += 1) {\n          if (qrcode.isDark(row, col) ) {\n            darkCount += 1;\n          }\n        }\n      }\n\n      var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n      lostPoint += ratio * 10;\n\n      return lostPoint;\n    };\n\n    return _this;\n  }();\n\n  //---------------------------------------------------------------------\n  // QRMath\n  //---------------------------------------------------------------------\n\n  var QRMath = function() {\n\n    var EXP_TABLE = new Array(256);\n    var LOG_TABLE = new Array(256);\n\n    // initialize tables\n    for (var i = 0; i < 8; i += 1) {\n      EXP_TABLE[i] = 1 << i;\n    }\n    for (var i = 8; i < 256; i += 1) {\n      EXP_TABLE[i] = EXP_TABLE[i - 4]\n        ^ EXP_TABLE[i - 5]\n        ^ EXP_TABLE[i - 6]\n        ^ EXP_TABLE[i - 8];\n    }\n    for (var i = 0; i < 255; i += 1) {\n      LOG_TABLE[EXP_TABLE[i] ] = i;\n    }\n\n    var _this = {};\n\n    _this.glog = function(n) {\n\n      if (n < 1) {\n        throw 'glog(' + n + ')';\n      }\n\n      return LOG_TABLE[n];\n    };\n\n    _this.gexp = function(n) {\n\n      while (n < 0) {\n        n += 255;\n      }\n\n      while (n >= 256) {\n        n -= 255;\n      }\n\n      return EXP_TABLE[n];\n    };\n\n    return _this;\n  }();\n\n  //---------------------------------------------------------------------\n  // qrPolynomial\n  //---------------------------------------------------------------------\n\n  function qrPolynomial(num, shift) {\n\n    if (typeof num.length == 'undefined') {\n      throw num.length + '/' + shift;\n    }\n\n    var _num = function() {\n      var offset = 0;\n      while (offset < num.length && num[offset] == 0) {\n        offset += 1;\n      }\n      var _num = new Array(num.length - offset + shift);\n      for (var i = 0; i < num.length - offset; i += 1) {\n        _num[i] = num[i + offset];\n      }\n      return _num;\n    }();\n\n    var _this = {};\n\n    _this.getAt = function(index) {\n      return _num[index];\n    };\n\n    _this.getLength = function() {\n      return _num.length;\n    };\n\n    _this.multiply = function(e) {\n\n      var num = new Array(_this.getLength() + e.getLength() - 1);\n\n      for (var i = 0; i < _this.getLength(); i += 1) {\n        for (var j = 0; j < e.getLength(); j += 1) {\n          num[i + j] ^= QRMath.gexp(QRMath.glog(_this.getAt(i) ) + QRMath.glog(e.getAt(j) ) );\n        }\n      }\n\n      return qrPolynomial(num, 0);\n    };\n\n    _this.mod = function(e) {\n\n      if (_this.getLength() - e.getLength() < 0) {\n        return _this;\n      }\n\n      var ratio = QRMath.glog(_this.getAt(0) ) - QRMath.glog(e.getAt(0) );\n\n      var num = new Array(_this.getLength() );\n      for (var i = 0; i < _this.getLength(); i += 1) {\n        num[i] = _this.getAt(i);\n      }\n\n      for (var i = 0; i < e.getLength(); i += 1) {\n        num[i] ^= QRMath.gexp(QRMath.glog(e.getAt(i) ) + ratio);\n      }\n\n      // recursive call\n      return qrPolynomial(num, 0).mod(e);\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // QRRSBlock\n  //---------------------------------------------------------------------\n\n  var QRRSBlock = function() {\n\n    var RS_BLOCK_TABLE = [\n\n      // L\n      // M\n      // Q\n      // H\n\n      // 1\n      [1, 26, 19],\n      [1, 26, 16],\n      [1, 26, 13],\n      [1, 26, 9],\n\n      // 2\n      [1, 44, 34],\n      [1, 44, 28],\n      [1, 44, 22],\n      [1, 44, 16],\n\n      // 3\n      [1, 70, 55],\n      [1, 70, 44],\n      [2, 35, 17],\n      [2, 35, 13],\n\n      // 4\n      [1, 100, 80],\n      [2, 50, 32],\n      [2, 50, 24],\n      [4, 25, 9],\n\n      // 5\n      [1, 134, 108],\n      [2, 67, 43],\n      [2, 33, 15, 2, 34, 16],\n      [2, 33, 11, 2, 34, 12],\n\n      // 6\n      [2, 86, 68],\n      [4, 43, 27],\n      [4, 43, 19],\n      [4, 43, 15],\n\n      // 7\n      [2, 98, 78],\n      [4, 49, 31],\n      [2, 32, 14, 4, 33, 15],\n      [4, 39, 13, 1, 40, 14],\n\n      // 8\n      [2, 121, 97],\n      [2, 60, 38, 2, 61, 39],\n      [4, 40, 18, 2, 41, 19],\n      [4, 40, 14, 2, 41, 15],\n\n      // 9\n      [2, 146, 116],\n      [3, 58, 36, 2, 59, 37],\n      [4, 36, 16, 4, 37, 17],\n      [4, 36, 12, 4, 37, 13],\n\n      // 10\n      [2, 86, 68, 2, 87, 69],\n      [4, 69, 43, 1, 70, 44],\n      [6, 43, 19, 2, 44, 20],\n      [6, 43, 15, 2, 44, 16],\n\n      // 11\n      [4, 101, 81],\n      [1, 80, 50, 4, 81, 51],\n      [4, 50, 22, 4, 51, 23],\n      [3, 36, 12, 8, 37, 13],\n\n      // 12\n      [2, 116, 92, 2, 117, 93],\n      [6, 58, 36, 2, 59, 37],\n      [4, 46, 20, 6, 47, 21],\n      [7, 42, 14, 4, 43, 15],\n\n      // 13\n      [4, 133, 107],\n      [8, 59, 37, 1, 60, 38],\n      [8, 44, 20, 4, 45, 21],\n      [12, 33, 11, 4, 34, 12],\n\n      // 14\n      [3, 145, 115, 1, 146, 116],\n      [4, 64, 40, 5, 65, 41],\n      [11, 36, 16, 5, 37, 17],\n      [11, 36, 12, 5, 37, 13],\n\n      // 15\n      [5, 109, 87, 1, 110, 88],\n      [5, 65, 41, 5, 66, 42],\n      [5, 54, 24, 7, 55, 25],\n      [11, 36, 12, 7, 37, 13],\n\n      // 16\n      [5, 122, 98, 1, 123, 99],\n      [7, 73, 45, 3, 74, 46],\n      [15, 43, 19, 2, 44, 20],\n      [3, 45, 15, 13, 46, 16],\n\n      // 17\n      [1, 135, 107, 5, 136, 108],\n      [10, 74, 46, 1, 75, 47],\n      [1, 50, 22, 15, 51, 23],\n      [2, 42, 14, 17, 43, 15],\n\n      // 18\n      [5, 150, 120, 1, 151, 121],\n      [9, 69, 43, 4, 70, 44],\n      [17, 50, 22, 1, 51, 23],\n      [2, 42, 14, 19, 43, 15],\n\n      // 19\n      [3, 141, 113, 4, 142, 114],\n      [3, 70, 44, 11, 71, 45],\n      [17, 47, 21, 4, 48, 22],\n      [9, 39, 13, 16, 40, 14],\n\n      // 20\n      [3, 135, 107, 5, 136, 108],\n      [3, 67, 41, 13, 68, 42],\n      [15, 54, 24, 5, 55, 25],\n      [15, 43, 15, 10, 44, 16],\n\n      // 21\n      [4, 144, 116, 4, 145, 117],\n      [17, 68, 42],\n      [17, 50, 22, 6, 51, 23],\n      [19, 46, 16, 6, 47, 17],\n\n      // 22\n      [2, 139, 111, 7, 140, 112],\n      [17, 74, 46],\n      [7, 54, 24, 16, 55, 25],\n      [34, 37, 13],\n\n      // 23\n      [4, 151, 121, 5, 152, 122],\n      [4, 75, 47, 14, 76, 48],\n      [11, 54, 24, 14, 55, 25],\n      [16, 45, 15, 14, 46, 16],\n\n      // 24\n      [6, 147, 117, 4, 148, 118],\n      [6, 73, 45, 14, 74, 46],\n      [11, 54, 24, 16, 55, 25],\n      [30, 46, 16, 2, 47, 17],\n\n      // 25\n      [8, 132, 106, 4, 133, 107],\n      [8, 75, 47, 13, 76, 48],\n      [7, 54, 24, 22, 55, 25],\n      [22, 45, 15, 13, 46, 16],\n\n      // 26\n      [10, 142, 114, 2, 143, 115],\n      [19, 74, 46, 4, 75, 47],\n      [28, 50, 22, 6, 51, 23],\n      [33, 46, 16, 4, 47, 17],\n\n      // 27\n      [8, 152, 122, 4, 153, 123],\n      [22, 73, 45, 3, 74, 46],\n      [8, 53, 23, 26, 54, 24],\n      [12, 45, 15, 28, 46, 16],\n\n      // 28\n      [3, 147, 117, 10, 148, 118],\n      [3, 73, 45, 23, 74, 46],\n      [4, 54, 24, 31, 55, 25],\n      [11, 45, 15, 31, 46, 16],\n\n      // 29\n      [7, 146, 116, 7, 147, 117],\n      [21, 73, 45, 7, 74, 46],\n      [1, 53, 23, 37, 54, 24],\n      [19, 45, 15, 26, 46, 16],\n\n      // 30\n      [5, 145, 115, 10, 146, 116],\n      [19, 75, 47, 10, 76, 48],\n      [15, 54, 24, 25, 55, 25],\n      [23, 45, 15, 25, 46, 16],\n\n      // 31\n      [13, 145, 115, 3, 146, 116],\n      [2, 74, 46, 29, 75, 47],\n      [42, 54, 24, 1, 55, 25],\n      [23, 45, 15, 28, 46, 16],\n\n      // 32\n      [17, 145, 115],\n      [10, 74, 46, 23, 75, 47],\n      [10, 54, 24, 35, 55, 25],\n      [19, 45, 15, 35, 46, 16],\n\n      // 33\n      [17, 145, 115, 1, 146, 116],\n      [14, 74, 46, 21, 75, 47],\n      [29, 54, 24, 19, 55, 25],\n      [11, 45, 15, 46, 46, 16],\n\n      // 34\n      [13, 145, 115, 6, 146, 116],\n      [14, 74, 46, 23, 75, 47],\n      [44, 54, 24, 7, 55, 25],\n      [59, 46, 16, 1, 47, 17],\n\n      // 35\n      [12, 151, 121, 7, 152, 122],\n      [12, 75, 47, 26, 76, 48],\n      [39, 54, 24, 14, 55, 25],\n      [22, 45, 15, 41, 46, 16],\n\n      // 36\n      [6, 151, 121, 14, 152, 122],\n      [6, 75, 47, 34, 76, 48],\n      [46, 54, 24, 10, 55, 25],\n      [2, 45, 15, 64, 46, 16],\n\n      // 37\n      [17, 152, 122, 4, 153, 123],\n      [29, 74, 46, 14, 75, 47],\n      [49, 54, 24, 10, 55, 25],\n      [24, 45, 15, 46, 46, 16],\n\n      // 38\n      [4, 152, 122, 18, 153, 123],\n      [13, 74, 46, 32, 75, 47],\n      [48, 54, 24, 14, 55, 25],\n      [42, 45, 15, 32, 46, 16],\n\n      // 39\n      [20, 147, 117, 4, 148, 118],\n      [40, 75, 47, 7, 76, 48],\n      [43, 54, 24, 22, 55, 25],\n      [10, 45, 15, 67, 46, 16],\n\n      // 40\n      [19, 148, 118, 6, 149, 119],\n      [18, 75, 47, 31, 76, 48],\n      [34, 54, 24, 34, 55, 25],\n      [20, 45, 15, 61, 46, 16]\n    ];\n\n    var qrRSBlock = function(totalCount, dataCount) {\n      var _this = {};\n      _this.totalCount = totalCount;\n      _this.dataCount = dataCount;\n      return _this;\n    };\n\n    var _this = {};\n\n    var getRsBlockTable = function(typeNumber, errorCorrectionLevel) {\n\n      switch(errorCorrectionLevel) {\n      case QRErrorCorrectionLevel.L :\n        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n      case QRErrorCorrectionLevel.M :\n        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n      case QRErrorCorrectionLevel.Q :\n        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n      case QRErrorCorrectionLevel.H :\n        return RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n      default :\n        return undefined;\n      }\n    };\n\n    _this.getRSBlocks = function(typeNumber, errorCorrectionLevel) {\n\n      var rsBlock = getRsBlockTable(typeNumber, errorCorrectionLevel);\n\n      if (typeof rsBlock == 'undefined') {\n        throw 'bad rs block @ typeNumber:' + typeNumber +\n            '/errorCorrectionLevel:' + errorCorrectionLevel;\n      }\n\n      var length = rsBlock.length / 3;\n\n      var list = [];\n\n      for (var i = 0; i < length; i += 1) {\n\n        var count = rsBlock[i * 3 + 0];\n        var totalCount = rsBlock[i * 3 + 1];\n        var dataCount = rsBlock[i * 3 + 2];\n\n        for (var j = 0; j < count; j += 1) {\n          list.push(qrRSBlock(totalCount, dataCount) );\n        }\n      }\n\n      return list;\n    };\n\n    return _this;\n  }();\n\n  //---------------------------------------------------------------------\n  // qrBitBuffer\n  //---------------------------------------------------------------------\n\n  var qrBitBuffer = function() {\n\n    var _buffer = [];\n    var _length = 0;\n\n    var _this = {};\n\n    _this.getBuffer = function() {\n      return _buffer;\n    };\n\n    _this.getAt = function(index) {\n      var bufIndex = Math.floor(index / 8);\n      return ( (_buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n    };\n\n    _this.put = function(num, length) {\n      for (var i = 0; i < length; i += 1) {\n        _this.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n      }\n    };\n\n    _this.getLengthInBits = function() {\n      return _length;\n    };\n\n    _this.putBit = function(bit) {\n\n      var bufIndex = Math.floor(_length / 8);\n      if (_buffer.length <= bufIndex) {\n        _buffer.push(0);\n      }\n\n      if (bit) {\n        _buffer[bufIndex] |= (0x80 >>> (_length % 8) );\n      }\n\n      _length += 1;\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // qrNumber\n  //---------------------------------------------------------------------\n\n  var qrNumber = function(data) {\n\n    var _mode = QRMode.MODE_NUMBER;\n    var _data = data;\n\n    var _this = {};\n\n    _this.getMode = function() {\n      return _mode;\n    };\n\n    _this.getLength = function(buffer) {\n      return _data.length;\n    };\n\n    _this.write = function(buffer) {\n\n      var data = _data;\n\n      var i = 0;\n\n      while (i + 2 < data.length) {\n        buffer.put(strToNum(data.substring(i, i + 3) ), 10);\n        i += 3;\n      }\n\n      if (i < data.length) {\n        if (data.length - i == 1) {\n          buffer.put(strToNum(data.substring(i, i + 1) ), 4);\n        } else if (data.length - i == 2) {\n          buffer.put(strToNum(data.substring(i, i + 2) ), 7);\n        }\n      }\n    };\n\n    var strToNum = function(s) {\n      var num = 0;\n      for (var i = 0; i < s.length; i += 1) {\n        num = num * 10 + chatToNum(s.charAt(i) );\n      }\n      return num;\n    };\n\n    var chatToNum = function(c) {\n      if ('0' <= c && c <= '9') {\n        return c.charCodeAt(0) - '0'.charCodeAt(0);\n      }\n      throw 'illegal char :' + c;\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // qrAlphaNum\n  //---------------------------------------------------------------------\n\n  var qrAlphaNum = function(data) {\n\n    var _mode = QRMode.MODE_ALPHA_NUM;\n    var _data = data;\n\n    var _this = {};\n\n    _this.getMode = function() {\n      return _mode;\n    };\n\n    _this.getLength = function(buffer) {\n      return _data.length;\n    };\n\n    _this.write = function(buffer) {\n\n      var s = _data;\n\n      var i = 0;\n\n      while (i + 1 < s.length) {\n        buffer.put(\n          getCode(s.charAt(i) ) * 45 +\n          getCode(s.charAt(i + 1) ), 11);\n        i += 2;\n      }\n\n      if (i < s.length) {\n        buffer.put(getCode(s.charAt(i) ), 6);\n      }\n    };\n\n    var getCode = function(c) {\n\n      if ('0' <= c && c <= '9') {\n        return c.charCodeAt(0) - '0'.charCodeAt(0);\n      } else if ('A' <= c && c <= 'Z') {\n        return c.charCodeAt(0) - 'A'.charCodeAt(0) + 10;\n      } else {\n        switch (c) {\n        case ' ' : return 36;\n        case '$' : return 37;\n        case '%' : return 38;\n        case '*' : return 39;\n        case '+' : return 40;\n        case '-' : return 41;\n        case '.' : return 42;\n        case '/' : return 43;\n        case ':' : return 44;\n        default :\n          throw 'illegal char :' + c;\n        }\n      }\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // qr8BitByte\n  //---------------------------------------------------------------------\n\n  var qr8BitByte = function(data) {\n\n    var _mode = QRMode.MODE_8BIT_BYTE;\n    var _data = data;\n    var _bytes = qrcode.stringToBytes(data);\n\n    var _this = {};\n\n    _this.getMode = function() {\n      return _mode;\n    };\n\n    _this.getLength = function(buffer) {\n      return _bytes.length;\n    };\n\n    _this.write = function(buffer) {\n      for (var i = 0; i < _bytes.length; i += 1) {\n        buffer.put(_bytes[i], 8);\n      }\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // qrKanji\n  //---------------------------------------------------------------------\n\n  var qrKanji = function(data) {\n\n    var _mode = QRMode.MODE_KANJI;\n    var _data = data;\n\n    var stringToBytes = qrcode.stringToBytesFuncs['SJIS'];\n    if (!stringToBytes) {\n      throw 'sjis not supported.';\n    }\n    !function(c, code) {\n      // self test for sjis support.\n      var test = stringToBytes(c);\n      if (test.length != 2 || ( (test[0] << 8) | test[1]) != code) {\n        throw 'sjis not supported.';\n      }\n    }('\\u53cb', 0x9746);\n\n    var _bytes = stringToBytes(data);\n\n    var _this = {};\n\n    _this.getMode = function() {\n      return _mode;\n    };\n\n    _this.getLength = function(buffer) {\n      return ~~(_bytes.length / 2);\n    };\n\n    _this.write = function(buffer) {\n\n      var data = _bytes;\n\n      var i = 0;\n\n      while (i + 1 < data.length) {\n\n        var c = ( (0xff & data[i]) << 8) | (0xff & data[i + 1]);\n\n        if (0x8140 <= c && c <= 0x9FFC) {\n          c -= 0x8140;\n        } else if (0xE040 <= c && c <= 0xEBBF) {\n          c -= 0xC140;\n        } else {\n          throw 'illegal char at ' + (i + 1) + '/' + c;\n        }\n\n        c = ( (c >>> 8) & 0xff) * 0xC0 + (c & 0xff);\n\n        buffer.put(c, 13);\n\n        i += 2;\n      }\n\n      if (i < data.length) {\n        throw 'illegal char at ' + (i + 1);\n      }\n    };\n\n    return _this;\n  };\n\n  //=====================================================================\n  // GIF Support etc.\n  //\n\n  //---------------------------------------------------------------------\n  // byteArrayOutputStream\n  //---------------------------------------------------------------------\n\n  var byteArrayOutputStream = function() {\n\n    var _bytes = [];\n\n    var _this = {};\n\n    _this.writeByte = function(b) {\n      _bytes.push(b & 0xff);\n    };\n\n    _this.writeShort = function(i) {\n      _this.writeByte(i);\n      _this.writeByte(i >>> 8);\n    };\n\n    _this.writeBytes = function(b, off, len) {\n      off = off || 0;\n      len = len || b.length;\n      for (var i = 0; i < len; i += 1) {\n        _this.writeByte(b[i + off]);\n      }\n    };\n\n    _this.writeString = function(s) {\n      for (var i = 0; i < s.length; i += 1) {\n        _this.writeByte(s.charCodeAt(i) );\n      }\n    };\n\n    _this.toByteArray = function() {\n      return _bytes;\n    };\n\n    _this.toString = function() {\n      var s = '';\n      s += '[';\n      for (var i = 0; i < _bytes.length; i += 1) {\n        if (i > 0) {\n          s += ',';\n        }\n        s += _bytes[i];\n      }\n      s += ']';\n      return s;\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // base64EncodeOutputStream\n  //---------------------------------------------------------------------\n\n  var base64EncodeOutputStream = function() {\n\n    var _buffer = 0;\n    var _buflen = 0;\n    var _length = 0;\n    var _base64 = '';\n\n    var _this = {};\n\n    var writeEncoded = function(b) {\n      _base64 += String.fromCharCode(encode(b & 0x3f) );\n    };\n\n    var encode = function(n) {\n      if (n < 0) {\n        // error.\n      } else if (n < 26) {\n        return 0x41 + n;\n      } else if (n < 52) {\n        return 0x61 + (n - 26);\n      } else if (n < 62) {\n        return 0x30 + (n - 52);\n      } else if (n == 62) {\n        return 0x2b;\n      } else if (n == 63) {\n        return 0x2f;\n      }\n      throw 'n:' + n;\n    };\n\n    _this.writeByte = function(n) {\n\n      _buffer = (_buffer << 8) | (n & 0xff);\n      _buflen += 8;\n      _length += 1;\n\n      while (_buflen >= 6) {\n        writeEncoded(_buffer >>> (_buflen - 6) );\n        _buflen -= 6;\n      }\n    };\n\n    _this.flush = function() {\n\n      if (_buflen > 0) {\n        writeEncoded(_buffer << (6 - _buflen) );\n        _buffer = 0;\n        _buflen = 0;\n      }\n\n      if (_length % 3 != 0) {\n        // padding\n        var padlen = 3 - _length % 3;\n        for (var i = 0; i < padlen; i += 1) {\n          _base64 += '=';\n        }\n      }\n    };\n\n    _this.toString = function() {\n      return _base64;\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // base64DecodeInputStream\n  //---------------------------------------------------------------------\n\n  var base64DecodeInputStream = function(str) {\n\n    var _str = str;\n    var _pos = 0;\n    var _buffer = 0;\n    var _buflen = 0;\n\n    var _this = {};\n\n    _this.read = function() {\n\n      while (_buflen < 8) {\n\n        if (_pos >= _str.length) {\n          if (_buflen == 0) {\n            return -1;\n          }\n          throw 'unexpected end of file./' + _buflen;\n        }\n\n        var c = _str.charAt(_pos);\n        _pos += 1;\n\n        if (c == '=') {\n          _buflen = 0;\n          return -1;\n        } else if (c.match(/^\\s$/) ) {\n          // ignore if whitespace.\n          continue;\n        }\n\n        _buffer = (_buffer << 6) | decode(c.charCodeAt(0) );\n        _buflen += 6;\n      }\n\n      var n = (_buffer >>> (_buflen - 8) ) & 0xff;\n      _buflen -= 8;\n      return n;\n    };\n\n    var decode = function(c) {\n      if (0x41 <= c && c <= 0x5a) {\n        return c - 0x41;\n      } else if (0x61 <= c && c <= 0x7a) {\n        return c - 0x61 + 26;\n      } else if (0x30 <= c && c <= 0x39) {\n        return c - 0x30 + 52;\n      } else if (c == 0x2b) {\n        return 62;\n      } else if (c == 0x2f) {\n        return 63;\n      } else {\n        throw 'c:' + c;\n      }\n    };\n\n    return _this;\n  };\n\n  //---------------------------------------------------------------------\n  // gifImage (B/W)\n  //---------------------------------------------------------------------\n\n  var gifImage = function(width, height) {\n\n    var _width = width;\n    var _height = height;\n    var _data = new Array(width * height);\n\n    var _this = {};\n\n    _this.setPixel = function(x, y, pixel) {\n      _data[y * _width + x] = pixel;\n    };\n\n    _this.write = function(out) {\n\n      //---------------------------------\n      // GIF Signature\n\n      out.writeString('GIF87a');\n\n      //---------------------------------\n      // Screen Descriptor\n\n      out.writeShort(_width);\n      out.writeShort(_height);\n\n      out.writeByte(0x80); // 2bit\n      out.writeByte(0);\n      out.writeByte(0);\n\n      //---------------------------------\n      // Global Color Map\n\n      // black\n      out.writeByte(0x00);\n      out.writeByte(0x00);\n      out.writeByte(0x00);\n\n      // white\n      out.writeByte(0xff);\n      out.writeByte(0xff);\n      out.writeByte(0xff);\n\n      //---------------------------------\n      // Image Descriptor\n\n      out.writeString(',');\n      out.writeShort(0);\n      out.writeShort(0);\n      out.writeShort(_width);\n      out.writeShort(_height);\n      out.writeByte(0);\n\n      //---------------------------------\n      // Local Color Map\n\n      //---------------------------------\n      // Raster Data\n\n      var lzwMinCodeSize = 2;\n      var raster = getLZWRaster(lzwMinCodeSize);\n\n      out.writeByte(lzwMinCodeSize);\n\n      var offset = 0;\n\n      while (raster.length - offset > 255) {\n        out.writeByte(255);\n        out.writeBytes(raster, offset, 255);\n        offset += 255;\n      }\n\n      out.writeByte(raster.length - offset);\n      out.writeBytes(raster, offset, raster.length - offset);\n      out.writeByte(0x00);\n\n      //---------------------------------\n      // GIF Terminator\n      out.writeString(';');\n    };\n\n    var bitOutputStream = function(out) {\n\n      var _out = out;\n      var _bitLength = 0;\n      var _bitBuffer = 0;\n\n      var _this = {};\n\n      _this.write = function(data, length) {\n\n        if ( (data >>> length) != 0) {\n          throw 'length over';\n        }\n\n        while (_bitLength + length >= 8) {\n          _out.writeByte(0xff & ( (data << _bitLength) | _bitBuffer) );\n          length -= (8 - _bitLength);\n          data >>>= (8 - _bitLength);\n          _bitBuffer = 0;\n          _bitLength = 0;\n        }\n\n        _bitBuffer = (data << _bitLength) | _bitBuffer;\n        _bitLength = _bitLength + length;\n      };\n\n      _this.flush = function() {\n        if (_bitLength > 0) {\n          _out.writeByte(_bitBuffer);\n        }\n      };\n\n      return _this;\n    };\n\n    var getLZWRaster = function(lzwMinCodeSize) {\n\n      var clearCode = 1 << lzwMinCodeSize;\n      var endCode = (1 << lzwMinCodeSize) + 1;\n      var bitLength = lzwMinCodeSize + 1;\n\n      // Setup LZWTable\n      var table = lzwTable();\n\n      for (var i = 0; i < clearCode; i += 1) {\n        table.add(String.fromCharCode(i) );\n      }\n      table.add(String.fromCharCode(clearCode) );\n      table.add(String.fromCharCode(endCode) );\n\n      var byteOut = byteArrayOutputStream();\n      var bitOut = bitOutputStream(byteOut);\n\n      // clear code\n      bitOut.write(clearCode, bitLength);\n\n      var dataIndex = 0;\n\n      var s = String.fromCharCode(_data[dataIndex]);\n      dataIndex += 1;\n\n      while (dataIndex < _data.length) {\n\n        var c = String.fromCharCode(_data[dataIndex]);\n        dataIndex += 1;\n\n        if (table.contains(s + c) ) {\n\n          s = s + c;\n\n        } else {\n\n          bitOut.write(table.indexOf(s), bitLength);\n\n          if (table.size() < 0xfff) {\n\n            if (table.size() == (1 << bitLength) ) {\n              bitLength += 1;\n            }\n\n            table.add(s + c);\n          }\n\n          s = c;\n        }\n      }\n\n      bitOut.write(table.indexOf(s), bitLength);\n\n      // end code\n      bitOut.write(endCode, bitLength);\n\n      bitOut.flush();\n\n      return byteOut.toByteArray();\n    };\n\n    var lzwTable = function() {\n\n      var _map = {};\n      var _size = 0;\n\n      var _this = {};\n\n      _this.add = function(key) {\n        if (_this.contains(key) ) {\n          throw 'dup key:' + key;\n        }\n        _map[key] = _size;\n        _size += 1;\n      };\n\n      _this.size = function() {\n        return _size;\n      };\n\n      _this.indexOf = function(key) {\n        return _map[key];\n      };\n\n      _this.contains = function(key) {\n        return typeof _map[key] != 'undefined';\n      };\n\n      return _this;\n    };\n\n    return _this;\n  };\n\n  var createDataURL = function(width, height, getPixel) {\n    var gif = gifImage(width, height);\n    for (var y = 0; y < height; y += 1) {\n      for (var x = 0; x < width; x += 1) {\n        gif.setPixel(x, y, getPixel(x, y) );\n      }\n    }\n\n    var b = byteArrayOutputStream();\n    gif.write(b);\n\n    var base64 = base64EncodeOutputStream();\n    var bytes = b.toByteArray();\n    for (var i = 0; i < bytes.length; i += 1) {\n      base64.writeByte(bytes[i]);\n    }\n    base64.flush();\n\n    return 'data:image/gif;base64,' + base64;\n  };\n\n  //---------------------------------------------------------------------\n  // returns qrcode function.\n\n  return qrcode;\n}();\n\n// multibyte support\n!function() {\n\n  qrcode.stringToBytesFuncs['UTF-8'] = function(s) {\n    // http://stackoverflow.com/questions/18729405/how-to-convert-utf8-string-to-byte-array\n    function toUTF8Array(str) {\n      var utf8 = [];\n      for (var i=0; i < str.length; i++) {\n        var charcode = str.charCodeAt(i);\n        if (charcode < 0x80) utf8.push(charcode);\n        else if (charcode < 0x800) {\n          utf8.push(0xc0 | (charcode >> 6),\n              0x80 | (charcode & 0x3f));\n        }\n        else if (charcode < 0xd800 || charcode >= 0xe000) {\n          utf8.push(0xe0 | (charcode >> 12),\n              0x80 | ((charcode>>6) & 0x3f),\n              0x80 | (charcode & 0x3f));\n        }\n        // surrogate pair\n        else {\n          i++;\n          // UTF-16 encodes 0x10000-0x10FFFF by\n          // subtracting 0x10000 and splitting the\n          // 20 bits of 0x0-0xFFFFF into two halves\n          charcode = 0x10000 + (((charcode & 0x3ff)<<10)\n            | (str.charCodeAt(i) & 0x3ff));\n          utf8.push(0xf0 | (charcode >>18),\n              0x80 | ((charcode>>12) & 0x3f),\n              0x80 | ((charcode>>6) & 0x3f),\n              0x80 | (charcode & 0x3f));\n        }\n      }\n      return utf8;\n    }\n    return toUTF8Array(s);\n  };\n\n}();\n\n(function (factory) {\n  if (typeof define === 'function' && define.amd) {\n      define([], factory);\n  } else if (typeof exports === 'object') {\n      module.exports = factory();\n  }\n}(function () {\n    return qrcode;\n}));\n","import { UnknownObject } from \"../types\";\n\nconst isObject = (obj: Record<string, unknown>): boolean => !!obj && typeof obj === \"object\" && !Array.isArray(obj);\n\nexport default function mergeDeep(target: UnknownObject, ...sources: UnknownObject[]): UnknownObject {\n  if (!sources.length) return target;\n  const source = sources.shift();\n  if (source === undefined || !isObject(target) || !isObject(source)) return target;\n  target = { ...target };\n  Object.keys(source).forEach((key: string): void => {\n    const targetValue = target[key];\n    const sourceValue = source[key];\n\n    if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n      target[key] = sourceValue;\n    } else if (isObject(targetValue) && isObject(sourceValue)) {\n      target[key] = mergeDeep(Object.assign({}, targetValue), sourceValue);\n    } else {\n      target[key] = sourceValue;\n    }\n  });\n\n  return mergeDeep(target, ...sources);\n}\n","export default function downloadURI(uri: string, name: string): void {\n  const link = document.createElement(\"a\");\n  link.download = name;\n  link.href = uri;\n  document.body.appendChild(link);\n  link.click();\n  document.body.removeChild(link);\n}\n","export default async function toDataURL(url: string): Promise<string> {\n  return new Promise((resolve) => {\n    const xhr = new XMLHttpRequest();\n    xhr.onload = function () {\n      const reader = new FileReader();\n      reader.onloadend = function () {\n        resolve(reader.result as string);\n      };\n      reader.readAsDataURL(xhr.response);\n    };\n    xhr.open(\"GET\", url);\n    xhr.responseType = \"blob\";\n    xhr.send();\n  });\n}\n","import { TypeNumber } from \"../types\";\n\ninterface TypesMap {\n  [key: number]: TypeNumber;\n}\n\nconst qrTypes: TypesMap = {};\n\nfor (let type = 0; type <= 40; type++) {\n  qrTypes[type] = type as TypeNumber;\n}\n\n// 0 types is autodetect\n\n// types = {\n//     0: 0,\n//     1: 1,\n//     ...\n//     40: 40\n// }\n\nexport default qrTypes;\n","interface ErrorCorrectionPercents {\n  [key: string]: number;\n}\n\nexport default {\n  L: 0.07,\n  M: 0.15,\n  Q: 0.25,\n  H: 0.3\n} as ErrorCorrectionPercents;\n","import dotTypes from \"../../constants/dotTypes\";\nimport { DotType, GetNeighbor, DrawArgs, BasicFigureDrawArgs, RotateFigureArgs } from \"../../types\";\n\nexport default class QRDot {\n  _element?: SVGElement;\n  _svg: SVGElement;\n  _type: DotType;\n\n  constructor({ svg, type }: { svg: SVGElement; type: DotType }) {\n    this._svg = svg;\n    this._type = type;\n  }\n\n  draw(x: number, y: number, size: number, getNeighbor: GetNeighbor): void {\n    const type = this._type;\n    let drawFunction;\n\n    switch (type) {\n      case dotTypes.dots:\n        drawFunction = this._drawDot;\n        break;\n      case dotTypes.classy:\n        drawFunction = this._drawClassy;\n        break;\n      case dotTypes.classyRounded:\n        drawFunction = this._drawClassyRounded;\n        break;\n      case dotTypes.rounded:\n        drawFunction = this._drawRounded;\n        break;\n      case dotTypes.extraRounded:\n        drawFunction = this._drawExtraRounded;\n        break;\n      case dotTypes.square:\n      default:\n        drawFunction = this._drawSquare;\n    }\n\n    drawFunction.call(this, { x, y, size, getNeighbor });\n  }\n\n  _rotateFigure({ x, y, size, rotation = 0, draw }: RotateFigureArgs): void {\n    const cx = x + size / 2;\n    const cy = y + size / 2;\n\n    draw();\n    this._element?.setAttribute(\"transform\", `rotate(${(180 * rotation) / Math.PI},${cx},${cy})`);\n  }\n\n  _basicDot(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n        this._element.setAttribute(\"cx\", String(x + size / 2));\n        this._element.setAttribute(\"cy\", String(y + size / 2));\n        this._element.setAttribute(\"r\", String(size / 2));\n      }\n    });\n  }\n\n  _basicSquare(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n        this._element.setAttribute(\"x\", String(x));\n        this._element.setAttribute(\"y\", String(y));\n        this._element.setAttribute(\"width\", String(size));\n        this._element.setAttribute(\"height\", String(size));\n      }\n    });\n  }\n\n  //if rotation === 0 - right side is rounded\n  _basicSideRounded(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y}` + //go to top left position\n            `v ${size}` + //draw line to left bottom corner\n            `h ${size / 2}` + //draw line to left bottom corner + half of size right\n            `a ${size / 2} ${size / 2}, 0, 0, 0, 0 ${-size}` // draw rounded corner\n        );\n      }\n    });\n  }\n\n  //if rotation === 0 - top right corner is rounded\n  _basicCornerRounded(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y}` + //go to top left position\n            `v ${size}` + //draw line to left bottom corner\n            `h ${size}` + //draw line to right bottom corner\n            `v ${-size / 2}` + //draw line to right bottom corner + half of size top\n            `a ${size / 2} ${size / 2}, 0, 0, 0, ${-size / 2} ${-size / 2}` // draw rounded corner\n        );\n      }\n    });\n  }\n\n  //if rotation === 0 - top right corner is rounded\n  _basicCornerExtraRounded(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y}` + //go to top left position\n            `v ${size}` + //draw line to left bottom corner\n            `h ${size}` + //draw line to right bottom corner\n            `a ${size} ${size}, 0, 0, 0, ${-size} ${-size}` // draw rounded top right corner\n        );\n      }\n    });\n  }\n\n  //if rotation === 0 - left bottom and right top corners are rounded\n  _basicCornersRounded(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y}` + //go to left top position\n            `v ${size / 2}` + //draw line to left top corner + half of size bottom\n            `a ${size / 2} ${size / 2}, 0, 0, 0, ${size / 2} ${size / 2}` + // draw rounded left bottom corner\n            `h ${size / 2}` + //draw line to right bottom corner\n            `v ${-size / 2}` + //draw line to right bottom corner + half of size top\n            `a ${size / 2} ${size / 2}, 0, 0, 0, ${-size / 2} ${-size / 2}` // draw rounded right top corner\n        );\n      }\n    });\n  }\n\n  _drawDot({ x, y, size }: DrawArgs): void {\n    this._basicDot({ x, y, size, rotation: 0 });\n  }\n\n  _drawSquare({ x, y, size }: DrawArgs): void {\n    this._basicSquare({ x, y, size, rotation: 0 });\n  }\n\n  _drawRounded({ x, y, size, getNeighbor }: DrawArgs): void {\n    const leftNeighbor = getNeighbor ? +getNeighbor(-1, 0) : 0;\n    const rightNeighbor = getNeighbor ? +getNeighbor(1, 0) : 0;\n    const topNeighbor = getNeighbor ? +getNeighbor(0, -1) : 0;\n    const bottomNeighbor = getNeighbor ? +getNeighbor(0, 1) : 0;\n\n    const neighborsCount = leftNeighbor + rightNeighbor + topNeighbor + bottomNeighbor;\n\n    if (neighborsCount === 0) {\n      this._basicDot({ x, y, size, rotation: 0 });\n      return;\n    }\n\n    if (neighborsCount > 2 || (leftNeighbor && rightNeighbor) || (topNeighbor && bottomNeighbor)) {\n      this._basicSquare({ x, y, size, rotation: 0 });\n      return;\n    }\n\n    if (neighborsCount === 2) {\n      let rotation = 0;\n\n      if (leftNeighbor && topNeighbor) {\n        rotation = Math.PI / 2;\n      } else if (topNeighbor && rightNeighbor) {\n        rotation = Math.PI;\n      } else if (rightNeighbor && bottomNeighbor) {\n        rotation = -Math.PI / 2;\n      }\n\n      this._basicCornerRounded({ x, y, size, rotation });\n      return;\n    }\n\n    if (neighborsCount === 1) {\n      let rotation = 0;\n\n      if (topNeighbor) {\n        rotation = Math.PI / 2;\n      } else if (rightNeighbor) {\n        rotation = Math.PI;\n      } else if (bottomNeighbor) {\n        rotation = -Math.PI / 2;\n      }\n\n      this._basicSideRounded({ x, y, size, rotation });\n      return;\n    }\n  }\n\n  _drawExtraRounded({ x, y, size, getNeighbor }: DrawArgs): void {\n    const leftNeighbor = getNeighbor ? +getNeighbor(-1, 0) : 0;\n    const rightNeighbor = getNeighbor ? +getNeighbor(1, 0) : 0;\n    const topNeighbor = getNeighbor ? +getNeighbor(0, -1) : 0;\n    const bottomNeighbor = getNeighbor ? +getNeighbor(0, 1) : 0;\n\n    const neighborsCount = leftNeighbor + rightNeighbor + topNeighbor + bottomNeighbor;\n\n    if (neighborsCount === 0) {\n      this._basicDot({ x, y, size, rotation: 0 });\n      return;\n    }\n\n    if (neighborsCount > 2 || (leftNeighbor && rightNeighbor) || (topNeighbor && bottomNeighbor)) {\n      this._basicSquare({ x, y, size, rotation: 0 });\n      return;\n    }\n\n    if (neighborsCount === 2) {\n      let rotation = 0;\n\n      if (leftNeighbor && topNeighbor) {\n        rotation = Math.PI / 2;\n      } else if (topNeighbor && rightNeighbor) {\n        rotation = Math.PI;\n      } else if (rightNeighbor && bottomNeighbor) {\n        rotation = -Math.PI / 2;\n      }\n\n      this._basicCornerExtraRounded({ x, y, size, rotation });\n      return;\n    }\n\n    if (neighborsCount === 1) {\n      let rotation = 0;\n\n      if (topNeighbor) {\n        rotation = Math.PI / 2;\n      } else if (rightNeighbor) {\n        rotation = Math.PI;\n      } else if (bottomNeighbor) {\n        rotation = -Math.PI / 2;\n      }\n\n      this._basicSideRounded({ x, y, size, rotation });\n      return;\n    }\n  }\n\n  _drawClassy({ x, y, size, getNeighbor }: DrawArgs): void {\n    const leftNeighbor = getNeighbor ? +getNeighbor(-1, 0) : 0;\n    const rightNeighbor = getNeighbor ? +getNeighbor(1, 0) : 0;\n    const topNeighbor = getNeighbor ? +getNeighbor(0, -1) : 0;\n    const bottomNeighbor = getNeighbor ? +getNeighbor(0, 1) : 0;\n\n    const neighborsCount = leftNeighbor + rightNeighbor + topNeighbor + bottomNeighbor;\n\n    if (neighborsCount === 0) {\n      this._basicCornersRounded({ x, y, size, rotation: Math.PI / 2 });\n      return;\n    }\n\n    if (!leftNeighbor && !topNeighbor) {\n      this._basicCornerRounded({ x, y, size, rotation: -Math.PI / 2 });\n      return;\n    }\n\n    if (!rightNeighbor && !bottomNeighbor) {\n      this._basicCornerRounded({ x, y, size, rotation: Math.PI / 2 });\n      return;\n    }\n\n    this._basicSquare({ x, y, size, rotation: 0 });\n  }\n\n  _drawClassyRounded({ x, y, size, getNeighbor }: DrawArgs): void {\n    const leftNeighbor = getNeighbor ? +getNeighbor(-1, 0) : 0;\n    const rightNeighbor = getNeighbor ? +getNeighbor(1, 0) : 0;\n    const topNeighbor = getNeighbor ? +getNeighbor(0, -1) : 0;\n    const bottomNeighbor = getNeighbor ? +getNeighbor(0, 1) : 0;\n\n    const neighborsCount = leftNeighbor + rightNeighbor + topNeighbor + bottomNeighbor;\n\n    if (neighborsCount === 0) {\n      this._basicCornersRounded({ x, y, size, rotation: Math.PI / 2 });\n      return;\n    }\n\n    if (!leftNeighbor && !topNeighbor) {\n      this._basicCornerExtraRounded({ x, y, size, rotation: -Math.PI / 2 });\n      return;\n    }\n\n    if (!rightNeighbor && !bottomNeighbor) {\n      this._basicCornerExtraRounded({ x, y, size, rotation: Math.PI / 2 });\n      return;\n    }\n\n    this._basicSquare({ x, y, size, rotation: 0 });\n  }\n}\n","import { DotTypes } from \"../types\";\n\nexport default {\n  dots: \"dots\",\n  rounded: \"rounded\",\n  classy: \"classy\",\n  classyRounded: \"classy-rounded\",\n  square: \"square\",\n  extraRounded: \"extra-rounded\"\n} as DotTypes;\n","import cornerSquareTypes from \"../../constants/cornerSquareTypes\";\nimport { CornerSquareType, DrawArgs, BasicFigureDrawArgs, RotateFigureArgs } from \"../../types\";\n\nexport default class QRCornerSquare {\n  _element?: SVGElement;\n  _svg: SVGElement;\n  _type: CornerSquareType;\n\n  constructor({ svg, type }: { svg: SVGElement; type: CornerSquareType }) {\n    this._svg = svg;\n    this._type = type;\n  }\n\n  draw(x: number, y: number, size: number, rotation: number): void {\n    const type = this._type;\n    let drawFunction;\n\n    switch (type) {\n      case cornerSquareTypes.square:\n        drawFunction = this._drawSquare;\n        break;\n      case cornerSquareTypes.extraRounded:\n        drawFunction = this._drawExtraRounded;\n        break;\n      case cornerSquareTypes.dot:\n      default:\n        drawFunction = this._drawDot;\n    }\n\n    drawFunction.call(this, { x, y, size, rotation });\n  }\n\n  _rotateFigure({ x, y, size, rotation = 0, draw }: RotateFigureArgs): void {\n    const cx = x + size / 2;\n    const cy = y + size / 2;\n\n    draw();\n    this._element?.setAttribute(\"transform\", `rotate(${(180 * rotation) / Math.PI},${cx},${cy})`);\n  }\n\n  _basicDot(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n    const dotSize = size / 7;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\"clip-rule\", \"evenodd\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x + size / 2} ${y}` + // M cx, y //  Move to top of ring\n            `a ${size / 2} ${size / 2} 0 1 0 0.1 0` + // a outerRadius, outerRadius, 0, 1, 0, 1, 0 // Draw outer arc, but don't close it\n            `z` + // Z // Close the outer shape\n            `m 0 ${dotSize}` + // m -1 outerRadius-innerRadius // Move to top point of inner radius\n            `a ${size / 2 - dotSize} ${size / 2 - dotSize} 0 1 1 -0.1 0` + // a innerRadius, innerRadius, 0, 1, 1, -1, 0 // Draw inner arc, but don't close it\n            `Z` // Z // Close the inner ring. Actually will still work without, but inner ring will have one unit missing in stroke\n        );\n      }\n    });\n  }\n\n  _basicSquare(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n    const dotSize = size / 7;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\"clip-rule\", \"evenodd\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y}` +\n            `v ${size}` +\n            `h ${size}` +\n            `v ${-size}` +\n            `z` +\n            `M ${x + dotSize} ${y + dotSize}` +\n            `h ${size - 2 * dotSize}` +\n            `v ${size - 2 * dotSize}` +\n            `h ${-size + 2 * dotSize}` +\n            `z`\n        );\n      }\n    });\n  }\n\n  _basicExtraRounded(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n    const dotSize = size / 7;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n        this._element.setAttribute(\"clip-rule\", \"evenodd\");\n        this._element.setAttribute(\n          \"d\",\n          `M ${x} ${y + 2.5 * dotSize}` +\n            `v ${2 * dotSize}` +\n            `a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${dotSize * 2.5} ${dotSize * 2.5}` +\n            `h ${2 * dotSize}` +\n            `a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${dotSize * 2.5} ${-dotSize * 2.5}` +\n            `v ${-2 * dotSize}` +\n            `a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${-dotSize * 2.5} ${-dotSize * 2.5}` +\n            `h ${-2 * dotSize}` +\n            `a ${2.5 * dotSize} ${2.5 * dotSize}, 0, 0, 0, ${-dotSize * 2.5} ${dotSize * 2.5}` +\n            `M ${x + 2.5 * dotSize} ${y + dotSize}` +\n            `h ${2 * dotSize}` +\n            `a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${dotSize * 1.5} ${dotSize * 1.5}` +\n            `v ${2 * dotSize}` +\n            `a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${-dotSize * 1.5} ${dotSize * 1.5}` +\n            `h ${-2 * dotSize}` +\n            `a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${-dotSize * 1.5} ${-dotSize * 1.5}` +\n            `v ${-2 * dotSize}` +\n            `a ${1.5 * dotSize} ${1.5 * dotSize}, 0, 0, 1, ${dotSize * 1.5} ${-dotSize * 1.5}`\n        );\n      }\n    });\n  }\n\n  _drawDot({ x, y, size, rotation }: DrawArgs): void {\n    this._basicDot({ x, y, size, rotation });\n  }\n\n  _drawSquare({ x, y, size, rotation }: DrawArgs): void {\n    this._basicSquare({ x, y, size, rotation });\n  }\n\n  _drawExtraRounded({ x, y, size, rotation }: DrawArgs): void {\n    this._basicExtraRounded({ x, y, size, rotation });\n  }\n}\n","import { CornerSquareTypes } from \"../types\";\n\nexport default {\n  dot: \"dot\",\n  square: \"square\",\n  extraRounded: \"extra-rounded\"\n} as CornerSquareTypes;\n","import cornerDotTypes from \"../../constants/cornerDotTypes\";\nimport { CornerDotType, RotateFigureArgs, BasicFigureDrawArgs, DrawArgs } from \"../../types\";\n\nexport default class QRCornerDot {\n  _element?: SVGElement;\n  _svg: SVGElement;\n  _type: CornerDotType;\n\n  constructor({ svg, type }: { svg: SVGElement; type: CornerDotType }) {\n    this._svg = svg;\n    this._type = type;\n  }\n\n  draw(x: number, y: number, size: number, rotation: number): void {\n    const type = this._type;\n    let drawFunction;\n\n    switch (type) {\n      case cornerDotTypes.square:\n        drawFunction = this._drawSquare;\n        break;\n      case cornerDotTypes.dot:\n      default:\n        drawFunction = this._drawDot;\n    }\n\n    drawFunction.call(this, { x, y, size, rotation });\n  }\n\n  _rotateFigure({ x, y, size, rotation = 0, draw }: RotateFigureArgs): void {\n    const cx = x + size / 2;\n    const cy = y + size / 2;\n\n    draw();\n    this._element?.setAttribute(\"transform\", `rotate(${(180 * rotation) / Math.PI},${cx},${cy})`);\n  }\n\n  _basicDot(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"circle\");\n        this._element.setAttribute(\"cx\", String(x + size / 2));\n        this._element.setAttribute(\"cy\", String(y + size / 2));\n        this._element.setAttribute(\"r\", String(size / 2));\n      }\n    });\n  }\n\n  _basicSquare(args: BasicFigureDrawArgs): void {\n    const { size, x, y } = args;\n\n    this._rotateFigure({\n      ...args,\n      draw: () => {\n        this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n        this._element.setAttribute(\"x\", String(x));\n        this._element.setAttribute(\"y\", String(y));\n        this._element.setAttribute(\"width\", String(size));\n        this._element.setAttribute(\"height\", String(size));\n      }\n    });\n  }\n\n  _drawDot({ x, y, size, rotation }: DrawArgs): void {\n    this._basicDot({ x, y, size, rotation });\n  }\n\n  _drawSquare({ x, y, size, rotation }: DrawArgs): void {\n    this._basicSquare({ x, y, size, rotation });\n  }\n}\n","import { CornerDotTypes } from \"../types\";\n\nexport default {\n  dot: \"dot\",\n  square: \"square\"\n} as CornerDotTypes;\n","import { ShapeTypes } from \"../types\";\n\nexport default {\n  square: \"square\",\n  circle: \"circle\"\n} as ShapeTypes;\n","import calculateImageSize from \"../tools/calculateImageSize\";\nimport toDataUrl from \"../tools/toDataUrl\";\nimport errorCorrectionPercents from \"../constants/errorCorrectionPercents\";\nimport QRDot from \"../figures/dot/QRDot\";\nimport QRCornerSquare from \"../figures/cornerSquare/QRCornerSquare\";\nimport QRCornerDot from \"../figures/cornerDot/QRCornerDot\";\nimport { RequiredOptions } from \"./QROptions\";\nimport gradientTypes from \"../constants/gradientTypes\";\nimport shapeTypes from \"../constants/shapeTypes\";\nimport { QRCode, FilterFunction, Gradient } from \"../types\";\n\nconst squareMask = [\n  [1, 1, 1, 1, 1, 1, 1],\n  [1, 0, 0, 0, 0, 0, 1],\n  [1, 0, 0, 0, 0, 0, 1],\n  [1, 0, 0, 0, 0, 0, 1],\n  [1, 0, 0, 0, 0, 0, 1],\n  [1, 0, 0, 0, 0, 0, 1],\n  [1, 1, 1, 1, 1, 1, 1]\n];\n\nconst dotMask = [\n  [0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 1, 1, 1, 0, 0],\n  [0, 0, 1, 1, 1, 0, 0],\n  [0, 0, 1, 1, 1, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0],\n  [0, 0, 0, 0, 0, 0, 0]\n];\n\nexport default class QRSVG {\n  _element: SVGElement;\n  _defs: SVGElement;\n  _backgroundClipPath?: SVGElement;\n  _dotsClipPath?: SVGElement;\n  _cornersSquareClipPath?: SVGElement;\n  _cornersDotClipPath?: SVGElement;\n  _options: RequiredOptions;\n  _qr?: QRCode;\n  _image?: HTMLImageElement;\n\n  //TODO don't pass all options to this class\n  constructor(options: RequiredOptions) {\n    this._element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\");\n    this._element.setAttribute(\"width\", String(options.width));\n    this._element.setAttribute(\"height\", String(options.height));\n    this._defs = document.createElementNS(\"http://www.w3.org/2000/svg\", \"defs\");\n    this._element.appendChild(this._defs);\n\n    this._options = options;\n  }\n\n  get width(): number {\n    return this._options.width;\n  }\n\n  get height(): number {\n    return this._options.height;\n  }\n\n  getElement(): SVGElement {\n    return this._element;\n  }\n\n  async drawQR(qr: QRCode): Promise<void> {\n    const count = qr.getModuleCount();\n    const minSize = Math.min(this._options.width, this._options.height) - this._options.margin * 2;\n    const realQRSize = this._options.shape === shapeTypes.circle ? minSize / Math.sqrt(2) : minSize;\n    const dotSize = Math.floor(realQRSize / count);\n    let drawImageSize = {\n      hideXDots: 0,\n      hideYDots: 0,\n      width: 0,\n      height: 0\n    };\n\n    this._qr = qr;\n\n    if (this._options.image) {\n      //We need it to get image size\n      await this.loadImage();\n      if (!this._image) return;\n      const { imageOptions, qrOptions } = this._options;\n      const coverLevel = imageOptions.imageSize * errorCorrectionPercents[qrOptions.errorCorrectionLevel];\n      const maxHiddenDots = Math.floor(coverLevel * count * count);\n\n      drawImageSize = calculateImageSize({\n        originalWidth: this._image.width,\n        originalHeight: this._image.height,\n        maxHiddenDots,\n        maxHiddenAxisDots: count - 14,\n        dotSize\n      });\n    }\n\n    this.drawBackground();\n    this.drawDots((i: number, j: number): boolean => {\n      if (this._options.imageOptions.hideBackgroundDots) {\n        if (\n          i >= (count - drawImageSize.hideXDots) / 2 &&\n          i < (count + drawImageSize.hideXDots) / 2 &&\n          j >= (count - drawImageSize.hideYDots) / 2 &&\n          j < (count + drawImageSize.hideYDots) / 2\n        ) {\n          return false;\n        }\n      }\n\n      if (squareMask[i]?.[j] || squareMask[i - count + 7]?.[j] || squareMask[i]?.[j - count + 7]) {\n        return false;\n      }\n\n      if (dotMask[i]?.[j] || dotMask[i - count + 7]?.[j] || dotMask[i]?.[j - count + 7]) {\n        return false;\n      }\n\n      return true;\n    });\n    this.drawCorners();\n\n    if (this._options.image) {\n      await this.drawImage({ width: drawImageSize.width, height: drawImageSize.height, count, dotSize });\n    }\n  }\n\n  drawBackground(): void {\n    const element = this._element;\n    const options = this._options;\n\n    if (element) {\n      const gradientOptions = options.backgroundOptions?.gradient;\n      const color = options.backgroundOptions?.color;\n\n      if (gradientOptions || color) {\n        this._createColor({\n          options: gradientOptions,\n          color: color,\n          additionalRotation: 0,\n          x: 0,\n          y: 0,\n          height: options.height,\n          width: options.width,\n          name: \"background-color\"\n        });\n      }\n\n      if (options.backgroundOptions?.round) {\n        const size = Math.min(options.width, options.height);\n        const element = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n        this._backgroundClipPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"clipPath\");\n        this._backgroundClipPath.setAttribute(\"id\", \"clip-path-background-color\");\n        this._defs.appendChild(this._backgroundClipPath);\n\n        element.setAttribute(\"x\", String((options.width - size) / 2));\n        element.setAttribute(\"y\", String((options.height - size) / 2));\n        element.setAttribute(\"width\", String(size));\n        element.setAttribute(\"height\", String(size));\n        element.setAttribute(\"rx\", String((size / 2) * options.backgroundOptions.round));\n\n        this._backgroundClipPath.appendChild(element);\n      }\n    }\n  }\n\n  drawDots(filter?: FilterFunction): void {\n    if (!this._qr) {\n      throw \"QR code is not defined\";\n    }\n\n    const options = this._options;\n    const count = this._qr.getModuleCount();\n\n    if (count > options.width || count > options.height) {\n      throw \"The canvas is too small.\";\n    }\n\n    const minSize = Math.min(options.width, options.height) - options.margin * 2;\n    const realQRSize = options.shape === shapeTypes.circle ? minSize / Math.sqrt(2) : minSize;\n    const dotSize = Math.floor(realQRSize / count);\n    const xBeginning = Math.floor((options.width - count * dotSize) / 2);\n    const yBeginning = Math.floor((options.height - count * dotSize) / 2);\n    const dot = new QRDot({ svg: this._element, type: options.dotsOptions.type });\n\n    this._dotsClipPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"clipPath\");\n    this._dotsClipPath.setAttribute(\"id\", \"clip-path-dot-color\");\n    this._defs.appendChild(this._dotsClipPath);\n\n    this._createColor({\n      options: options.dotsOptions?.gradient,\n      color: options.dotsOptions.color,\n      additionalRotation: 0,\n      x: 0,\n      y: 0,\n      height: options.height,\n      width: options.width,\n      name: \"dot-color\"\n    });\n\n    for (let i = 0; i < count; i++) {\n      for (let j = 0; j < count; j++) {\n        if (filter && !filter(i, j)) {\n          continue;\n        }\n        if (!this._qr?.isDark(i, j)) {\n          continue;\n        }\n\n        dot.draw(\n          xBeginning + i * dotSize,\n          yBeginning + j * dotSize,\n          dotSize,\n          (xOffset: number, yOffset: number): boolean => {\n            if (i + xOffset < 0 || j + yOffset < 0 || i + xOffset >= count || j + yOffset >= count) return false;\n            if (filter && !filter(i + xOffset, j + yOffset)) return false;\n            return !!this._qr && this._qr.isDark(i + xOffset, j + yOffset);\n          }\n        );\n\n        if (dot._element && this._dotsClipPath) {\n          this._dotsClipPath.appendChild(dot._element);\n        }\n      }\n    }\n\n    if (options.shape === shapeTypes.circle) {\n      const additionalDots = Math.floor((minSize / dotSize - count) / 2);\n      const fakeCount = count + additionalDots * 2;\n      const xFakeBeginning = xBeginning - additionalDots * dotSize;\n      const yFakeBeginning = yBeginning - additionalDots * dotSize;\n      const fakeMatrix: number[][] = [];\n      const center = Math.floor(fakeCount / 2);\n\n      for (let i = 0; i < fakeCount; i++) {\n        fakeMatrix[i] = [];\n        for (let j = 0; j < fakeCount; j++) {\n          if (\n            i >= additionalDots - 1 &&\n            i <= fakeCount - additionalDots &&\n            j >= additionalDots - 1 &&\n            j <= fakeCount - additionalDots\n          ) {\n            fakeMatrix[i][j] = 0;\n            continue;\n          }\n\n          if (Math.sqrt((i - center) * (i - center) + (j - center) * (j - center)) > center) {\n            fakeMatrix[i][j] = 0;\n            continue;\n          }\n\n          //Get random dots from QR code to show it outside of QR code\n          fakeMatrix[i][j] = this._qr.isDark(\n            j - 2 * additionalDots < 0 ? j : j >= count ? j - 2 * additionalDots : j - additionalDots,\n            i - 2 * additionalDots < 0 ? i : i >= count ? i - 2 * additionalDots : i - additionalDots\n          )\n            ? 1\n            : 0;\n        }\n      }\n\n      for (let i = 0; i < fakeCount; i++) {\n        for (let j = 0; j < fakeCount; j++) {\n          if (!fakeMatrix[i][j]) continue;\n\n          dot.draw(\n            xFakeBeginning + i * dotSize,\n            yFakeBeginning + j * dotSize,\n            dotSize,\n            (xOffset: number, yOffset: number): boolean => {\n              return !!fakeMatrix[i + xOffset]?.[j + yOffset];\n            }\n          );\n          if (dot._element && this._dotsClipPath) {\n            this._dotsClipPath.appendChild(dot._element);\n          }\n        }\n      }\n    }\n  }\n\n  drawCorners(): void {\n    if (!this._qr) {\n      throw \"QR code is not defined\";\n    }\n\n    const element = this._element;\n    const options = this._options;\n\n    if (!element) {\n      throw \"Element code is not defined\";\n    }\n\n    const count = this._qr.getModuleCount();\n    const minSize = Math.min(options.width, options.height) - options.margin * 2;\n    const realQRSize = options.shape === shapeTypes.circle ? minSize / Math.sqrt(2) : minSize;\n    const dotSize = Math.floor(realQRSize / count);\n    const cornersSquareSize = dotSize * 7;\n    const cornersDotSize = dotSize * 3;\n    const xBeginning = Math.floor((options.width - count * dotSize) / 2);\n    const yBeginning = Math.floor((options.height - count * dotSize) / 2);\n\n    [\n      [0, 0, 0],\n      [1, 0, Math.PI / 2],\n      [0, 1, -Math.PI / 2]\n    ].forEach(([column, row, rotation]) => {\n      const x = xBeginning + column * dotSize * (count - 7);\n      const y = yBeginning + row * dotSize * (count - 7);\n      let cornersSquareClipPath = this._dotsClipPath;\n      let cornersDotClipPath = this._dotsClipPath;\n\n      if (options.cornersSquareOptions?.gradient || options.cornersSquareOptions?.color) {\n        cornersSquareClipPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"clipPath\");\n        cornersSquareClipPath.setAttribute(\"id\", `clip-path-corners-square-color-${column}-${row}`);\n        this._defs.appendChild(cornersSquareClipPath);\n        this._cornersSquareClipPath = this._cornersDotClipPath = cornersDotClipPath = cornersSquareClipPath;\n\n        this._createColor({\n          options: options.cornersSquareOptions?.gradient,\n          color: options.cornersSquareOptions?.color,\n          additionalRotation: rotation,\n          x,\n          y,\n          height: cornersSquareSize,\n          width: cornersSquareSize,\n          name: `corners-square-color-${column}-${row}`\n        });\n      }\n\n      if (options.cornersSquareOptions?.type) {\n        const cornersSquare = new QRCornerSquare({ svg: this._element, type: options.cornersSquareOptions.type });\n\n        cornersSquare.draw(x, y, cornersSquareSize, rotation);\n\n        if (cornersSquare._element && cornersSquareClipPath) {\n          cornersSquareClipPath.appendChild(cornersSquare._element);\n        }\n      } else {\n        const dot = new QRDot({ svg: this._element, type: options.dotsOptions.type });\n\n        for (let i = 0; i < squareMask.length; i++) {\n          for (let j = 0; j < squareMask[i].length; j++) {\n            if (!squareMask[i]?.[j]) {\n              continue;\n            }\n\n            dot.draw(\n              x + i * dotSize,\n              y + j * dotSize,\n              dotSize,\n              (xOffset: number, yOffset: number): boolean => !!squareMask[i + xOffset]?.[j + yOffset]\n            );\n\n            if (dot._element && cornersSquareClipPath) {\n              cornersSquareClipPath.appendChild(dot._element);\n            }\n          }\n        }\n      }\n\n      if (options.cornersDotOptions?.gradient || options.cornersDotOptions?.color) {\n        cornersDotClipPath = document.createElementNS(\"http://www.w3.org/2000/svg\", \"clipPath\");\n        cornersDotClipPath.setAttribute(\"id\", `clip-path-corners-dot-color-${column}-${row}`);\n        this._defs.appendChild(cornersDotClipPath);\n        this._cornersDotClipPath = cornersDotClipPath;\n\n        this._createColor({\n          options: options.cornersDotOptions?.gradient,\n          color: options.cornersDotOptions?.color,\n          additionalRotation: rotation,\n          x: x + dotSize * 2,\n          y: y + dotSize * 2,\n          height: cornersDotSize,\n          width: cornersDotSize,\n          name: `corners-dot-color-${column}-${row}`\n        });\n      }\n\n      if (options.cornersDotOptions?.type) {\n        const cornersDot = new QRCornerDot({ svg: this._element, type: options.cornersDotOptions.type });\n\n        cornersDot.draw(x + dotSize * 2, y + dotSize * 2, cornersDotSize, rotation);\n\n        if (cornersDot._element && cornersDotClipPath) {\n          cornersDotClipPath.appendChild(cornersDot._element);\n        }\n      } else {\n        const dot = new QRDot({ svg: this._element, type: options.dotsOptions.type });\n\n        for (let i = 0; i < dotMask.length; i++) {\n          for (let j = 0; j < dotMask[i].length; j++) {\n            if (!dotMask[i]?.[j]) {\n              continue;\n            }\n\n            dot.draw(\n              x + i * dotSize,\n              y + j * dotSize,\n              dotSize,\n              (xOffset: number, yOffset: number): boolean => !!dotMask[i + xOffset]?.[j + yOffset]\n            );\n\n            if (dot._element && cornersDotClipPath) {\n              cornersDotClipPath.appendChild(dot._element);\n            }\n          }\n        }\n      }\n    });\n  }\n\n  loadImage(): Promise<void> {\n    return new Promise((resolve, reject) => {\n      const options = this._options;\n      const image = new Image();\n\n      if (!options.image) {\n        return reject(\"Image is not defined\");\n      }\n\n      if (typeof options.imageOptions.crossOrigin === \"string\") {\n        image.crossOrigin = options.imageOptions.crossOrigin;\n      }\n\n      this._image = image;\n      image.onload = (): void => {\n        resolve();\n      };\n      image.src = options.image;\n    });\n  }\n\n  async drawImage({\n    width,\n    height,\n    count,\n    dotSize\n  }: {\n    width: number;\n    height: number;\n    count: number;\n    dotSize: number;\n  }): Promise<void> {\n    const options = this._options;\n    const xBeginning = Math.floor((options.width - count * dotSize) / 2);\n    const yBeginning = Math.floor((options.height - count * dotSize) / 2);\n    const dx = xBeginning + options.imageOptions.margin + (count * dotSize - width) / 2;\n    const dy = yBeginning + options.imageOptions.margin + (count * dotSize - height) / 2;\n    const dw = width - options.imageOptions.margin * 2;\n    const dh = height - options.imageOptions.margin * 2;\n\n    const image = document.createElementNS(\"http://www.w3.org/2000/svg\", \"image\");\n    image.setAttribute(\"x\", String(dx));\n    image.setAttribute(\"y\", String(dy));\n    image.setAttribute(\"width\", `${dw}px`);\n    image.setAttribute(\"height\", `${dh}px`);\n\n    const imageUrl = await toDataUrl(options.image || \"\");\n\n    image.setAttribute(\"href\", imageUrl || \"\");\n\n    this._element.appendChild(image);\n  }\n\n  _createColor({\n    options,\n    color,\n    additionalRotation,\n    x,\n    y,\n    height,\n    width,\n    name\n  }: {\n    options?: Gradient;\n    color?: string;\n    additionalRotation: number;\n    x: number;\n    y: number;\n    height: number;\n    width: number;\n    name: string;\n  }): void {\n    const size = width > height ? width : height;\n    const rect = document.createElementNS(\"http://www.w3.org/2000/svg\", \"rect\");\n    rect.setAttribute(\"x\", String(x));\n    rect.setAttribute(\"y\", String(y));\n    rect.setAttribute(\"height\", String(height));\n    rect.setAttribute(\"width\", String(width));\n    rect.setAttribute(\"clip-path\", `url('#clip-path-${name}')`);\n\n    if (options) {\n      let gradient: SVGElement;\n      if (options.type === gradientTypes.radial) {\n        gradient = document.createElementNS(\"http://www.w3.org/2000/svg\", \"radialGradient\");\n        gradient.setAttribute(\"id\", name);\n        gradient.setAttribute(\"gradientUnits\", \"userSpaceOnUse\");\n        gradient.setAttribute(\"fx\", String(x + width / 2));\n        gradient.setAttribute(\"fy\", String(y + height / 2));\n        gradient.setAttribute(\"cx\", String(x + width / 2));\n        gradient.setAttribute(\"cy\", String(y + height / 2));\n        gradient.setAttribute(\"r\", String(size / 2));\n      } else {\n        const rotation = ((options.rotation || 0) + additionalRotation) % (2 * Math.PI);\n        const positiveRotation = (rotation + 2 * Math.PI) % (2 * Math.PI);\n        let x0 = x + width / 2;\n        let y0 = y + height / 2;\n        let x1 = x + width / 2;\n        let y1 = y + height / 2;\n\n        if (\n          (positiveRotation >= 0 && positiveRotation <= 0.25 * Math.PI) ||\n          (positiveRotation > 1.75 * Math.PI && positiveRotation <= 2 * Math.PI)\n        ) {\n          x0 = x0 - width / 2;\n          y0 = y0 - (height / 2) * Math.tan(rotation);\n          x1 = x1 + width / 2;\n          y1 = y1 + (height / 2) * Math.tan(rotation);\n        } else if (positiveRotation > 0.25 * Math.PI && positiveRotation <= 0.75 * Math.PI) {\n          y0 = y0 - height / 2;\n          x0 = x0 - width / 2 / Math.tan(rotation);\n          y1 = y1 + height / 2;\n          x1 = x1 + width / 2 / Math.tan(rotation);\n        } else if (positiveRotation > 0.75 * Math.PI && positiveRotation <= 1.25 * Math.PI) {\n          x0 = x0 + width / 2;\n          y0 = y0 + (height / 2) * Math.tan(rotation);\n          x1 = x1 - width / 2;\n          y1 = y1 - (height / 2) * Math.tan(rotation);\n        } else if (positiveRotation > 1.25 * Math.PI && positiveRotation <= 1.75 * Math.PI) {\n          y0 = y0 + height / 2;\n          x0 = x0 + width / 2 / Math.tan(rotation);\n          y1 = y1 - height / 2;\n          x1 = x1 - width / 2 / Math.tan(rotation);\n        }\n\n        gradient = document.createElementNS(\"http://www.w3.org/2000/svg\", \"linearGradient\");\n        gradient.setAttribute(\"id\", name);\n        gradient.setAttribute(\"gradientUnits\", \"userSpaceOnUse\");\n        gradient.setAttribute(\"x1\", String(Math.round(x0)));\n        gradient.setAttribute(\"y1\", String(Math.round(y0)));\n        gradient.setAttribute(\"x2\", String(Math.round(x1)));\n        gradient.setAttribute(\"y2\", String(Math.round(y1)));\n      }\n\n      options.colorStops.forEach(({ offset, color }: { offset: number; color: string }) => {\n        const stop = document.createElementNS(\"http://www.w3.org/2000/svg\", \"stop\");\n        stop.setAttribute(\"offset\", `${100 * offset}%`);\n        stop.setAttribute(\"stop-color\", color);\n        gradient.appendChild(stop);\n      });\n\n      rect.setAttribute(\"fill\", `url('#${name}')`);\n      this._defs.appendChild(gradient);\n    } else if (color) {\n      rect.setAttribute(\"fill\", color);\n    }\n\n    this._element.appendChild(rect);\n  }\n}\n","interface ImageSizeOptions {\n  originalHeight: number;\n  originalWidth: number;\n  maxHiddenDots: number;\n  maxHiddenAxisDots?: number;\n  dotSize: number;\n}\n\ninterface ImageSizeResult {\n  height: number;\n  width: number;\n  hideYDots: number;\n  hideXDots: number;\n}\n\nexport default function calculateImageSize({\n  originalHeight,\n  originalWidth,\n  maxHiddenDots,\n  maxHiddenAxisDots,\n  dotSize\n}: ImageSizeOptions): ImageSizeResult {\n  const hideDots = { x: 0, y: 0 };\n  const imageSize = { x: 0, y: 0 };\n\n  if (originalHeight <= 0 || originalWidth <= 0 || maxHiddenDots <= 0 || dotSize <= 0) {\n    return {\n      height: 0,\n      width: 0,\n      hideYDots: 0,\n      hideXDots: 0\n    };\n  }\n\n  const k = originalHeight / originalWidth;\n\n  //Getting the maximum possible axis hidden dots\n  hideDots.x = Math.floor(Math.sqrt(maxHiddenDots / k));\n  //The count of hidden dot's can't be less than 1\n  if (hideDots.x <= 0) hideDots.x = 1;\n  //Check the limit of the maximum allowed axis hidden dots\n  if (maxHiddenAxisDots && maxHiddenAxisDots < hideDots.x) hideDots.x = maxHiddenAxisDots;\n  //The count of dots should be odd\n  if (hideDots.x % 2 === 0) hideDots.x--;\n  imageSize.x = hideDots.x * dotSize;\n  //Calculate opposite axis hidden dots based on axis value.\n  //The value will be odd.\n  //We use ceil to prevent dots covering by the image.\n  hideDots.y = 1 + 2 * Math.ceil((hideDots.x * k - 1) / 2);\n  imageSize.y = Math.round(imageSize.x * k);\n  //If the result dots count is bigger than max - then decrease size and calculate again\n  if (hideDots.y * hideDots.x > maxHiddenDots || (maxHiddenAxisDots && maxHiddenAxisDots < hideDots.y)) {\n    if (maxHiddenAxisDots && maxHiddenAxisDots < hideDots.y) {\n      hideDots.y = maxHiddenAxisDots;\n      if (hideDots.y % 2 === 0) hideDots.x--;\n    } else {\n      hideDots.y -= 2;\n    }\n    imageSize.y = hideDots.y * dotSize;\n    hideDots.x = 1 + 2 * Math.ceil((hideDots.y / k - 1) / 2);\n    imageSize.x = Math.round(imageSize.y / k);\n  }\n\n  return {\n    height: imageSize.y,\n    width: imageSize.x,\n    hideYDots: hideDots.y,\n    hideXDots: hideDots.x\n  };\n}\n","import { GradientTypes } from \"../types\";\n\nexport default {\n  radial: \"radial\",\n  linear: \"linear\"\n} as GradientTypes;\n","import { DrawTypes } from \"../types\";\n\nexport default {\n  canvas: \"canvas\",\n  svg: \"svg\"\n} as DrawTypes;\n","import qrTypes from \"../constants/qrTypes\";\nimport drawTypes from \"../constants/drawTypes\";\nimport shapeTypes from \"../constants/shapeTypes\";\nimport errorCorrectionLevels from \"../constants/errorCorrectionLevels\";\nimport { ShapeType, DotType, Options, TypeNumber, ErrorCorrectionLevel, Mode, DrawType, Gradient } from \"../types\";\n\nexport interface RequiredOptions extends Options {\n  type: DrawType;\n  shape: ShapeType;\n  width: number;\n  height: number;\n  margin: number;\n  data: string;\n  qrOptions: {\n    typeNumber: TypeNumber;\n    mode?: Mode;\n    errorCorrectionLevel: ErrorCorrectionLevel;\n  };\n  imageOptions: {\n    hideBackgroundDots: boolean;\n    imageSize: number;\n    crossOrigin?: string;\n    margin: number;\n  };\n  dotsOptions: {\n    type: DotType;\n    color: string;\n    gradient?: Gradient;\n  };\n  backgroundOptions: {\n    round: number;\n    color: string;\n    gradient?: Gradient;\n  };\n}\n\nconst defaultOptions: RequiredOptions = {\n  type: drawTypes.canvas,\n  shape: shapeTypes.square,\n  width: 300,\n  height: 300,\n  data: \"\",\n  margin: 0,\n  qrOptions: {\n    typeNumber: qrTypes[0],\n    mode: undefined,\n    errorCorrectionLevel: errorCorrectionLevels.Q\n  },\n  imageOptions: {\n    hideBackgroundDots: true,\n    imageSize: 0.4,\n    crossOrigin: undefined,\n    margin: 0\n  },\n  dotsOptions: {\n    type: \"square\",\n    color: \"#000\"\n  },\n  backgroundOptions: {\n    round: 0,\n    color: \"#fff\"\n  }\n};\n\nexport default defaultOptions;\n","import { ErrorCorrectionLevel } from \"../types\";\n\ninterface ErrorCorrectionLevels {\n  [key: string]: ErrorCorrectionLevel;\n}\n\nexport default {\n  L: \"L\",\n  M: \"M\",\n  Q: \"Q\",\n  H: \"H\"\n} as ErrorCorrectionLevels;\n","import { RequiredOptions } from \"../core/QROptions\";\nimport { Gradient } from \"../types\";\n\nfunction sanitizeGradient(gradient: Gradient): Gradient {\n  const newGradient = { ...gradient };\n\n  if (!newGradient.colorStops || !newGradient.colorStops.length) {\n    throw \"Field 'colorStops' is required in gradient\";\n  }\n\n  if (newGradient.rotation) {\n    newGradient.rotation = Number(newGradient.rotation);\n  } else {\n    newGradient.rotation = 0;\n  }\n\n  newGradient.colorStops = newGradient.colorStops.map((colorStop: { offset: number; color: string }) => ({\n    ...colorStop,\n    offset: Number(colorStop.offset)\n  }));\n\n  return newGradient;\n}\n\nexport default function sanitizeOptions(options: RequiredOptions): RequiredOptions {\n  const newOptions = { ...options };\n\n  newOptions.width = Number(newOptions.width);\n  newOptions.height = Number(newOptions.height);\n  newOptions.margin = Number(newOptions.margin);\n  newOptions.imageOptions = {\n    ...newOptions.imageOptions,\n    hideBackgroundDots: Boolean(newOptions.imageOptions.hideBackgroundDots),\n    imageSize: Number(newOptions.imageOptions.imageSize),\n    margin: Number(newOptions.imageOptions.margin)\n  };\n\n  if (newOptions.margin > Math.min(newOptions.width, newOptions.height)) {\n    newOptions.margin = Math.min(newOptions.width, newOptions.height);\n  }\n\n  newOptions.dotsOptions = {\n    ...newOptions.dotsOptions\n  };\n  if (newOptions.dotsOptions.gradient) {\n    newOptions.dotsOptions.gradient = sanitizeGradient(newOptions.dotsOptions.gradient);\n  }\n\n  if (newOptions.cornersSquareOptions) {\n    newOptions.cornersSquareOptions = {\n      ...newOptions.cornersSquareOptions\n    };\n    if (newOptions.cornersSquareOptions.gradient) {\n      newOptions.cornersSquareOptions.gradient = sanitizeGradient(newOptions.cornersSquareOptions.gradient);\n    }\n  }\n\n  if (newOptions.cornersDotOptions) {\n    newOptions.cornersDotOptions = {\n      ...newOptions.cornersDotOptions\n    };\n    if (newOptions.cornersDotOptions.gradient) {\n      newOptions.cornersDotOptions.gradient = sanitizeGradient(newOptions.cornersDotOptions.gradient);\n    }\n  }\n\n  if (newOptions.backgroundOptions) {\n    newOptions.backgroundOptions = {\n      ...newOptions.backgroundOptions\n    };\n    if (newOptions.backgroundOptions.gradient) {\n      newOptions.backgroundOptions.gradient = sanitizeGradient(newOptions.backgroundOptions.gradient);\n    }\n  }\n\n  return newOptions;\n}\n","import QRCodeStyling from \"./core/QRCodeStyling\";\nimport dotTypes from \"./constants/dotTypes\";\nimport cornerDotTypes from \"./constants/cornerDotTypes\";\nimport cornerSquareTypes from \"./constants/cornerSquareTypes\";\nimport errorCorrectionLevels from \"./constants/errorCorrectionLevels\";\nimport errorCorrectionPercents from \"./constants/errorCorrectionPercents\";\nimport modes from \"./constants/modes\";\nimport qrTypes from \"./constants/qrTypes\";\nimport drawTypes from \"./constants/drawTypes\";\nimport shapeTypes from \"./constants/shapeTypes\";\nimport gradientTypes from \"./constants/gradientTypes\";\n\nexport * from \"./types\";\n\nexport {\n  dotTypes,\n  cornerDotTypes,\n  cornerSquareTypes,\n  errorCorrectionLevels,\n  errorCorrectionPercents,\n  modes,\n  qrTypes,\n  drawTypes,\n  shapeTypes,\n  gradientTypes\n};\n\nexport default QRCodeStyling;\n","import getMode from \"../tools/getMode\";\nimport mergeDeep from \"../tools/merge\";\nimport downloadURI from \"../tools/downloadURI\";\nimport QRSVG from \"./QRSVG\";\nimport drawTypes from \"../constants/drawTypes\";\n\nimport defaultOptions, { RequiredOptions } from \"./QROptions\";\nimport sanitizeOptions from \"../tools/sanitizeOptions\";\nimport { FileExtension, QRCode, Options, DownloadOptions, ExtensionFunction } from \"../types\";\nimport qrcode from \"qrcode-generator\";\n\nexport default class QRCodeStyling {\n  _options: RequiredOptions;\n  _container?: HTMLElement;\n  _canvas?: HTMLCanvasElement;\n  _svg?: SVGElement;\n  _qr?: QRCode;\n  _extension?: ExtensionFunction;\n  _canvasDrawingPromise?: Promise<void>;\n  _svgDrawingPromise?: Promise<void>;\n\n  constructor(options?: Partial<Options>) {\n    this._options = options ? sanitizeOptions(mergeDeep(defaultOptions, options) as RequiredOptions) : defaultOptions;\n    this.update();\n  }\n\n  static _clearContainer(container?: HTMLElement): void {\n    if (container) {\n      container.innerHTML = \"\";\n    }\n  }\n\n  _setupSvg(): void {\n    if (!this._qr) {\n      return;\n    }\n    const qrSVG = new QRSVG(this._options);\n\n    this._svg = qrSVG.getElement();\n    this._svgDrawingPromise = qrSVG.drawQR(this._qr).then(() => {\n      if (!this._svg) return;\n      this._extension?.(qrSVG.getElement(), this._options);\n    });\n  }\n\n  _setupCanvas(): void {\n    if (!this._qr) {\n      return;\n    }\n\n    this._canvas = document.createElement(\"canvas\");\n    this._canvas.width = this._options.width;\n    this._canvas.height = this._options.height;\n\n    this._setupSvg();\n    this._canvasDrawingPromise = this._svgDrawingPromise?.then(() => {\n      if (!this._svg) return;\n\n      const svg = this._svg;\n      const xml = new XMLSerializer().serializeToString(svg);\n      const svg64 = btoa(xml);\n      const image64 = \"data:image/svg+xml;base64,\" + svg64;\n      const image = new Image();\n\n      return new Promise((resolve) => {\n        image.onload = (): void => {\n          this._canvas?.getContext(\"2d\")?.drawImage(image, 0, 0);\n          resolve();\n        };\n\n        image.src = image64;\n      });\n    });\n  }\n\n  async _getElement(extension: FileExtension = \"png\"): Promise<SVGElement | HTMLCanvasElement | undefined> {\n    if (!this._qr) throw \"QR code is empty\";\n\n    if (extension.toLowerCase() === \"svg\") {\n      if (!this._svg || !this._svgDrawingPromise) {\n        this._setupSvg();\n      }\n      await this._svgDrawingPromise;\n      return this._svg;\n    } else {\n      if (!this._canvas || !this._canvasDrawingPromise) {\n        this._setupCanvas();\n      }\n      await this._canvasDrawingPromise;\n      return this._canvas;\n    }\n  }\n\n  update(options?: Partial<Options>): void {\n    QRCodeStyling._clearContainer(this._container);\n    this._options = options ? sanitizeOptions(mergeDeep(this._options, options) as RequiredOptions) : this._options;\n\n    if (!this._options.data) {\n      return;\n    }\n\n    this._qr = qrcode(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel);\n    this._qr.addData(this._options.data, this._options.qrOptions.mode || getMode(this._options.data));\n    this._qr.make();\n\n    if (this._options.type === drawTypes.canvas) {\n      this._setupCanvas();\n    } else {\n      this._setupSvg();\n    }\n\n    this.append(this._container);\n  }\n\n  append(container?: HTMLElement): void {\n    if (!container) {\n      return;\n    }\n\n    if (typeof container.appendChild !== \"function\") {\n      throw \"Container should be a single DOM node\";\n    }\n\n    if (this._options.type === drawTypes.canvas) {\n      if (this._canvas) {\n        container.appendChild(this._canvas);\n      }\n    } else {\n      if (this._svg) {\n        container.appendChild(this._svg);\n      }\n    }\n\n    this._container = container;\n  }\n\n  applyExtension(extension: ExtensionFunction): void {\n    if (!extension) {\n      throw \"Extension function should be defined.\";\n    }\n\n    this._extension = extension;\n    this.update();\n  }\n\n  deleteExtension(): void {\n    this._extension = undefined;\n    this.update();\n  }\n\n  async getRawData(extension: FileExtension = \"png\"): Promise<Blob | null> {\n    if (!this._qr) throw \"QR code is empty\";\n    const element = await this._getElement(extension);\n\n    if (!element) {\n      return null;\n    }\n\n    if (extension.toLowerCase() === \"svg\") {\n      const serializer = new XMLSerializer();\n      const source = serializer.serializeToString(element);\n\n      return new Blob(['<?xml version=\"1.0\" standalone=\"no\"?>\\r\\n' + source], { type: \"image/svg+xml\" });\n    } else {\n      return new Promise((resolve) => (element as HTMLCanvasElement).toBlob(resolve, `image/${extension}`, 1));\n    }\n  }\n\n  async download(downloadOptions?: Partial<DownloadOptions> | string): Promise<void> {\n    if (!this._qr) throw \"QR code is empty\";\n    let extension = \"png\" as FileExtension;\n    let name = \"qr\";\n\n    //TODO remove deprecated code in the v2\n    if (typeof downloadOptions === \"string\") {\n      extension = downloadOptions as FileExtension;\n      console.warn(\n        \"Extension is deprecated as argument for 'download' method, please pass object { name: '...', extension: '...' } as argument\"\n      );\n    } else if (typeof downloadOptions === \"object\" && downloadOptions !== null) {\n      if (downloadOptions.name) {\n        name = downloadOptions.name;\n      }\n      if (downloadOptions.extension) {\n        extension = downloadOptions.extension;\n      }\n    }\n\n    const element = await this._getElement(extension);\n\n    if (!element) {\n      return;\n    }\n\n    if (extension.toLowerCase() === \"svg\") {\n      const serializer = new XMLSerializer();\n      let source = serializer.serializeToString(element);\n\n      source = '<?xml version=\"1.0\" standalone=\"no\"?>\\r\\n' + source;\n      const url = \"data:image/svg+xml;charset=utf-8,\" + encodeURIComponent(source);\n      downloadURI(url, `${name}.svg`);\n    } else {\n      const url = (element as HTMLCanvasElement).toDataURL(`image/${extension}`);\n      downloadURI(url, `${name}.${extension}`);\n    }\n  }\n}\n","import modes from \"../constants/modes\";\nimport { Mode } from \"../types\";\n\nexport default function getMode(data: string): Mode {\n  switch (true) {\n    case /^[0-9]*$/.test(data):\n      return modes.numeric;\n    case /^[0-9A-Z $%*+\\-./:]*$/.test(data):\n      return modes.alphanumeric;\n    default:\n      return modes.byte;\n  }\n}\n","import { Mode } from \"../types\";\n\ninterface Modes {\n  [key: string]: Mode;\n}\n\nexport default {\n  numeric: \"Numeric\",\n  alphanumeric: \"Alphanumeric\",\n  byte: \"Byte\",\n  kanji: \"Kanji\"\n} as Modes;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(676);\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => module['default'] :\n\t\t() => module;\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AsyncContract = void 0;\nvar errors_1 = require(\"./errors\");\nvar util_1 = require(\"./util\");\nfunction AsyncContract() {\n    var runtypes = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        runtypes[_i] = arguments[_i];\n    }\n    var lastIndex = runtypes.length - 1;\n    var argRuntypes = runtypes.slice(0, lastIndex);\n    var returnRuntype = runtypes[lastIndex];\n    return {\n        enforce: function (f) { return function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            if (args.length < argRuntypes.length) {\n                var message = \"Expected \".concat(argRuntypes.length, \" arguments but only received \").concat(args.length);\n                var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message);\n                throw new errors_1.ValidationError(failure);\n            }\n            for (var i = 0; i < argRuntypes.length; i++)\n                argRuntypes[i].check(args[i]);\n            var returnedPromise = f.apply(void 0, __spreadArray([], __read(args), false));\n            if (!(returnedPromise instanceof Promise)) {\n                var message = \"Expected function to return a promise, but instead got \".concat(returnedPromise);\n                var failure = util_1.FAILURE.RETURN_INCORRECT(message);\n                throw new errors_1.ValidationError(failure);\n            }\n            return returnedPromise.then(returnRuntype.check);\n        }; },\n    };\n}\nexports.AsyncContract = AsyncContract;\n","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Contract = void 0;\nvar errors_1 = require(\"./errors\");\nvar util_1 = require(\"./util\");\nfunction Contract() {\n    var runtypes = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        runtypes[_i] = arguments[_i];\n    }\n    var lastIndex = runtypes.length - 1;\n    var argRuntypes = runtypes.slice(0, lastIndex);\n    var returnRuntype = runtypes[lastIndex];\n    return {\n        enforce: function (f) { return function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            if (args.length < argRuntypes.length) {\n                var message = \"Expected \".concat(argRuntypes.length, \" arguments but only received \").concat(args.length);\n                var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message);\n                throw new errors_1.ValidationError(failure);\n            }\n            for (var i = 0; i < argRuntypes.length; i++)\n                argRuntypes[i].check(args[i]);\n            return returnRuntype.check(f.apply(void 0, __spreadArray([], __read(args), false)));\n        }; },\n    };\n}\nexports.Contract = Contract;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checked = exports.check = void 0;\nvar errors_1 = require(\"./errors\");\nvar util_1 = require(\"./util\");\nvar prototypes = new WeakMap();\n/**\n * A parameter decorator. Explicitly mark the parameter as checked on every method call in combination with `@checked` method decorator. The number of `@check` params must be the same as the number of provided runtypes into `@checked`.\\\n * Usage:\n * ```ts\n * @checked(Runtype1, Runtype3)\n * method(@check p1: Static1, p2: number, @check p3: Static3) { ... }\n * ```\n */\nfunction check(target, propertyKey, parameterIndex) {\n    var prototype = prototypes.get(target) || new Map();\n    prototypes.set(target, prototype);\n    var validParameterIndices = prototype.get(propertyKey) || [];\n    prototype.set(propertyKey, validParameterIndices);\n    validParameterIndices.push(parameterIndex);\n}\nexports.check = check;\nfunction getValidParameterIndices(target, propertyKey, runtypeCount) {\n    var prototype = prototypes.get(target);\n    var validParameterIndices = prototype && prototype.get(propertyKey);\n    if (validParameterIndices) {\n        // used with `@check` parameter decorator\n        return validParameterIndices;\n    }\n    var indices = [];\n    for (var i = 0; i < runtypeCount; i++) {\n        indices.push(i);\n    }\n    return indices;\n}\n/**\n * A method decorator. Takes runtypes as arguments which correspond to the ones of the actual method.\n *\n * Usually, the number of provided runtypes must be _**the same as**_ or _**less than**_ the actual parameters.\n *\n * If you explicitly mark which parameter shall be checked using `@check` parameter decorator, the number of `@check` parameters must be _**the same as**_ the runtypes provided into `@checked`.\n *\n * Usage:\n * ```ts\n * @checked(Runtype1, Runtype2)\n * method1(param1: Static1, param2: Static2, param3: any) {\n *   ...\n * }\n *\n * @checked(Runtype1, Runtype3)\n * method2(@check param1: Static1, param2: any, @check param3: Static3) {\n *   ...\n * }\n * ```\n */\nfunction checked() {\n    var runtypes = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        runtypes[_i] = arguments[_i];\n    }\n    if (runtypes.length === 0) {\n        throw new Error('No runtype provided to `@checked`. Please remove the decorator.');\n    }\n    return function (target, propertyKey, descriptor) {\n        var method = descriptor.value;\n        var methodId = (target.name || target.constructor.name + '.prototype') +\n            (typeof propertyKey === 'string' ? \"[\\\"\".concat(propertyKey, \"\\\"]\") : \"[\".concat(String(propertyKey), \"]\"));\n        var validParameterIndices = getValidParameterIndices(target, propertyKey, runtypes.length);\n        if (validParameterIndices.length !== runtypes.length) {\n            throw new Error('Number of `@checked` runtypes and @check parameters not matched.');\n        }\n        if (validParameterIndices.length > method.length) {\n            throw new Error('Number of `@checked` runtypes exceeds actual parameter length.');\n        }\n        descriptor.value = function () {\n            var args = [];\n            for (var _i = 0; _i < arguments.length; _i++) {\n                args[_i] = arguments[_i];\n            }\n            runtypes.forEach(function (type, typeIndex) {\n                var parameterIndex = validParameterIndices[typeIndex];\n                var result = type.validate(args[parameterIndex]);\n                if (!result.success) {\n                    var message = \"\".concat(methodId, \", argument #\").concat(parameterIndex, \": \").concat(result.message);\n                    var failure = util_1.FAILURE.ARGUMENT_INCORRECT(message);\n                    throw new errors_1.ValidationError(failure);\n                }\n            });\n            return method.apply(this, args);\n        };\n    };\n}\nexports.checked = checked;\n","\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ValidationError = void 0;\nvar ValidationError = /** @class */ (function (_super) {\n    __extends(ValidationError, _super);\n    function ValidationError(failure) {\n        var _this = _super.call(this, failure.message) || this;\n        _this.name = 'ValidationError';\n        _this.code = failure.code;\n        if (failure.details !== undefined)\n            _this.details = failure.details;\n        Object.setPrototypeOf(_this, ValidationError.prototype);\n        return _this;\n    }\n    return ValidationError;\n}(Error));\nexports.ValidationError = ValidationError;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n    if (k2 === undefined) k2 = k;\n    o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n    for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InstanceOf = exports.Nullish = exports.Null = exports.Undefined = exports.Literal = void 0;\n__exportStar(require(\"./reflect\"), exports);\n__exportStar(require(\"./result\"), exports);\n__exportStar(require(\"./contract\"), exports);\n__exportStar(require(\"./asynccontract\"), exports);\n__exportStar(require(\"./match\"), exports);\n__exportStar(require(\"./errors\"), exports);\n__exportStar(require(\"./types/unknown\"), exports);\n__exportStar(require(\"./types/never\"), exports);\n__exportStar(require(\"./types/void\"), exports);\nvar literal_1 = require(\"./types/literal\");\nObject.defineProperty(exports, \"Literal\", { enumerable: true, get: function () { return literal_1.Literal; } });\nObject.defineProperty(exports, \"Undefined\", { enumerable: true, get: function () { return literal_1.Undefined; } });\nObject.defineProperty(exports, \"Null\", { enumerable: true, get: function () { return literal_1.Null; } });\nObject.defineProperty(exports, \"Nullish\", { enumerable: true, get: function () { return literal_1.Nullish; } });\n__exportStar(require(\"./types/template\"), exports);\n__exportStar(require(\"./types/boolean\"), exports);\n__exportStar(require(\"./types/number\"), exports);\n__exportStar(require(\"./types/bigint\"), exports);\n__exportStar(require(\"./types/string\"), exports);\n__exportStar(require(\"./types/symbol\"), exports);\n__exportStar(require(\"./types/array\"), exports);\n__exportStar(require(\"./types/tuple\"), exports);\n__exportStar(require(\"./types/record\"), exports);\n__exportStar(require(\"./types/dictionary\"), exports);\n__exportStar(require(\"./types/union\"), exports);\n__exportStar(require(\"./types/intersect\"), exports);\n__exportStar(require(\"./types/optional\"), exports);\n__exportStar(require(\"./types/function\"), exports);\nvar instanceof_1 = require(\"./types/instanceof\");\nObject.defineProperty(exports, \"InstanceOf\", { enumerable: true, get: function () { return instanceof_1.InstanceOf; } });\n__exportStar(require(\"./types/lazy\"), exports);\n__exportStar(require(\"./types/constraint\"), exports);\n__exportStar(require(\"./types/brand\"), exports);\n__exportStar(require(\"./decorator\"), exports);\n","\"use strict\";\nvar __values = (this && this.__values) || function(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.when = exports.match = void 0;\nfunction match() {\n    var cases = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        cases[_i] = arguments[_i];\n    }\n    return function (x) {\n        var e_1, _a;\n        try {\n            for (var cases_1 = __values(cases), cases_1_1 = cases_1.next(); !cases_1_1.done; cases_1_1 = cases_1.next()) {\n                var _b = __read(cases_1_1.value, 2), T = _b[0], f = _b[1];\n                if (T.guard(x))\n                    return f(x);\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (cases_1_1 && !cases_1_1.done && (_a = cases_1.return)) _a.call(cases_1);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        throw new Error('No alternatives were matched');\n    };\n}\nexports.match = match;\nfunction when(runtype, transformer) {\n    return [runtype, transformer];\n}\nexports.when = when;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Failcode = void 0;\nexports.Failcode = {\n    /** The type of the received primitive value is incompatible with expected one. */\n    TYPE_INCORRECT: 'TYPE_INCORRECT',\n    /** The received primitive value is incorrect. */\n    VALUE_INCORRECT: 'VALUE_INCORRECT',\n    /** The key of the property is incorrect. */\n    KEY_INCORRECT: 'KEY_INCORRECT',\n    /** One or more elements or properties of the received object are incorrect. */\n    CONTENT_INCORRECT: 'CONTENT_INCORRECT',\n    /** One or more arguments passed to the function is incorrect. */\n    ARGUMENT_INCORRECT: 'ARGUMENT_INCORRECT',\n    /** The value returned by the function is incorrect. */\n    RETURN_INCORRECT: 'RETURN_INCORRECT',\n    /** The received value does not fulfill the constraint. */\n    CONSTRAINT_FAILED: 'CONSTRAINT_FAILED',\n    /** The property must be present but missing. */\n    PROPERTY_MISSING: 'PROPERTY_MISSING',\n    /** The property must not be present but present. */\n    PROPERTY_PRESENT: 'PROPERTY_PRESENT',\n    /** The value must not be present but present. */\n    NOTHING_EXPECTED: 'NOTHING_EXPECTED',\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.innerValidate = exports.create = exports.isRuntype = void 0;\nvar index_1 = require(\"./index\");\nvar show_1 = require(\"./show\");\nvar errors_1 = require(\"./errors\");\nvar util_1 = require(\"./util\");\nvar RuntypeSymbol = Symbol();\nvar isRuntype = function (x) { return (0, util_1.hasKey)(RuntypeSymbol, x); };\nexports.isRuntype = isRuntype;\nfunction create(validate, A) {\n    A[RuntypeSymbol] = true;\n    A.check = check;\n    A.assert = check;\n    A._innerValidate = function (value, visited) {\n        if (visited.has(value, A))\n            return (0, util_1.SUCCESS)(value);\n        return validate(value, visited);\n    };\n    A.validate = function (value) { return A._innerValidate(value, VisitedState()); };\n    A.guard = guard;\n    A.Or = Or;\n    A.And = And;\n    A.optional = optional;\n    A.nullable = nullable;\n    A.withConstraint = withConstraint;\n    A.withGuard = withGuard;\n    A.withBrand = withBrand;\n    A.reflect = A;\n    A.toString = function () { return \"Runtype<\".concat((0, show_1.default)(A), \">\"); };\n    return A;\n    function check(x) {\n        var result = A.validate(x);\n        if (result.success)\n            return result.value;\n        else\n            throw new errors_1.ValidationError(result);\n    }\n    function guard(x) {\n        return A.validate(x).success;\n    }\n    function Or(B) {\n        return (0, index_1.Union)(A, B);\n    }\n    function And(B) {\n        return (0, index_1.Intersect)(A, B);\n    }\n    function optional() {\n        return (0, index_1.Optional)(A);\n    }\n    function nullable() {\n        return (0, index_1.Union)(A, index_1.Null);\n    }\n    function withConstraint(constraint, options) {\n        return (0, index_1.Constraint)(A, constraint, options);\n    }\n    function withGuard(guard, options) {\n        return (0, index_1.Constraint)(A, guard, options);\n    }\n    function withBrand(B) {\n        return (0, index_1.Brand)(B, A);\n    }\n}\nexports.create = create;\nfunction innerValidate(targetType, value, visited) {\n    return targetType._innerValidate(value, visited);\n}\nexports.innerValidate = innerValidate;\nfunction VisitedState() {\n    var members = new WeakMap();\n    var add = function (candidate, type) {\n        if (candidate === null || !(typeof candidate === 'object'))\n            return;\n        var typeSet = members.get(candidate);\n        members.set(candidate, typeSet\n            ? typeSet.set(type, true)\n            : new WeakMap().set(type, true));\n    };\n    var has = function (candidate, type) {\n        var typeSet = members.get(candidate);\n        var value = (typeSet && typeSet.get(type)) || false;\n        add(candidate, type);\n        return value;\n    };\n    return { has: has };\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/**\n * Return the display string for the stringified version of a type, e.g.\n *\n * - `Number` -> `` `${number}` ``\n * - `String` -> `string`\n * - `Literal(42)` -> `\"42\"`\n * - `Union(Literal(\"foo\"), Number)` -> `` \"foo\" | `${number}` ``\n */\nvar showStringified = function (circular) { return function (refl) {\n    switch (refl.tag) {\n        case 'literal':\n            return \"\\\"\".concat(String(refl.value), \"\\\"\");\n        case 'string':\n            return 'string';\n        case 'brand':\n            return refl.brand;\n        case 'constraint':\n            return refl.name || showStringified(circular)(refl.underlying);\n        case 'union':\n            return refl.alternatives.map(showStringified(circular)).join(' | ');\n        case 'intersect':\n            return refl.intersectees.map(showStringified(circular)).join(' & ');\n        default:\n            break;\n    }\n    return \"`${\".concat(show(false, circular)(refl), \"}`\");\n}; };\n/**\n * Return the display string which is to be embedded into the display string of\n * the surrounding template literal type, e.g.\n *\n * - `Number` -> `${number}`\n * - `String` -> `${string}`\n * - `Literal(\"foo\")` -> `foo`\n * - `Union(Literal(42), Number)` -> `${\"42\" | number}`\n */\nvar showEmbedded = function (circular) { return function (refl) {\n    switch (refl.tag) {\n        case 'literal':\n            return String(refl.value);\n        case 'brand':\n            return \"${\".concat(refl.brand, \"}\");\n        case 'constraint':\n            return refl.name ? \"${\".concat(refl.name, \"}\") : showEmbedded(circular)(refl.underlying);\n        case 'union':\n            if (refl.alternatives.length === 1) {\n                var inner = refl.alternatives[0];\n                return showEmbedded(circular)(inner.reflect);\n            }\n            break;\n        case 'intersect':\n            if (refl.intersectees.length === 1) {\n                var inner = refl.intersectees[0];\n                return showEmbedded(circular)(inner.reflect);\n            }\n            break;\n        default:\n            break;\n    }\n    return \"${\".concat(show(false, circular)(refl), \"}\");\n}; };\nvar show = function (needsParens, circular) { return function (refl) {\n    var parenthesize = function (s) { return (needsParens ? \"(\".concat(s, \")\") : s); };\n    if (circular.has(refl))\n        return parenthesize(\"CIRCULAR \".concat(refl.tag));\n    else\n        circular.add(refl);\n    try {\n        switch (refl.tag) {\n            // Primitive types\n            case 'unknown':\n            case 'never':\n            case 'void':\n            case 'boolean':\n            case 'number':\n            case 'bigint':\n            case 'string':\n            case 'symbol':\n            case 'function':\n                return refl.tag;\n            case 'literal': {\n                var value = refl.value;\n                return typeof value === 'string' ? \"\\\"\".concat(value, \"\\\"\") : String(value);\n            }\n            // Complex types\n            case 'template': {\n                if (refl.strings.length === 0)\n                    return '\"\"';\n                else if (refl.strings.length === 1)\n                    return \"\\\"\".concat(refl.strings[0], \"\\\"\");\n                else if (refl.strings.length === 2) {\n                    if (refl.strings.every(function (string) { return string === ''; })) {\n                        var runtype = refl.runtypes[0];\n                        return showStringified(circular)(runtype.reflect);\n                    }\n                }\n                var backtick_1 = false;\n                var inner = refl.strings.reduce(function (inner, string, i) {\n                    var prefix = inner + string;\n                    var runtype = refl.runtypes[i];\n                    if (runtype) {\n                        var suffix = showEmbedded(circular)(runtype.reflect);\n                        if (!backtick_1 && suffix.startsWith('$'))\n                            backtick_1 = true;\n                        return prefix + suffix;\n                    }\n                    else\n                        return prefix;\n                }, '');\n                return backtick_1 ? \"`\".concat(inner, \"`\") : \"\\\"\".concat(inner, \"\\\"\");\n            }\n            case 'array':\n                return \"\".concat(readonlyTag(refl)).concat(show(true, circular)(refl.element), \"[]\");\n            case 'dictionary':\n                return \"{ [_: \".concat(refl.key, \"]: \").concat(show(false, circular)(refl.value), \" }\");\n            case 'record': {\n                var keys = Object.keys(refl.fields);\n                return keys.length\n                    ? \"{ \".concat(keys\n                        .map(function (k) {\n                        return \"\".concat(readonlyTag(refl)).concat(k).concat(partialTag(refl, k), \": \").concat(refl.fields[k].tag === 'optional'\n                            ? show(false, circular)(refl.fields[k].underlying)\n                            : show(false, circular)(refl.fields[k]), \";\");\n                    })\n                        .join(' '), \" }\")\n                    : '{}';\n            }\n            case 'tuple':\n                return \"[\".concat(refl.components.map(show(false, circular)).join(', '), \"]\");\n            case 'union':\n                return parenthesize(\"\".concat(refl.alternatives.map(show(true, circular)).join(' | ')));\n            case 'intersect':\n                return parenthesize(\"\".concat(refl.intersectees.map(show(true, circular)).join(' & ')));\n            case 'optional':\n                return show(needsParens, circular)(refl.underlying) + ' | undefined';\n            case 'constraint':\n                return refl.name || show(needsParens, circular)(refl.underlying);\n            case 'instanceof':\n                return refl.ctor.name;\n            case 'brand':\n                return show(needsParens, circular)(refl.entity);\n        }\n    }\n    finally {\n        circular.delete(refl);\n    }\n    /* istanbul ignore next */\n    throw Error('impossible');\n}; };\nexports.default = show(false, new Set());\nfunction partialTag(_a, key) {\n    var isPartial = _a.isPartial, fields = _a.fields;\n    return isPartial || (key !== undefined && fields[key].tag === 'optional') ? '?' : '';\n}\nfunction readonlyTag(_a) {\n    var isReadonly = _a.isReadonly;\n    return isReadonly ? 'readonly ' : '';\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Array = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Construct an array runtype from a runtype for its elements.\n */\nfunction InternalArr(element, isReadonly) {\n    var self = { tag: 'array', isReadonly: isReadonly, element: element };\n    return withExtraModifierFuncs((0, runtype_1.create)(function (xs, visited) {\n        if (!Array.isArray(xs))\n            return util_1.FAILURE.TYPE_INCORRECT(self, xs);\n        var keys = (0, util_1.enumerableKeysOf)(xs);\n        var results = keys.map(function (key) {\n            return (0, runtype_1.innerValidate)(element, xs[key], visited);\n        });\n        var details = keys.reduce(function (details, key) {\n            var result = results[key];\n            if (!result.success)\n                details[key] = result.details || result.message;\n            return details;\n        }, []);\n        if ((0, util_1.enumerableKeysOf)(details).length !== 0)\n            return util_1.FAILURE.CONTENT_INCORRECT(self, details);\n        else\n            return (0, util_1.SUCCESS)(xs);\n    }, self));\n}\nfunction Arr(element) {\n    return InternalArr(element, false);\n}\nexports.Array = Arr;\nfunction withExtraModifierFuncs(A) {\n    A.asReadonly = asReadonly;\n    return A;\n    function asReadonly() {\n        return InternalArr(A.element, true);\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BigInt = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'bigint' };\n/**\n * Validates that a value is a bigint.\n */\nexports.BigInt = (0, runtype_1.create)(function (value) { return (typeof value === 'bigint' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Boolean = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'boolean' };\n/**\n * Validates that a value is a boolean.\n */\nexports.Boolean = (0, runtype_1.create)(function (value) { return (typeof value === 'boolean' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Brand = void 0;\nvar runtype_1 = require(\"../runtype\");\nfunction Brand(brand, entity) {\n    var self = { tag: 'brand', brand: brand, entity: entity };\n    return (0, runtype_1.create)(function (value) { return entity.validate(value); }, self);\n}\nexports.Brand = Brand;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Guard = exports.Constraint = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar unknown_1 = require(\"./unknown\");\nfunction Constraint(underlying, constraint, options) {\n    var name = options && options.name;\n    var args = options && options.args;\n    var self = {\n        tag: 'constraint',\n        underlying: underlying,\n        constraint: constraint,\n        name: name,\n        args: args,\n    };\n    return (0, runtype_1.create)(function (value) {\n        var result = underlying.validate(value);\n        if (!result.success)\n            return result;\n        var message = constraint(result.value);\n        if (typeof message === 'string')\n            return util_1.FAILURE.CONSTRAINT_FAILED(self, message);\n        else if (!message)\n            return util_1.FAILURE.CONSTRAINT_FAILED(self);\n        return (0, util_1.SUCCESS)(result.value);\n    }, self);\n}\nexports.Constraint = Constraint;\nvar Guard = function (guard, options) { return unknown_1.Unknown.withGuard(guard, options); };\nexports.Guard = Guard;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Dictionary = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar string_1 = require(\"./string\");\nvar constraint_1 = require(\"./constraint\");\nvar show_1 = require(\"../show\");\nvar util_1 = require(\"../util\");\nvar NumberKey = (0, constraint_1.Constraint)(string_1.String, function (s) { return !isNaN(+s); }, { name: 'number' });\nfunction Dictionary(value, key) {\n    var keyRuntype = key === undefined\n        ? string_1.String\n        : key === 'string'\n            ? string_1.String\n            : key === 'number'\n                ? NumberKey\n                : key;\n    var keyString = (0, show_1.default)(keyRuntype);\n    var self = { tag: 'dictionary', key: keyString, value: value };\n    return (0, runtype_1.create)(function (x, visited) {\n        if (x === null || x === undefined || typeof x !== 'object')\n            return util_1.FAILURE.TYPE_INCORRECT(self, x);\n        if (Object.getPrototypeOf(x) !== Object.prototype)\n            if (!Array.isArray(x) || keyString === 'string')\n                return util_1.FAILURE.TYPE_INCORRECT(self, x);\n        var numberString = /^(?:NaN|-?\\d+(?:\\.\\d+)?)$/;\n        var keys = (0, util_1.enumerableKeysOf)(x);\n        var results = keys.reduce(function (results, key) {\n            // We should provide interoperability with `number` and `string` here,\n            // as a user would expect JavaScript engines to convert numeric keys to\n            // string keys automatically. So, if the key can be interpreted as a\n            // decimal number, then test it against a `Number` OR `String` runtype.\n            var isNumberLikeKey = typeof key === 'string' && numberString.test(key);\n            var keyInterop = isNumberLikeKey ? globalThis.Number(key) : key;\n            if (isNumberLikeKey\n                ? !keyRuntype.guard(keyInterop) && !keyRuntype.guard(key)\n                : !keyRuntype.guard(keyInterop)) {\n                results[key] = util_1.FAILURE.KEY_INCORRECT(self, keyRuntype.reflect, keyInterop);\n            }\n            else\n                results[key] = (0, runtype_1.innerValidate)(value, x[key], visited);\n            return results;\n        }, {});\n        var details = keys.reduce(function (details, key) {\n            var result = results[key];\n            if (!result.success)\n                details[key] = result.details || result.message;\n            return details;\n        }, {});\n        if ((0, util_1.enumerableKeysOf)(details).length !== 0)\n            return util_1.FAILURE.CONTENT_INCORRECT(self, details);\n        else\n            return (0, util_1.SUCCESS)(x);\n    }, self);\n}\nexports.Dictionary = Dictionary;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Function = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'function' };\n/**\n * Construct a runtype for functions.\n */\nexports.Function = (0, runtype_1.create)(function (value) { return (typeof value === 'function' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.InstanceOf = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nfunction InstanceOf(ctor) {\n    var self = { tag: 'instanceof', ctor: ctor };\n    return (0, runtype_1.create)(function (value) { return (value instanceof ctor ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n}\nexports.InstanceOf = InstanceOf;\n","\"use strict\";\nvar __values = (this && this.__values) || function(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Intersect = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Construct an intersection runtype from runtypes for its alternatives.\n */\nfunction Intersect() {\n    var intersectees = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        intersectees[_i] = arguments[_i];\n    }\n    var self = { tag: 'intersect', intersectees: intersectees };\n    return (0, runtype_1.create)(function (value, visited) {\n        var e_1, _a;\n        try {\n            for (var intersectees_1 = __values(intersectees), intersectees_1_1 = intersectees_1.next(); !intersectees_1_1.done; intersectees_1_1 = intersectees_1.next()) {\n                var targetType = intersectees_1_1.value;\n                var result = (0, runtype_1.innerValidate)(targetType, value, visited);\n                if (!result.success)\n                    return result;\n            }\n        }\n        catch (e_1_1) { e_1 = { error: e_1_1 }; }\n        finally {\n            try {\n                if (intersectees_1_1 && !intersectees_1_1.done && (_a = intersectees_1.return)) _a.call(intersectees_1);\n            }\n            finally { if (e_1) throw e_1.error; }\n        }\n        return (0, util_1.SUCCESS)(value);\n    }, self);\n}\nexports.Intersect = Intersect;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Lazy = void 0;\nvar runtype_1 = require(\"../runtype\");\n/**\n * Construct a possibly-recursive Runtype.\n */\nfunction Lazy(delayed) {\n    var data = {\n        get tag() {\n            return getWrapped()['tag'];\n        },\n    };\n    var cached;\n    function getWrapped() {\n        if (!cached) {\n            cached = delayed();\n            for (var k in cached)\n                if (k !== 'tag')\n                    data[k] = cached[k];\n        }\n        return cached;\n    }\n    return (0, runtype_1.create)(function (x) {\n        return getWrapped().validate(x);\n    }, data);\n}\nexports.Lazy = Lazy;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Nullish = exports.Null = exports.Undefined = exports.Literal = exports.literal = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar union_1 = require(\"./union\");\n/**\n * Be aware of an Array of Symbols `[Symbol()]` which would throw \"TypeError: Cannot convert a Symbol value to a string\"\n */\nfunction literal(value) {\n    return Array.isArray(value)\n        ? String(value.map(String))\n        : typeof value === 'bigint'\n            ? String(value) + 'n'\n            : String(value);\n}\nexports.literal = literal;\n/**\n * Construct a runtype for a type literal.\n */\nfunction Literal(valueBase) {\n    var self = { tag: 'literal', value: valueBase };\n    return (0, runtype_1.create)(function (value) {\n        return value === valueBase\n            ? (0, util_1.SUCCESS)(value)\n            : util_1.FAILURE.VALUE_INCORRECT('literal', \"`\".concat(literal(valueBase), \"`\"), \"`\".concat(literal(value), \"`\"));\n    }, self);\n}\nexports.Literal = Literal;\n/**\n * An alias for Literal(undefined).\n */\nexports.Undefined = Literal(undefined);\n/**\n * An alias for Literal(null).\n */\nexports.Null = Literal(null);\n/**\n * An alias for `Union(Null, Undefined)`.\n */\nexports.Nullish = (0, union_1.Union)(exports.Null, exports.Undefined);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Never = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'never' };\n/**\n * Validates nothing (unknown fails).\n */\nexports.Never = (0, runtype_1.create)(util_1.FAILURE.NOTHING_EXPECTED, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Number = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'number' };\n/**\n * Validates that a value is a number.\n */\nexports.Number = (0, runtype_1.create)(function (value) { return (typeof value === 'number' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Optional = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Validates optional value.\n */\nfunction Optional(runtype) {\n    var self = { tag: 'optional', underlying: runtype };\n    return (0, runtype_1.create)(function (value) { return (value === undefined ? (0, util_1.SUCCESS)(value) : runtype.validate(value)); }, self);\n}\nexports.Optional = Optional;\n","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Partial = exports.Record = exports.InternalRecord = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Construct a record runtype from runtypes for its values.\n */\nfunction InternalRecord(fields, isPartial, isReadonly) {\n    var self = { tag: 'record', isPartial: isPartial, isReadonly: isReadonly, fields: fields };\n    return withExtraModifierFuncs((0, runtype_1.create)(function (x, visited) {\n        if (x === null || x === undefined) {\n            return util_1.FAILURE.TYPE_INCORRECT(self, x);\n        }\n        var keysOfFields = (0, util_1.enumerableKeysOf)(fields);\n        if (keysOfFields.length !== 0 && typeof x !== 'object')\n            return util_1.FAILURE.TYPE_INCORRECT(self, x);\n        var keys = __spreadArray([], __read(new Set(__spreadArray(__spreadArray([], __read(keysOfFields), false), __read((0, util_1.enumerableKeysOf)(x)), false))), false);\n        var results = keys.reduce(function (results, key) {\n            var fieldsHasKey = (0, util_1.hasKey)(key, fields);\n            var xHasKey = (0, util_1.hasKey)(key, x);\n            if (fieldsHasKey) {\n                var runtype = fields[key];\n                var isOptional = isPartial || runtype.reflect.tag === 'optional';\n                if (xHasKey) {\n                    var value = x[key];\n                    if (isOptional && value === undefined)\n                        results[key] = (0, util_1.SUCCESS)(value);\n                    else\n                        results[key] = (0, runtype_1.innerValidate)(runtype, value, visited);\n                }\n                else {\n                    if (!isOptional)\n                        results[key] = util_1.FAILURE.PROPERTY_MISSING(runtype.reflect);\n                    else\n                        results[key] = (0, util_1.SUCCESS)(undefined);\n                }\n            }\n            else if (xHasKey) {\n                // TODO: exact record validation\n                var value = x[key];\n                results[key] = (0, util_1.SUCCESS)(value);\n            }\n            else {\n                /* istanbul ignore next */\n                throw new Error('impossible');\n            }\n            return results;\n        }, {});\n        var details = keys.reduce(function (details, key) {\n            var result = results[key];\n            if (!result.success)\n                details[key] = result.details || result.message;\n            return details;\n        }, {});\n        if ((0, util_1.enumerableKeysOf)(details).length !== 0)\n            return util_1.FAILURE.CONTENT_INCORRECT(self, details);\n        else\n            return (0, util_1.SUCCESS)(x);\n    }, self));\n}\nexports.InternalRecord = InternalRecord;\nfunction Record(fields) {\n    return InternalRecord(fields, false, false);\n}\nexports.Record = Record;\nfunction Partial(fields) {\n    return InternalRecord(fields, true, false);\n}\nexports.Partial = Partial;\nfunction withExtraModifierFuncs(A) {\n    A.asPartial = asPartial;\n    A.asReadonly = asReadonly;\n    A.pick = pick;\n    A.omit = omit;\n    A.extend = extend;\n    return A;\n    function asPartial() {\n        return InternalRecord(A.fields, true, A.isReadonly);\n    }\n    function asReadonly() {\n        return InternalRecord(A.fields, A.isPartial, true);\n    }\n    function pick() {\n        var keys = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            keys[_i] = arguments[_i];\n        }\n        var result = {};\n        keys.forEach(function (key) {\n            result[key] = A.fields[key];\n        });\n        return InternalRecord(result, A.isPartial, A.isReadonly);\n    }\n    function omit() {\n        var keys = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            keys[_i] = arguments[_i];\n        }\n        var result = {};\n        var existingKeys = (0, util_1.enumerableKeysOf)(A.fields);\n        existingKeys.forEach(function (key) {\n            if (!keys.includes(key))\n                result[key] = A.fields[key];\n        });\n        return InternalRecord(result, A.isPartial, A.isReadonly);\n    }\n    function extend(fields) {\n        return InternalRecord(Object.assign({}, A.fields, fields), A.isPartial, A.isReadonly);\n    }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.String = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'string' };\n/**\n * Validates that a value is a string.\n */\nexports.String = (0, runtype_1.create)(function (value) { return (typeof value === 'string' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Symbol = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar f = function (key) {\n    var self = { tag: 'symbol', key: key };\n    return (0, runtype_1.create)(function (value) {\n        if (typeof value !== 'symbol')\n            return util_1.FAILURE.TYPE_INCORRECT(self, value);\n        else {\n            var keyForValue = globalThis.Symbol.keyFor(value);\n            if (keyForValue !== key)\n                return util_1.FAILURE.VALUE_INCORRECT('symbol key', quoteIfPresent(key), quoteIfPresent(keyForValue));\n            else\n                return (0, util_1.SUCCESS)(value);\n        }\n    }, self);\n};\nvar self = { tag: 'symbol' };\n/**\n * Validates that a value is a symbol, regardless of whether it is keyed or not.\n */\nexports.Symbol = (0, runtype_1.create)(function (value) { return (typeof value === 'symbol' ? (0, util_1.SUCCESS)(value) : util_1.FAILURE.TYPE_INCORRECT(self, value)); }, Object.assign(f, self));\nvar quoteIfPresent = function (key) { return (key === undefined ? 'undefined' : \"\\\"\".concat(key, \"\\\"\")); };\n","\"use strict\";\nvar __read = (this && this.__read) || function (o, n) {\n    var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n    if (!m) return o;\n    var i = m.call(o), r, ar = [], e;\n    try {\n        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n    }\n    catch (error) { e = { error: error }; }\n    finally {\n        try {\n            if (r && !r.done && (m = i[\"return\"])) m.call(i);\n        }\n        finally { if (e) throw e.error; }\n    }\n    return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n        if (ar || !(i in from)) {\n            if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n            ar[i] = from[i];\n        }\n    }\n    return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __values = (this && this.__values) || function(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Template = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar show_1 = require(\"../show\");\nvar util_1 = require(\"../util\");\nvar literal_1 = require(\"./literal\");\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping\nvar escapeRegExp = function (string) { return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&'); };\nvar parseArgs = function (args) {\n    // If the first element is an `Array`, maybe it's called by the tagged style\n    if (0 < args.length && Array.isArray(args[0])) {\n        var _a = __read(args), strings = _a[0], runtypes = _a.slice(1);\n        // For further manipulation, recreate an `Array` because `TemplateStringsArray` is readonly\n        return [Array.from(strings), runtypes];\n    }\n    else {\n        var convenient = args;\n        var strings = convenient.reduce(function (strings, arg) {\n            // Concatenate every consecutive literals as strings\n            if (!(0, runtype_1.isRuntype)(arg))\n                strings.push(strings.pop() + String(arg));\n            // Skip runtypes\n            else\n                strings.push('');\n            return strings;\n        }, ['']);\n        var runtypes = convenient.filter(runtype_1.isRuntype);\n        return [strings, runtypes];\n    }\n};\n/**\n * Flatten inner runtypes of a `Template` if possible, with in-place strategy\n */\nvar flattenInnerRuntypes = function (strings, runtypes) {\n    for (var i = 0; i < runtypes.length;) {\n        switch (runtypes[i].reflect.tag) {\n            case 'literal': {\n                var literal_2 = runtypes[i];\n                runtypes.splice(i, 1);\n                var string = String(literal_2.value);\n                strings.splice(i, 2, strings[i] + string + strings[i + 1]);\n                break;\n            }\n            case 'template': {\n                var template = runtypes[i];\n                runtypes.splice.apply(runtypes, __spreadArray([i, 1], __read(template.runtypes), false));\n                var innerStrings = template.strings;\n                if (innerStrings.length === 1) {\n                    strings.splice(i, 2, strings[i] + innerStrings[0] + strings[i + 1]);\n                }\n                else {\n                    var first = innerStrings[0];\n                    var rest = innerStrings.slice(1, -1);\n                    var last = innerStrings[innerStrings.length - 1];\n                    strings.splice.apply(strings, __spreadArray(__spreadArray([i, 2, strings[i] + first], __read(rest), false), [last + strings[i + 1]], false));\n                }\n                break;\n            }\n            case 'union': {\n                var union = runtypes[i];\n                if (union.alternatives.length === 1) {\n                    try {\n                        var literal_3 = getInnerLiteral(union);\n                        runtypes.splice(i, 1);\n                        var string = String(literal_3.value);\n                        strings.splice(i, 2, strings[i] + string + strings[i + 1]);\n                        break;\n                    }\n                    catch (_) {\n                        i++;\n                        break;\n                    }\n                }\n                else {\n                    i++;\n                    break;\n                }\n            }\n            case 'intersect': {\n                var intersect = runtypes[i];\n                if (intersect.intersectees.length === 1) {\n                    try {\n                        var literal_4 = getInnerLiteral(intersect);\n                        runtypes.splice(i, 1);\n                        var string = String(literal_4.value);\n                        strings.splice(i, 2, strings[i] + string + strings[i + 1]);\n                        break;\n                    }\n                    catch (_) {\n                        i++;\n                        break;\n                    }\n                }\n                else {\n                    i++;\n                    break;\n                }\n            }\n            default:\n                i++;\n                break;\n        }\n    }\n};\nvar normalizeArgs = function (args) {\n    var _a = __read(parseArgs(args), 2), strings = _a[0], runtypes = _a[1];\n    flattenInnerRuntypes(strings, runtypes);\n    return [strings, runtypes];\n};\nvar getInnerLiteral = function (runtype) {\n    switch (runtype.reflect.tag) {\n        case 'literal':\n            return runtype;\n        case 'brand':\n            return getInnerLiteral(runtype.reflect.entity);\n        case 'union':\n            if (runtype.reflect.alternatives.length === 1)\n                return getInnerLiteral(runtype.reflect.alternatives[0]);\n            break;\n        case 'intersect':\n            if (runtype.reflect.intersectees.length === 1)\n                return getInnerLiteral(runtype.reflect.intersectees[0]);\n            break;\n        default:\n            break;\n    }\n    throw undefined;\n};\nvar identity = function (s) { return s; };\nvar revivers = {\n    string: [function (s) { return globalThis.String(s); }, '.*'],\n    number: [\n        function (s) { return globalThis.Number(s); },\n        '[+-]?(?:\\\\d*\\\\.\\\\d+|\\\\d+\\\\.\\\\d*|\\\\d+)(?:[Ee][+-]?\\\\d+)?',\n        '0[Bb][01]+',\n        '0[Oo][0-7]+',\n        '0[Xx][0-9A-Fa-f]+',\n        // Note: `\"NaN\"` isn't here, as TS doesn't allow `\"NaN\"` to be a `` `${number}` ``\n    ],\n    bigint: [function (s) { return globalThis.BigInt(s); }, '-?[1-9]d*'],\n    boolean: [function (s) { return (s === 'false' ? false : true); }, 'true', 'false'],\n    null: [function () { return null; }, 'null'],\n    undefined: [function () { return undefined; }, 'undefined'],\n};\nvar getReviversFor = function (reflect) {\n    switch (reflect.tag) {\n        case 'literal': {\n            var _a = __read(revivers[(0, util_1.typeOf)(reflect.value)] || [identity], 1), reviver_1 = _a[0];\n            return reviver_1;\n        }\n        case 'brand':\n            return getReviversFor(reflect.entity);\n        case 'constraint':\n            return getReviversFor(reflect.underlying);\n        case 'union':\n            return reflect.alternatives.map(getReviversFor);\n        case 'intersect':\n            return reflect.intersectees.map(getReviversFor);\n        default:\n            var _b = __read(revivers[reflect.tag] || [identity], 1), reviver = _b[0];\n            return reviver;\n    }\n};\n/** Recursively map corresponding reviver and  */\nvar reviveValidate = function (reflect, visited) { return function (value) {\n    var e_1, _a, e_2, _b;\n    var revivers = getReviversFor(reflect);\n    if (Array.isArray(revivers)) {\n        switch (reflect.tag) {\n            case 'union':\n                try {\n                    for (var _c = __values(reflect.alternatives), _d = _c.next(); !_d.done; _d = _c.next()) {\n                        var alternative = _d.value;\n                        var validated = reviveValidate(alternative.reflect, visited)(value);\n                        if (validated.success)\n                            return validated;\n                    }\n                }\n                catch (e_1_1) { e_1 = { error: e_1_1 }; }\n                finally {\n                    try {\n                        if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n                    }\n                    finally { if (e_1) throw e_1.error; }\n                }\n                return util_1.FAILURE.TYPE_INCORRECT(reflect, value);\n            case 'intersect':\n                try {\n                    for (var _e = __values(reflect.intersectees), _f = _e.next(); !_f.done; _f = _e.next()) {\n                        var intersectee = _f.value;\n                        var validated = reviveValidate(intersectee.reflect, visited)(value);\n                        if (!validated.success)\n                            return validated;\n                    }\n                }\n                catch (e_2_1) { e_2 = { error: e_2_1 }; }\n                finally {\n                    try {\n                        if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n                    }\n                    finally { if (e_2) throw e_2.error; }\n                }\n                return (0, util_1.SUCCESS)(value);\n            default:\n                /* istanbul ignore next */\n                throw Error('impossible');\n        }\n    }\n    else {\n        var reviver = revivers;\n        var validated = (0, runtype_1.innerValidate)(reflect, reviver(value), visited);\n        if (!validated.success && validated.code === 'VALUE_INCORRECT' && reflect.tag === 'literal')\n            // TODO: Temporary fix to show unrevived value in message; needs refactor\n            return util_1.FAILURE.VALUE_INCORRECT('literal', \"\\\"\".concat((0, literal_1.literal)(reflect.value), \"\\\"\"), \"\\\"\".concat(value, \"\\\"\"));\n        return validated;\n    }\n}; };\nvar getRegExpPatternFor = function (reflect) {\n    switch (reflect.tag) {\n        case 'literal':\n            return escapeRegExp(String(reflect.value));\n        case 'brand':\n            return getRegExpPatternFor(reflect.entity);\n        case 'constraint':\n            return getRegExpPatternFor(reflect.underlying);\n        case 'union':\n            return reflect.alternatives.map(getRegExpPatternFor).join('|');\n        case 'template': {\n            return reflect.strings.map(escapeRegExp).reduce(function (pattern, string, i) {\n                var prefix = pattern + string;\n                var runtype = reflect.runtypes[i];\n                if (runtype)\n                    return prefix + \"(?:\".concat(getRegExpPatternFor(runtype.reflect), \")\");\n                else\n                    return prefix;\n            }, '');\n        }\n        default:\n            var _a = __read(revivers[reflect.tag] || [undefined, '.*']), patterns = _a.slice(1);\n            return patterns.join('|');\n    }\n};\nvar createRegExpForTemplate = function (reflect) {\n    var pattern = reflect.strings.map(escapeRegExp).reduce(function (pattern, string, i) {\n        var prefix = pattern + string;\n        var runtype = reflect.runtypes[i];\n        if (runtype)\n            return prefix + \"(\".concat(getRegExpPatternFor(runtype.reflect), \")\");\n        else\n            return prefix;\n    }, '');\n    return new RegExp(\"^\".concat(pattern, \"$\"), 'su');\n};\nfunction Template() {\n    var args = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        args[_i] = arguments[_i];\n    }\n    var _a = __read(normalizeArgs(args), 2), strings = _a[0], runtypes = _a[1];\n    var self = { tag: 'template', strings: strings, runtypes: runtypes };\n    var regexp = createRegExpForTemplate(self);\n    var test = function (value, visited) {\n        var matches = value.match(regexp);\n        if (matches) {\n            var values = matches.slice(1);\n            for (var i = 0; i < runtypes.length; i++) {\n                var runtype = runtypes[i];\n                var value_1 = values[i];\n                var validated = reviveValidate(runtype.reflect, visited)(value_1);\n                if (!validated.success)\n                    return validated;\n            }\n            return (0, util_1.SUCCESS)(value);\n        }\n        else {\n            return util_1.FAILURE.VALUE_INCORRECT('string', \"\".concat((0, show_1.default)(self)), \"\\\"\".concat((0, literal_1.literal)(value), \"\\\"\"));\n        }\n    };\n    return (0, runtype_1.create)(function (value, visited) {\n        if (typeof value !== 'string')\n            return util_1.FAILURE.TYPE_INCORRECT(self, value);\n        else {\n            var validated = test(value, visited);\n            if (!validated.success) {\n                var result = util_1.FAILURE.VALUE_INCORRECT('string', \"\".concat((0, show_1.default)(self)), \"\\\"\".concat(value, \"\\\"\"));\n                if (result.message !== validated.message)\n                    // TODO: Should use `details` here, but it needs unionizing `string` anew to the definition of `Details`, which is a breaking change\n                    result.message += \" (inner: \".concat(validated.message, \")\");\n                return result;\n            }\n            else\n                return (0, util_1.SUCCESS)(value);\n        }\n    }, self);\n}\nexports.Template = Template;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Tuple = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Construct a tuple runtype from runtypes for each of its elements.\n */\nfunction Tuple() {\n    var components = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        components[_i] = arguments[_i];\n    }\n    var self = { tag: 'tuple', components: components };\n    return (0, runtype_1.create)(function (xs, visited) {\n        if (!Array.isArray(xs))\n            return util_1.FAILURE.TYPE_INCORRECT(self, xs);\n        if (xs.length !== components.length)\n            return util_1.FAILURE.CONSTRAINT_FAILED(self, \"Expected length \".concat(components.length, \", but was \").concat(xs.length));\n        var keys = (0, util_1.enumerableKeysOf)(xs);\n        var results = keys.map(function (key) {\n            return (0, runtype_1.innerValidate)(components[key], xs[key], visited);\n        });\n        var details = keys.reduce(function (details, key) {\n            var result = results[key];\n            if (!result.success)\n                details[key] = result.details || result.message;\n            return details;\n        }, []);\n        if ((0, util_1.enumerableKeysOf)(details).length !== 0)\n            return util_1.FAILURE.CONTENT_INCORRECT(self, details);\n        else\n            return (0, util_1.SUCCESS)(xs);\n    }, self);\n}\nexports.Tuple = Tuple;\n","\"use strict\";\nvar __values = (this && this.__values) || function(o) {\n    var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n    if (m) return m.call(o);\n    if (o && typeof o.length === \"number\") return {\n        next: function () {\n            if (o && i >= o.length) o = void 0;\n            return { value: o && o[i++], done: !o };\n        }\n    };\n    throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Union = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\n/**\n * Construct a union runtype from runtypes for its alternatives.\n */\nfunction Union() {\n    var alternatives = [];\n    for (var _i = 0; _i < arguments.length; _i++) {\n        alternatives[_i] = arguments[_i];\n    }\n    var match = function () {\n        var cases = [];\n        for (var _i = 0; _i < arguments.length; _i++) {\n            cases[_i] = arguments[_i];\n        }\n        return function (x) {\n            for (var i = 0; i < alternatives.length; i++) {\n                if (alternatives[i].guard(x)) {\n                    return cases[i](x);\n                }\n            }\n        };\n    };\n    var self = { tag: 'union', alternatives: alternatives, match: match };\n    return (0, runtype_1.create)(function (value, visited) {\n        var e_1, _a, e_2, _b, e_3, _c, e_4, _d;\n        if (typeof value !== 'object' || value === null) {\n            try {\n                for (var alternatives_1 = __values(alternatives), alternatives_1_1 = alternatives_1.next(); !alternatives_1_1.done; alternatives_1_1 = alternatives_1.next()) {\n                    var alternative = alternatives_1_1.value;\n                    if ((0, runtype_1.innerValidate)(alternative, value, visited).success)\n                        return (0, util_1.SUCCESS)(value);\n                }\n            }\n            catch (e_1_1) { e_1 = { error: e_1_1 }; }\n            finally {\n                try {\n                    if (alternatives_1_1 && !alternatives_1_1.done && (_a = alternatives_1.return)) _a.call(alternatives_1);\n                }\n                finally { if (e_1) throw e_1.error; }\n            }\n            return util_1.FAILURE.TYPE_INCORRECT(self, value);\n        }\n        var commonLiteralFields = {};\n        try {\n            for (var alternatives_2 = __values(alternatives), alternatives_2_1 = alternatives_2.next(); !alternatives_2_1.done; alternatives_2_1 = alternatives_2.next()) {\n                var alternative = alternatives_2_1.value;\n                if (alternative.reflect.tag === 'record') {\n                    var _loop_1 = function (fieldName) {\n                        var field = alternative.reflect.fields[fieldName];\n                        if (field.tag === 'literal') {\n                            if (commonLiteralFields[fieldName]) {\n                                if (commonLiteralFields[fieldName].every(function (value) { return value !== field.value; })) {\n                                    commonLiteralFields[fieldName].push(field.value);\n                                }\n                            }\n                            else {\n                                commonLiteralFields[fieldName] = [field.value];\n                            }\n                        }\n                    };\n                    for (var fieldName in alternative.reflect.fields) {\n                        _loop_1(fieldName);\n                    }\n                }\n            }\n        }\n        catch (e_2_1) { e_2 = { error: e_2_1 }; }\n        finally {\n            try {\n                if (alternatives_2_1 && !alternatives_2_1.done && (_b = alternatives_2.return)) _b.call(alternatives_2);\n            }\n            finally { if (e_2) throw e_2.error; }\n        }\n        for (var fieldName in commonLiteralFields) {\n            if (commonLiteralFields[fieldName].length === alternatives.length) {\n                try {\n                    for (var alternatives_3 = (e_3 = void 0, __values(alternatives)), alternatives_3_1 = alternatives_3.next(); !alternatives_3_1.done; alternatives_3_1 = alternatives_3.next()) {\n                        var alternative = alternatives_3_1.value;\n                        if (alternative.reflect.tag === 'record') {\n                            var field = alternative.reflect.fields[fieldName];\n                            if (field.tag === 'literal' &&\n                                (0, util_1.hasKey)(fieldName, value) &&\n                                value[fieldName] === field.value) {\n                                return (0, runtype_1.innerValidate)(alternative, value, visited);\n                            }\n                        }\n                    }\n                }\n                catch (e_3_1) { e_3 = { error: e_3_1 }; }\n                finally {\n                    try {\n                        if (alternatives_3_1 && !alternatives_3_1.done && (_c = alternatives_3.return)) _c.call(alternatives_3);\n                    }\n                    finally { if (e_3) throw e_3.error; }\n                }\n            }\n        }\n        try {\n            for (var alternatives_4 = __values(alternatives), alternatives_4_1 = alternatives_4.next(); !alternatives_4_1.done; alternatives_4_1 = alternatives_4.next()) {\n                var targetType = alternatives_4_1.value;\n                if ((0, runtype_1.innerValidate)(targetType, value, visited).success)\n                    return (0, util_1.SUCCESS)(value);\n            }\n        }\n        catch (e_4_1) { e_4 = { error: e_4_1 }; }\n        finally {\n            try {\n                if (alternatives_4_1 && !alternatives_4_1.done && (_d = alternatives_4.return)) _d.call(alternatives_4);\n            }\n            finally { if (e_4) throw e_4.error; }\n        }\n        return util_1.FAILURE.TYPE_INCORRECT(self, value);\n    }, self);\n}\nexports.Union = Union;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Unknown = void 0;\nvar runtype_1 = require(\"../runtype\");\nvar util_1 = require(\"../util\");\nvar self = { tag: 'unknown' };\n/**\n * Validates anything, but provides no new type information about it.\n */\nexports.Unknown = (0, runtype_1.create)(function (value) { return (0, util_1.SUCCESS)(value); }, self);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Void = void 0;\nvar unknown_1 = require(\"./unknown\");\n/**\n * Void is an alias for Unknown\n *\n * @deprecated Please use Unknown instead\n */\nexports.Void = unknown_1.Unknown;\n","\"use strict\";\n// Type guard to determine if an object has a given key\nvar __assign = (this && this.__assign) || function () {\n    __assign = Object.assign || function(t) {\n        for (var s, i = 1, n = arguments.length; i < n; i++) {\n            s = arguments[i];\n            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n                t[p] = s[p];\n        }\n        return t;\n    };\n    return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FAILURE = exports.SUCCESS = exports.enumerableKeysOf = exports.typeOf = exports.hasKey = void 0;\nvar result_1 = require(\"./result\");\nvar show_1 = require(\"./show\");\n// If this feature gets implemented, we can use `in` instead: https://github.com/Microsoft/TypeScript/issues/10485\nfunction hasKey(key, object) {\n    return typeof object === 'object' && object !== null && key in object;\n}\nexports.hasKey = hasKey;\nvar typeOf = function (value) {\n    var _a, _b, _c;\n    return typeof value === 'object'\n        ? value === null\n            ? 'null'\n            : Array.isArray(value)\n                ? 'array'\n                : ((_a = value.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Object'\n                    ? 'object'\n                    : (_c = (_b = value.constructor) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : typeof value\n        : typeof value;\n};\nexports.typeOf = typeOf;\nvar enumerableKeysOf = function (object) {\n    return typeof object === 'object' && object !== null\n        ? // Objects with a null prototype may not have `propertyIsEnumerable`\n            Reflect.ownKeys(object).filter(function (key) { var _a, _b; return (_b = (_a = object.propertyIsEnumerable) === null || _a === void 0 ? void 0 : _a.call(object, key)) !== null && _b !== void 0 ? _b : true; })\n        : [];\n};\nexports.enumerableKeysOf = enumerableKeysOf;\nfunction SUCCESS(value) {\n    return { success: true, value: value };\n}\nexports.SUCCESS = SUCCESS;\nexports.FAILURE = Object.assign(function (code, message, details) { return (__assign({ success: false, code: code, message: message }, (details ? { details: details } : {}))); }, {\n    TYPE_INCORRECT: function (self, value) {\n        var message = \"Expected \".concat(self.tag === 'template' ? \"string \".concat((0, show_1.default)(self)) : (0, show_1.default)(self), \", but was \").concat((0, exports.typeOf)(value));\n        return (0, exports.FAILURE)(result_1.Failcode.TYPE_INCORRECT, message);\n    },\n    VALUE_INCORRECT: function (name, expected, received) {\n        return (0, exports.FAILURE)(result_1.Failcode.VALUE_INCORRECT, \"Expected \".concat(name, \" \").concat(String(expected), \", but was \").concat(String(received)));\n    },\n    KEY_INCORRECT: function (self, expected, value) {\n        return (0, exports.FAILURE)(result_1.Failcode.KEY_INCORRECT, \"Expected \".concat((0, show_1.default)(self), \" key to be \").concat((0, show_1.default)(expected), \", but was \").concat((0, exports.typeOf)(value)));\n    },\n    CONTENT_INCORRECT: function (self, details) {\n        var message = \"Expected \".concat((0, show_1.default)(self), \", but was incompatible\");\n        return (0, exports.FAILURE)(result_1.Failcode.CONTENT_INCORRECT, message, details);\n    },\n    ARGUMENT_INCORRECT: function (message) {\n        return (0, exports.FAILURE)(result_1.Failcode.ARGUMENT_INCORRECT, message);\n    },\n    RETURN_INCORRECT: function (message) {\n        return (0, exports.FAILURE)(result_1.Failcode.RETURN_INCORRECT, message);\n    },\n    CONSTRAINT_FAILED: function (self, message) {\n        var info = message ? \": \".concat(message) : '';\n        return (0, exports.FAILURE)(result_1.Failcode.CONSTRAINT_FAILED, \"Failed constraint check for \".concat((0, show_1.default)(self)).concat(info));\n    },\n    PROPERTY_MISSING: function (self) {\n        var message = \"Expected \".concat((0, show_1.default)(self), \", but was missing\");\n        return (0, exports.FAILURE)(result_1.Failcode.PROPERTY_MISSING, message);\n    },\n    PROPERTY_PRESENT: function (value) {\n        var message = \"Expected nothing, but was \".concat((0, exports.typeOf)(value));\n        return (0, exports.FAILURE)(result_1.Failcode.PROPERTY_PRESENT, message);\n    },\n    NOTHING_EXPECTED: function (value) {\n        var message = \"Expected nothing, but was \".concat((0, exports.typeOf)(value));\n        return (0, exports.FAILURE)(result_1.Failcode.NOTHING_EXPECTED, message);\n    },\n});\n"],"names":["self","module","exports","qrcode","typeNumber","errorCorrectionLevel","_typeNumber","_errorCorrectionLevel","QRErrorCorrectionLevel","_modules","_moduleCount","_dataCache","_dataList","_this","makeImpl","test","maskPattern","moduleCount","modules","Array","row","col","setupPositionProbePattern","setupPositionAdjustPattern","setupTimingPattern","setupTypeInfo","setupTypeNumber","createData","mapData","r","c","pos","QRUtil","getPatternPosition","i","length","j","bits","getBCHTypeNumber","mod","Math","floor","data","getBCHTypeInfo","inc","bitIndex","byteIndex","maskFunc","getMaskFunction","dark","dataList","rsBlocks","QRRSBlock","getRSBlocks","buffer","qrBitBuffer","put","getMode","getLength","getLengthInBits","write","totalDataCount","dataCount","putBit","offset","maxDcCount","maxEcCount","dcdata","ecdata","dcCount","ecCount","totalCount","max","getBuffer","rsPoly","getErrorCorrectPolynomial","modPoly","qrPolynomial","modIndex","getAt","totalCodeCount","index","addData","mode","newData","qrNumber","qrAlphaNum","qr8BitByte","qrKanji","push","isDark","getModuleCount","make","minLostPoint","pattern","lostPoint","getLostPoint","createTableTag","cellSize","margin","qrHtml","createSvgTag","alt","title","opts","arguments","text","id","mr","rect","size","qrSvg","scalable","escapeXml","join","trim","createDataURL","min","x","y","createImgTag","img","s","escaped","charAt","createASCII","r1","r2","p","blocks","blocksLastLineNoMargin","ascii","substring","white","black","line","renderTo2dContext","context","fillStyle","fillRect","stringToBytes","stringToBytesFuncs","default","bytes","charCodeAt","createStringToBytes","unicodeData","numChars","unicodeMap","bin","base64DecodeInputStream","read","b","count","b0","b1","v","String","fromCharCode","unknownChar","PATTERN_POSITION_TABLE","G15","G18","getBCHDigit","L","M","Q","H","digit","d","errorCorrectLength","a","multiply","QRMath","gexp","type","sameCount","darkCount","abs","EXP_TABLE","LOG_TABLE","glog","n","num","shift","_num","e","ratio","RS_BLOCK_TABLE","qrRSBlock","rsBlock","list","_buffer","_length","bufIndex","bit","_data","strToNum","chatToNum","getCode","_bytes","SJIS","code","byteArrayOutputStream","writeByte","writeShort","writeBytes","off","len","writeString","toByteArray","toString","str","_str","_pos","_buflen","match","decode","width","height","getPixel","gif","_width","_height","setPixel","pixel","out","raster","getLZWRaster","lzwMinCodeSize","clearCode","endCode","bitLength","table","lzwTable","add","_out","_bitLength","_bitBuffer","byteOut","bitOut","flush","dataIndex","contains","indexOf","_map","_size","key","base64","_base64","writeEncoded","encode","padlen","utf8","charcode","t","isObject","obj","isArray","mergeDeep","target","sources","source","Object","keys","forEach","targetValue","sourceValue","assign","apply","o","downloadURI","uri","name","link","document","createElement","download","href","body","appendChild","click","removeChild","toDataURL","url","Promise","resolve","xhr","XMLHttpRequest","onload","reader","FileReader","onloadend","result","readAsDataURL","response","open","responseType","send","svg","this","_svg","_type","getNeighbor","drawFunction","_drawDot","_drawClassy","_drawClassyRounded","_drawRounded","_drawExtraRounded","_drawSquare","call","rotation","cx","cy","_element","setAttribute","PI","args","_rotateFigure","draw","createElementNS","_basicDot","_basicSquare","leftNeighbor","rightNeighbor","topNeighbor","bottomNeighbor","neighborsCount","_basicCornerRounded","_basicSideRounded","_basicCornerExtraRounded","_basicCornersRounded","dotSize","_basicExtraRounded","g","squareMask","dotMask","options","_defs","_options","qr","minSize","realQRSize","shape","shapeTypes","sqrt","drawImageSize","hideXDots","hideYDots","_qr","image","loadImage","f","_image","imageOptions","qrOptions","coverLevel","imageSize","errorCorrectionPercents","maxHiddenDots","originalHeight","originalWidth","maxHiddenAxisDots","hideDots","k","ceil","round","l","drawBackground","drawDots","hideBackgroundDots","u","h","drawCorners","drawImage","element","gradientOptions","backgroundOptions","gradient","color","_createColor","additionalRotation","_backgroundClipPath","filter","xBeginning","yBeginning","dot","dotsOptions","_dotsClipPath","xOffset","yOffset","additionalDots","fakeCount","xFakeBeginning","yFakeBeginning","_","center","C","cornersSquareSize","cornersDotSize","column","cornersSquareClipPath","cornersDotClipPath","cornersSquareOptions","_cornersSquareClipPath","_cornersDotClipPath","D","P","cornersSquare","w","cornersDotOptions","S","cornersDot","reject","Image","crossOrigin","src","dx","dy","dw","dh","imageUrl","positiveRotation","x0","y0","x1","y1","tan","colorStops","stop","qrTypes","drawTypes","sanitizeGradient","newGradient","A","Number","map","colorStop","sanitizeOptions","newOptions","Boolean","q","update","container","innerHTML","qrSVG","getElement","_svgDrawingPromise","drawQR","then","_extension","_canvas","_setupSvg","_canvasDrawingPromise","xml","XMLSerializer","serializeToString","image64","btoa","getContext","extension","toLowerCase","_setupCanvas","QRCodeStyling","_clearContainer","_container","append","_getElement","serializer","Blob","toBlob","downloadOptions","console","warn","encodeURIComponent","__webpack_module_cache__","__webpack_require__","moduleId","__webpack_modules__","getter","__esModule","definition","defineProperty","enumerable","get","prop","prototype","hasOwnProperty","__read","m","Symbol","iterator","ar","next","done","value","error","__spreadArray","to","from","pack","slice","concat","AsyncContract","errors_1","require","util_1","runtypes","_i","lastIndex","argRuntypes","returnRuntype","enforce","message","failure","FAILURE","ARGUMENT_INCORRECT","ValidationError","check","returnedPromise","RETURN_INCORRECT","Contract","checked","prototypes","WeakMap","getValidParameterIndices","propertyKey","runtypeCount","validParameterIndices","indices","parameterIndex","Map","set","Error","descriptor","method","methodId","constructor","typeIndex","validate","success","__extends","extendStatics","setPrototypeOf","__proto__","TypeError","__","create","_super","undefined","details","__createBinding","k2","__exportStar","InstanceOf","Nullish","Null","Undefined","Literal","literal_1","instanceof_1","__values","when","cases","e_1","_a","cases_1","cases_1_1","_b","T","guard","e_1_1","return","runtype","transformer","Failcode","TYPE_INCORRECT","VALUE_INCORRECT","KEY_INCORRECT","CONTENT_INCORRECT","CONSTRAINT_FAILED","PROPERTY_MISSING","PROPERTY_PRESENT","NOTHING_EXPECTED","innerValidate","isRuntype","index_1","show_1","RuntypeSymbol","hasKey","assert","_innerValidate","visited","has","SUCCESS","members","candidate","typeSet","VisitedState","Or","B","Union","And","Intersect","optional","Optional","nullable","withConstraint","constraint","Constraint","withGuard","withBrand","Brand","reflect","targetType","showStringified","circular","refl","tag","brand","underlying","alternatives","intersectees","show","showEmbedded","inner","needsParens","parenthesize","strings","every","string","backtick_1","reduce","prefix","suffix","startsWith","readonlyTag","fields","isPartial","partialTag","components","ctor","entity","delete","isReadonly","Set","runtype_1","InternalArr","asReadonly","withExtraModifierFuncs","xs","enumerableKeysOf","results","BigInt","Guard","unknown_1","Unknown","Dictionary","string_1","constraint_1","NumberKey","isNaN","keyRuntype","keyString","getPrototypeOf","numberString","isNumberLikeKey","keyInterop","globalThis","Function","intersectees_1","intersectees_1_1","Lazy","delayed","cached","getWrapped","literal","union_1","valueBase","Never","Partial","Record","InternalRecord","asPartial","pick","omit","extend","includes","keysOfFields","fieldsHasKey","xHasKey","isOptional","keyForValue","keyFor","quoteIfPresent","Template","escapeRegExp","replace","normalizeArgs","convenient","arg","pop","parseArgs","literal_2","splice","template","innerStrings","first","rest","last","union","literal_3","getInnerLiteral","intersect","literal_4","flattenInnerRuntypes","identity","revivers","number","bigint","boolean","null","getReviversFor","typeOf","reviveValidate","e_2","reviver","validated","_c","_d","alternative","_e","_f","intersectee","e_2_1","getRegExpPatternFor","createRegExpForTemplate","RegExp","regexp","matches","values","value_1","Tuple","e_3","e_4","alternatives_1","alternatives_1_1","commonLiteralFields","alternatives_2","alternatives_2_1","_loop_1","fieldName","field","alternatives_3","alternatives_3_1","e_3_1","alternatives_4","alternatives_4_1","e_4_1","Void","__assign","result_1","object","Reflect","ownKeys","propertyIsEnumerable","expected","received","info"],"sourceRoot":""}