import { has } from "./chunk-SPWQ3AWG.js"; import { r, t } from "./chunk-YXWMMD76.js"; // node_modules/@arcgis/core/views/webgl/context-util.js var r2; function o(t2, r3, o2 = {}) { const l2 = n(t2); for (; l2.length > 1; ) { const t3 = c(r3, l2.shift(), o2); if (r(t3)) return t3; } return i(r3, l2.shift(), o2); } function n(e) { const t2 = has("esri-force-webgl"); if (t2 === r2.WEBGL1 || t2 === r2.WEBGL2) return [t2]; switch (e) { case "2d": return has("mac") && has("chrome") ? [r2.WEBGL1, r2.WEBGL2] : [r2.WEBGL2, r2.WEBGL1]; case "3d": return [r2.WEBGL2, r2.WEBGL1]; } } function i(e, r3, o2 = {}) { if (!window.WebGLRenderingContext) return l(e, a), null; const n2 = c(e, r3, o2); return t(n2) && l(e, s), n2; } function c(e, t2, o2 = {}) { const n2 = t2 === r2.WEBGL1 ? ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"] : ["webgl2"]; let i2 = null; for (const r3 of n2) { try { i2 = e.getContext(r3, o2); } catch (c2) { } if (i2) break; } return i2; } function l(e, t2) { const r3 = e.parentNode; r3 && (r3.innerHTML = '
' + t2 + "
"); } !function(e) { e[e.WEBGL1 = 1] = "WEBGL1", e[e.WEBGL2 = 2] = "WEBGL2"; }(r2 || (r2 = {})); var a = 'This page requires a browser that supports WebGL.
Click here to upgrade your browser.'; var s = `It doesn't appear your computer can support WebGL.
Click here for more information.`; export { r2 as r, o, n, c }; //# sourceMappingURL=chunk-RWQH5X3O.js.map