/**
 * Minified by jsDelivr using Terser v5.19.2.
 * Original file: /npm/merge-images@2.0.0/dist/index.umd.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):n.mergeImages=t()}(this,(function(){"use strict";var n={format:"image/png",quality:.92,width:void 0,height:void 0,Canvas:void 0,crossOrigin:void 0};return function(t,e){return void 0===t&&(t=[]),void 0===e&&(e={}),new Promise((function(i){var o=(e=Object.assign({},n,e)).Canvas?new e.Canvas:window.document.createElement("canvas"),r=e.Image||window.Image,a=t.map((function(n){return new Promise((function(t,i){"Object"!==n.constructor.name&&(n={src:n});var o=new r;o.crossOrigin=e.crossOrigin,o.onerror=function(){return i(new Error("Couldn't load image"))},o.onload=function(){return t(Object.assign({},n,{img:o}))},o.src=n.src}))})),u=o.getContext("2d");i(Promise.all(a).then((function(n){var t=function(t){return e[t]||Math.max.apply(Math,n.map((function(n){return n.img[t]})))};return o.width=t("width"),o.height=t("height"),n.forEach((function(n){return u.globalAlpha=n.opacity?n.opacity:1,u.drawImage(n.img,n.x||0,n.y||0)})),e.Canvas&&"image/jpeg"===e.format?new Promise((function(n,t){o.toDataURL(e.format,{quality:e.quality,progressive:!1},(function(e,i){e?t(e):n(i)}))})):o.toDataURL(e.format,e.quality)})))}))}}));
//# sourceMappingURL=/sm/bb01616dbf7088f93d4b38bb6925b8c5de9c95249efa6cc20414fc9f25a2c3c8.map