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,IAAK,EACD,OAAO,EAMX,IACI,EAAS,EAAG,aAAa,EAAG,cAChC,CAAE,MAAO,GAIL,OAAO,CACX,CAEA,SAAK,GAAU,EAAG,mBAGlB,EAAG,aAAa,EAAQ,kBACxB,EAAG,cAAc,IAC2C,IAArD,EAAG,mBAAmB,EAAQ,EAAG,gBAC5C,CAEA,SAAS,UACL,OAAQ,SAAS,YACrB,CA5CA,YAAY,uBAAyB,CACjC,WAAW,EACX,OAAO,EACP,SAAS,EACT,OAAO","file":"/npm/@mapbox/mapbox-gl-supported@3.0.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/@mapbox/mapbox-gl-supported@3.0.0/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';\n\nexports.supported = isSupported;\nexports.notSupportedReason = notSupportedReason;\n\n/**\n * Test whether the current browser supports Mapbox GL JS\n * @param {Object} options\n * @param {boolean} [options.failIfMajorPerformanceCaveat=false] Return `false`\n *   if the performance of Mapbox GL JS would be dramatically worse than\n *   expected (i.e. a software renderer is would be used)\n * @return {boolean}\n */\nfunction isSupported(options) {\n    return !notSupportedReason(options);\n}\n\nfunction notSupportedReason(options) {\n    if (!isBrowser()) return 'not a browser';\n    if (!isWorkerSupported()) return 'insufficient worker support';\n    if (!isCanvasGetImageDataSupported()) return 'insufficient Canvas/getImageData support';\n    if (!isWebGLSupportedCached(options && options.failIfMajorPerformanceCaveat)) return 'insufficient WebGL2 support';\n    if (!isNotIE()) return 'insufficient ECMAScript 6 support';\n}\n\nfunction isBrowser() {\n    return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\nfunction isWorkerSupported() {\n    if (!('Worker' in window && 'Blob' in window && 'URL' in window)) {\n        return false;\n    }\n\n    var blob = new Blob([''], { type: 'text/javascript' });\n    var workerURL = URL.createObjectURL(blob);\n    var supported;\n    var worker;\n\n    try {\n        worker = new Worker(workerURL);\n        supported = true;\n    } catch (e) {\n        supported = false;\n    }\n\n    if (worker) {\n        worker.terminate();\n    }\n    URL.revokeObjectURL(workerURL);\n\n    return supported;\n}\n\n// Some browsers or browser extensions block access to canvas data to prevent fingerprinting.\n// Mapbox GL uses this API to load sprites and images in general.\nfunction isCanvasGetImageDataSupported() {\n    var canvas = document.createElement('canvas');\n    canvas.width = canvas.height = 1;\n    var context = canvas.getContext('2d');\n    if (!context) {\n        return false;\n    }\n    var imageData = context.getImageData(0, 0, 1, 1);\n    return imageData && imageData.width === canvas.width;\n}\n\nvar isWebGLSupportedCache = {};\nfunction isWebGLSupportedCached(failIfMajorPerformanceCaveat) {\n\n    if (isWebGLSupportedCache[failIfMajorPerformanceCaveat] === undefined) {\n        isWebGLSupportedCache[failIfMajorPerformanceCaveat] = isWebGLSupported(failIfMajorPerformanceCaveat);\n    }\n\n    return isWebGLSupportedCache[failIfMajorPerformanceCaveat];\n}\n\nisSupported.webGLContextAttributes = {\n    antialias: false,\n    alpha: true,\n    stencil: true,\n    depth: true\n};\n\nfunction getWebGLContext(failIfMajorPerformanceCaveat) {\n    var canvas = document.createElement('canvas');\n\n    var attributes = Object.create(isSupported.webGLContextAttributes);\n    attributes.failIfMajorPerformanceCaveat = failIfMajorPerformanceCaveat;\n\n    return canvas.getContext('webgl2', attributes);\n}\n\nfunction isWebGLSupported(failIfMajorPerformanceCaveat) {\n    var gl = getWebGLContext(failIfMajorPerformanceCaveat);\n    if (!gl) {\n        return false;\n    }\n\n    // Try compiling a shader and get its compile status. Some browsers like Brave block this API\n    // to prevent fingerprinting. Unfortunately, this also means that Mapbox GL won't work.\n    var shader;\n    try {\n        shader = gl.createShader(gl.VERTEX_SHADER);\n    } catch (e) {\n        // some older browsers throw an exception that `createShader` is not defined\n        // so handle this separately from the case where browsers block `createShader`\n        // for security reasons\n        return false;\n    }\n\n    if (!shader || gl.isContextLost()) {\n        return false;\n    }\n    gl.shaderSource(shader, 'void main() {}');\n    gl.compileShader(shader);\n    return gl.getShaderParameter(shader, gl.COMPILE_STATUS) === true;\n}\n\nfunction isNotIE() {\n    return !document.documentMode;\n}\n"]}