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AO,EAAO,OAAQ,EAAO","file":"/npm/bitmap-image-data@0.0.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/bitmap-image-data@0.0.2/dist/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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar copy_1 = require(\"./copy\");\nexports.copy = copy_1.copy;\nvar fill_1 = require(\"./fill\");\nexports.fill = fill_1.fill;\nvar line_1 = require(\"./line\");\nexports.line = line_1.line;\nvar modes_1 = require(\"./modes\");\nexports.modes = modes_1.modes;\nvar oval_1 = require(\"./oval\");\nexports.oval = oval_1.oval;\nvar paste_1 = require(\"./paste\");\nexports.paste = paste_1.paste;\nvar plot_1 = require(\"./plot\");\nexports.plot = plot_1.plot;\nvar png_1 = require(\"./png\");\nexports.fromPng = png_1.fromPng;\nexports.toPng = png_1.toPng;\nvar resize_1 = require(\"./resize\");\nexports.resize = resize_1.resize;\nvar triangle_1 = require(\"./triangle\");\nexports.triangle = triangle_1.triangle;\nexports.createBitmap = (width, height, data) => {\n    if (width === undefined || height === undefined) {\n        throw TypeError('Not enough arguments');\n    }\n    width = width | 0;\n    height = height | 0;\n    if (width < 1 || height < 1) {\n        throw TypeError('Index or size is negative or greater than the allowed amount');\n    }\n    const length = width * height;\n    if (data === undefined) {\n        data = new Array(length).fill(0);\n    }\n    if (Array.isArray(data)) {\n        if (data.length !== length) {\n            throw TypeError('Index or size is negative or greater than the allowed amount');\n        }\n        data = data.map(n => n ? 1 : 0);\n        return {\n            get width() { return width; },\n            get height() { return height; },\n            get data() { return data; }\n        };\n    }\n    throw TypeError('Expected data to be array or undefined');\n};\nexports.clone = (bitmap) => exports.createBitmap(bitmap.width, bitmap.height, bitmap.data);\n"]}