12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- import {
- a,
- r,
- t
- } from "./chunk-GZT4BVFP.js";
- // node_modules/@arcgis/core/views/webgl/context-util.js
- var o;
- function n(e, r2, o2 = {}) {
- const n2 = i(e);
- for (; n2.length > 1; ) {
- const e2 = l(r2, n2.shift(), o2);
- if (r(e2))
- return e2;
- }
- return c(r2, n2.shift(), o2);
- }
- function i(t2) {
- const r2 = a("esri-force-webgl");
- if (r2 === o.WEBGL1 || r2 === o.WEBGL2)
- return [r2];
- switch (t2) {
- case "2d":
- return a("mac") && a("chrome") ? [o.WEBGL1, o.WEBGL2] : [o.WEBGL2, o.WEBGL1];
- case "3d":
- return [o.WEBGL2, o.WEBGL1];
- }
- }
- function c(e, t2, o2 = {}) {
- if (!window.WebGLRenderingContext)
- return a2(e, s), null;
- const n2 = l(e, t2, o2);
- return t(n2) && a2(e, u), n2;
- }
- function l(e, t2, r2 = {}) {
- const n2 = t2 === o.WEBGL1 ? ["webgl", "experimental-webgl", "webkit-3d", "moz-webgl"] : ["webgl2"];
- let i2 = null;
- for (const o2 of n2) {
- try {
- i2 = e.getContext(o2, r2);
- } catch (c2) {
- }
- if (i2)
- break;
- }
- return i2;
- }
- function a2(e, t2) {
- const r2 = e.parentNode;
- r2 && (r2.innerHTML = '<table style="background-color: #8CE; width: 100%; height: 100%;"><tr><td align="center"><div style="display: table-cell; vertical-align: middle;"><div style="">' + t2 + "</div></div></td></tr></table>");
- }
- !function(e) {
- e[e.WEBGL1 = 1] = "WEBGL1", e[e.WEBGL2 = 2] = "WEBGL2";
- }(o || (o = {}));
- var s = 'This page requires a browser that supports WebGL.<br/><a href="http://get.webgl.org">Click here to upgrade your browser.</a>';
- var u = `It doesn't appear your computer can support WebGL.<br/><a href="http://get.webgl.org/troubleshooting/">Click here for more information.</a>`;
- export {
- o,
- n,
- i,
- l
- };
- //# sourceMappingURL=chunk-LGW7TID4.js.map
|