{"version":3,"file":null,"sources":["../../../../../../\u0000babelHelpers","../../src/util/Utilities.js","../../src/service/Service.js","../../src/service/element/ElementService.js","../../src/service/element/NodeElementService.js","../../src/renderer/Renderer.js","../../src/renderer/CanvasRenderer.js","../../src/Alignment.js","../../src/ErrorCorrection.js","../../src/Galois.js","../../src/Version.js","../../src/Frame.js","../../src/renderer/ImageRenderer.js","../../src/service/ServiceManager.js","../../src/QRious.js","../../src/runtime/node.js"],"sourcesContent":["var babelHelpers = {};\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n};\n\nexport var jsx = function () {\n var REACT_ELEMENT_TYPE = typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\") || 0xeac7;\n return function createRawReactElement(type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {};\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n };\n}();\n\nexport var asyncToGenerator = function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step(\"next\", value);\n }, function (err) {\n return step(\"throw\", err);\n });\n }\n }\n\n return step(\"next\");\n });\n };\n};\n\nexport var classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nexport var createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nexport var defineEnumerableProperties = function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n return obj;\n};\n\nexport var defaults = function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n};\n\nexport var defineProperty = function (obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n};\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexport var get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nexport var inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar _instanceof = function (left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n};\n\nexport var interopRequireDefault = function (obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n};\n\nexport var interopRequireWildcard = function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n};\n\nexport var newArrowCheck = function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n};\n\nexport var objectDestructuringEmpty = function (obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n};\n\nexport var objectWithoutProperties = function (obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nexport var possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nexport var selfGlobal = typeof global === \"undefined\" ? self : global;\n\nexport var set = function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n};\n\nexport var slicedToArray = function () {\n function sliceIterator(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"]) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n };\n}();\n\nexport var slicedToArrayLoose = function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n } else {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }\n};\n\nexport var taggedTemplateLiteral = function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n};\n\nexport var taggedTemplateLiteralLoose = function (strings, raw) {\n strings.raw = raw;\n return strings;\n};\n\nexport var temporalRef = function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n};\n\nexport var temporalUndefined = {};\n\nexport var toArray = function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n};\n\nexport var toConsumableArray = function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n } else {\n return Array.from(arr);\n }\n};\n\nbabelHelpers;\n\nexport { _typeof as typeof, _extends as extends, _instanceof as instanceof }","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains utility methods that are useful throughout the library.\n *\n * @public\n */\nclass Utilities {\n\n /**\n * Copies all properties from the source object to the target object, however, all property\n * names on the target will be prefixed with an underscore, used to indicate that they are private.\n *\n * @param {Object} target - the object to which the private fields are to be copied\n * @param {Object} source - the object from which the fields are to be copied\n * @return {Object} A reference to the target object.\n * @public\n * @static\n */\n static privatize(target, source) {\n for (let key in source) {\n if (source.hasOwnProperty(key)) {\n target[`_${key}`] = source[key]\n }\n }\n\n return target\n }\n\n /**\n * Sets the specified value on a given field on the object provided.\n *\n * If value is null, the specified default value will be used instead.\n *\n * An optional transformer can be specified which will be used to transform the value (or default value)\n * before it is assigned to the field.\n *\n * @param {Object} object - the object whose field is to be set with value\n * @param {String} fieldName - the field to be set with value\n * @param {*} value - the value to be set on the named field\n * @param {*} [defaultValue] - the value to be used if value is null\n * @param {Function} [transformer] - a function used to transform the value before it is assigned to the named field\n * @return {Boolean} true if the value of the field has changed as a result of the assignment; otherwise\n * false.\n * @public\n * @static\n */\n static setter(object, fieldName, value, defaultValue, transformer) {\n const oldValue = object[fieldName]\n let newValue = value != null ? value : defaultValue\n if (typeof transformer === 'function') {\n newValue = transformer(newValue)\n }\n\n object[fieldName] = newValue\n\n return newValue !== oldValue\n }\n\n /**\n * Throws an error indicating that the a given method on a specific class has not been implemented.\n *\n * @param {String} className - the name of the class on which the method has not been implemented\n * @param {String} methodName - the name of the method which has not been implemented\n * @throws {Error} The error describing the class method which has not been implemented.\n * @public\n * @static\n */\n static throwUnimplemented(className, methodName) {\n throw new Error(`\"${methodName}\" method must be implemented on the ${className} class`)\n }\n\n /**\n * Transforms the specified string to upper case while remaining null-safe.\n *\n * @param {String} string - the string to be transformed to upper case\n * @return {String} string transformed to upper case if string is not null.\n * @public\n * @static\n */\n static toUpperCase(string) {\n return string != null && string.toUpperCase()\n }\n}\n\nexport default Utilities\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Defines a service contract that must be met by all implementations.\n *\n * @public\n */\nclass Service {\n\n /**\n * Returns the name of this {@link Service}.\n *\n * @return {String} The service name.\n * @public\n */\n getName() {\n Utilities.throwUnimplemented('Service', 'getName')\n }\n}\n\nexport default Service\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Service from '../Service'\nimport Utilities from '../../util/Utilities'\n\n/**\n * A service for working with elements.\n *\n * @public\n * @extends Service\n */\nclass ElementService extends Service {\n\n /**\n * Creates an instance of a canvas element.\n *\n * @return {*} The newly created canvas element.\n * @public\n */\n createCanvas() {\n Utilities.throwUnimplemented('ElementService', 'createCanvas')\n }\n\n /**\n * Creates an instance of a image element.\n *\n * @return {*} The newly created image element.\n * @public\n */\n createImage() {\n Utilities.throwUnimplemented('ElementService', 'createImage')\n }\n\n /**\n * @override\n */\n getName() {\n return 'element'\n }\n\n /**\n * Returns whether the specified element is a canvas.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is a canvas; otherwise false.\n * @public\n */\n isCanvas(element) {\n Utilities.throwUnimplemented('ElementService', 'isCanvas')\n }\n\n /**\n * Returns whether the specified element is an image.\n *\n * @param {*} element - the element to be checked\n * @return {Boolean} true if element is an image; otherwise false.\n * @public\n */\n isImage(element) {\n Utilities.throwUnimplemented('ElementService', 'isImage')\n }\n}\n\nexport default ElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Canvas, { Image } from 'canvas'\n\nimport ElementService from './ElementService'\n\n/**\n * An implementation of {@link ElementService} intended for use within a Node.js environment but is only supported when\n * the canvas module has also been depended on.\n *\n * @public\n * @extends ElementService\n */\nclass NodeElementService extends ElementService {\n\n /**\n * @override\n */\n static isSupported() {\n return Canvas != null\n }\n\n /**\n * @override\n */\n createCanvas() {\n return new Canvas()\n }\n\n /**\n * @override\n */\n createImage() {\n return new Image()\n }\n\n /**\n * @override\n */\n isCanvas(element) {\n return element instanceof Canvas\n }\n\n /**\n * @override\n */\n isImage(element) {\n return element instanceof Image\n }\n}\n\nexport default NodeElementService\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Utilities from '../util/Utilities'\n\n/**\n * Responsible for rendering a QR code {@link Frame} on a specific type of element.\n *\n * A renderer may be dependant on the rendering of another element, so ordering of their execution is important.\n *\n * @public\n */\nclass Renderer {\n\n /**\n * Creates a new instance of {@link Renderer} for the qrious instance provided.\n *\n * @param {QRious} qrious - the {@link QRious} instance to be used\n * @public\n */\n constructor(qrious) {\n /**\n * The {@link QRious} instance.\n *\n * @protected\n * @type {QRious}\n */\n this.qrious = qrious\n }\n\n /**\n * Draws the specified QR code frame on the underlying element.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @param {Frame} frame - the {@link Frame} to be drawn\n * @protected\n */\n draw(frame) {\n Utilities.throwUnimplemented('Renderer', 'draw')\n }\n\n /**\n * Calculates the size (in pixel units) to represent an individual module within the QR code based on the\n * frame provided.\n *\n * The returned value will be at least one, even in cases where the size of the QR code does not fit its contents.\n * This is done so that the inevitable clipping is handled more gracefully since this way at least something is\n * displayed instead of just a blank space filled by the background color.\n *\n * @param {Frame} frame - the {@link Frame} from which the module size is to be derived\n * @return {Number} The pixel size for each module in the QR code which will be no less than one.\n * @protected\n */\n getModuleSize(frame) {\n const pixels = Math.floor(this.qrious.size / frame.width)\n\n return Math.max(1, pixels)\n }\n\n /**\n * Calculates the offset/padding (in pixel units) to be inserted before the QR code based on the frame\n * provided.\n *\n * The returned value will be zero if there is no available offset or if the size of the QR code does not fit its\n * contents. It will never be a negative value. This is done so that the inevitable clipping appears more naturally\n * and it is not clipped from all directions.\n *\n * @param {Frame} frame - the {@link Frame} from which the offset is to be derived\n * @return {Number} The pixel offset for the QR code which will be no less than zero.\n * @protected\n */\n getOffset(frame) {\n const moduleSize = this.getModuleSize(frame)\n const offset = Math.floor((this.qrious.size - moduleSize * frame.width) / 2)\n\n return Math.max(0, offset)\n }\n\n /**\n * Renders a QR code on the underlying element based on the frame provided.\n *\n * @param {Frame} frame - the {@link Frame} to be rendered\n * @public\n */\n render(frame) {\n this.resize()\n this.reset()\n this.draw(frame)\n }\n\n /**\n * Resets the underlying element, effectively clearing any previously rendered QR code.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n reset() {\n Utilities.throwUnimplemented('Renderer', 'reset')\n }\n\n /**\n * Ensures that the size of the underlying element matches that defined on the associated {@link QRious} instance.\n *\n * Implementations of {@link Renderer} must override this method with their own specific logic.\n *\n * @protected\n */\n resize() {\n Utilities.throwUnimplemented('Renderer', 'resize')\n }\n}\n\nexport default Renderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with canvas elements.\n *\n * @public\n * @extends Renderer\n */\nclass CanvasRenderer extends Renderer {\n\n /**\n * @override\n */\n draw(frame) {\n const qrious = this.qrious\n const moduleSize = this.getModuleSize(frame)\n const offset = this.getOffset(frame)\n const context = qrious.canvas.getContext('2d')\n\n context.fillStyle = qrious.foreground\n\n for (let i = 0; i < frame.width; i++) {\n for (let j = 0; j < frame.width; j++) {\n if (frame.buffer[j * frame.width + i]) {\n context.fillRect(moduleSize * i + offset, moduleSize * j + offset, moduleSize, moduleSize)\n }\n }\n }\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n const context = qrious.canvas.getContext('2d')\n\n context.lineWidth = 1\n context.clearRect(0, 0, qrious.size, qrious.size)\n context.fillStyle = qrious.background\n context.fillRect(0, 0, qrious.size, qrious.size)\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const canvas = qrious.canvas\n\n canvas.width = qrious.size\n canvas.height = qrious.size\n }\n}\n\nexport default CanvasRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains alignment pattern information.\n *\n * @public\n */\nclass Alignment {\n\n /**\n * Returns the alignment pattern block.\n *\n * @return {Number[]} The alignment pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0, 11, 15, 19, 23, 27, 31,\n 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24,\n 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28\n ]\n }\n}\n\nexport default Alignment\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/* eslint no-multi-spaces: 0 */\n\n/**\n * Contains error correction information.\n *\n * @public\n */\nclass ErrorCorrection {\n\n /**\n * Returns the error correction blocks.\n *\n * There are four elements per version. The first two indicate the number of blocks, then the data width, and finally\n * the ECC width.\n *\n * @return {Number[]} The ECC blocks.\n * @public\n * @static\n */\n static get BLOCKS() {\n return [\n 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17,\n 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28,\n 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22,\n 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16,\n 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22,\n 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28,\n 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26,\n 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26,\n 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24,\n 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28,\n 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24,\n 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28,\n 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22,\n 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24,\n 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24,\n 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30,\n 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28,\n 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28,\n 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26,\n 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28,\n 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30,\n 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24,\n 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30,\n 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30,\n 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30,\n 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30,\n 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30,\n 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30,\n 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30,\n 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30,\n 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30,\n 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30,\n 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30,\n 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30,\n 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30,\n 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30,\n 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30,\n 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30,\n 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30,\n 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30\n ]\n }\n\n /**\n * Returns the final format bits with mask (level << 3 | mask).\n *\n * @return {Number[]} The final format bits.\n * @public\n * @static\n */\n static get FINAL_FORMAT() {\n return [\n // L\n 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,\n // M\n 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,\n // Q\n 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,\n // H\n 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b\n ]\n }\n\n /**\n * Returns a map of human-readable ECC levels.\n *\n * @return {Object} A ECC level mapping.\n * @public\n * @static\n */\n static get LEVELS() {\n return {\n L: 1,\n M: 2,\n Q: 3,\n H: 4\n }\n }\n}\n\nexport default ErrorCorrection\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains Galois field information.\n *\n * @public\n */\nclass Galois {\n\n /**\n * Returns the Galois field exponent table.\n *\n * @return {Number[]} The Galois field exponent table.\n * @public\n * @static\n */\n static get EXPONENT() {\n return [\n 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26,\n 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0,\n 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23,\n 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1,\n 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0,\n 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2,\n 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce,\n 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc,\n 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54,\n 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73,\n 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff,\n 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41,\n 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6,\n 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09,\n 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16,\n 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00\n ]\n }\n\n /**\n * Returns the Galois field log table.\n *\n * @return {Number[]} The Galois field log table.\n * @public\n * @static\n */\n static get LOG() {\n return [\n 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b,\n 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71,\n 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x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bb, 0xcc, 0x3e, 0x5a,\n 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7,\n 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf\n ]\n }\n}\n\nexport default Galois\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * Contains version pattern information.\n *\n * @public\n */\nclass Version {\n\n /**\n * Returns the version pattern block.\n *\n * @return {Number[]} The version pattern block.\n * @public\n * @static\n */\n static get BLOCK() {\n return [\n 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532,\n 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5,\n 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69\n ]\n }\n}\n\nexport default Version\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Alignment from './Alignment'\nimport ErrorCorrection from './ErrorCorrection'\nimport Galois from './Galois'\nimport Version from './Version'\n\n/**\n * Generates information for a QR code frame based on a specific value to be encoded.\n *\n * @public\n */\nclass Frame {\n\n static _createArray(length) {\n const array = []\n\n for (let i = 0; i < length; i++) {\n array[i] = 0\n }\n\n return array\n }\n\n static _getMaskBit(x, y) {\n let bit\n\n if (x > y) {\n bit = x\n x = y\n y = bit\n }\n\n bit = y\n bit += y * y\n bit >>= 1\n bit += x\n\n return bit\n }\n\n static _modN(x) {\n while (x >= 255) {\n x -= 255\n x = (x >> 8) + (x & 255)\n }\n\n return x\n }\n\n // *Badness* coefficients.\n static get N1() {\n return 3\n }\n static get N2() {\n return 3\n }\n static get N3() {\n return 40\n }\n static get N4() {\n return 10\n }\n\n /**\n * Creates an instance of {@link Frame} based on the options provided.\n *\n * @param {Frame~Options} options - the options to be used\n * @public\n */\n constructor(options) {\n this._badness = []\n this._level = ErrorCorrection.LEVELS[options.level]\n this._polynomial = []\n this._value = options.value\n this._valueLength = this._value.length\n this._version = 0\n this._stringBuffer = this._value.slice(0)\n\n let dataBlock\n let eccBlock\n let neccBlock1\n let neccBlock2\n\n while (this._version < 40) {\n this._version++\n\n let index = (this._level - 1) * 4 + (this._version - 1) * 16\n\n neccBlock1 = ErrorCorrection.BLOCKS[index++]\n neccBlock2 = ErrorCorrection.BLOCKS[index++]\n dataBlock = ErrorCorrection.BLOCKS[index++]\n eccBlock = ErrorCorrection.BLOCKS[index]\n\n index = dataBlock * (neccBlock1 + neccBlock2) + neccBlock2 - 3 + (this._version <= 9)\n\n if (this._valueLength <= index) {\n break\n }\n }\n\n this._dataBlock = dataBlock\n this._eccBlock = eccBlock\n this._neccBlock1 = neccBlock1\n this._neccBlock2 = neccBlock2\n\n /**\n * The data width is based on version.\n *\n * @public\n * @type {Number}\n */\n // FIXME: Ensure that it fits instead of being truncated.\n this.width = 17 + 4 * this._version\n\n /**\n * The image buffer.\n *\n * @public\n * @type {Number[]}\n */\n this.buffer = Frame._createArray(this.width * this.width)\n\n this._ecc = Frame._createArray(this._dataBlock + (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2)\n this._mask = Frame._createArray((this.width * (this.width + 1) + 1) / 2)\n\n this._insertFinders()\n this._insertAlignments()\n\n // Insert single foreground cell.\n this.buffer[8 + this.width * (this.width - 8)] = 1\n\n this._insertTimingGap()\n this._reverseMask()\n this._insertTimingRowAndColumn()\n this._insertVersion()\n this._syncMask()\n this._convertBitStream(this._stringBuffer.length)\n this._calculatePolynomial()\n this._appendEccToData()\n this._interleaveBlocks()\n this._pack()\n this._finish()\n }\n\n _addAlignment(x, y) {\n this.buffer[x + this.width * y] = 1\n\n for (let i = -2; i < 2; i++) {\n this.buffer[x + i + this.width * (y - 2)] = 1\n this.buffer[x - 2 + this.width * (y + i + 1)] = 1\n this.buffer[x + 2 + this.width * (y + i)] = 1\n this.buffer[x + i + 1 + this.width * (y + 2)] = 1\n }\n\n for (let i = 0; i < 2; i++) {\n this._setMask(x - 1, y + i)\n this._setMask(x + 1, y - i)\n this._setMask(x - i, y - 1)\n this._setMask(x + i, y + 1)\n }\n }\n\n _appendData(data, dataLength, ecc, eccLength) {\n for (let i = 0; i < eccLength; i++) {\n this._stringBuffer[ecc + i] = 0\n }\n\n for (let i = 0; i < dataLength; i++) {\n const bit = Galois.LOG[this._stringBuffer[data + i] ^ this._stringBuffer[ecc]]\n\n if (bit !== 255) {\n for (let j = 1; j < eccLength; j++) {\n this._stringBuffer[ecc + j - 1] = this._stringBuffer[ecc + j] ^ Galois.EXPONENT[Frame._modN(bit + this._polynomial[eccLength - j])]\n }\n } else {\n for (let j = ecc; j < ecc + eccLength; j++) {\n this._stringBuffer[j] = this._stringBuffer[j + 1]\n }\n }\n\n this._stringBuffer[ecc + eccLength - 1] = bit === 255 ? 0 : Galois.EXPONENT[Frame._modN(bit + this._polynomial[0])]\n }\n }\n\n _appendEccToData() {\n let data = 0\n let ecc = this._calculateMaxLength()\n\n for (let i = 0; i < this._neccBlock1; i++) {\n this._appendData(data, this._dataBlock, ecc, this._eccBlock)\n\n data += this._dataBlock\n ecc += this._eccBlock\n }\n\n for (let i = 0; i < this._neccBlock2; i++) {\n this._appendData(data, this._dataBlock + 1, ecc, this._eccBlock)\n\n data += this._dataBlock + 1\n ecc += this._eccBlock\n }\n }\n\n _applyMask(mask) {\n const width = this.width\n\n switch (mask) {\n case 0:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(x + y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 1:\n for (let y = 0; y < width; y++) {\n for (let x = 0; x < width; x++) {\n if (!(y & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 2:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 3:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = r3y, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!r3x && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 4:\n for (let y = 0; y < width; y++) {\n for (let r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n r3y = !r3y\n }\n\n if (!r3y && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 5:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((x & y & 1) + !(!r3x | !r3y)) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 6:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!(x & y & 1 + (r3x && r3x === r3y) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n case 7:\n for (let r3y = 0, y = 0; y < width; y++, r3y++) {\n if (r3y === 3) {\n r3y = 0\n }\n\n for (let r3x = 0, x = 0; x < width; x++, r3x++) {\n if (r3x === 3) {\n r3x = 0\n }\n\n if (!((r3x && r3x === r3y) + (x + y & 1) & 1) && !this._isMasked(x, y)) {\n this.buffer[x + y * width] ^= 1\n }\n }\n }\n\n break\n }\n }\n\n _calculateMaxLength() {\n return this._dataBlock * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n }\n\n _calculatePolynomial() {\n this._polynomial[0] = 1\n\n for (let i = 0; i < this._eccBlock; i++) {\n this._polynomial[i + 1] = 1\n\n for (let j = i; j > 0; j--) {\n this._polynomial[j] = this._polynomial[j] ? this._polynomial[j - 1] ^ Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[j]] + i)] : this._polynomial[j - 1]\n }\n\n this._polynomial[0] = Galois.EXPONENT[Frame._modN(Galois.LOG[this._polynomial[0]] + i)]\n }\n\n // Use logs for generator polynomial to save calculation step.\n for (let i = 0; i <= this._eccBlock; i++) {\n this._polynomial[i] = Galois.LOG[this._polynomial[i]]\n }\n }\n\n _checkBadness() {\n let bad = 0\n const width = this.width\n\n // Blocks of same colour.\n for (let y = 0; y < width - 1; y++) {\n for (let x = 0; x < width - 1; x++) {\n // All foreground colour.\n if (this.buffer[x + width * y] &&\n this.buffer[x + 1 + width * y] &&\n this.buffer[x + width * (y + 1)] &&\n this.buffer[x + 1 + width * (y + 1)] ||\n // All background colour.\n !(this.buffer[x + width * y] ||\n this.buffer[x + 1 + width * y] ||\n this.buffer[x + width * (y + 1)] ||\n this.buffer[x + 1 + width * (y + 1)])) {\n bad += Frame.N2\n }\n }\n }\n\n let bw = 0\n\n // X runs.\n for (let y = 0; y < width; y++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, x = 0; x < width; x++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n bw += b ? 1 : -1\n }\n\n bad += this._getBadness(h)\n }\n\n if (bw < 0) {\n bw = -bw\n }\n\n let count = 0\n let big = bw\n big += big << 2\n big <<= 1\n\n while (big > width * width) {\n big -= width * width\n count++\n }\n\n bad += count * Frame.N4\n\n // Y runs.\n for (let x = 0; x < width; x++) {\n let h = 0\n\n this._badness[0] = 0\n\n for (let b = 0, y = 0; y < width; y++) {\n let b1 = this.buffer[x + width * y]\n\n if (b === b1) {\n this._badness[h]++\n } else {\n this._badness[++h] = 1\n }\n\n b = b1\n }\n\n bad += this._getBadness(h)\n }\n\n return bad\n }\n\n _convertBitStream(length) {\n // Convert string to bit stream. 8-bit data to QR-coded 8-bit data (numeric, alphanum, or kanji\n // not supported).\n\n for (let i = 0; i < length; i++) {\n this._ecc[i] = this._stringBuffer.charCodeAt(i)\n }\n\n this._stringBuffer = this._ecc.slice(0)\n\n const maxLength = this._calculateMaxLength()\n\n if (length >= maxLength - 2) {\n length = maxLength - 2\n\n if (this._version > 9) {\n length--\n }\n }\n\n // Shift and re-pack to insert length prefix.\n let index = length\n\n if (this._version > 9) {\n this._stringBuffer[index + 2] = 0\n this._stringBuffer[index + 3] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 3] |= 255 & bit << 4\n this._stringBuffer[index + 2] = bit >> 4\n }\n\n this._stringBuffer[2] |= 255 & length << 4\n this._stringBuffer[1] = length >> 4\n this._stringBuffer[0] = 0x40 | length >> 12\n } else {\n this._stringBuffer[index + 1] = 0\n this._stringBuffer[index + 2] = 0\n\n while (index--) {\n const bit = this._stringBuffer[index]\n\n this._stringBuffer[index + 2] |= 255 & bit << 4\n this._stringBuffer[index + 1] = bit >> 4\n }\n\n this._stringBuffer[1] |= 255 & length << 4\n this._stringBuffer[0] = 0x40 | length >> 4\n }\n\n // Fill to end with pad pattern.\n index = length + 3 - (this._version < 10)\n\n while (index < maxLength) {\n this._stringBuffer[index++] = 0xec\n this._stringBuffer[index++] = 0x11\n }\n }\n\n _getBadness(length) {\n let badRuns = 0\n\n for (let i = 0; i <= length; i++) {\n if (this._badness[i] >= 5) {\n badRuns += Frame.N1 + this._badness[i] - 5\n }\n }\n\n // FBFFFBF as in finder.\n for (let i = 3; i < length - 1; i += 2) {\n if (this._badness[i - 2] === this._badness[i + 2] &&\n this._badness[i + 2] === this._badness[i - 1] &&\n this._badness[i - 1] === this._badness[i + 1] &&\n this._badness[i - 1] * 3 === this._badness[i] &&\n // Background around the foreground pattern? Not part of the specs.\n (this._badness[i - 3] === 0 || i + 3 > length ||\n this._badness[i - 3] * 3 >= this._badness[i] * 4 ||\n this._badness[i + 3] * 3 >= this._badness[i] * 4)) {\n badRuns += Frame.N3\n }\n }\n\n return badRuns\n }\n\n _finish() {\n // Save pre-mask copy of frame.\n this._stringBuffer = this.buffer.slice(0)\n\n let bit = 0\n let i\n let mask = 30000\n\n /*\n * Using for instead of while since in original Arduino code if an early mask was \"good enough\" it wouldn't try for\n * a better one since they get more complex and take longer.\n */\n for (i = 0; i < 8; i++) {\n // Returns foreground-background imbalance.\n this._applyMask(i)\n\n const currentMask = this._checkBadness()\n\n // Is current mask better than previous best?\n if (currentMask < mask) {\n mask = currentMask\n bit = i\n }\n\n // Don't increment \"i\" to a void redoing mask.\n if (bit === 7) {\n break\n }\n\n // Reset for next pass.\n this.buffer = this._stringBuffer.slice(0)\n }\n\n // Redo best mask as none were \"good enough\" (i.e. last wasn't bit).\n if (bit !== i) {\n this._applyMask(bit)\n }\n\n // Add in final mask/ECC level bytes.\n mask = ErrorCorrection.FINAL_FORMAT[bit + (this._level - 1 << 3)]\n\n // Low byte.\n for (i = 0; i < 8; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[this.width - 1 - i + this.width * 8] = 1\n\n if (i < 6) {\n this.buffer[8 + this.width * i] = 1\n } else {\n this.buffer[8 + this.width * (i + 1)] = 1\n }\n }\n }\n\n // High byte.\n for (i = 0; i < 7; i++, mask >>= 1) {\n if (mask & 1) {\n this.buffer[8 + this.width * (this.width - 7 + i)] = 1\n\n if (i) {\n this.buffer[6 - i + this.width * 8] = 1\n } else {\n this.buffer[7 + this.width * 8] = 1\n }\n }\n }\n }\n\n _interleaveBlocks() {\n const maxLength = this._calculateMaxLength()\n let i\n let k = 0\n\n for (i = 0; i < this._dataBlock; i++) {\n for (let j = 0; j < this._neccBlock1; j++) {\n this._ecc[k++] = this._stringBuffer[i + j * this._dataBlock]\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n }\n\n for (let j = 0; j < this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[this._neccBlock1 * this._dataBlock + i + j * (this._dataBlock + 1)]\n }\n\n for (i = 0; i < this._eccBlock; i++) {\n for (let j = 0; j < this._neccBlock1 + this._neccBlock2; j++) {\n this._ecc[k++] = this._stringBuffer[maxLength + i + j * this._eccBlock]\n }\n }\n\n this._stringBuffer = this._ecc\n }\n\n _insertAlignments() {\n const width = this.width\n\n if (this._version > 1) {\n const i = Alignment.BLOCK[this._version]\n let y = width - 7\n\n for (;;) {\n let x = width - 7\n\n while (x > i - 3) {\n this._addAlignment(x, y)\n\n if (x < i) {\n break\n }\n\n x -= i\n }\n\n if (y <= i + 9) {\n break\n }\n\n y -= i\n\n this._addAlignment(6, y)\n this._addAlignment(y, 6)\n }\n }\n }\n\n _insertFinders() {\n const width = this.width\n\n for (let i = 0; i < 3; i++) {\n let j = 0\n let y = 0\n\n if (i === 1) {\n j = width - 7\n }\n if (i === 2) {\n y = width - 7\n }\n\n this.buffer[y + 3 + width * (j + 3)] = 1\n\n for (let x = 0; x < 6; x++) {\n this.buffer[y + x + width * j] = 1\n this.buffer[y + width * (j + x + 1)] = 1\n this.buffer[y + 6 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 6)] = 1\n }\n\n for (let x = 1; x < 5; x++) {\n this._setMask(y + x, j + 1)\n this._setMask(y + 1, j + x + 1)\n this._setMask(y + 5, j + x)\n this._setMask(y + x + 1, j + 5)\n }\n\n for (let x = 2; x < 4; x++) {\n this.buffer[y + x + width * (j + 2)] = 1\n this.buffer[y + 2 + width * (j + x + 1)] = 1\n this.buffer[y + 4 + width * (j + x)] = 1\n this.buffer[y + x + 1 + width * (j + 4)] = 1\n }\n }\n }\n\n _insertTimingGap() {\n const width = this.width\n\n for (let y = 0; y < 7; y++) {\n this._setMask(7, y)\n this._setMask(width - 8, y)\n this._setMask(7, y + width - 7)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x, 7)\n this._setMask(x + width - 8, 7)\n this._setMask(x, width - 8)\n }\n }\n\n _insertTimingRowAndColumn() {\n const width = this.width\n\n for (let x = 0; x < width - 14; x++) {\n if (x & 1) {\n this._setMask(8 + x, 6)\n this._setMask(6, 8 + x)\n } else {\n this.buffer[8 + x + width * 6] = 1\n this.buffer[6 + width * (8 + x)] = 1\n }\n }\n }\n\n _insertVersion() {\n const width = this.width\n\n if (this._version > 6) {\n let i = Version.BLOCK[this._version - 7]\n let j = 17\n\n for (let x = 0; x < 6; x++) {\n for (let y = 0; y < 3; y++, j--) {\n if (1 & (j > 11 ? this._version >> j - 12 : i >> j)) {\n this.buffer[5 - x + width * (2 - y + width - 11)] = 1\n this.buffer[2 - y + width - 11 + width * (5 - x)] = 1\n } else {\n this._setMask(5 - x, 2 - y + width - 11)\n this._setMask(2 - y + width - 11, 5 - x)\n }\n }\n }\n }\n }\n\n _isMasked(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n return this._mask[bit] === 1\n }\n\n _pack() {\n let x = this.width - 1\n let y = this.width - 1\n let k = 1\n let v = 1\n\n // Interleaved data and ECC codes.\n const length = (this._dataBlock + this._eccBlock) * (this._neccBlock1 + this._neccBlock2) + this._neccBlock2\n\n for (let i = 0; i < length; i++) {\n let bit = this._stringBuffer[i]\n\n for (let j = 0; j < 8; j++, bit <<= 1) {\n if (0x80 & bit) {\n this.buffer[x + this.width * y] = 1\n }\n\n // Find next fill position.\n do {\n if (v) {\n x--\n } else {\n x++\n\n if (k) {\n if (y !== 0) {\n y--\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y = 9\n }\n }\n } else if (y !== this.width - 1) {\n y++\n } else {\n x -= 2\n k = !k\n\n if (x === 6) {\n x--\n y -= 8\n }\n }\n }\n\n v = !v\n } while (this._isMasked(x, y))\n }\n }\n }\n\n _reverseMask() {\n const width = this.width\n\n for (let x = 0; x < 9; x++) {\n this._setMask(x, 8)\n }\n\n for (let x = 0; x < 8; x++) {\n this._setMask(x + width - 8, 8)\n this._setMask(8, x)\n }\n\n for (let y = 0; y < 7; y++) {\n this._setMask(8, y + width - 7)\n }\n }\n\n _setMask(x, y) {\n const bit = Frame._getMaskBit(x, y)\n\n this._mask[bit] = 1\n }\n\n _syncMask() {\n const width = this.width\n\n for (let y = 0; y < width; y++) {\n for (let x = 0; x <= y; x++) {\n if (this.buffer[x + width * y]) {\n this._setMask(x, y)\n }\n }\n }\n }\n}\n\nexport default Frame\n\n/**\n * The options used by {@link Frame}.\n *\n * @typedef {Object} Frame~Options\n * @property {String} level - The ECC level to be used.\n * @property {String} value - The value to be encoded.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport Renderer from './Renderer'\n\n/**\n * An implementation of {@link Renderer} for working with img elements.\n *\n * This depends on {@link CanvasRenderer} being executed first as this implementation simply applies the data URL from\n * the rendered canvas element as the src for the img element being rendered.\n *\n * @public\n * @extends Renderer\n */\nclass ImageRenderer extends Renderer {\n\n /**\n * @override\n */\n draw() {\n const qrious = this.qrious\n\n qrious.image.src = qrious.toDataURL()\n }\n\n /**\n * @override\n */\n reset() {\n const qrious = this.qrious\n\n qrious.image.src = ''\n }\n\n /**\n * @override\n */\n resize() {\n const qrious = this.qrious\n const image = qrious.image\n\n image.width = qrious.size\n image.height = qrious.size\n }\n}\n\nexport default ImageRenderer\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\n/**\n * A basic manager for {@link Service} implementations that are mapped to simple names.\n *\n * @public\n */\nclass ServiceManager {\n\n /**\n * Creates a new instance of {@link ServiceManager}.\n *\n * @public\n */\n constructor() {\n this._services = {}\n }\n\n /**\n * Returns the {@link Service} being managed with the specified name.\n *\n * @param {String} name - the name of the {@link Service} to be returned\n * @return {Service} The {@link Service} is being managed with name.\n * @throws {Error} If no {@link Service} is being managed with name.\n * @public\n */\n getService(name) {\n const service = this._services[name]\n if (!service) {\n throw new Error(`Service is not being managed with name: ${name}`)\n }\n\n return service\n }\n\n /**\n * Sets the {@link Service} implementation to be managed for the specified name to the\n * service provided.\n *\n * @param {String} name - the name of the {@link Service} to be managed with name\n * @param {Service} service - the {@link Service} implementation to be managed\n * @throws {Error} If a {@link Service} is already being managed with the same name.\n * @public\n */\n setService(name, service) {\n if (this._services[name]) {\n throw new Error(`Service is already managed with name: ${name}`)\n }\n\n if (service) {\n this._services[name] = service\n }\n }\n}\n\nexport default ServiceManager\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport CanvasRenderer from './renderer/CanvasRenderer'\nimport Frame from './Frame'\nimport ImageRenderer from './renderer/ImageRenderer'\nimport ServiceManager from './service/ServiceManager'\nimport Utilities from './util/Utilities'\n\n/**\n * Enables configuration of a QR code generator which uses HTML5 canvas for rendering.\n *\n * @public\n */\nclass QRious {\n\n /**\n * Returns the default options for {@link QRious}.\n *\n * @return {QRious~Options} The default options.\n * @public\n * @static\n */\n static get DEFAULTS() {\n return {\n background: 'white',\n foreground: 'black',\n level: 'L',\n mime: 'image/png',\n size: 100,\n value: ''\n }\n }\n\n /**\n * Returns the current version of {@link QRious}.\n *\n * @return {String} The current version.\n * @public\n * @static\n */\n static get VERSION() {\n return '2.0.0'\n }\n\n /**\n * Configures the service provided to be used by all {@link QRious} instances.\n *\n * @param {Service} service - the {@link Service} to be configured\n * @throws {Error} If a {@link Service} has already been configured with the same name.\n * @public\n * @static\n */\n static use(service) {\n QRious._serviceManager.setService(service.getName(), service)\n }\n\n static _parseOptions(options) {\n options = Object.assign({}, QRious.DEFAULTS, options)\n options.level = Utilities.toUpperCase(options.level)\n options.size = Math.abs(options.size)\n\n return options\n }\n\n /**\n * Creates a new instance of {@link QRious} based on the options provided.\n *\n * @param {QRious~Options} [options] - the options to be used\n * @public\n */\n constructor(options) {\n options = QRious._parseOptions(options)\n\n Utilities.privatize(this, options)\n\n let element = this._element\n let elementService = QRious._serviceManager.getService('element')\n\n /**\n * The canvas being used to render the QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.canvas = element && elementService.isCanvas(element) ? element : elementService.createCanvas()\n this.canvas.qrious = this\n\n /**\n * The img to contain the rendered QR code for this {@link QRious}.\n *\n * @public\n * @type {*}\n */\n this.image = element && elementService.isImage(element) ? element : elementService.createImage()\n this.image.qrious = this\n\n this._renderers = [\n new CanvasRenderer(this),\n new ImageRenderer(this)\n ]\n\n this.update()\n }\n\n /**\n * Returns the image data URI for the generated QR code using the mime provided.\n *\n * @param {String} [mime] - the MIME type for the image\n * @return {String} The image data URI for the QR code.\n * @public\n */\n toDataURL(mime) {\n return this.canvas.toDataURL(mime || this.mime)\n }\n\n /**\n * Updates this {@link QRious} by generating a new {@link Frame} and re-rendering the QR code.\n *\n * @protected\n */\n update() {\n const frame = new Frame({\n level: this.level,\n value: this.value\n })\n\n this._renderers.forEach((renderer) => renderer.render(frame))\n }\n\n /**\n * Returns the background color for the QR code.\n *\n * @return {String} The background color.\n * @public\n */\n get background() {\n return this._background\n }\n\n /**\n * Sets the background color for the QR code to background.\n *\n * @param {String} [background=\"white\"] - the background color to be set\n * @public\n */\n set background(background) {\n const changed = Utilities.setter(this, '_background', background, QRious.DEFAULTS.background)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the foreground color for the QR code.\n *\n * @return {String} The foreground color.\n * @public\n */\n get foreground() {\n return this._foreground\n }\n\n /**\n * Sets the foreground color for the QR code to foreground.\n *\n * @param {String} [foreground=\"black\"] - the foreground color to be set\n * @public\n */\n set foreground(foreground) {\n const changed = Utilities.setter(this, '_foreground', foreground, QRious.DEFAULTS.foreground)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the error correction level for the QR code.\n *\n * @return {String} The ECC level.\n * @public\n */\n get level() {\n return this._level\n }\n\n /**\n * Sets the error correction level for the QR code to level.\n *\n * level will be transformed to upper case to aid mapping to known ECC level blocks.\n *\n * @param {String} [level=\"L\"] - the ECC level to be set\n * @public\n */\n set level(level) {\n const changed = Utilities.setter(this, '_level', level, QRious.DEFAULTS.level, Utilities.toUpperCase)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the MIME type for the image rendered for the QR code.\n *\n * @return {String} The image MIME type.\n * @public\n */\n get mime() {\n return this._mime\n }\n\n /**\n * Sets the MIME type for the image rendered for the QR code to mime.\n *\n * @param {String} [mime=\"image/png\"] - the image MIME type to be set\n * @public\n */\n set mime(mime) {\n const changed = Utilities.setter(this, '_mime', mime, QRious.DEFAULTS.mime)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the size of the QR code.\n *\n * @return {Number} The size in pixels.\n * @public\n */\n get size() {\n return this._size\n }\n\n /**\n * Sets the size of the QR code to size.\n *\n * size will be transformed to ensure that it is always an absolute positive numbers (e.g.\n * -100 would become 100).\n *\n * @param {Number} [size=100] - the size in pixels to be set\n * @public\n */\n set size(size) {\n const changed = Utilities.setter(this, '_size', size, QRious.DEFAULTS.size, Math.abs)\n\n if (changed) {\n this.update()\n }\n }\n\n /**\n * Returns the value of the QR code.\n *\n * @return {String} The value.\n * @public\n */\n get value() {\n return this._value\n }\n\n /**\n * Sets the value of the QR code to value.\n *\n * @param {String} [value=\"\"] - the value to be set\n * @public\n */\n set value(value) {\n const changed = Utilities.setter(this, '_value', value, QRious.DEFAULTS.value)\n\n if (changed) {\n this.update()\n }\n }\n}\n\nQRious._serviceManager = new ServiceManager()\n\nexport default QRious\n\n/**\n * The options used by {@link QRious}.\n *\n * @typedef {Object} QRious~Options\n * @property {String} [background=\"white\"] - The background color to be applied to the QR code.\n * @property {*} [element] - The element to be used to render the QR code which may either be an canvas or\n * img. The element(s) will be created if needed.\n * @property {String} [foreground=\"black\"] - The foreground color to be applied to the QR code.\n * @property {String} [level=\"L\"] - The error correction level to be applied to the QR code.\n * @property {String} [mime=\"image/png\"] - The MIME type to be used to render the image for the QR code.\n * @property {Number} [size=100] - The size of the QR code in pixels.\n * @property {String} [value=\"\"] - The value to be encoded within the QR code.\n */\n","/*\n * QRious\n * Copyright (C) 2016 Alasdair Mercer\n * Copyright (C) 2010 Tom Zerucha\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\n\nimport NodeElementService from '../service/element/NodeElementService'\nimport QRious from '../QRious'\n\nQRious.use(new NodeElementService())\n\nexport default QRious\n"],"names":["Canvas","Image"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+EO,IAAI,cAAc,GAAG,UAAU,QAAQ,EAAE,WAAW,EAAE;EAC3D,IAAI,CAAC,CAAC,QAAQ,YAAY,WAAW,CAAC,EAAE;IACtC,MAAM,IAAI,SAAS,CAAC,mCAAmC,CAAC,CAAC;GAC1D;CACF,CAAC;;AAEF,AAAO,IAAI,WAAW,GAAG,YAAY;EACnC,SAAS,gBAAgB,CAAC,MAAM,EAAE,KAAK,EAAE;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC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