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OAAO,MAAM,cAAc,MAAO,SAAS,CACzC,eAAgB,aAChB,OAAQ,EACR,MAAO,EACP,QAAS,OAAO,OAAO,EAAU,KAAK,OAAO,IAC5C,GAAa,MAAM,cAAc,OAAQ,CAC1C,KAAM,EACN,EAAG,SAAS,OAAO,EAAU,KAAK,OAAO,EAAU,SACjD,MAAM,cAAc,OAAQ,CAC9B,KAAM,EACN,EAAG,IACD,EACN,KAGK,CACT,CA3EA,GA6EA,gBAAgB,UAAW,eAAgB,eAEd,eAAzB,QAAQ,IAAI,WACd,UAAU,UAAY,YAGxB,IAAI,OAAS,SAAgB,GAC3B,IAAI,EAAW,EAAM,SACjB,EAAa,yBAAyB,EAAO,CAAC,aAE9C,EAAyB,QAAb,EAAqB,UAAY,aACjD,OAAO,MAAM,cAAc,EAAW,EACxC,EAEA,OAAO,aAAe,cAAc,CAClC,SAAU,UACT,eACH,OAAO,QAAU","file":"/npm/qrcode.react@1.0.1/lib/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/qrcode.react@1.0.1/lib/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar React = require('react');\n\nvar PropTypes = require('prop-types'); // qr.js doesn't handle error level of zero (M) so we need to do it right,\n// thus the deep require.\n\n\nvar QRCodeImpl = require('qr.js/lib/QRCode');\n\nvar ErrorCorrectLevel = require('qr.js/lib/ErrorCorrectLevel'); // TODO: pull this off of the QRCode class type so it matches.\n\n\n// Convert from UTF-16, forcing the use of byte-mode encoding in our QR Code.\n// This allows us to encode Hanji, Kanji, emoji, etc. Ideally we'd do more\n// detection and not resort to byte-mode if possible, but we're trading off\n// a smaller library for a smaller amount of data we can potentially encode.\n// Based on http://jonisalonen.com/2012/from-utf-16-to-utf-8-in-javascript/\nfunction convertStr(str) {\n  var out = '';\n\n  for (var i = 0; i < str.length; i++) {\n    var charcode = str.charCodeAt(i);\n\n    if (charcode < 0x0080) {\n      out += String.fromCharCode(charcode);\n    } else if (charcode < 0x0800) {\n      out += String.fromCharCode(0xc0 | charcode >> 6);\n      out += String.fromCharCode(0x80 | charcode & 0x3f);\n    } else if (charcode < 0xd800 || charcode >= 0xe000) {\n      out += String.fromCharCode(0xe0 | charcode >> 12);\n      out += String.fromCharCode(0x80 | charcode >> 6 & 0x3f);\n      out += String.fromCharCode(0x80 | charcode & 0x3f);\n    } else {\n      // This is a surrogate pair, so we'll reconsitute the pieces and work\n      // from that\n      i++;\n      charcode = 0x10000 + ((charcode & 0x3ff) << 10 | str.charCodeAt(i) & 0x3ff);\n      out += String.fromCharCode(0xf0 | charcode >> 18);\n      out += String.fromCharCode(0x80 | charcode >> 12 & 0x3f);\n      out += String.fromCharCode(0x80 | charcode >> 6 & 0x3f);\n      out += String.fromCharCode(0x80 | charcode & 0x3f);\n    }\n  }\n\n  return out;\n}\n\nvar DEFAULT_PROPS = {\n  size: 128,\n  level: 'L',\n  bgColor: '#FFFFFF',\n  fgColor: '#000000',\n  includeMargin: false\n};\nvar PROP_TYPES = process.env.NODE_ENV !== 'production' ? {\n  value: PropTypes.string.isRequired,\n  size: PropTypes.number,\n  level: PropTypes.oneOf(['L', 'M', 'Q', 'H']),\n  bgColor: PropTypes.string,\n  fgColor: PropTypes.string,\n  includeMargin: PropTypes.bool,\n  imageSettings: PropTypes.shape({\n    src: PropTypes.string.isRequired,\n    height: PropTypes.number.isRequired,\n    width: PropTypes.number.isRequired,\n    excavate: PropTypes.bool,\n    x: PropTypes.number,\n    y: PropTypes.number\n  })\n} : {};\nvar MARGIN_SIZE = 4; // This is *very* rough estimate of max amount of QRCode allowed to be covered.\n// It is \"wrong\" in a lot of ways (area is a terrible way to estimate, it\n// really should be number of modules covered), but if for some reason we don't\n// get an explicit height or width, I'd rather default to something than throw.\n\nvar DEFAULT_IMG_SCALE = 0.1;\n\nfunction generatePath(modules) {\n  var margin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n  var ops = [];\n  modules.forEach(function (row, y) {\n    var start = null;\n    row.forEach(function (cell, x) {\n      if (!cell && start !== null) {\n        // M0 0h7v1H0z injects the space with the move and drops the comma,\n        // saving a char per operation\n        ops.push(\"M\".concat(start + margin, \" \").concat(y + margin, \"h\").concat(x - start, \"v1H\").concat(start + margin, \"z\"));\n        start = null;\n        return;\n      } // end of row, clean up or skip\n\n\n      if (x === row.length - 1) {\n        if (!cell) {\n          // We would have closed the op above already so this can only mean\n          // 2+ light modules in a row.\n          return;\n        }\n\n        if (start === null) {\n          // Just a single dark module.\n          ops.push(\"M\".concat(x + margin, \",\").concat(y + margin, \" h1v1H\").concat(x + margin, \"z\"));\n        } else {\n          // Otherwise finish the current line.\n          ops.push(\"M\".concat(start + margin, \",\").concat(y + margin, \" h\").concat(x + 1 - start, \"v1H\").concat(start + margin, \"z\"));\n        }\n\n        return;\n      }\n\n      if (cell && start === null) {\n        start = x;\n      }\n    });\n  });\n  return ops.join('');\n} // We could just do this in generatePath, except that we want to support\n// non-Path2D canvas, so we need to keep it an explicit step.\n\n\nfunction excavateModules(modules, excavation) {\n  return modules.slice().map(function (row, y) {\n    if (y < excavation.y || y >= excavation.y + excavation.h) {\n      return row;\n    }\n\n    return row.map(function (cell, x) {\n      if (x < excavation.x || x >= excavation.x + excavation.w) {\n        return cell;\n      }\n\n      return false;\n    });\n  });\n}\n\nfunction getImageSettings(props, cells) {\n  var imageSettings = props.imageSettings,\n      size = props.size,\n      includeMargin = props.includeMargin;\n\n  if (imageSettings == null) {\n    return null;\n  }\n\n  var margin = includeMargin ? MARGIN_SIZE : 0;\n  var numCells = cells.length + margin * 2;\n  var defaultSize = Math.floor(size * DEFAULT_IMG_SCALE);\n  var scale = numCells / size;\n  var w = (imageSettings.width || defaultSize) * scale;\n  var h = (imageSettings.height || defaultSize) * scale;\n  var x = imageSettings.x == null ? cells.length / 2 - w / 2 : imageSettings.x * scale;\n  var y = imageSettings.y == null ? cells.length / 2 - h / 2 : imageSettings.y * scale;\n  var excavation = null;\n\n  if (imageSettings.excavate) {\n    var floorX = Math.floor(x);\n    var floorY = Math.floor(y);\n    var ceilW = Math.ceil(w + x - floorX);\n    var ceilH = Math.ceil(h + y - floorY);\n    excavation = {\n      x: floorX,\n      y: floorY,\n      w: ceilW,\n      h: ceilH\n    };\n  }\n\n  return {\n    x: x,\n    y: y,\n    h: h,\n    w: w,\n    excavation: excavation\n  };\n} // For canvas we're going to switch our drawing mode based on whether or not\n// the environment supports Path2D. We only need the constructor to be\n// supported, but Edge doesn't actually support the path (string) type\n// argument. Luckily it also doesn't support the addPath() method. We can\n// treat that as the same thing.\n\n\nvar SUPPORTS_PATH2D = function () {\n  try {\n    new Path2D().addPath(new Path2D());\n  } catch (e) {\n    return false;\n  }\n\n  return true;\n}();\n\nvar QRCodeCanvas =\n/*#__PURE__*/\nfunction (_React$PureComponent) {\n  _inherits(QRCodeCanvas, _React$PureComponent);\n\n  function QRCodeCanvas() {\n    var _getPrototypeOf2;\n\n    var _this;\n\n    _classCallCheck(this, QRCodeCanvas);\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(QRCodeCanvas)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n    _defineProperty(_assertThisInitialized(_this), \"_canvas\", void 0);\n\n    _defineProperty(_assertThisInitialized(_this), \"_image\", void 0);\n\n    _defineProperty(_assertThisInitialized(_this), \"state\", {\n      imgLoaded: false\n    });\n\n    _defineProperty(_assertThisInitialized(_this), \"handleImageLoad\", function () {\n      _this.setState({\n        imgLoaded: true\n      });\n    });\n\n    return _this;\n  }\n\n  _createClass(QRCodeCanvas, [{\n    key: \"componentDidMount\",\n    value: function componentDidMount() {\n      if (this._image && this._image.complete) {\n        this.handleImageLoad();\n      }\n\n      this.update();\n    }\n  }, {\n    key: \"componentWillReceiveProps\",\n    value: function componentWillReceiveProps(nextProps) {\n      var _this$props$imageSett, _nextProps$imageSetti;\n\n      var currentSrc = (_this$props$imageSett = this.props.imageSettings) === null || _this$props$imageSett === void 0 ? void 0 : _this$props$imageSett.src;\n      var nextSrc = (_nextProps$imageSetti = nextProps.imageSettings) === null || _nextProps$imageSetti === void 0 ? void 0 : _nextProps$imageSetti.src;\n\n      if (currentSrc !== nextSrc) {\n        this.setState({\n          imgLoaded: false\n        });\n      }\n    }\n  }, {\n    key: \"componentDidUpdate\",\n    value: function componentDidUpdate() {\n      this.update();\n    }\n  }, {\n    key: \"update\",\n    value: function update() {\n      var _this$props = this.props,\n          value = _this$props.value,\n          size = _this$props.size,\n          level = _this$props.level,\n          bgColor = _this$props.bgColor,\n          fgColor = _this$props.fgColor,\n          includeMargin = _this$props.includeMargin,\n          imageSettings = _this$props.imageSettings; // We'll use type===-1 to force QRCode to automatically pick the best type\n\n      var qrcode = new QRCodeImpl(-1, ErrorCorrectLevel[level]);\n      qrcode.addData(convertStr(value));\n      qrcode.make();\n\n      if (this._canvas != null) {\n        var canvas = this._canvas;\n        var ctx = canvas.getContext('2d');\n\n        if (!ctx) {\n          return;\n        }\n\n        var cells = qrcode.modules;\n\n        if (cells === null) {\n          return;\n        }\n\n        var margin = includeMargin ? MARGIN_SIZE : 0;\n        var numCells = cells.length + margin * 2;\n        var calculatedImageSettings = getImageSettings(this.props, cells);\n\n        if (imageSettings != null && calculatedImageSettings != null) {\n          if (calculatedImageSettings.excavation != null) {\n            cells = excavateModules(cells, calculatedImageSettings.excavation);\n          }\n        } // We're going to scale this so that the number of drawable units\n        // matches the number of cells. This avoids rounding issues, but does\n        // result in some potentially unwanted single pixel issues between\n        // blocks, only in environments that don't support Path2D.\n\n\n        var pixelRatio = window.devicePixelRatio || 1;\n        canvas.height = canvas.width = size * pixelRatio;\n        var scale = size / numCells * pixelRatio;\n        ctx.scale(scale, scale); // Draw solid background, only paint dark modules.\n\n        ctx.fillStyle = bgColor;\n        ctx.fillRect(0, 0, numCells, numCells);\n        ctx.fillStyle = fgColor;\n\n        if (SUPPORTS_PATH2D) {\n          // $FlowFixMe: Path2D c'tor doesn't support args yet.\n          ctx.fill(new Path2D(generatePath(cells, margin)));\n        } else {\n          cells.forEach(function (row, rdx) {\n            row.forEach(function (cell, cdx) {\n              if (cell) {\n                ctx.fillRect(cdx + margin, rdx + margin, 1, 1);\n              }\n            });\n          });\n        }\n\n        if (this.state.imgLoaded && this._image && calculatedImageSettings != null) {\n          ctx.drawImage(this._image, calculatedImageSettings.x + margin, calculatedImageSettings.y + margin, calculatedImageSettings.w, calculatedImageSettings.h);\n        }\n      }\n    }\n  }, {\n    key: \"render\",\n    value: function render() {\n      var _this2 = this;\n\n      var _this$props2 = this.props,\n          value = _this$props2.value,\n          size = _this$props2.size,\n          level = _this$props2.level,\n          bgColor = _this$props2.bgColor,\n          fgColor = _this$props2.fgColor,\n          style = _this$props2.style,\n          includeMargin = _this$props2.includeMargin,\n          imageSettings = _this$props2.imageSettings,\n          otherProps = _objectWithoutProperties(_this$props2, [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"style\", \"includeMargin\", \"imageSettings\"]);\n\n      var canvasStyle = _objectSpread({\n        height: size,\n        width: size\n      }, style);\n\n      var img = null;\n      var imgSrc = imageSettings && imageSettings.src;\n\n      if (imageSettings != null && imgSrc != null) {\n        img = React.createElement(\"img\", {\n          src: imgSrc,\n          style: {\n            display: 'none'\n          },\n          onLoad: this.handleImageLoad,\n          ref: function ref(_ref) {\n            return _this2._image = _ref;\n          }\n        });\n      }\n\n      return React.createElement(React.Fragment, null, React.createElement(\"canvas\", _extends({\n        style: canvasStyle,\n        height: size,\n        width: size,\n        ref: function ref(_ref2) {\n          return _this2._canvas = _ref2;\n        }\n      }, otherProps)), img);\n    }\n  }]);\n\n  return QRCodeCanvas;\n}(React.PureComponent);\n\n_defineProperty(QRCodeCanvas, \"defaultProps\", DEFAULT_PROPS);\n\nif (process.env.NODE_ENV !== 'production') {\n  QRCodeCanvas.propTypes = PROP_TYPES;\n}\n\nvar QRCodeSVG =\n/*#__PURE__*/\nfunction (_React$PureComponent2) {\n  _inherits(QRCodeSVG, _React$PureComponent2);\n\n  function QRCodeSVG() {\n    _classCallCheck(this, QRCodeSVG);\n\n    return _possibleConstructorReturn(this, _getPrototypeOf(QRCodeSVG).apply(this, arguments));\n  }\n\n  _createClass(QRCodeSVG, [{\n    key: \"render\",\n    value: function render() {\n      var _this$props3 = this.props,\n          value = _this$props3.value,\n          size = _this$props3.size,\n          level = _this$props3.level,\n          bgColor = _this$props3.bgColor,\n          fgColor = _this$props3.fgColor,\n          includeMargin = _this$props3.includeMargin,\n          imageSettings = _this$props3.imageSettings,\n          otherProps = _objectWithoutProperties(_this$props3, [\"value\", \"size\", \"level\", \"bgColor\", \"fgColor\", \"includeMargin\", \"imageSettings\"]); // We'll use type===-1 to force QRCode to automatically pick the best type\n\n\n      var qrcode = new QRCodeImpl(-1, ErrorCorrectLevel[level]);\n      qrcode.addData(convertStr(value));\n      qrcode.make();\n      var cells = qrcode.modules;\n\n      if (cells === null) {\n        return null;\n      }\n\n      var margin = includeMargin ? MARGIN_SIZE : 0;\n      var numCells = cells.length + margin * 2;\n      var calculatedImageSettings = getImageSettings(this.props, cells);\n      var image = null;\n\n      if (imageSettings != null && calculatedImageSettings != null) {\n        if (calculatedImageSettings.excavation != null) {\n          cells = excavateModules(cells, calculatedImageSettings.excavation);\n        }\n\n        image = React.createElement(\"image\", {\n          xlinkHref: imageSettings.src,\n          height: calculatedImageSettings.h,\n          width: calculatedImageSettings.w,\n          x: calculatedImageSettings.x + margin,\n          y: calculatedImageSettings.y + margin,\n          preserveAspectRatio: \"none\"\n        });\n      } // Drawing strategy: instead of a rect per module, we're going to create a\n      // single path for the dark modules and layer that on top of a light rect,\n      // for a total of 2 DOM nodes. We pay a bit more in string concat but that's\n      // way faster than DOM ops.\n      // For level 1, 441 nodes -> 2\n      // For level 40, 31329 -> 2\n\n\n      var fgPath = generatePath(cells, margin);\n      return React.createElement(\"svg\", _extends({\n        shapeRendering: \"crispEdges\",\n        height: size,\n        width: size,\n        viewBox: \"0 0 \".concat(numCells, \" \").concat(numCells)\n      }, otherProps), React.createElement(\"path\", {\n        fill: bgColor,\n        d: \"M0,0 h\".concat(numCells, \"v\").concat(numCells, \"H0z\")\n      }), React.createElement(\"path\", {\n        fill: fgColor,\n        d: fgPath\n      }), image);\n    }\n  }]);\n\n  return QRCodeSVG;\n}(React.PureComponent);\n\n_defineProperty(QRCodeSVG, \"defaultProps\", DEFAULT_PROPS);\n\nif (process.env.NODE_ENV !== 'production') {\n  QRCodeSVG.propTypes = PROP_TYPES;\n}\n\nvar QRCode = function QRCode(props) {\n  var renderAs = props.renderAs,\n      otherProps = _objectWithoutProperties(props, [\"renderAs\"]);\n\n  var Component = renderAs === 'svg' ? QRCodeSVG : QRCodeCanvas;\n  return React.createElement(Component, otherProps);\n};\n\nQRCode.defaultProps = _objectSpread({\n  renderAs: 'canvas'\n}, DEFAULT_PROPS);\nmodule.exports = QRCode;"]}