UNPKG

@mapbox-react/env-layers

Version:

Mapbox React Component Library Env Layers

10 lines 1.56 MB
(function(Ls,oi){typeof exports=="object"&&typeof module<"u"?oi(exports,require("react"),require("@mapbox-react/core")):typeof define=="function"&&define.amd?define(["exports","react","@mapbox-react/core"],oi):(Ls=typeof globalThis<"u"?globalThis:Ls||self,oi(Ls.MapboxReactEnvLayers={},Ls.React,Ls.MapboxReactCore))})(this,function(Ls,oi,If){"use strict";function RE(i,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const u in s)if(u!=="default"&&!(u in i)){const p=Object.getOwnPropertyDescriptor(s,u);p&&Object.defineProperty(i,u,p.get?p:{enumerable:!0,get:()=>s[u]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var PE=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bf(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ay={exports:{}},Cf={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var DE=oi,LE=Symbol.for("react.element"),FE=Symbol.for("react.fragment"),NE=Object.prototype.hasOwnProperty,OE=DE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kE={key:!0,ref:!0,__self:!0,__source:!0};function my(i,t,n){var s,u={},p=null,a=null;n!==void 0&&(p=""+n),t.key!==void 0&&(p=""+t.key),t.ref!==void 0&&(a=t.ref);for(s in t)NE.call(t,s)&&!kE.hasOwnProperty(s)&&(u[s]=t[s]);if(i&&i.defaultProps)for(s in t=i.defaultProps,t)u[s]===void 0&&(u[s]=t[s]);return{$$typeof:LE,type:i,key:p,ref:a,props:u,_owner:OE.current}}Cf.Fragment=FE,Cf.jsx=my,Cf.jsxs=my,Ay.exports=Cf;var wf=Ay.exports;function zE(i){var t=oi.useRef(i);return t.current=i,t}var Tf=function(i){var t=zE(i);oi.useEffect(function(){return function(){t.current()}},[])},Mf=function(i){oi.useEffect(function(){i==null||i()},[])},QE=typeof Element<"u",UE=typeof Map=="function",GE=typeof Set=="function",VE=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Sf(i,t){if(i===t)return!0;if(i&&t&&typeof i=="object"&&typeof t=="object"){if(i.constructor!==t.constructor)return!1;var n,s,u;if(Array.isArray(i)){if(n=i.length,n!=t.length)return!1;for(s=n;s--!==0;)if(!Sf(i[s],t[s]))return!1;return!0}var p;if(UE&&i instanceof Map&&t instanceof Map){if(i.size!==t.size)return!1;for(p=i.entries();!(s=p.next()).done;)if(!t.has(s.value[0]))return!1;for(p=i.entries();!(s=p.next()).done;)if(!Sf(s.value[1],t.get(s.value[0])))return!1;return!0}if(GE&&i instanceof Set&&t instanceof Set){if(i.size!==t.size)return!1;for(p=i.entries();!(s=p.next()).done;)if(!t.has(s.value[0]))return!1;return!0}if(VE&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(t)){if(n=i.length,n!=t.length)return!1;for(s=n;s--!==0;)if(i[s]!==t[s])return!1;return!0}if(i.constructor===RegExp)return i.source===t.source&&i.flags===t.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof t.valueOf=="function")return i.valueOf()===t.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof t.toString=="function")return i.toString()===t.toString();if(u=Object.keys(i),n=u.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!Object.prototype.hasOwnProperty.call(t,u[s]))return!1;if(QE&&i instanceof Element)return!1;for(s=n;s--!==0;)if(!((u[s]==="_owner"||u[s]==="__v"||u[s]==="__o")&&i.$$typeof)&&!Sf(i[u[s]],t[u[s]]))return!1;return!0}return i!==i&&t!==t}var jE=function(t,n){try{return Sf(t,n)}catch(s){if((s.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw s}};const HE=bf(jE);var KE=function(i,t){return i===void 0&&(i=[]),t===void 0&&(t=[]),HE(i,t)},YE=function(i){return function(t,n){var s=oi.useRef(),u=oi.useRef(0);(n===void 0||!KE(n,s.current))&&(u.current+=1),s.current=n,i(t,[u.current])}};const yy=YE(oi.useEffect);var Bf,XE=new Uint8Array(16);function qE(){if(!Bf&&(Bf=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto<"u"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!Bf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Bf(XE)}const WE=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ZE(i){return typeof i=="string"&&WE.test(i)}for(var sr=[],Gd=0;Gd<256;++Gd)sr.push((Gd+256).toString(16).substr(1));function JE(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=(sr[i[t+0]]+sr[i[t+1]]+sr[i[t+2]]+sr[i[t+3]]+"-"+sr[i[t+4]]+sr[i[t+5]]+"-"+sr[i[t+6]]+sr[i[t+7]]+"-"+sr[i[t+8]]+sr[i[t+9]]+"-"+sr[i[t+10]]+sr[i[t+11]]+sr[i[t+12]]+sr[i[t+13]]+sr[i[t+14]]+sr[i[t+15]]).toLowerCase();if(!ZE(n))throw TypeError("Stringified UUID is invalid");return n}function Rf(i,t,n){i=i||{};var s=i.random||(i.rng||qE)();return s[6]=s[6]&15|64,s[8]=s[8]&63|128,JE(s)}const Qt={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795};function zc(i){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(i)}function $E(i,t){if(zc(i)!="object"||!i)return i;var n=i[Symbol.toPrimitive];if(n!==void 0){var s=n.call(i,t||"default");if(zc(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(i)}function tI(i){var t=$E(i,"string");return zc(t)=="symbol"?t:t+""}function Z(i,t,n){return(t=tI(t))in i?Object.defineProperty(i,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):i[t]=n,i}function _y(i){if(typeof window<"u"&&typeof window.process=="object"&&window.process.type==="renderer"||typeof process<"u"&&typeof process.versions=="object"&&process.versions.electron)return!0;const n=typeof navigator=="object"&&typeof navigator.userAgent=="string"&&navigator.userAgent;return!!(n&&n.indexOf("Electron")>=0)}function bl(){return!(typeof process=="object"&&String(process)==="[object process]"&&!process.browser)||_y()}const Pf={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document,process:typeof process=="object"&&process},Df=Pf.window||Pf.self||Pf.global,Qc=Pf.process||{},vy=typeof __VERSION__<"u"?__VERSION__:"untranspiled source";bl();const Vd=globalThis;function xy(i){if(!bl())return"Node";if(_y())return"Electron";const n=(typeof navigator<"u"?navigator:{}).userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const s=n.indexOf("MSIE ")!==-1,u=n.indexOf("Trident/")!==-1;return s||u?"IE":Vd.chrome?"Chrome":Vd.safari?"Safari":Vd.mozInnerScreenX?"Firefox":"Unknown"}function eI(i){try{const t=window[i],n="__storage_test__";return t.setItem(n,n),t.removeItem(n),t}catch{return null}}class nI{constructor(t,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"sessionStorage";Z(this,"storage",void 0),Z(this,"id",void 0),Z(this,"config",void 0),this.storage=eI(s),this.id=t,this.config=n,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const n=JSON.stringify(this.config);this.storage.setItem(this.id,n)}}_loadConfiguration(){let t={};if(this.storage){const n=this.storage.getItem(this.id);t=n?JSON.parse(n):{}}return Object.assign(this.config,t),this}}function iI(i){let t;return i<10?t="".concat(i.toFixed(2),"ms"):i<100?t="".concat(i.toFixed(1),"ms"):i<1e3?t="".concat(i.toFixed(0),"ms"):t="".concat((i/1e3).toFixed(2),"s"),t}function rI(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:8;const n=Math.max(t-i.length,0);return"".concat(" ".repeat(n)).concat(i)}function jd(i,t,n){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:600;const u=i.src.replace(/\(/g,"%28").replace(/\)/g,"%29");i.width>s&&(n=Math.min(n,s/i.width));const p=i.width*n,a=i.height*n,E=["font-size:1px;","padding:".concat(Math.floor(a/2),"px ").concat(Math.floor(p/2),"px;"),"line-height:".concat(a,"px;"),"background:url(".concat(u,");"),"background-size:".concat(p,"px ").concat(a,"px;"),"color:transparent;"].join("");return["".concat(t," %c+"),E]}let Lf;(function(i){i[i.BLACK=30]="BLACK",i[i.RED=31]="RED",i[i.GREEN=32]="GREEN",i[i.YELLOW=33]="YELLOW",i[i.BLUE=34]="BLUE",i[i.MAGENTA=35]="MAGENTA",i[i.CYAN=36]="CYAN",i[i.WHITE=37]="WHITE",i[i.BRIGHT_BLACK=90]="BRIGHT_BLACK",i[i.BRIGHT_RED=91]="BRIGHT_RED",i[i.BRIGHT_GREEN=92]="BRIGHT_GREEN",i[i.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",i[i.BRIGHT_BLUE=94]="BRIGHT_BLUE",i[i.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",i[i.BRIGHT_CYAN=96]="BRIGHT_CYAN",i[i.BRIGHT_WHITE=97]="BRIGHT_WHITE"})(Lf||(Lf={}));function Ey(i){return typeof i=="string"?Lf[i.toUpperCase()]||Lf.WHITE:i}function sI(i,t,n){return!bl&&typeof i=="string"&&(t&&(t=Ey(t),i="\x1B[".concat(t,"m").concat(i,"\x1B[39m")),n&&(t=Ey(n),i="\x1B[".concat(n+10,"m").concat(i,"\x1B[49m"))),i}function oI(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:["constructor"];const n=Object.getPrototypeOf(i),s=Object.getOwnPropertyNames(n);for(const u of s)typeof i[u]=="function"&&(t.find(p=>u===p)||(i[u]=i[u].bind(i)))}function Ff(i,t){if(!i)throw new Error(t||"Assertion failed")}function Cl(){let i;if("performance"in Df){var t,n;i=Df==null||(t=Df.performance)===null||t===void 0||(n=t.now)===null||n===void 0?void 0:n.call(t)}else if("hrtime"in Qc){var s;const u=Qc==null||(s=Qc.hrtime)===null||s===void 0?void 0:s.call(Qc);i=u[0]*1e3+u[1]/1e6}else i=Date.now();return i}const wl={debug:console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},aI={enabled:!0,level:0};function ro(){}const Iy={},by={once:!0};class Uc{constructor(){let{id:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{id:""};Z(this,"id",void 0),Z(this,"VERSION",vy),Z(this,"_startTs",Cl()),Z(this,"_deltaTs",Cl()),Z(this,"_storage",void 0),Z(this,"userData",{}),Z(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new nI("__probe-".concat(this.id,"__"),aI),this.timeStamp("".concat(this.id," started")),oI(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((Cl()-this._startTs).toPrecision(10))}getDelta(){return Number((Cl()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return this._storage.setConfiguration({enabled:t}),this}setLevel(t){return this._storage.setConfiguration({level:t}),this}get(t){return this._storage.config[t]}set(t,n){this._storage.setConfiguration({[t]:n})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,n){Ff(t,n)}warn(t){return this._getLogFunction(0,t,wl.warn,arguments,by)}error(t){return this._getLogFunction(0,t,wl.error,arguments)}deprecated(t,n){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(n,"` instead"))}removed(t,n){return this.error("`".concat(t,"` has been removed. Use `").concat(n,"` instead"))}probe(t,n){return this._getLogFunction(t,n,wl.log,arguments,{time:!0,once:!0})}log(t,n){return this._getLogFunction(t,n,wl.debug,arguments)}info(t,n){return this._getLogFunction(t,n,console.info,arguments)}once(t,n){for(var s=arguments.length,u=new Array(s>2?s-2:0),p=2;p<s;p++)u[p-2]=arguments[p];return this._getLogFunction(t,n,wl.debug||wl.info,arguments,by)}table(t,n,s){return n?this._getLogFunction(t,n,console.table||ro,s&&[s],{tag:cI(n)}):ro}image(t){let{logLevel:n,priority:s,image:u,message:p="",scale:a=1}=t;return this._shouldLog(n||s)?lI({image:u,message:p,scale:a}):ro}time(t,n){return this._getLogFunction(t,n,console.time?console.time:console.info)}timeEnd(t,n){return this._getLogFunction(t,n,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,n){return this._getLogFunction(t,n,console.timeStamp||ro)}group(t,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{collapsed:!1};const u=wy({logLevel:t,message:n,opts:s}),{collapsed:p}=s;return u.method=(p?console.groupCollapsed:console.group)||console.info,this._getLogFunction(u)}groupCollapsed(t,n){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.group(t,n,Object.assign({},s,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||ro)}withGroup(t,n,s){this.group(t,n)();try{s()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=Cy(t)}_getLogFunction(t,n,s,u,p){if(this._shouldLog(t)){p=wy({logLevel:t,message:n,args:u,opts:p}),s=s||p.method,Ff(s),p.total=this.getTotal(),p.delta=this.getDelta(),this._deltaTs=Cl();const a=p.tag||p.message;if(p.once)if(!Iy[a])Iy[a]=Cl();else return ro;return n=uI(this.id,p.message,p),s.bind(console,n,...p.args)}return ro}}Z(Uc,"VERSION",vy);function Cy(i){if(!i)return 0;let t;switch(typeof i){case"number":t=i;break;case"object":t=i.logLevel||i.priority||0;break;default:return 0}return Ff(Number.isFinite(t)&&t>=0),t}function wy(i){const{logLevel:t,message:n}=i;i.logLevel=Cy(t);const s=i.args?Array.from(i.args):[];for(;s.length&&s.shift()!==n;);switch(typeof t){case"string":case"function":n!==void 0&&s.unshift(n),i.message=t;break;case"object":Object.assign(i,t);break}typeof i.message=="function"&&(i.message=i.message());const u=typeof i.message;return Ff(u==="string"||u==="object"),Object.assign(i,{args:s},i.opts)}function uI(i,t,n){if(typeof t=="string"){const s=n.time?rI(iI(n.total)):"";t=n.time?"".concat(i,": ").concat(s," ").concat(t):"".concat(i,": ").concat(t),t=sI(t,n.color,n.background)}return t}function lI(i){let{image:t,message:n="",scale:s=1}=i;if(typeof t=="string"){const p=new Image;return p.onload=()=>{const a=jd(p,n,s);console.log(...a)},p.src=t,ro}const u=t.nodeName||"";if(u.toLowerCase()==="img")return console.log(...jd(t,n,s)),ro;if(u.toLowerCase()==="canvas"){const p=new Image;return p.onload=()=>console.log(...jd(p,n,s)),p.src=t.toDataURL(),ro}return ro}function cI(i){for(const t in i)for(const n in i[t])return n||"untitled";return"empty"}const Ee=new Uc({id:"luma.gl"});function Lr(i,t){if(!i)throw new Error(t||"luma.gl: assertion failed.")}const hI="Invalid WebGLRenderingContext",fI="Requires WebGL2";function Nf(i){return typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext||typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext?!0:!!(i&&Number.isFinite(i._version))}function rn(i){return typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext?!0:!!(i&&i._version===2)}function pI(i){return rn(i)?i:null}function Of(i){return Lr(Nf(i),hI),i}function Fr(i){return Lr(rn(i),fI),i}const Gc={};function dI(i){globalThis.console&&globalThis.console.error&&globalThis.console.error(i)}function gI(i){globalThis.console&&globalThis.console.log&&globalThis.console.log(i)}function AI(i,t){Gc[i]=!0,dI(t)}function mI(i){const t=i.getError;i.getError=function(){let s;do s=t.apply(i),s!==0&&(Gc[s]=!0);while(s!==0);for(s in Gc)if(Gc[s])return delete Gc[s],parseInt(s,10);return 0}}const Vc=function i(t){const n=t.gl;this.ext=t,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(t.maxVertexAttribs);for(let s=0;s<this.attribs.length;s++){const u=new i.VertexAttrib(n);this.attribs[s]=u}this.maxAttrib=0};Vc.VertexAttrib=function(t){this.enabled=!1,this.buffer=null,this.size=4,this.type=5126,this.normalized=!1,this.stride=16,this.offset=0,this.cached="",this.recache()},Vc.VertexAttrib.prototype.recache=function(){this.cached=[this.size,this.type,this.normalized,this.stride,this.offset].join(":")};const Su=function(t){const n=this;this.gl=t,mI(t);const s=this.original={getParameter:t.getParameter,enableVertexAttribArray:t.enableVertexAttribArray,disableVertexAttribArray:t.disableVertexAttribArray,bindBuffer:t.bindBuffer,getVertexAttrib:t.getVertexAttrib,vertexAttribPointer:t.vertexAttribPointer};t.getParameter=function(p){return p===n.VERTEX_ARRAY_BINDING_OES?n.currentVertexArrayObject===n.defaultVertexArrayObject?null:n.currentVertexArrayObject:s.getParameter.apply(this,arguments)},t.enableVertexAttribArray=function(p){const a=n.currentVertexArrayObject;a.maxAttrib=Math.max(a.maxAttrib,p);const E=a.attribs[p];return E.enabled=!0,s.enableVertexAttribArray.apply(this,arguments)},t.disableVertexAttribArray=function(p){const a=n.currentVertexArrayObject;a.maxAttrib=Math.max(a.maxAttrib,p);const E=a.attribs[p];return E.enabled=!1,s.disableVertexAttribArray.apply(this,arguments)},t.bindBuffer=function(p,a){switch(p){case 34962:n.currentArrayBuffer=a;break;case 34963:n.currentVertexArrayObject.elementArrayBuffer=a;break}return s.bindBuffer.apply(this,arguments)},t.getVertexAttrib=function(p,a){const I=n.currentVertexArrayObject.attribs[p];switch(a){case 34975:return I.buffer;case 34338:return I.enabled;case 34339:return I.size;case 34340:return I.stride;case 34341:return I.type;case 34922:return I.normalized;default:return s.getVertexAttrib.apply(this,arguments)}},t.vertexAttribPointer=function(p,a,E,I,M,P){const O=n.currentVertexArrayObject;O.maxAttrib=Math.max(O.maxAttrib,p);const z=O.attribs[p];return z.buffer=n.currentArrayBuffer,z.size=a,z.type=E,z.normalized=I,z.stride=M,z.offset=P,z.recache(),s.vertexAttribPointer.apply(this,arguments)},t.instrumentExtension&&t.instrumentExtension(this,"OES_vertex_array_object"),t.canvas&&t.canvas.addEventListener("webglcontextrestored",()=>{gI("OESVertexArrayObject emulation library context restored"),n.reset_()},!0),this.reset_()};Su.prototype.VERTEX_ARRAY_BINDING_OES=34229,Su.prototype.reset_=function(){if(this.vertexArrayObjects!==void 0)for(let s=0;s<this.vertexArrayObjects.length;++s)this.vertexArrayObjects.isAlive=!1;const n=this.gl;this.maxVertexAttribs=n.getParameter(34921),this.defaultVertexArrayObject=new Vc(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},Su.prototype.createVertexArrayOES=function(){const t=new Vc(this);return this.vertexArrayObjects.push(t),t},Su.prototype.deleteVertexArrayOES=function(t){t.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t),1),this.currentVertexArrayObject===t&&this.bindVertexArrayOES(null)},Su.prototype.isVertexArrayOES=function(t){return!!(t&&t instanceof Vc&&t.hasBeenBound&&t.ext===this)},Su.prototype.bindVertexArrayOES=function(t){const n=this.gl;if(t&&!t.isAlive){AI(1282,"bindVertexArrayOES: attempt to bind deleted arrayObject");return}const s=this.original,u=this.currentVertexArrayObject;this.currentVertexArrayObject=t||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;const p=this.currentVertexArrayObject;if(u===p)return;(!u||p.elementArrayBuffer!==u.elementArrayBuffer)&&s.bindBuffer.call(n,34963,p.elementArrayBuffer);let a=this.currentArrayBuffer;const E=Math.max(u?u.maxAttrib:0,p.maxAttrib);for(let I=0;I<=E;I++){const M=p.attribs[I],P=u?u.attribs[I]:null;if((!u||M.enabled!==P.enabled)&&(M.enabled?s.enableVertexAttribArray.call(n,I):s.disableVertexAttribArray.call(n,I)),M.enabled){let O=!1;(!u||M.buffer!==P.buffer)&&(a!==M.buffer&&(s.bindBuffer.call(n,34962,M.buffer),a=M.buffer),O=!0),(O||M.cached!==P.cached)&&s.vertexAttribPointer.call(n,I,M.size,M.type,M.normalized,M.stride,M.offset)}}this.currentArrayBuffer!==a&&s.bindBuffer.call(n,34962,this.currentArrayBuffer)};function yI(i){if(typeof i.createVertexArray=="function")return;const t=i.getSupportedExtensions;i.getSupportedExtensions=function(){const u=t.call(this)||[];return u.indexOf("OES_vertex_array_object")<0&&u.push("OES_vertex_array_object"),u};const n=i.getExtension;i.getExtension=function(u){const p=n.call(this,u);return p||(u!=="OES_vertex_array_object"?null:(i.__OESVertexArrayObject||(this.__OESVertexArrayObject=new Su(this)),this.__OESVertexArrayObject))}}const Ty="OES_element_index",My="WEBGL_draw_buffers",_I="EXT_disjoint_timer_query",vI="EXT_disjoint_timer_query_webgl2",xI="EXT_texture_filter_anisotropic",Sy="WEBGL_debug_renderer_info",EI=35723,II=4352,bI=36795,CI=34047,wI=37445,TI=37446,Kn=i=>rn(i)?void 0:0,MI={3074:i=>rn(i)?void 0:36064,[EI]:i=>rn(i)?void 0:II,35977:Kn,32937:Kn,[bI]:(i,t)=>{const n=rn(i)?i.getExtension(vI):i.getExtension(_I);return n&&n.GPU_DISJOINT_EXT?t(n.GPU_DISJOINT_EXT):0},[wI]:(i,t)=>{const n=i.getExtension(Sy);return t(n&&n.UNMASKED_VENDOR_WEBGL||7936)},[TI]:(i,t)=>{const n=i.getExtension(Sy);return t(n&&n.UNMASKED_RENDERER_WEBGL||7937)},[CI]:(i,t)=>{const n=i.luma.extensions[xI];return n?t(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:Kn,35071:Kn,37447:Kn,36063:(i,t)=>{if(!rn(i)){const n=i.getExtension(My);return n?t(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:Kn,35374:Kn,35377:Kn,34852:i=>{if(!rn(i)){const t=i.getExtension(My);return t?t.MAX_DRAW_BUFFERS_WEBGL:0}},36203:i=>i.getExtension(Ty)?2147483647:65535,33001:i=>i.getExtension(Ty)?16777216:65535,33e3:i=>16777216,37157:Kn,35373:Kn,35657:Kn,36183:Kn,37137:Kn,34045:Kn,35978:Kn,35979:Kn,35968:Kn,35376:Kn,35375:Kn,35659:Kn,37154:Kn,35371:Kn,35658:Kn,35076:Kn,35077:Kn,35380:Kn};function SI(i,t,n){const s=MI[n],u=typeof s=="function"?s(i,t,n):s;return u!==void 0?u:t(n)}const BI="OES_vertex_array_object",By="ANGLE_instanced_arrays",RI="WEBGL_draw_buffers",PI="EXT_disjoint_timer_query",DI="EXT_texture_filter_anisotropic",LI="VertexArray requires WebGL2 or OES_vertex_array_object extension";function FI(i,t){return{webgl2:rn(i),ext:i.getExtension(t)}}const Ry={[BI]:{meta:{suffix:"OES"},createVertexArray:()=>{Lr(!1,LI)},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[By]:{meta:{suffix:"ANGLE"},vertexAttribDivisor(i,t){Lr(t===0,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},[RI]:{meta:{suffix:"WEBGL"},drawBuffers:()=>{Lr(!1)}},[PI]:{meta:{suffix:"EXT"},createQuery:()=>{Lr(!1)},deleteQuery:()=>{Lr(!1)},beginQuery:()=>{Lr(!1)},endQuery:()=>{},getQuery(i,t){return this.getQueryObject(i,t)},getQueryParameter(i,t){return this.getQueryObject(i,t)},getQueryObject:()=>{}}},Hd={readBuffer:(i,t,n)=>{rn(i)&&t(n)},getVertexAttrib:(i,t,n,s)=>{const{webgl2:u,ext:p}=FI(i,By);let a;switch(s){case 35069:a=u?void 0:!1;break;case 35070:a=!u&&!p?0:void 0;break}return a!==void 0?a:t(n,s)},getProgramParameter:(i,t,n,s)=>{if(!rn(i))switch(s){case 35967:return 35981;case 35971:return 0;case 35382:return 0}return t(n,s)},getInternalformatParameter:(i,t,n,s,u)=>{if(!rn(i))switch(u){case 32937:return new Int32Array([0])}return i.getInternalformatParameter(n,s,u)},getTexParameter(i,t,n,s){switch(s){case 34046:const{extensions:u}=i.luma,p=u[DI];s=p&&p.TEXTURE_MAX_ANISOTROPY_EXT||34046;break}return t(n,s)},getParameter:SI,hint(i,t,n,s){return t(n,s)}};function jc(i){i.luma=i.luma||{};const{luma:t}=i;return t.polyfilled||(yI(i),NI(i),kI(i,Ry),OI(i,{target:t,target2:i}),t.polyfilled=!0),i}globalThis.polyfillContext=jc;function NI(i){i.luma.extensions={};const t=i.getSupportedExtensions()||[];for(const n of t)i.luma[n]=i.getExtension(n)}function OI(i,t){let{target:n,target2:s}=t;Object.keys(Hd).forEach(u=>{if(typeof Hd[u]=="function"){const p=i[u]?i[u].bind(i):()=>{},a=Hd[u].bind(null,i,p);n[u]=a,s[u]=a}})}function kI(i,t){for(const n of Object.getOwnPropertyNames(t))n!=="overrides"&&zI(i,{extension:n,target:i.luma,target2:i})}function zI(i,t){let{extension:n,target:s,target2:u}=t;const p=Ry[n];Lr(p);const{meta:a={}}=p,{suffix:E=""}=a,I=i.getExtension(n);for(const M of Object.keys(p)){const P="".concat(M).concat(E);let O=null;M==="meta"||typeof i[M]=="function"||(I&&typeof I[P]=="function"?O=function(){return I[P](...arguments)}:typeof p[M]=="function"&&(O=p[M].bind(s))),O&&(s[M]=O,u[M]=O)}}const Kd={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},Ga=(i,t,n)=>t?i.enable(n):i.disable(n),Py=(i,t,n)=>i.hint(n,t),ps=(i,t,n)=>i.pixelStorei(n,t),QI=(i,t)=>{const n=rn(i)?36009:36160;return i.bindFramebuffer(n,t)},UI=(i,t)=>i.bindFramebuffer(36008,t);function Hc(i){return Array.isArray(i)||ArrayBuffer.isView(i)}const GI={3042:Ga,32773:(i,t)=>i.blendColor(...t),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(i,t)=>i.clearColor(...t),3107:(i,t)=>i.colorMask(...t),2884:Ga,2885:(i,t)=>i.cullFace(t),2929:Ga,2931:(i,t)=>i.clearDepth(t),2932:(i,t)=>i.depthFunc(t),2928:(i,t)=>i.depthRange(...t),2930:(i,t)=>i.depthMask(t),3024:Ga,35723:Py,36006:QI,2886:(i,t)=>i.frontFace(t),33170:Py,2849:(i,t)=>i.lineWidth(t),32823:Ga,32824:"polygonOffset",10752:"polygonOffset",35977:Ga,32938:"sampleCoverage",32939:"sampleCoverage",3089:Ga,3088:(i,t)=>i.scissor(...t),2960:Ga,2961:(i,t)=>i.clearStencil(t),2968:(i,t)=>i.stencilMaskSeparate(1028,t),36005:(i,t)=>i.stencilMaskSeparate(1029,t),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(i,t)=>i.viewport(...t),3333:ps,3317:ps,37440:ps,37441:ps,37443:ps,3330:ps,3332:ps,3331:ps,36010:UI,3314:ps,32878:ps,3316:ps,3315:ps,32877:ps,framebuffer:(i,t)=>{const n=t&&"handle"in t?t.handle:t;return i.bindFramebuffer(36160,n)},blend:(i,t)=>t?i.enable(3042):i.disable(3042),blendColor:(i,t)=>i.blendColor(...t),blendEquation:(i,t)=>{t=Hc(t)?t:[t,t],i.blendEquationSeparate(...t)},blendFunc:(i,t)=>{t=Hc(t)&&t.length===2?[...t,...t]:t,i.blendFuncSeparate(...t)},clearColor:(i,t)=>i.clearColor(...t),clearDepth:(i,t)=>i.clearDepth(t),clearStencil:(i,t)=>i.clearStencil(t),colorMask:(i,t)=>i.colorMask(...t),cull:(i,t)=>t?i.enable(2884):i.disable(2884),cullFace:(i,t)=>i.cullFace(t),depthTest:(i,t)=>t?i.enable(2929):i.disable(2929),depthFunc:(i,t)=>i.depthFunc(t),depthMask:(i,t)=>i.depthMask(t),depthRange:(i,t)=>i.depthRange(...t),dither:(i,t)=>t?i.enable(3024):i.disable(3024),derivativeHint:(i,t)=>{i.hint(35723,t)},frontFace:(i,t)=>i.frontFace(t),mipmapHint:(i,t)=>i.hint(33170,t),lineWidth:(i,t)=>i.lineWidth(t),polygonOffsetFill:(i,t)=>t?i.enable(32823):i.disable(32823),polygonOffset:(i,t)=>i.polygonOffset(...t),sampleCoverage:(i,t)=>i.sampleCoverage(...t),scissorTest:(i,t)=>t?i.enable(3089):i.disable(3089),scissor:(i,t)=>i.scissor(...t),stencilTest:(i,t)=>t?i.enable(2960):i.disable(2960),stencilMask:(i,t)=>{t=Hc(t)?t:[t,t];const[n,s]=t;i.stencilMaskSeparate(1028,n),i.stencilMaskSeparate(1029,s)},stencilFunc:(i,t)=>{t=Hc(t)&&t.length===3?[...t,...t]:t;const[n,s,u,p,a,E]=t;i.stencilFuncSeparate(1028,n,s,u),i.stencilFuncSeparate(1029,p,a,E)},stencilOp:(i,t)=>{t=Hc(t)&&t.length===3?[...t,...t]:t;const[n,s,u,p,a,E]=t;i.stencilOpSeparate(1028,n,s,u),i.stencilOpSeparate(1029,p,a,E)},viewport:(i,t)=>i.viewport(...t)};function _i(i,t,n){return t[i]!==void 0?t[i]:n[i]}const VI={blendEquation:(i,t,n)=>i.blendEquationSeparate(_i(32777,t,n),_i(34877,t,n)),blendFunc:(i,t,n)=>i.blendFuncSeparate(_i(32969,t,n),_i(32968,t,n),_i(32971,t,n),_i(32970,t,n)),polygonOffset:(i,t,n)=>i.polygonOffset(_i(32824,t,n),_i(10752,t,n)),sampleCoverage:(i,t,n)=>i.sampleCoverage(_i(32938,t,n),_i(32939,t,n)),stencilFuncFront:(i,t,n)=>i.stencilFuncSeparate(1028,_i(2962,t,n),_i(2967,t,n),_i(2963,t,n)),stencilFuncBack:(i,t,n)=>i.stencilFuncSeparate(1029,_i(34816,t,n),_i(36003,t,n),_i(36004,t,n)),stencilOpFront:(i,t,n)=>i.stencilOpSeparate(1028,_i(2964,t,n),_i(2965,t,n),_i(2966,t,n)),stencilOpBack:(i,t,n)=>i.stencilOpSeparate(1029,_i(34817,t,n),_i(34818,t,n),_i(34819,t,n))},Dy={enable:(i,t)=>i({[t]:!0}),disable:(i,t)=>i({[t]:!1}),pixelStorei:(i,t,n)=>i({[t]:n}),hint:(i,t,n)=>i({[t]:n}),bindFramebuffer:(i,t,n)=>{switch(t){case 36160:return i({36006:n,36010:n});case 36009:return i({36006:n});case 36008:return i({36010:n});default:return null}},blendColor:(i,t,n,s,u)=>i({32773:new Float32Array([t,n,s,u])}),blendEquation:(i,t)=>i({32777:t,34877:t}),blendEquationSeparate:(i,t,n)=>i({32777:t,34877:n}),blendFunc:(i,t,n)=>i({32969:t,32968:n,32971:t,32970:n}),blendFuncSeparate:(i,t,n,s,u)=>i({32969:t,32968:n,32971:s,32970:u}),clearColor:(i,t,n,s,u)=>i({3106:new Float32Array([t,n,s,u])}),clearDepth:(i,t)=>i({2931:t}),clearStencil:(i,t)=>i({2961:t}),colorMask:(i,t,n,s,u)=>i({3107:[t,n,s,u]}),cullFace:(i,t)=>i({2885:t}),depthFunc:(i,t)=>i({2932:t}),depthRange:(i,t,n)=>i({2928:new Float32Array([t,n])}),depthMask:(i,t)=>i({2930:t}),frontFace:(i,t)=>i({2886:t}),lineWidth:(i,t)=>i({2849:t}),polygonOffset:(i,t,n)=>i({32824:t,10752:n}),sampleCoverage:(i,t,n)=>i({32938:t,32939:n}),scissor:(i,t,n,s,u)=>i({3088:new Int32Array([t,n,s,u])}),stencilMask:(i,t)=>i({2968:t,36005:t}),stencilMaskSeparate:(i,t,n)=>i({[t===1028?2968:36005]:n}),stencilFunc:(i,t,n,s)=>i({2962:t,2967:n,2963:s,34816:t,36003:n,36004:s}),stencilFuncSeparate:(i,t,n,s,u)=>i({[t===1028?2962:34816]:n,[t===1028?2967:36003]:s,[t===1028?2963:36004]:u}),stencilOp:(i,t,n,s)=>i({2964:t,2965:n,2966:s,34817:t,34818:n,34819:s}),stencilOpSeparate:(i,t,n,s,u)=>i({[t===1028?2964:34817]:n,[t===1028?2965:34818]:s,[t===1028?2966:34819]:u}),viewport:(i,t,n,s,u)=>i({2978:[t,n,s,u]})},Co=(i,t)=>i.isEnabled(t),Ly={3042:Co,2884:Co,2929:Co,3024:Co,32823:Co,32926:Co,32928:Co,3089:Co,2960:Co,35977:Co};function Fy(i){for(const t in i)return!1;return!0}function jI(i,t){if(i===t)return!0;const n=Array.isArray(i)||ArrayBuffer.isView(i),s=Array.isArray(t)||ArrayBuffer.isView(t);if(n&&s&&i.length===t.length){for(let u=0;u<i.length;++u)if(i[u]!==t[u])return!1;return!0}return!1}function Ny(i,t){const n=i[t].bind(i);i[t]=function(){const u=arguments.length<=0?void 0:arguments[0];return u in i.state.cache?i.state.enable?i.state.cache[u]:n(...arguments):n(...arguments)},Object.defineProperty(i[t],"name",{value:"".concat(t,"-from-cache"),configurable:!1})}function HI(i,t,n){const s=i[t].bind(i);i[t]=function(){for(var p=arguments.length,a=new Array(p),E=0;E<p;E++)a[E]=arguments[E];const{valueChanged:I,oldValue:M}=n(i.state._updateCache,...a);return I&&s(...a),M},Object.defineProperty(i[t],"name",{value:"".concat(t,"-to-cache"),configurable:!1})}function KI(i){const t=i.useProgram.bind(i);i.useProgram=function(s){i.state.program!==s&&(t(s),i.state.program=s)}}class YI{constructor(t){let{copyState:n=!1,log:s=()=>{}}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=n?qI(t):Object.assign({},Kd),this.log=s,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(){this.stateStack.push({})}pop(){Lr(this.stateStack.length>0);const t=this.stateStack[this.stateStack.length-1];ea(this.gl,t),this.stateStack.pop()}_updateCache(t){let n=!1,s;const u=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const p in t){Lr(p!==void 0);const a=t[p],E=this.cache[p];jI(a,E)||(n=!0,s=E,u&&!(p in u)&&(u[p]=E),this.cache[p]=a)}return{valueChanged:n,oldValue:s}}}function Oy(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{enable:n=!0,copyState:s}=t;if(Lr(s!==void 0),!i.state){const{polyfillContext:u}=globalThis;u&&u(i),i.state=new YI(i,{copyState:s}),KI(i);for(const p in Dy){const a=Dy[p];HI(i,p,a)}Ny(i,"getParameter"),Ny(i,"isEnabled")}return i.state.enable=n,i}function XI(i){i.state||Oy(i,{copyState:!1}),i.state.push()}function ky(i){Lr(i.state),i.state.pop()}function ea(i,t){if(Lr(Nf(i),"setParameters requires a WebGL context"),Fy(t))return;const n={};for(const u in t){const p=Number(u),a=GI[u];a&&(typeof a=="string"?n[a]=!0:a(i,t[u],p))}const s=i.state&&i.state.cache;if(s)for(const u in n){const p=VI[u];p(i,t,s)}}function qI(i,t){if(t=t||Kd,typeof t=="number"){const u=t,p=Ly[u];return p?p(i,u):i.getParameter(u)}const n=Array.isArray(t)?t:Object.keys(t),s={};for(const u of n){const p=Ly[u];s[u]=p?p(i,Number(u)):i.getParameter(Number(u))}return s}function WI(i){ea(i,Kd)}function Nr(i,t,n){if(Fy(t))return n(i);const{nocatch:s=!0}=t;XI(i),ea(i,t);let u;if(s)u=n(i),ky(i);else try{u=n(i)}finally{ky(i)}return u}function Tl(i){const{luma:t}=i;if(i.canvas&&t){const n=t.canvasSizeInfo,s="clientWidth"in n?n.clientWidth:i.canvas.clientWidth;return s?i.drawingBufferWidth/s:1}return 1}function Yd(i,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const s=Tl(i),u=i.drawingBufferWidth,p=i.drawingBufferHeight;return JI(t,s,u,p,n)}function ZI(i){const t=typeof window>"u"?1:window.devicePixelRatio||1;return Number.isFinite(i)?i<=0?1:i:i?t:1}function JI(i,t,n,s,u){const p=zy(i[0],t,n);let a=Qy(i[1],t,s,u),E=zy(i[0]+1,t,n);const I=E===n-1?E:E-1;E=Qy(i[1]+1,t,s,u);let M;return u?(E=E===0?E:E+1,M=a,a=E):M=E===s-1?E:E-1,{x:p,y:a,width:Math.max(I-p+1,1),height:Math.max(M-a+1,1)}}function zy(i,t,n){return Math.min(Math.round(i*t),n-1)}function Qy(i,t,n,s){return s?Math.max(0,n-1-Math.round(i*t)):Math.min(Math.round(i*t),n-1)}const Xd=bl(),$I=Xd&&typeof document<"u",Uy={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function Gy(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Lr(Xd,`createGLContext only available in the browser. Create your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils`),i=Object.assign({},Uy,i);const{width:t,height:n}=i;function s(E){if(i.throwOnError)throw new Error(E);return console.error(E),null}i.onError=s;let u;const{canvas:p}=i,a=ib({canvas:p,width:t,height:n,onError:s});return u=nb(a,i),u?(u=qd(u,i),rb(u),u):null}function qd(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!i||i._instrumented)return i;i._version=i._version||sb(i),i.luma=i.luma||{},i.luma.canvasSizeInfo=i.luma.canvasSizeInfo||{},t=Object.assign({},Uy,t);const{manageState:n,debug:s}=t;return n&&Oy(i,{copyState:!1,log:function(){for(var u=arguments.length,p=new Array(u),a=0;a<u;a++)p[a]=arguments[a];return Ee.log(1,...p)()}}),Xd&&s&&(globalThis.makeDebugContext?(i=globalThis.makeDebugContext(i,t),Ee.level=Math.max(Ee.level,1)):Ee.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),i._instrumented=!0,i}function tb(i){const t=i.getParameter(7936),n=i.getParameter(7937),s=i.getExtension("WEBGL_debug_renderer_info"),u=s&&i.getParameter(s.UNMASKED_VENDOR_WEBGL||7936),p=s&&i.getParameter(s.UNMASKED_RENDERER_WEBGL||7937);return{vendor:u||t,renderer:p||n,vendorMasked:t,rendererMasked:n,version:i.getParameter(7938),sha