{"version":3,"sources":["node_modules/@arcgis/core/views/2d/support/Timeline.js","node_modules/@arcgis/core/views/support/screenshotUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nconst s = s => s.includes(\"Brush\");\nclass e {\n constructor() {\n this._names = new Map();\n }\n begin(e) {\n this._names.has(e) || (this._names.set(e, !1), s(e) && this.record(\"Esri.FirstDraw\"), performance.mark(`Esri.${e}.Start`));\n }\n end(s) {\n this._names.has(s) && !this._names.get(s) && (this._names.set(s, !0), performance.mark(`Esri.${s}.End`));\n }\n record(s) {\n this._names.has(s) || (this._names.set(s, !0), performance.mark(`Esri.${s}`));\n }\n}\nexport { e as Timeline };","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.28/esri/copyright.txt for details.\n*/\nimport \"../../core/has.js\";\nimport { clamp as t } from \"../../core/mathUtils.js\";\nexport { createEmptyImageData } from \"../../core/imageUtils.js\";\nconst h = 2048,\n i = 1.5,\n e = 8;\nfunction o(h, i) {\n const {\n format: e,\n quality: o,\n rotation: n,\n disableDecorations: a\n } = h || {},\n r = b(h, i.padding),\n l = p(h, {\n width: i.width - r.left - r.right,\n height: i.height - r.top - r.bottom\n }),\n {\n width: g,\n height: f\n } = m(h, l),\n d = j(e),\n u = R[d];\n return {\n format: d,\n quality: t(null != o ? o : u, 0, 100),\n area: l,\n width: g,\n height: f,\n rotation: n,\n disableDecorations: !!a,\n ignoreBackground: !!h?.ignoreBackground,\n ignorePadding: !!h?.ignorePadding\n };\n}\nfunction n(t, h) {\n const i = o(t, h),\n e = i.area,\n n = i.width / e.width,\n a = b(i, h.padding),\n r = a.left + a.right,\n l = a.top + a.bottom,\n g = h.width - r,\n f = h.height - l,\n d = Math.floor(g * n + r),\n u = Math.floor(f * n + l),\n c = t?.layers ?? [],\n s = i.ignoreBackground,\n w = i.ignorePadding;\n return {\n framebufferWidth: d,\n framebufferHeight: u,\n region: {\n x: Math.floor(e.x * n) + a.left,\n y: Math.floor(e.y * n) + a.top,\n width: i.width,\n height: i.height\n },\n format: i.format,\n quality: i.quality,\n rotation: i.rotation,\n pixelRatio: n,\n layers: c,\n disableDecorations: i.disableDecorations,\n ignoreBackground: s,\n ignorePadding: w,\n objectAndLayerIdColor: !1\n };\n}\nfunction a(t, h, i) {\n const {\n ctx: e,\n canvas: o\n } = l(t, i),\n n = e.getImageData(0, 0, t.width, t.height),\n a = u(o, h);\n return g(o), {\n dataUrl: a,\n data: n\n };\n}\nfunction r(t, h) {\n const {\n ctx: i,\n canvas: e\n } = l(t, h),\n o = i.getImageData(0, 0, t.width, t.height);\n return g(e), o;\n}\nfunction l(t, h) {\n const i = f();\n h.premultipliedAlpha && q(t), i.width = t.width, i.height = t.height;\n const e = i.getContext(\"2d\", {\n willReadFrequently: !0\n });\n return e.putImageData(t, 0, 0), h.flipY && D(e), {\n ctx: e,\n canvas: i\n };\n}\nfunction g(t) {\n t.width = 0, t.height = 0;\n}\nfunction f() {\n return null == d && (d = document.createElement(\"canvas\")), d;\n}\nlet d = null;\nfunction u(t, h) {\n const i = v[h.format],\n e = h.quality / 100;\n return t.toDataURL(i, e);\n}\nfunction c(h, i) {\n const e = j(h),\n o = R[e];\n return {\n format: e,\n quality: t(null != i ? i : o, 0, 100)\n };\n}\nfunction s(t, h) {\n return h / Math.max(t[0], t[1]);\n}\nfunction w(t, h, i, e = 0, o = 0, n = t.width - e, a = t.height - o, r = !1) {\n const {\n data: l\n } = t,\n {\n width: g,\n height: f,\n data: d\n } = h,\n u = n / g,\n c = a / f,\n s = Math.ceil(u / 2),\n w = Math.ceil(c / 2),\n M = t.width;\n for (let m = 0; m < f; m++) for (let t = 0; t < g; t++) {\n const h = 4 * (t + (r ? f - m - 1 : m) * g);\n let n = 0,\n a = 0,\n p = 0,\n x = 0,\n y = 0,\n b = 0;\n const j = (m + .5) * c;\n for (let r = Math.floor(m * c); r < (m + 1) * c; r++) {\n const h = Math.abs(j - (r + .5)) / w,\n g = (t + .5) * u,\n f = h * h;\n for (let d = Math.floor(t * u); d < (t + 1) * u; d++) {\n const t = Math.abs(g - (d + .5)) / s,\n h = Math.sqrt(f + t * t);\n if (h >= 1) continue;\n let u = 2 * h * h * h - 3 * h * h + 1;\n const c = 4 * (e + d + (o + r) * M);\n b += u * l[c + 3], a += u, !i && l[c + 3] < 255 && (u = u * l[c + 3] / 255), p += u * l[c], x += u * l[c + 1], y += u * l[c + 2], n += u;\n }\n }\n d[h] = p / n, d[h + 1] = x / n, d[h + 2] = y / n, d[h + 3] = b / a;\n }\n return h;\n}\nfunction M(t, o, n) {\n if (!o) return t;\n const {\n framebufferWidth: a,\n framebufferHeight: r,\n pixelRatio: l,\n region: g\n } = t,\n f = b(t, n),\n d = f.left + f.right,\n u = f.top + f.bottom,\n c = a - d,\n s = r - u,\n w = Math.min(e, Math.min((h - d) / c, (h - u) / s));\n return w < i ? t : {\n ...t,\n framebufferWidth: Math.round(c * w) + d,\n framebufferHeight: Math.round(s * w) + u,\n pixelRatio: l * w,\n resample: {\n region: {\n x: Math.round((g.x - f.left) * w) + f.left,\n y: Math.round((g.y - f.top) * w) + f.top,\n width: Math.round(g.width * w),\n height: Math.round(g.height * w)\n },\n width: a,\n height: r\n }\n };\n}\nfunction m(t, h) {\n if (!t) return h;\n const i = t.width,\n e = t.height;\n if (null != i && null != e) return {\n width: Math.floor(i),\n height: Math.floor(e)\n };\n if (null == i && null == e) return h;\n const o = h.width / h.height;\n return null == e ? {\n width: Math.floor(i),\n height: Math.floor(i / o)\n } : {\n width: Math.floor(e * o),\n height: Math.floor(e)\n };\n}\nfunction p(t, h) {\n const i = {\n x: 0,\n y: 0,\n width: h.width,\n height: h.height\n };\n if (t?.area) {\n null != t.area.x && (i.x = Math.floor(t.area.x)), null != t.area.y && (i.y = Math.floor(t.area.y));\n const e = null != t.area.width ? Math.floor(t.area.width) : null,\n o = null != t.area.height ? Math.floor(t.area.height) : null;\n if (i.width = h.width - i.x, i.height = h.height - i.y, null != e && null != o) i.width = Math.min(i.width, e), i.height = Math.min(i.height, o);else if (null == e && null != o) {\n const t = Math.min(i.width, e);\n i.height = t / i.width * i.height, i.width = t;\n } else if (null != e && null == o) {\n const t = Math.min(i.height, o);\n i.width = t / i.height * i.width, i.height = t;\n }\n }\n return x(y(i, t), h);\n}\nfunction x(t, h) {\n const i = Math.floor(Math.max(t.x, 0)),\n e = Math.floor(Math.max(t.y, 0)),\n o = {\n x: i,\n y: e,\n width: Math.floor(Math.min(t.width, h.width - i)),\n height: Math.floor(Math.min(t.height, h.height - e))\n },\n n = o.width / o.height,\n a = t.width / t.height;\n if (a === n) return o;\n if (a > n) {\n const t = Math.floor(o.width / a),\n h = o.height - t;\n return {\n x: o.x,\n y: Math.floor(o.y + h / 2),\n width: o.width,\n height: t\n };\n }\n const r = Math.floor(o.height * a),\n l = o.width - r;\n return {\n x: Math.floor(o.x + l / 2),\n y: o.y,\n width: r,\n height: o.height\n };\n}\nfunction y(t, h) {\n if (null == h?.width || null == h.height) return t;\n const i = h.width / h.height,\n e = t.width / t.height;\n if (e === i) return t;\n if (e < i) {\n const h = Math.floor(t.height * i);\n return t.x -= (h - t.width) / 2, t.width = h, t;\n }\n const o = Math.floor(t.width / i);\n return t.y -= (o - t.height) / 2, t.height = o, t;\n}\nfunction b(t, h) {\n return !h || t && t.ignorePadding ? k : h;\n}\nfunction j(t) {\n switch (t) {\n case \"png\":\n case \"jpg\":\n case \"jpeg\":\n return t;\n default:\n return P;\n }\n}\nfunction D(t) {\n t.save(), t.globalCompositeOperation = \"copy\", t.scale(1, -1), t.translate(0, -t.canvas.height), t.drawImage(t.canvas, 0, 0), t.restore();\n}\nfunction q(t) {\n const h = t.data,\n i = h.length;\n for (let e = 0; e < i; e += 4) {\n const t = h[e + 3];\n if (255 !== t && t > 0) {\n const i = 255 / t;\n h[e] = h[e] * i, h[e + 1] = h[e + 1] * i, h[e + 2] = h[e + 2] * i;\n }\n }\n}\nconst v = {\n png: \"image/png\",\n jpg: \"image/jpeg\",\n jpeg: \"image/jpeg\"\n },\n I = 98,\n P = \"png\",\n R = {\n png: 100,\n jpg: I,\n jpeg: I\n },\n k = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\nexport { o as completeUserSettings, a as encode, r as encodeData, c as getFormatAndQuality, s as getMaximumResolutionScale, w as resampleHermite, M as screenshotSuperSampleSettings, u as toDataUrl, n as toRenderSettings };"],"mappings":";;;;;AAIA,IAAM,IAAI,CAAAA,OAAKA,GAAE,SAAS,OAAO;AACjC,IAAM,IAAN,MAAQ;AAAA,EACN,cAAc;AACZ,SAAK,SAAS,oBAAI,IAAI;AAAA,EACxB;AAAA,EACA,MAAMC,IAAG;AACP,SAAK,OAAO,IAAIA,EAAC,MAAM,KAAK,OAAO,IAAIA,IAAG,KAAE,GAAG,EAAEA,EAAC,KAAK,KAAK,OAAO,gBAAgB,GAAG,YAAY,KAAK,QAAQA,EAAC,QAAQ;AAAA,EAC1H;AAAA,EACA,IAAID,IAAG;AACL,SAAK,OAAO,IAAIA,EAAC,KAAK,CAAC,KAAK,OAAO,IAAIA,EAAC,MAAM,KAAK,OAAO,IAAIA,IAAG,IAAE,GAAG,YAAY,KAAK,QAAQA,EAAC,MAAM;AAAA,EACxG;AAAA,EACA,OAAOA,IAAG;AACR,SAAK,OAAO,IAAIA,EAAC,MAAM,KAAK,OAAO,IAAIA,IAAG,IAAE,GAAG,YAAY,KAAK,QAAQA,EAAC,EAAE;AAAA,EAC7E;AACF;;;ACwDA,SAAS,EAAE,GAAG,GAAGE,IAAG;AAClB,QAAM;AAAA,IACF,KAAKC;AAAA,IACL,QAAQ;AAAA,EACV,IAAI,EAAE,GAAGD,EAAC,GACV,IAAIC,GAAE,aAAa,GAAG,GAAG,EAAE,OAAO,EAAE,MAAM,GAC1CC,KAAI,EAAE,GAAG,CAAC;AACZ,SAAO,EAAE,CAAC,GAAG;AAAA,IACX,SAASA;AAAA,IACT,MAAM;AAA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