@luma.gl/webgpu 9.0.0-alpha.16 → 9.0.0-alpha.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/adapter/helpers/accessor-to-format.js +1 -100
  2. package/dist/adapter/helpers/accessor-to-format.js.map +1 -0
  3. package/dist/adapter/helpers/convert-texture-format.d.ts +1 -1
  4. package/dist/adapter/helpers/convert-texture-format.js +5 -5
  5. package/dist/adapter/helpers/convert-texture-format.js.map +1 -0
  6. package/dist/adapter/helpers/generate-mipmaps.d.ts +1 -1
  7. package/dist/adapter/helpers/generate-mipmaps.js +85 -88
  8. package/dist/adapter/helpers/generate-mipmaps.js.map +1 -0
  9. package/dist/adapter/helpers/get-bind-group.d.ts +1 -1
  10. package/dist/adapter/helpers/get-bind-group.d.ts.map +1 -1
  11. package/dist/adapter/helpers/get-bind-group.js +39 -54
  12. package/dist/adapter/helpers/get-bind-group.js.map +1 -0
  13. package/dist/adapter/helpers/get-vertex-buffer-layout.d.ts +1 -1
  14. package/dist/adapter/helpers/get-vertex-buffer-layout.js +72 -97
  15. package/dist/adapter/helpers/get-vertex-buffer-layout.js.map +1 -0
  16. package/dist/adapter/helpers/webgpu-parameters.d.ts +1 -1
  17. package/dist/adapter/helpers/webgpu-parameters.js +125 -182
  18. package/dist/adapter/helpers/webgpu-parameters.js.map +1 -0
  19. package/dist/adapter/resources/webgpu-buffer.d.ts +2 -2
  20. package/dist/adapter/resources/webgpu-buffer.d.ts.map +1 -1
  21. package/dist/adapter/resources/webgpu-buffer.js +63 -57
  22. package/dist/adapter/resources/webgpu-buffer.js.map +1 -0
  23. package/dist/adapter/resources/webgpu-command-encoder.d.ts +2 -2
  24. package/dist/adapter/resources/webgpu-command-encoder.d.ts.map +1 -1
  25. package/dist/adapter/resources/webgpu-command-encoder.js +46 -47
  26. package/dist/adapter/resources/webgpu-command-encoder.js.map +1 -0
  27. package/dist/adapter/resources/webgpu-compute-pass.d.ts +2 -2
  28. package/dist/adapter/resources/webgpu-compute-pass.d.ts.map +1 -1
  29. package/dist/adapter/resources/webgpu-compute-pass.js +41 -51
  30. package/dist/adapter/resources/webgpu-compute-pass.js.map +1 -0
  31. package/dist/adapter/resources/webgpu-compute-pipeline.d.ts +2 -2
  32. package/dist/adapter/resources/webgpu-compute-pipeline.d.ts.map +1 -1
  33. package/dist/adapter/resources/webgpu-compute-pipeline.js +20 -22
  34. package/dist/adapter/resources/webgpu-compute-pipeline.js.map +1 -0
  35. package/dist/adapter/resources/webgpu-external-texture.d.ts +2 -2
  36. package/dist/adapter/resources/webgpu-external-texture.d.ts.map +1 -1
  37. package/dist/adapter/resources/webgpu-external-texture.js +20 -26
  38. package/dist/adapter/resources/webgpu-external-texture.js.map +1 -0
  39. package/dist/adapter/resources/webgpu-framebuffer.d.ts +2 -2
  40. package/dist/adapter/resources/webgpu-framebuffer.d.ts.map +1 -1
  41. package/dist/adapter/resources/webgpu-framebuffer.js +86 -89
  42. package/dist/adapter/resources/webgpu-framebuffer.js.map +1 -0
  43. package/dist/adapter/resources/webgpu-query.js +1 -42
  44. package/dist/adapter/resources/webgpu-query.js.map +1 -0
  45. package/dist/adapter/resources/webgpu-render-pass.d.ts +2 -2
  46. package/dist/adapter/resources/webgpu-render-pass.d.ts.map +1 -1
  47. package/dist/adapter/resources/webgpu-render-pass.js +70 -64
  48. package/dist/adapter/resources/webgpu-render-pass.js.map +1 -0
  49. package/dist/adapter/resources/webgpu-render-pipeline.d.ts +2 -2
  50. package/dist/adapter/resources/webgpu-render-pipeline.d.ts.map +1 -1
  51. package/dist/adapter/resources/webgpu-render-pipeline.js +118 -158
  52. package/dist/adapter/resources/webgpu-render-pipeline.js.map +1 -0
  53. package/dist/adapter/resources/webgpu-sampler.d.ts +3 -3
  54. package/dist/adapter/resources/webgpu-sampler.d.ts.map +1 -1
  55. package/dist/adapter/resources/webgpu-sampler.js +16 -16
  56. package/dist/adapter/resources/webgpu-sampler.js.map +1 -0
  57. package/dist/adapter/resources/webgpu-shader.d.ts +3 -3
  58. package/dist/adapter/resources/webgpu-shader.d.ts.map +1 -1
  59. package/dist/adapter/resources/webgpu-shader.js +44 -47
  60. package/dist/adapter/resources/webgpu-shader.js.map +1 -0
  61. package/dist/adapter/resources/webgpu-texture.d.ts +3 -2
  62. package/dist/adapter/resources/webgpu-texture.d.ts.map +1 -1
  63. package/dist/adapter/resources/webgpu-texture.js +87 -100
  64. package/dist/adapter/resources/webgpu-texture.js.map +1 -0
  65. package/dist/adapter/webgpu-canvas-context.d.ts +2 -2
  66. package/dist/adapter/webgpu-canvas-context.d.ts.map +1 -1
  67. package/dist/adapter/webgpu-canvas-context.js +68 -77
  68. package/dist/adapter/webgpu-canvas-context.js.map +1 -0
  69. package/dist/adapter/webgpu-device.d.ts +2 -2
  70. package/dist/adapter/webgpu-device.d.ts.map +1 -1
  71. package/dist/adapter/webgpu-device.js +194 -215
  72. package/dist/adapter/webgpu-device.js.map +1 -0
  73. package/dist/adapter/webgpu-types.js +2 -0
  74. package/dist/adapter/webgpu-types.js.map +1 -0
  75. package/dist/dist.dev.js +3061 -0
  76. package/dist/glsl/glsllang.js +6 -9
  77. package/dist/glsl/glsllang.js.map +1 -0
  78. package/dist/index.cjs +1442 -0
  79. package/dist/index.d.ts +1 -3
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +6 -10
  82. package/dist/index.js.map +1 -0
  83. package/dist.min.js +17 -0
  84. package/package.json +17 -8
  85. package/src/adapter/helpers/generate-mipmaps.ts +1 -1
  86. package/src/adapter/helpers/get-bind-group.ts +1 -1
  87. package/src/adapter/helpers/get-vertex-buffer-layout.ts +2 -2
  88. package/src/adapter/helpers/webgpu-parameters.ts +9 -9
  89. package/src/adapter/resources/webgpu-buffer.ts +1 -1
  90. package/src/adapter/resources/webgpu-command-encoder.ts +4 -4
  91. package/src/adapter/resources/webgpu-compute-pass.ts +1 -1
  92. package/src/adapter/resources/webgpu-compute-pipeline.ts +1 -1
  93. package/src/adapter/resources/webgpu-external-texture.ts +1 -1
  94. package/src/adapter/resources/webgpu-framebuffer.ts +6 -6
  95. package/src/adapter/resources/webgpu-query.ts +1 -1
  96. package/src/adapter/resources/webgpu-render-pass.ts +1 -1
  97. package/src/adapter/resources/webgpu-render-pipeline.ts +3 -3
  98. package/src/adapter/resources/webgpu-sampler.ts +1 -1
  99. package/src/adapter/resources/webgpu-shader.ts +3 -1
  100. package/src/adapter/resources/webgpu-texture.ts +1 -1
  101. package/src/adapter/webgpu-canvas-context.ts +1 -1
  102. package/src/adapter/webgpu-device.ts +3 -2
  103. package/src/index.ts +2 -5
  104. package/dist/bundle.d.ts +0 -2
  105. package/dist/bundle.d.ts.map +0 -1
  106. package/dist/bundle.js +0 -4
  107. package/dist/dist.js +0 -8051
  108. package/dist/dist.min.js +0 -1
  109. package/dist/es5/adapter/helpers/accessor-to-format.js +0 -2
  110. package/dist/es5/adapter/helpers/accessor-to-format.js.map +0 -1
  111. package/dist/es5/adapter/helpers/convert-texture-format.js +0 -13
  112. package/dist/es5/adapter/helpers/convert-texture-format.js.map +0 -1
  113. package/dist/es5/adapter/helpers/generate-mipmaps.js +0 -103
  114. package/dist/es5/adapter/helpers/generate-mipmaps.js.map +0 -1
  115. package/dist/es5/adapter/helpers/get-bind-group.js +0 -66
  116. package/dist/es5/adapter/helpers/get-bind-group.js.map +0 -1
  117. package/dist/es5/adapter/helpers/get-vertex-buffer-layout.js +0 -149
  118. package/dist/es5/adapter/helpers/get-vertex-buffer-layout.js.map +0 -1
  119. package/dist/es5/adapter/helpers/webgpu-parameters.js +0 -150
  120. package/dist/es5/adapter/helpers/webgpu-parameters.js.map +0 -1
  121. package/dist/es5/adapter/resources/webgpu-buffer.js +0 -131
  122. package/dist/es5/adapter/resources/webgpu-buffer.js.map +0 -1
  123. package/dist/es5/adapter/resources/webgpu-command-encoder.js +0 -90
  124. package/dist/es5/adapter/resources/webgpu-command-encoder.js.map +0 -1
  125. package/dist/es5/adapter/resources/webgpu-compute-pass.js +0 -85
  126. package/dist/es5/adapter/resources/webgpu-compute-pass.js.map +0 -1
  127. package/dist/es5/adapter/resources/webgpu-compute-pipeline.js +0 -48
  128. package/dist/es5/adapter/resources/webgpu-compute-pipeline.js.map +0 -1
  129. package/dist/es5/adapter/resources/webgpu-external-texture.js +0 -50
  130. package/dist/es5/adapter/resources/webgpu-external-texture.js.map +0 -1
  131. package/dist/es5/adapter/resources/webgpu-framebuffer.js +0 -126
  132. package/dist/es5/adapter/resources/webgpu-framebuffer.js.map +0 -1
  133. package/dist/es5/adapter/resources/webgpu-query.js +0 -2
  134. package/dist/es5/adapter/resources/webgpu-query.js.map +0 -1
  135. package/dist/es5/adapter/resources/webgpu-render-pass.js +0 -124
  136. package/dist/es5/adapter/resources/webgpu-render-pass.js.map +0 -1
  137. package/dist/es5/adapter/resources/webgpu-render-pipeline.js +0 -185
  138. package/dist/es5/adapter/resources/webgpu-render-pipeline.js.map +0 -1
  139. package/dist/es5/adapter/resources/webgpu-sampler.js +0 -45
  140. package/dist/es5/adapter/resources/webgpu-sampler.js.map +0 -1
  141. package/dist/es5/adapter/resources/webgpu-shader.js +0 -125
  142. package/dist/es5/adapter/resources/webgpu-shader.js.map +0 -1
  143. package/dist/es5/adapter/resources/webgpu-texture.js +0 -138
  144. package/dist/es5/adapter/resources/webgpu-texture.js.map +0 -1
  145. package/dist/es5/adapter/webgpu-canvas-context.js +0 -111
  146. package/dist/es5/adapter/webgpu-canvas-context.js.map +0 -1
  147. package/dist/es5/adapter/webgpu-device.js +0 -317
  148. package/dist/es5/adapter/webgpu-device.js.map +0 -1
  149. package/dist/es5/adapter/webgpu-types.js +0 -2
  150. package/dist/es5/adapter/webgpu-types.js.map +0 -1
  151. package/dist/es5/bundle.js +0 -6
  152. package/dist/es5/bundle.js.map +0 -1
  153. package/dist/es5/glsl/glsllang.js +0 -47
  154. package/dist/es5/glsl/glsllang.js.map +0 -1
  155. package/dist/es5/index.js +0 -44
  156. package/dist/es5/index.js.map +0 -1
  157. package/dist/es5/init.js +0 -7
  158. package/dist/es5/init.js.map +0 -1
  159. package/dist/esm/adapter/helpers/accessor-to-format.js +0 -2
  160. package/dist/esm/adapter/helpers/accessor-to-format.js.map +0 -1
  161. package/dist/esm/adapter/helpers/convert-texture-format.js +0 -7
  162. package/dist/esm/adapter/helpers/convert-texture-format.js.map +0 -1
  163. package/dist/esm/adapter/helpers/generate-mipmaps.js +0 -88
  164. package/dist/esm/adapter/helpers/generate-mipmaps.js.map +0 -1
  165. package/dist/esm/adapter/helpers/get-bind-group.js +0 -51
  166. package/dist/esm/adapter/helpers/get-bind-group.js.map +0 -1
  167. package/dist/esm/adapter/helpers/get-vertex-buffer-layout.js +0 -83
  168. package/dist/esm/adapter/helpers/get-vertex-buffer-layout.js.map +0 -1
  169. package/dist/esm/adapter/helpers/webgpu-parameters.js +0 -137
  170. package/dist/esm/adapter/helpers/webgpu-parameters.js.map +0 -1
  171. package/dist/esm/adapter/resources/webgpu-buffer.js +0 -70
  172. package/dist/esm/adapter/resources/webgpu-buffer.js.map +0 -1
  173. package/dist/esm/adapter/resources/webgpu-command-encoder.js +0 -49
  174. package/dist/esm/adapter/resources/webgpu-command-encoder.js.map +0 -1
  175. package/dist/esm/adapter/resources/webgpu-compute-pass.js +0 -44
  176. package/dist/esm/adapter/resources/webgpu-compute-pass.js.map +0 -1
  177. package/dist/esm/adapter/resources/webgpu-compute-pipeline.js +0 -23
  178. package/dist/esm/adapter/resources/webgpu-compute-pipeline.js.map +0 -1
  179. package/dist/esm/adapter/resources/webgpu-external-texture.js +0 -23
  180. package/dist/esm/adapter/resources/webgpu-external-texture.js.map +0 -1
  181. package/dist/esm/adapter/resources/webgpu-framebuffer.js +0 -93
  182. package/dist/esm/adapter/resources/webgpu-framebuffer.js.map +0 -1
  183. package/dist/esm/adapter/resources/webgpu-query.js +0 -2
  184. package/dist/esm/adapter/resources/webgpu-query.js.map +0 -1
  185. package/dist/esm/adapter/resources/webgpu-render-pass.js +0 -79
  186. package/dist/esm/adapter/resources/webgpu-render-pass.js.map +0 -1
  187. package/dist/esm/adapter/resources/webgpu-render-pipeline.js +0 -130
  188. package/dist/esm/adapter/resources/webgpu-render-pipeline.js.map +0 -1
  189. package/dist/esm/adapter/resources/webgpu-sampler.js +0 -20
  190. package/dist/esm/adapter/resources/webgpu-sampler.js.map +0 -1
  191. package/dist/esm/adapter/resources/webgpu-shader.js +0 -50
  192. package/dist/esm/adapter/resources/webgpu-shader.js.map +0 -1
  193. package/dist/esm/adapter/resources/webgpu-texture.js +0 -95
  194. package/dist/esm/adapter/resources/webgpu-texture.js.map +0 -1
  195. package/dist/esm/adapter/webgpu-canvas-context.js +0 -74
  196. package/dist/esm/adapter/webgpu-canvas-context.js.map +0 -1
  197. package/dist/esm/adapter/webgpu-device.js +0 -196
  198. package/dist/esm/adapter/webgpu-device.js.map +0 -1
  199. package/dist/esm/adapter/webgpu-types.js +0 -2
  200. package/dist/esm/adapter/webgpu-types.js.map +0 -1
  201. package/dist/esm/bundle.js +0 -4
  202. package/dist/esm/bundle.js.map +0 -1
  203. package/dist/esm/glsl/glsllang.js +0 -9
  204. package/dist/esm/glsl/glsllang.js.map +0 -1
  205. package/dist/esm/index.js +0 -8
  206. package/dist/esm/index.js.map +0 -1
  207. package/dist/esm/init.js +0 -4
  208. package/dist/esm/init.js.map +0 -1
  209. package/dist/init.d.ts +0 -2
  210. package/dist/init.d.ts.map +0 -1
  211. package/dist/init.js +0 -3
  212. package/src/bundle.ts +0 -4
  213. package/src/init.ts +0 -4
package/dist/dist.min.js DELETED
@@ -1 +0,0 @@
1
- !function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var r=e();for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=24)}([function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){(e=(0,o.default)(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r;return t};var n,o=(n=r(27))&&n.__esModule?n:{default:n}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Buffer",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"CanvasContext",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"CommandEncoder",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"ComputePass",{enumerable:!0,get:function(){return b.default}}),Object.defineProperty(e,"ComputePipeline",{enumerable:!0,get:function(){return y.default}}),Object.defineProperty(e,"Device",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"ExternalTexture",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(e,"Framebuffer",{enumerable:!0,get:function(){return p.default}}),Object.defineProperty(e,"RenderPass",{enumerable:!0,get:function(){return v.default}}),Object.defineProperty(e,"RenderPipeline",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"Resource",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"Sampler",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"Shader",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"StatsManager",{enumerable:!0,get:function(){return j.default}}),Object.defineProperty(e,"Texture",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"UniformBlock",{enumerable:!0,get:function(){return g.default}}),Object.defineProperty(e,"UniformBufferLayout",{enumerable:!0,get:function(){return m.default}}),Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return P.assert}}),Object.defineProperty(e,"cancelAnimationFrame",{enumerable:!0,get:function(){return D.cancelAnimationFrame}}),Object.defineProperty(e,"cast",{enumerable:!0,get:function(){return S.cast}}),Object.defineProperty(e,"checkProps",{enumerable:!0,get:function(){return k.checkProps}}),Object.defineProperty(e,"decodeTextureFormat",{enumerable:!0,get:function(){return O.decodeTextureFormat}}),Object.defineProperty(e,"decodeVertexFormat",{enumerable:!0,get:function(){return w.decodeVertexFormat}}),Object.defineProperty(e,"fillArray",{enumerable:!0,get:function(){return A.fillArray}}),Object.defineProperty(e,"formatCompilerLog",{enumerable:!0,get:function(){return C.formatCompilerLog}}),Object.defineProperty(e,"formatValue",{enumerable:!0,get:function(){return x.formatValue}}),Object.defineProperty(e,"getRandom",{enumerable:!0,get:function(){return L.getRandom}}),Object.defineProperty(e,"getScratchArray",{enumerable:!0,get:function(){return A.getScratchArray}}),Object.defineProperty(e,"getScratchArrayBuffer",{enumerable:!0,get:function(){return A.getScratchArrayBuffer}}),e.glsl=void 0,Object.defineProperty(e,"isObjectEmpty",{enumerable:!0,get:function(){return E.isObjectEmpty}}),Object.defineProperty(e,"isPowerOfTwo",{enumerable:!0,get:function(){return E.isPowerOfTwo}}),Object.defineProperty(e,"loadFile",{enumerable:!0,get:function(){return R.loadFile}}),Object.defineProperty(e,"loadImage",{enumerable:!0,get:function(){return R.loadImage}}),Object.defineProperty(e,"loadImageBitmap",{enumerable:!0,get:function(){return R.loadImageBitmap}}),Object.defineProperty(e,"loadScript",{enumerable:!0,get:function(){return R.loadScript}}),Object.defineProperty(e,"log",{enumerable:!0,get:function(){return _.log}}),Object.defineProperty(e,"luma",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"random",{enumerable:!0,get:function(){return L.random}}),Object.defineProperty(e,"requestAnimationFrame",{enumerable:!0,get:function(){return D.requestAnimationFrame}}),Object.defineProperty(e,"setPathPrefix",{enumerable:!0,get:function(){return R.setPathPrefix}}),Object.defineProperty(e,"stubRemovedMethods",{enumerable:!0,get:function(){return T.stubRemovedMethods}}),Object.defineProperty(e,"uid",{enumerable:!0,get:function(){return E.uid}}),r(26);var n=M(r(29)),o=M(r(18)),i=M(r(30)),u=M(r(3)),a=M(r(19)),c=M(r(31)),l=M(r(32)),f=M(r(33)),s=M(r(34)),p=M(r(35)),d=M(r(36)),y=M(r(37)),h=M(r(38)),v=M(r(39)),b=M(r(40)),m=M(r(41)),g=M(r(43)),w=r(44),O=r(45),j=M(r(9)),P=r(13),S=r(46),_=r(4),E=r(12),x=r(47),T=r(48),k=r(49),R=r(50),A=r(51),L=r(52),C=r(53),D=r(54);function M(t){return t&&t.__esModule?t:{default:t}}e.glsl=function(t){return"".concat(t)}},function(t,e,r){"use strict";r.d(e,"c",(function(){return n})),r.d(e,"f",(function(){return o})),r.d(e,"g",(function(){return i})),r.d(e,"b",(function(){return u})),r.d(e,"e",(function(){return a})),r.d(e,"a",(function(){return c})),r.d(e,"d",(function(){return l}));const n=globalThis,o=globalThis.self||globalThis.window||globalThis.global,i=globalThis.window||globalThis.self||globalThis.global,u=globalThis.document||{},a=globalThis.process||{},c=globalThis.console,l=globalThis.navigator||{}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.DEFAULT_RESOURCE_PROPS=void 0;var n=r(12);function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function a(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function c(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var l={id:"undefined",handle:void 0,userData:{}};e.DEFAULT_RESOURCE_PROPS=l;var f=function(){function t(e,r,i){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,"id",void 0),a(this,"props",void 0),a(this,"userData",{}),a(this,"device",void 0),a(this,"_device",void 0),a(this,"destroyed",!1),a(this,"allocatedBytes",0),!e)throw new Error("no device");this._device=e,this.props=function(t,e){var r=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e);for(var n in t)void 0!==t[n]&&(r[n]=t[n]);return r}(r,i);var u="undefined"!==this.props.id?this.props.id:(0,n.uid)(this[Symbol.toStringTag]);this.props.id=u,this.id=u,this.userData=this.props.userData||{},this.addStats()}var e,r,i;return e=t,(r=[{key:"destroy",value:function(){this.removeStats()}},{key:"delete",value:function(){return this.destroy(),this}},{key:"toString",value:function(){return"".concat(this[Symbol.toStringTag]||this.constructor.name,"(").concat(this.id,")")}},{key:"getProps",value:function(){return this.props}},{key:"addStats",value:function(){var t=this._device.statsManager.getStats("Resource Counts"),e=this[Symbol.toStringTag];t.get("Resources Created").incrementCount(),t.get("".concat(e,"s Created")).incrementCount(),t.get("".concat(e,"s Active")).incrementCount()}},{key:"removeStats",value:function(){var t=this._device.statsManager.getStats("Resource Counts"),e=this[Symbol.toStringTag];t.get("".concat(e,"s Active")).decrementCount()}},{key:"trackAllocatedMemory",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[Symbol.toStringTag],r=this._device.statsManager.getStats("Resource Counts");r.get("GPU Memory").addCount(t),r.get("".concat(e," Memory")).addCount(t),this.allocatedBytes=t}},{key:"trackDeallocatedMemory",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this[Symbol.toStringTag],e=this._device.statsManager.getStats("Resource Counts");e.get("GPU Memory").subtractCount(this.allocatedBytes),e.get("".concat(t," Memory")).subtractCount(this.allocatedBytes),this.allocatedBytes=0}}])&&u(e.prototype,r),i&&u(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.log=void 0;var n=new(r(66).Log)({id:"luma.gl"});e.log=n},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return i}));var n=r(6);function o(){return!("object"==typeof t&&"[object process]"===String(t)&&!t.browser)||Object(n.a)()}function i(){return o()&&"undefined"!=typeof document}}).call(this,r(11))},function(t,e,r){"use strict";(function(t){function n(e){if("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type)return!0;if(void 0!==t&&"object"==typeof t.versions&&Boolean(t.versions.electron))return!0;const r="object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent,n=e||r;return!!(n&&n.indexOf("Electron")>=0)}r.d(e,"a",(function(){return n}))}).call(this,r(11))},function(t,e,r){"use strict";r.r(e),r.d(e,"VERSION",(function(){return n.a})),r.d(e,"self",(function(){return o.f})),r.d(e,"window",(function(){return o.g})),r.d(e,"global",(function(){return o.c})),r.d(e,"document",(function(){return o.b})),r.d(e,"process",(function(){return o.e})),r.d(e,"console",(function(){return o.a})),r.d(e,"isBrowser",(function(){return i.a})),r.d(e,"isBrowserMainThread",(function(){return i.b})),r.d(e,"getBrowser",(function(){return l})),r.d(e,"isMobile",(function(){return c})),r.d(e,"isElectron",(function(){return u.a})),r.d(e,"assert",(function(){return f}));var n=r(16),o=r(2),i=r(5),u=r(6);const a=globalThis;function c(){return void 0!==a.orientation}function l(t){if(!t&&!Object(i.a)())return"Node";if(Object(u.a)(t))return"Electron";const e=t||o.d.userAgent||"";if(e.indexOf("Edge")>-1)return"Edge";const r=-1!==e.indexOf("MSIE "),n=-1!==e.indexOf("Trident/");return r||n?"IE":a.chrome?"Chrome":a.safari?"Safari":a.mozInnerScreenX?"Firefox":"Unknown"}function f(t,e){if(!t)throw new Error(e||"Assertion failed")}},function(t,e,r){"use strict";(function(t){function n(){let e;if("undefined"!=typeof window&&window.performance)e=window.performance.now();else if(void 0!==t&&t.hrtime){const r=t.hrtime();e=1e3*r[0]+r[1]/1e6}else e=Date.now();return e}r.d(e,"a",(function(){return n}))}).call(this,r(11))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lumaStats=e.default=void 0;var n=r(67);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var a=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,r="stats",n=new Map,(r=u(r))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,o;return e=t,(r=[{key:"getStats",value:function(t){return this.get(t)}},{key:"get",value:function(t){return this.stats.has(t)||this.stats.set(t,new n.Stats({id:t})),this.stats.get(t)}}])&&i(e.prototype,r),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=a;var c=new a;e.lumaStats=c},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,r,n,c=a(f);function f(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),s(l(r=c.call(this,t,e)),"device",void 0),s(l(r),"handle",void 0),r.device=t;var n=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},r.props);return"comparison-sampler"!==n.type&&delete n.compare,r.handle=r.handle||r.device.handle.createSampler(n),r.handle.label=r.props.id,r}return e=f,(r=[{key:"destroy",value:function(){}}])&&i(e.prototype,r),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),f}(r(1).Sampler);e.default=d},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=u}}();var c,l=[],f=!1,s=-1;function p(){f&&c&&(f=!1,c.length?l=c.concat(l):s=-1,l.length&&d())}function d(){if(!f){var t=a(p);f=!0;for(var e=l.length;e;){for(c=l,l=[];++s<e;)c&&c[s].run();s=-1,e=l.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new y(t,e)),1!==l.length||f||a(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isObjectEmpty=function(t){var e=!0;for(var r in t){e=!1;break}return e},e.isPowerOfTwo=function(t){return t>0&&0==(t&t-1)},e.uid=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";n[t]=n[t]||1;var e=n[t]++;return"".concat(t,"-").concat(e)};var n={}},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}Object.defineProperty(e,"__esModule",{value:!0}),e.assert=n,e.default=void 0;var o=n;e.default=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=r(1),i=r(15),u=(n=r(10))&&n.__esModule?n:{default:n};function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}var v={"1d":"1d","2d":"2d","2d-array":"2d",cube:"2d","cube-array":"2d","3d":"3d"},b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(a,t);var e,r,n,o=f(a);function a(t,e){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),y(p(r=o.call(this,t,e)),"device",void 0),y(p(r),"handle",void 0),y(p(r),"view",void 0),y(p(r),"sampler",void 0),"number"==typeof r.props.format)throw new Error("number format");return r.device=t,r.handle=r.props.handle||r.createHandle(),r.props.data&&r.setData({data:r.props.data}),r.sampler=e.sampler instanceof u.default?e.sampler:new u.default(r.device,e.sampler),r.view=r.handle.createView({}),r}return e=a,(r=[{key:"createHandle",value:function(){var t,e;if("number"==typeof this.props.format)throw new Error("number format");var r=this.props.width||(null===(t=this.props.data)||void 0===t?void 0:t.width)||1,n=this.props.height||(null===(e=this.props.data)||void 0===e?void 0:e.height)||1;return this.device.handle.createTexture({size:{width:r,height:n,depthOrArrayLayers:this.props.depth},dimension:v[this.props.dimension],format:(0,i.getWebGPUTextureFormat)(this.props.format),usage:this.props.usage,mipLevelCount:this.props.mipLevels,sampleCount:this.props.samples})}},{key:"destroy",value:function(){this.handle.destroy()}},{key:"setSampler",value:function(t){return this.sampler=t instanceof u.default?t:new u.default(this.device,t),this}},{key:"setData",value:function(t){return this.setImage({source:t.data})}},{key:"setImage",value:function(t){var e=t.source,r=t.width,n=void 0===r?t.source.width:r,o=t.height,i=void 0===o?t.source.height:o,u=t.depth,a=void 0===u?1:u,c=t.sourceX,l=void 0===c?0:c,f=t.sourceY,s=void 0===f?0:f,p=t.mipLevel,d=void 0===p?0:p,y=t.x,h=void 0===y?0:y,v=t.y,b=void 0===v?0:v,m=t.z,g=void 0===m?0:m,w=t.aspect,O=void 0===w?"all":w,j=t.colorSpace,P=void 0===j?"srgb":j,S=t.premultipliedAlpha,_=void 0!==S&&S;return this.device.handle.queue.copyExternalImageToTexture({source:e,origin:[l,s]},{texture:this.handle,origin:[h,b,g],mipLevel:d,aspect:O,colorSpace:P,premultipliedAlpha:_},[n,i,a]),this}}])&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Texture);e.default=b},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWebGPUTextureFormat=function(t){if(t.includes("webgl"))throw new Error("webgl-only format");return t}},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(5);const o="9.0.0-alpha.15";Object(n.a)()},function(t,e,r){"use strict";function n(t){return e.default=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=n},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.DEFAULT_DEVICE_PROPS=void 0;var o,i,u=r(9),a=r(4),c=r(12),l=(o=r(19))&&o.__esModule?o:{default:o};function f(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function s(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?f(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function p(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}var h={id:null,type:"best-available",canvas:null,container:null,webgl2:!0,webgl1:!0,manageState:!0,width:800,height:600,debug:Boolean(a.log.get("debug")),break:[],gl:null};e.DEFAULT_DEVICE_PROPS=h,i=Symbol.toStringTag;var v=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),d(this,"id",void 0),d(this,"statsManager",u.lumaStats),d(this,"props",void 0),d(this,"userData",{}),d(this,"info",void 0),d(this,"lost",void 0),d(this,"canvasContext",void 0),this.props=s(s({},h),e),this.id=this.props.id||(0,c.uid)(this[Symbol.toStringTag].toLowerCase())}var e,r,n;return e=t,(r=[{key:i,get:function(){return"Device"}},{key:"createBuffer",value:function(t){return t instanceof ArrayBuffer||ArrayBuffer.isView(t)?this._createBuffer({data:t}):((t.usage||0)&l.default.INDEX&&!t.indexType&&(t.data instanceof Uint32Array?t.indexType="uint32":t.data instanceof Uint16Array&&(t.indexType="uint16")),this._createBuffer(t))}},{key:"createTexture",value:function(t){return(t instanceof Promise||"string"==typeof t)&&(t={data:t}),this._createTexture(t)}}])&&p(e.prototype,r),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=v},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function y(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var v=d(d({},o.DEFAULT_RESOURCE_PROPS),{},{usage:0,byteLength:0,byteOffset:0,data:null,indexType:"uint16",mappedAtCreation:!1});n=Symbol.toStringTag;var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,o,i=l(u);function u(t,e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u);var r=d({},e);return(e.usage||0)&u.INDEX&&!e.indexType&&(e.data instanceof Uint32Array?r.indexType="uint32":e.data instanceof Uint16Array&&(r.indexType="uint16")),i.call(this,t,r,v)}return e=u,(r=[{key:n,get:function(){return"Buffer"}},{key:"write",value:function(t,e){throw new Error("not implemented")}},{key:"readAsync",value:function(t,e){throw new Error("not implemented")}},{key:"getData",value:function(){throw new Error("not implemented")}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=b,y(b,"MAP_READ",1),y(b,"MAP_WRITE",2),y(b,"COPY_SRC",4),y(b,"COPY_DST",8),y(b,"INDEX",16),y(b,"VERTEX",32),y(b,"UNIFORM",64),y(b,"STORAGE",128),y(b,"INDIRECT",256),y(b,"QUERY_RESOLVE",512)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeVertexType=function(t){var e=function(t){return o[t]}(n[t]),r=!t.startsWith("float"),i=t.includes("norm"),u=t.startsWith("s");return{dataType:n[t],byteLength:e,integer:r,signed:u,normalized:i}};var n={uint8:"uint8",sint8:"sint8",unorm8:"uint8",snorm8:"sint8",uint16:"uint16",sint16:"sint16",unorm16:"uint16",snorm16:"sint16",float16:"float16",float32:"float32",uint32:"uint32",sint32:"sint32"},o={uint8:1,sint8:1,uint16:2,sint16:2,float16:2,float32:4,uint32:4,sint32:4}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1),o=y(r(22)),i=y(r(14)),u=y(r(56)),a=y(r(10)),c=y(r(23)),l=y(r(57)),f=y(r(61)),s=y(r(62)),p=y(r(63)),d=y(r(64));function y(t){return t&&t.__esModule?t:{default:t}}function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function v(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var i=e&&e.prototype instanceof p?e:p,u=Object.create(i.prototype),a=new x(o||[]);return n(u,"_invoke",{value:P(t,r,a)}),u}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var s={};function p(){}function d(){}function y(){}var b={};c(b,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,i)&&(b=g);var w=y.prototype=p.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;n(this,"_invoke",{value:function(n,i){function u(){return new e((function(o,u){!function n(o,i,u,a){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==h(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,u,a)}),(function(t){n("throw",t,u,a)})):e.resolve(s).then((function(t){l.value=t,u(l)}),(function(t){return n("throw",t,u,a)}))}a(c.arg)}(n,i,o,u)}))}return o=o?o.then(u,u):u()}})}function P(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=S(u,r);if(a){if(a===s)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=f(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===s)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),s;var o=f(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,s;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,s):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,s)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return d.prototype=y,n(w,"constructor",{value:y,configurable:!0}),n(y,"constructor",{value:d,configurable:!0}),d.displayName=c(y,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,a,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),c(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new j(l(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},O(w),c(w,a,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,s):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},t}function b(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function m(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(t){b(i,n,o,u,a,"next",t)}function a(t){b(i,n,o,u,a,"throw",t)}u(void 0)}))}}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function w(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){x(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function j(t,e){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=E(t);if(e){var o=E(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return S(this,r)}}function S(t,e){if(e&&("object"===h(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _(t)}function _(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function E(t){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function x(t,e,r){return(e=T(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){var e=function(t,e){if("object"!==h(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==h(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===h(e)?e:String(e)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(g,t);var e,r,y,h,b=P(g);function g(t,e,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),x(_(o=b.call(this,w(w({},r),{},{id:r.id||(0,n.uid)("webgpu-device")}))),"handle",void 0),x(_(o),"adapter",void 0),x(_(o),"lost",void 0),x(_(o),"canvasContext",null),x(_(o),"commandEncoder",null),x(_(o),"renderPass",null),x(_(o),"_info",void 0),x(_(o),"_isLost",!1),x(_(o),"features",void 0),o.handle=t,o.adapter=e,o._info={type:"webgpu",vendor:o.adapter.__brand,renderer:"",version:"",gpu:"unknown",shadingLanguages:["glsl","wgsl"],shadingLanguageVersions:{glsl:"450",wgsl:"100"},vendorMasked:"",rendererMasked:""},o.lost=new Promise(function(){var t=m(v().mark((function t(e){var r;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o.handle.lost;case 2:r=t.sent,o._isLost=!0,e({reason:"destroyed",message:r.message});case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),r.canvas&&(o.canvasContext=new d.default(_(o),o.adapter,{canvas:r.canvas})),o.features=o._getFeatures(),o}return e=g,r=[{key:"destroy",value:function(){this.handle.destroy()}},{key:"info",get:function(){return this._info}},{key:"limits",get:function(){return this.handle.limits}},{key:"isTextureFormatSupported",value:function(t){return!t.includes("webgl")}},{key:"isTextureFormatFilterable",value:function(t){return this.isTextureFormatSupported(t)}},{key:"isTextureFormatRenderable",value:function(t){return this.isTextureFormatSupported(t)}},{key:"isLost",get:function(){return this._isLost}},{key:"_createBuffer",value:function(t){return new o.default(this,t)}},{key:"_createTexture",value:function(t){return new i.default(this,t)}},{key:"createExternalTexture",value:function(t){return new u.default(this,t)}},{key:"createShader",value:function(t){return new c.default(this,t)}},{key:"createSampler",value:function(t){return new a.default(this,t)}},{key:"createRenderPipeline",value:function(t){return new l.default(this,t)}},{key:"createFramebuffer",value:function(t){throw new Error("Not implemented")}},{key:"createComputePipeline",value:function(t){return new f.default(this,t)}},{key:"beginRenderPass",value:function(t){return this.commandEncoder=this.commandEncoder||this.handle.createCommandEncoder(),new s.default(this,t)}},{key:"beginComputePass",value:function(t){return this.commandEncoder=this.commandEncoder||this.handle.createCommandEncoder(),new p.default(this,t)}},{key:"createCanvasContext",value:function(t){return new d.default(this,this.adapter,t)}},{key:"getDefaultRenderPass",value:function(){var t;return this.renderPass=this.renderPass||this.beginRenderPass({framebuffer:null===(t=this.canvasContext)||void 0===t?void 0:t.getCurrentFramebuffer()}),this.renderPass}},{key:"submit",value:function(){var t,e;null===(t=this.renderPass)||void 0===t||t.end();var r=null===(e=this.commandEncoder)||void 0===e?void 0:e.finish();r&&this.handle.queue.submit([r]),this.commandEncoder=null,this.renderPass=null}},{key:"_getFeatures",value:function(){var t=new Set(this.handle.features);return t.has("depth-clamping")&&(t.delete("depth-clamping"),t.add("depth-clip-control")),t.has("texture-compression-bc")&&t.add("texture-compression-bc5-webgl"),t.add("webgpu"),t.add("timer-query-webgl"),t.add("vertex-array-object-webgl1"),t.add("instanced-rendering-webgl1"),t.add("multiple-render-targets-webgl1"),t.add("index-uint32-webgl1"),t.add("blend-minmax-webgl1"),t.add("texture-blend-float-webgl1"),t.add("texture-formats-srgb-webgl1"),t.add("texture-formats-depth-webgl1"),t.add("texture-formats-float32-webgl1"),t.add("texture-formats-float16-webgl1"),t.add("texture-filter-linear-float32-webgl"),t.add("texture-filter-linear-float16-webgl"),t.add("texture-filter-anisotropic-webgl"),t.add("texture-renderable-rgba32float-webgl"),t.add("texture-renderable-float32-webgl"),t.add("texture-renderable-float16-webgl"),t.add("glsl-frag-data"),t.add("glsl-frag-depth"),t.add("glsl-derivatives"),t.add("glsl-texture-lod"),t}}],y=[{key:"isSupported",value:function(){return Boolean("undefined"!=typeof navigator&&navigator.gpu)}},{key:"create",value:(h=m(v().mark((function t(e){var r,o,i;return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(navigator.gpu){t.next=2;break}throw new Error("WebGPU not available. Open in Chrome Canary and turn on chrome://flags/#enable-unsafe-webgpu");case 2:return n.log.groupCollapsed(1,"WebGPUDevice created")(),t.next=5,navigator.gpu.requestAdapter({powerPreference:"high-performance"});case 5:if(r=t.sent){t.next=8;break}throw new Error("Failed to request WebGPU adapter");case 8:return n.log.probe(1,"Adapter available")(),t.next=11,r.requestDevice({requiredFeatures:r.features});case 11:if(o=t.sent,n.log.probe(1,"GPUDevice available")(),"string"!=typeof e.canvas){t.next=17;break}return t.next=16,n.CanvasContext.pageLoaded;case 16:n.log.probe(1,"DOM is loaded")();case 17:return i=new g(o,r,e),n.log.probe(1,"Device created",i.info)(),n.log.table(1,i.info)(),n.log.groupEnd(1)(),t.abrupt("return",i);case 22:case"end":return t.stop()}}),t)}))),function(t){return h.apply(this,arguments)})}],r&&O(e.prototype,r),y&&O(e,y),Object.defineProperty(e,"prototype",{writable:!1}),g}(n.Device);e.default=k,x(k,"type","webgpu")},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,u=Object.create(i.prototype),a=new x(o||[]);return n(u,"_invoke",{value:P(t,r,a)}),u}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function y(){}function h(){}function v(){}var b={};f(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,a)&&(b=g);var w=v.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var i;n(this,"_invoke",{value:function(n,u){function a(){return new e((function(i,a){!function n(i,u,a,c){var l=p(t[i],t,u);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==o(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}(n,u,i,a)}))}return i=i?i.then(a,a):a()}})}function P(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=S(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=f(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new j(s(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},O(w),f(w,l,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function u(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(h,t);var e,r,o,f,p,y=l(h);function h(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),d(s(r=y.call(this,t,e)),"device",void 0),d(s(r),"handle",void 0),d(s(r),"byteLength",void 0),r.device=t,r.byteLength=function(t){var e;return t.byteLength||(null===(e=t.data)||void 0===e?void 0:e.byteLength)||0}(e);var n=Boolean(e.data);return r.handle=r.props.handle||r.device.handle.createBuffer({size:r.byteLength,usage:r.props.usage||GPUBufferUsage.VERTEX|GPUBufferUsage.COPY_DST,mappedAtCreation:r.props.mappedAtCreation||n,label:r.props.id}),e.data&&r._writeMapped(e.data),n&&!e.mappedAtCreation&&r.handle.unmap(),r}return e=h,(r=[{key:"destroy",value:function(){this.handle.destroy()}},{key:"write",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.device.handle.queue.writeBuffer(this.handle,e,t.buffer,t.byteOffset,t.byteLength)}},{key:"readAsync",value:(f=i().mark((function t(){var e,r,o,u,a,c=arguments;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=c.length>0&&void 0!==c[0]?c[0]:0,r=c.length>1&&void 0!==c[1]?c[1]:this.byteLength,o=new h(this.device,{usage:n.Buffer.MAP_READ|n.Buffer.COPY_DST,byteLength:r}),(u=this.device.handle.createCommandEncoder()).copyBufferToBuffer(this.handle,e,o.handle,0,r),this.device.handle.queue.submit([u.finish()]),t.next=8,o.handle.mapAsync(GPUMapMode.READ,e,r);case 8:return a=o.handle.getMappedRange().slice(0),o.handle.unmap(),o.destroy(),t.abrupt("return",a);case 12:case"end":return t.stop()}}),t,this)})),p=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=f.apply(t,e);function i(t){u(o,r,n,i,a,"next",t)}function a(t){u(o,r,n,i,a,"throw",t)}i(void 0)}))},function(){return p.apply(this,arguments)})},{key:"_writeMapped",value:function(t){var e=this.handle.getMappedRange();new t.constructor(e).set(t)}},{key:"mapAsync",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return this.handle.mapAsync(t,e,r)}},{key:"getMappedRange",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0;return this.handle.getMappedRange(t,e)}},{key:"unmap",value:function(){this.handle.unmap()}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),h}(n.Buffer);e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,u=Object.create(i.prototype),a=new x(o||[]);return n(u,"_invoke",{value:P(t,r,a)}),u}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function y(){}function h(){}function v(){}var b={};f(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,a)&&(b=g);var w=v.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var i;n(this,"_invoke",{value:function(n,u){function a(){return new e((function(i,a){!function n(i,u,a,c){var l=p(t[i],t,u);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==o(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,a,c)}),(function(t){n("throw",t,a,c)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,c)}))}c(l.arg)}(n,u,i,a)}))}return i=i?i.then(a,a):a()}})}function P(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=S(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=f(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new j(s(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},O(w),f(w,l,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function u(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){u(i,n,o,a,c,"next",t)}function c(t){u(i,n,o,a,c,"throw",t)}a(void 0)}))}}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e,r){return(e=h(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(h,t);var e,r,o,u,s,d=f(h);function h(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),y(p(r=d.call(this,t,e)),"device",void 0),y(p(r),"handle",void 0),r.device=t,r.device.handle.pushErrorScope("validation"),r.handle=r.props.handle||r.createHandle(),r.handle.label=r.props.id,r._checkCompilationError(r.device.handle.popErrorScope()),r}return e=h,(r=[{key:"_checkCompilationError",value:(s=a(i().mark((function t(e){var r,o;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e;case 2:if(!(r=t.sent)){t.next=9;break}return t.next=6,this.compilationInfo();case 6:throw o=t.sent,n.log.error("Shader compilation error: ".concat(r.message),o)(),new Error("Shader compilation error: ".concat(r.message));case 9:case"end":return t.stop()}}),t,this)}))),function(t){return s.apply(this,arguments)})},{key:"destroy",value:function(){}},{key:"createHandle",value:function(){var t=this,e=this.props.source,r=this.props.language;switch(r||(r=e.includes("->")?"wgsl":"glsl"),r){case"wgsl":return this.device.handle.createShaderModule({code:e});case"glsl":return this.device.handle.createShaderModule({code:e,transform:function(e){return t.device.glslang.compileGLSL(e,type)}});default:throw new Error(r)}}},{key:"compilationInfo",value:(u=a(i().mark((function t(){var e;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.handle.getCompilationInfo();case 2:return e=t.sent,t.abrupt("return",e.messages);case 4:case"end":return t.stop()}}),t,this)}))),function(){return u.apply(this,arguments)})}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),h}(n.Shader);e.default=v},function(t,e,r){"use strict";var n=r(25);globalThis.luma=globalThis.luma||{},t.exports=Object.assign(globalThis.luma,n)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"WebGPUBuffer",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"WebGPUDevice",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"WebGPUSampler",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"WebGPUShader",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(e,"WebGPUTexture",{enumerable:!0,get:function(){return i.default}}),r(1),r(55);var n=c(r(21)),o=c(r(22)),i=c(r(14)),u=c(r(10)),a=c(r(23));function c(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,Object.defineProperty(e,"lumaStats",{enumerable:!0,get:function(){return i.lumaStats}});var n=r(7),o=r(4),i=r(9),u="9.0.0-alpha.15";if(globalThis.luma&&globalThis.luma.VERSION!==u)throw new Error("luma.gl - multiple VERSIONs detected: ".concat(globalThis.luma.VERSION," vs ").concat(u));globalThis.luma||((0,n.isBrowser)()&&o.log.log(1,"luma.gl ".concat(u," - ").concat("set luma.log.level=1 (or higher) to trace rendering"))(),globalThis.luma=globalThis.luma||{VERSION:u,version:u,log:o.log,stats:i.lumaStats});var a=globalThis.luma;e.default=a},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=(0,o.default)(t,"string");return"symbol"===(0,n.default)(e)?e:String(e)};var n=i(r(17)),o=i(r(28));function i(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e){if("object"!==(0,o.default)(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==(0,o.default)(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)};var n,o=(n=r(17))&&n.__esModule?n:{default:n}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(18),o=r(9),i=r(4),u=r(1);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */c=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,o){var i=e&&e.prototype instanceof y?e:y,u=Object.create(i.prototype),a=new x(o||[]);return n(u,"_invoke",{value:P(t,r,a)}),u}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function y(){}function h(){}function v(){}var b={};f(b,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,i)&&(b=g);var w=v.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;n(this,"_invoke",{value:function(n,i){function u(){return new e((function(o,u){!function n(o,i,u,c){var l=p(t[o],t,i);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==a(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){n("next",t,u,c)}),(function(t){n("throw",t,u,c)})):e.resolve(s).then((function(t){f.value=t,u(f)}),(function(t){return n("throw",t,u,c)}))}c(l.arg)}(n,i,o,u)}))}return o=o?o.then(u,u):u()}})}function P(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=S(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=v,n(w,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:h,configurable:!0}),h.displayName=f(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new j(s(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},O(w),f(w,l,"Generator"),f(w,i,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function p(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return d(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return d(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}var b=new Map,m=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,o,i,a;return e=t,r=null,o=[{key:"registerDevices",value:function(t){var e,r=p(t);try{for(r.s();!(e=r.n()).done;){var n=e.value;(0,u.assert)(n.type&&n.isSupported&&n.create),b.set(n.type,n)}}catch(t){r.e(t)}finally{r.f()}}},{key:"getAvailableDevices",value:function(){return Array.from(b).map((function(t){return t.type}))}},{key:"getSupportedDevices",value:function(){return Array.from(b).filter((function(t){return t.isSupported()})).map((function(t){return t.type}))}},{key:"setDefaultDeviceProps",value:function(t){Object.assign(n.DEFAULT_DEVICE_PROPS,t)}},{key:"createDevice",value:(i=c().mark((function t(){var e,r,o=arguments;return c().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=o.length>0&&void 0!==o[0]?o[0]:{},(e=f(f({},n.DEFAULT_DEVICE_PROPS),e)).gl&&(e.type="webgl"),t.t0=e.type,t.next="webgpu"===t.t0?6:"webgl"===t.t0||"webgl1"===t.t0||"webgl2"===t.t0?12:"best-available"===t.t0?18:29;break;case 6:if(!(r=b.get("webgpu"))){t.next=11;break}return t.next=10,r.create(e);case 10:return t.abrupt("return",t.sent);case 11:return t.abrupt("break",29);case 12:if(!(r=b.get("webgl"))){t.next=17;break}return t.next=16,r.create(e);case 16:return t.abrupt("return",t.sent);case 17:return t.abrupt("break",29);case 18:if(!(r=b.get("webgpu"))||!r.isSupported()){t.next=23;break}return t.next=22,r.create(e);case 22:return t.abrupt("return",t.sent);case 23:if(!(r=b.get("webgl"))||!r.isSupported()){t.next=28;break}return t.next=27,r.create(e);case 27:return t.abrupt("return",t.sent);case 28:return t.abrupt("break",29);case 29:throw new Error("No matching device found. Ensure `@luma.gl/webgl` and/or `@luma.gl/webgpu` modules are imported.");case 30:case"end":return t.stop()}}),t)})),a=function(){var t=this,e=arguments;return new Promise((function(r,n){var o=i.apply(t,e);function u(t){s(o,r,n,u,a,"next",t)}function a(t){s(o,r,n,u,a,"throw",t)}u(void 0)}))},function(){return a.apply(this,arguments)})}],r&&y(e.prototype,r),o&&y(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=m,h(m,"stats",o.lumaStats),h(m,"log",i.log)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(7),o=r(4);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){p(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function p(t,e,r){return(e=d(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var y=(0,n.isBrowser)()&&"undefined"!=typeof document,h=function(){return y&&"complete"===document.readyState},v={canvas:null,width:800,height:600,useDevicePixels:!0,autoResize:!0,container:null,visible:!0,colorSpace:"srgb",alphaMode:"opaque"},b=function(){function t(e){var r=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),p(this,"device",void 0),p(this,"id",void 0),p(this,"props",void 0),p(this,"canvas",void 0),p(this,"htmlCanvas",void 0),p(this,"offscreenCanvas",void 0),p(this,"type",void 0),p(this,"width",1),p(this,"height",1),p(this,"resizeObserver",void 0),p(this,"_canvasSizeInfo",{clientWidth:0,clientHeight:0,devicePixelRatio:1}),this.props=f(f({},v),e),e=this.props,!(0,n.isBrowser)())return this.id="node-canvas-context",this.type="node",this.width=this.props.width,this.height=this.props.height,void(this.canvas=null);if(e.canvas)"string"==typeof e.canvas?this.canvas=function(t){var e=document.getElementById(t);if(!e&&!h())throw new Error("Accessing '".concat(t,"' before page was loaded"));if(!(e instanceof HTMLCanvasElement))throw new Error("'".concat(e,"' is not a canvas element"));return e}(e.canvas):this.canvas=e.canvas;else{var o,i,u=function(t){var e=t.width,r=t.height,n=document.createElement("canvas");return n.id="lumagl-auto-created-canvas",n.width=e||1,n.height=r||1,n.style.width=Number.isFinite(e)?"".concat(e,"px"):"100%",n.style.height=Number.isFinite(r)?"".concat(r,"px"):"100%",n}(e),c=function(t){if("string"==typeof t){var e=document.getElementById(t);if(!e&&!h())throw new Error("Accessing '".concat(t,"' before page was loaded"));if(!e)throw new Error("".concat(t," is not an HTML element"));return e}if(t)return t;return document.body}((null===(o=e)||void 0===o?void 0:o.container)||null);c.insertBefore(u,c.firstChild),this.canvas=u,null!==(i=e)&&void 0!==i&&i.visible||(this.canvas.style.visibility="hidden")}this.canvas instanceof HTMLCanvasElement?(this.id=this.canvas.id,this.type="html-canvas",this.htmlCanvas=this.canvas):(this.id="offscreen-canvas",this.type="offscreen-canvas",this.offscreenCanvas=this.canvas),this.canvas instanceof HTMLCanvasElement&&e.autoResize&&(this.resizeObserver=new ResizeObserver((function(t){var e,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}(t);try{for(n.s();!(e=n.n()).done;){e.value.target===r.canvas&&r.update()}}catch(t){n.e(t)}finally{n.f()}})),this.resizeObserver.observe(this.canvas))}var e,r,i;return e=t,i=[{key:"isPageLoaded",get:function(){return h()}}],(r=[{key:"getDevicePixelRatio",value:function(t){return"undefined"!=typeof OffscreenCanvas&&this.canvas instanceof OffscreenCanvas?1:"number"==typeof t?t>0?t:1:"number"==typeof this.props.useDevicePixels?this.props.useDevicePixels>0?this.props.useDevicePixels:1:(t||this.props.useDevicePixels)&&"undefined"!=typeof window&&window.devicePixelRatio||1}},{key:"getPixelSize",value:function(){switch(this.type){case"node":return[this.width,this.height];case"offscreen-canvas":return[this.canvas.width,this.canvas.height];case"html-canvas":var t=this.getDevicePixelRatio(),e=this.canvas;return e.parentElement?[e.clientWidth*t,e.clientHeight*t]:[this.canvas.width,this.canvas.height]}}},{key:"getAspect",value:function(){var t=u(this.getPixelSize(),2);return t[0]/t[1]}},{key:"cssToDeviceRatio",value:function(){try{var t=u(this.getDrawingBufferSize(),1)[0],e=this._canvasSizeInfo.clientWidth;return e?t/e:1}catch(t){return 1}}},{key:"cssToDevicePixels",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this.cssToDeviceRatio(),n=this.getDrawingBufferSize(),o=u(n,2),i=o[0],a=o[1];return m(t,r,i,a,e)}},{key:"setDevicePixelRatio",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.htmlCanvas){var r="width"in e?e.width:this.htmlCanvas.clientWidth,n="height"in e?e.height:this.htmlCanvas.clientHeight;r&&n||(o.log.log(1,"Canvas clientWidth/clientHeight is 0")(),t=1,r=this.htmlCanvas.width||1,n=this.htmlCanvas.height||1);var i=this._canvasSizeInfo;if(i.clientWidth!==r||i.clientHeight!==n||i.devicePixelRatio!==t){var a=t,c=Math.floor(r*a),l=Math.floor(n*a);this.htmlCanvas.width=c,this.htmlCanvas.height=l;var f=this.getDrawingBufferSize(),s=u(f,2),p=s[0],d=s[1];p===c&&d===l||(a=Math.min(p/r,d/n),this.htmlCanvas.width=Math.floor(r*a),this.htmlCanvas.height=Math.floor(n*a),o.log.warn("Device pixel ratio clamped")()),this._canvasSizeInfo.clientWidth=r,this._canvasSizeInfo.clientHeight=n,this._canvasSizeInfo.devicePixelRatio=t}}}},{key:"getDrawingBufferSize",value:function(){var t=this.device.gl;if(!t)throw new Error("canvas size");return[t.drawingBufferWidth,t.drawingBufferHeight]}},{key:"_setAutoCreatedCanvasId",value:function(t){var e;"lumagl-auto-created-canvas"===(null===(e=this.htmlCanvas)||void 0===e?void 0:e.id)&&(this.htmlCanvas.id=t)}}])&&s(e.prototype,r),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function m(t,e,r,n,o){var i,u=t,a=g(u[0],e,r),c=w(u[1],e,n,o),l=g(u[0]+1,e,r),f=l===r-1?l:l-1;return l=w(u[1]+1,e,n,o),o?(i=c,c=l=0===l?l:l+1):i=l===n-1?l:l-1,{x:a,y:c,width:Math.max(f-a+1,1),height:Math.max(i-c+1,1)}}function g(t,e,r){return Math.min(Math.round(t*e),r-1)}function w(t,e,r,n){return n?Math.max(0,r-1-Math.round(t*e)):Math.min(Math.round(t*e),r-1)}e.default=b,p(b,"pageLoaded",function(){if(h()||"undefined"==typeof window)return Promise.resolve();return new Promise((function(t){window.addEventListener("load",(function(){return t()}))}))}())},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var b=y(y({},o.DEFAULT_RESOURCE_PROPS),{},{data:null,dimension:"2d",format:"rgba8unorm",depth:1,mipmaps:!0,sampler:{},compressed:!1,usage:0,parameters:{},pixelStore:{},pixels:null,border:0,recreate:!1});n=Symbol.toStringTag;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,o,i=l(u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),h(s(r=i.call(this,t,e,b)),"sampler",void 0),r}return e=u,(r=[{key:n,get:function(){return"Texture"}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=m,h(m,"COPY_SRC",1),h(m,"COPY_DST",2),h(m,"TEXTURE_BINDING",4),h(m,"STORAGE_BINDING",8),h(m,"RENDER_ATTACHMENT",16)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var r=o(e);if(r&&r.has(t))return r.get(t);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=u?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(o=function(t){return t?r:e})(t)}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var h=p(p({},n.DEFAULT_RESOURCE_PROPS),{},{source:null,colorSpace:"srgb"}),v=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,t);var r,n,o,i=c(l);function l(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,t,e,h)}return r=l,(n=[{key:e,get:function(){return"ExternalTexture"}}])&&u(r.prototype,n),o&&u(r,o),Object.defineProperty(r,"prototype",{writable:!1}),l}(n.default,Symbol.toStringTag);e.default=v},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var b=y(y({},o.DEFAULT_RESOURCE_PROPS),{},{stage:"vertex",source:"",sourceMap:null,language:"glsl",shaderType:0});n=Symbol.toStringTag;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,o,i=l(u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),h(s(r=i.call(this,t,e,b)),"stage",void 0),h(s(r),"source",void 0),r.stage=r.props.stage,r.source=r.props.source,r}return e=u,(r=[{key:n,get:function(){return"Shader"}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=m},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var r=o(e);if(r&&r.has(t))return r.get(t);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=u?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(o=function(t){return t?r:e})(t)}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var h=p(p({},n.DEFAULT_RESOURCE_PROPS),{},{type:"color-sampler",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge",addressModeW:"clamp-to-edge",magFilter:"nearest",minFilter:"nearest",mipmapFilter:"nearest",lodMinClamp:0,lodMaxClamp:32,compare:"less-equal",maxAnisotropy:1}),v=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,t);var r,n,o,i=c(l);function l(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,t,e,h)}return r=l,(n=[{key:e,get:function(){return"Sampler"}}])&&u(r.prototype,n),o&&u(r,o),Object.defineProperty(r,"prototype",{writable:!1}),l}(n.default,Symbol.toStringTag);e.default=v},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function l(t,e){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=d(t);if(e){var o=d(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return p(t)}function p(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function y(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?y(Object(r),!0).forEach((function(e){v(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function v(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var m=h(h({},o.DEFAULT_RESOURCE_PROPS),{},{width:1,height:1,colorAttachments:[],depthStencilAttachment:null});n=Symbol.toStringTag;var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&l(t,e)}(u,t);var e,r,o,i=f(u);function u(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,u),v(p(e=i.call(this,t,r,m)),"width",void 0),v(p(e),"height",void 0),v(p(e),"colorAttachments",void 0),v(p(e),"depthStencilAttachment",void 0),e.width=e.props.width,e.height=e.props.height,e}return e=u,(r=[{key:n,get:function(){return"Framebuffer"}},{key:"resize",value:function(t){var e=!t||t.height!==this.height||t.width!==this.width;t&&(this.width=null==t?void 0:t.width,this.height=null==t?void 0:t.height),e&&this._resizeAttachments(this.width,this.height)}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=g},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.DEFAULT_RENDER_PIPELINE_PROPS=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var b=y(y({},o.DEFAULT_RESOURCE_PROPS),{},{vs:null,vsEntryPoint:"",vsConstants:{},fs:null,fsEntryPoint:"",fsConstants:{},layout:null,topology:"triangle-list",parameters:{},bufferMap:[],vertexCount:0,instanceCount:0,indices:null,attributes:{},bindings:{},uniforms:{}});e.DEFAULT_RENDER_PIPELINE_PROPS=b,n=Symbol.toStringTag;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,o,i=l(u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),h(s(r=i.call(this,t,e,b)),"hash",""),h(s(r),"vs",void 0),h(s(r),"fs",void 0),r}return e=u,(r=[{key:n,get:function(){return"RenderPipeline"}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=m,h(m,"_DEFAULT_PROPS",b)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==u(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=o?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?d(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var b=y(y({},o.DEFAULT_RESOURCE_PROPS),{},{csConstants:{},layout:[]});n=Symbol.toStringTag;var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,o,i=l(u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),h(s(r=i.call(this,t,e,b)),"hash",""),r}return e=u,(r=[{key:n,get:function(){return"ComputePipeline"}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.default);e.default=m},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o;function i(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(i=o.key,u=void 0,u=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===n(u)?u:String(u)),o)}var i,u}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=l(t);if(e){var o=l(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var f=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(l,t);var r,n,o,c=a(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),c.call(this,t,DEFAULT_COMMAND_ENCODER_PROPS)}return r=l,(n=[{key:e,get:function(){return"CommandEncoder"}},{key:"pushDebugGroup",value:function(t){}},{key:"popDebugGroup",value:function(){}},{key:"insertDebugMarker",value:function(t){}}])&&i(r.prototype,n),o&&i(r,o),Object.defineProperty(r,"prototype",{writable:!1}),l}(((o=r(3))&&o.__esModule?o:{default:o}).default,Symbol.toStringTag);e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!=typeof t)return{default:t};var r=o(e);if(r&&r.has(t))return r.get(t);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=u?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=t[a]}n.default=t,r&&r.set(t,n);return n}(r(3));function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(o=function(t){return t?r:e})(t)}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var h=p(p({},n.DEFAULT_RESOURCE_PROPS),{},{framebuffer:null,parameters:null}),v=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(l,t);var r,n,o,i=c(l);function l(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,t,e,h)}return r=l,(n=[{key:e,get:function(){return"RenderPass"}}])&&u(r.prototype,n),o&&u(r,o),Object.defineProperty(r,"prototype",{writable:!1}),l}(n.default,Symbol.toStringTag);e.default=v},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var r=i(e);if(r&&r.has(t))return r.get(t);var o={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if("default"!==a&&Object.prototype.hasOwnProperty.call(t,a)){var c=u?Object.getOwnPropertyDescriptor(t,a):null;c&&(c.get||c.set)?Object.defineProperty(o,a,c):o[a]=t[a]}o.default=t,r&&r.set(t,o);return o}(r(3));function i(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,r=new WeakMap;return(i=function(t){return t?r:e})(t)}function u(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,(i=o.key,u=void 0,u=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(i,"string"),"symbol"===n(u)?u:String(u)),o)}var i,u}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var s=function(t,e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(f,t);var r,n,i,l=c(f);function f(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),l.call(this,t,e,o.DEFAULT_RESOURCE_PROPS)}return r=f,(n=[{key:e,get:function(){return"ComputePass"}}])&&u(r.prototype,n),i&&u(r,i),Object.defineProperty(r,"prototype",{writable:!1}),f}(o.default,Symbol.toStringTag);e.default=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(42);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function c(t,e,r){return(e=l(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var f=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),c(this,"layout",{}),c(this,"size",0);for(var r=0,o=Object.entries(e);r<o.length;r++){var u=i(o[r],2),a=u[0],l=u[1],f=(0,n.decodeUniformFormat)(l),s=f.type,p=f.components;this.size=(0,n.alignTo)(this.size,p);var d=this.size;this.size+=p,this.layout[a]={type:s,size:p,offset:d}}this.size+=(4-this.size%4)%4}var e,r,o;return e=t,(r=[{key:"byteLength",get:function(){return 4*this.size}},{key:"has",value:function(t){return Boolean(this.layout[t])}},{key:"get",value:function(t){return this.layout[t]}}])&&a(e.prototype,r),o&&a(e,o),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=f},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.alignTo=function(t,e){switch(e){case 1:return t;case 2:return t+t%2;default:return t+(4-t%4)%4}},e.decodeUniformFormat=function(t){var e=o[t];return(0,n.assert)(t),e};var n=r(13),o={f32:{type:"float32",components:1},i32:{type:"sint32",components:1},u32:{type:"uint32",components:1},"vec2<f32>":{type:"float32",components:2},"vec3<f32>":{type:"float32",components:3},"vec4<f32>":{type:"float32",components:4},"vec2<i32>":{type:"sint32",components:2},"vec3<i32>":{type:"sint32",components:3},"vec4<i32>":{type:"sint32",components:4},"vec2<u32>":{type:"uint32",components:2},"vec3<u32>":{type:"uint32",components:3},"vec4<u32>":{type:"uint32",components:4},"mat2x2<f32>":{type:"float32",components:4},"mat2x3<f32>":{type:"float32",components:6},"mat2x4<f32>":{type:"float32",components:8},"mat3x2<f32>":{type:"float32",components:6},"mat3x3<f32>":{type:"float32",components:9},"mat3x4<f32>":{type:"float32",components:12},"mat4x2<f32>":{type:"float32",components:8},"mat4x3<f32>":{type:"float32",components:12},"mat4x4<f32>":{type:"float32",components:16}}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(13),o=r(4);function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||a(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){if(t){if("string"==typeof t)return c(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,s(n.key),n)}}function f(t,e,r){return(e=s(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}var p=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),f(this,"layout",{}),f(this,"uniforms",{}),f(this,"size",void 0),f(this,"data",void 0),f(this,"typedArray",void 0);var n=e.bindings.find((function(t){return"uniform"===t.type&&t.name===r}));if(!n)throw new Error(r);var o,i=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=a(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}(n.uniforms||[]);try{for(i.s();!(o=i.n()).done;){var u=o.value;this.layout[u.name]=u}}catch(t){i.e(t)}finally{i.f()}this.size=256,this.data=new ArrayBuffer(4*this.size),this.typedArray={float32:new Float32Array(this.data),sint32:new Int32Array(this.data),uint32:new Uint32Array(this.data)}}var e,r,i;return e=t,(r=[{key:"setUniforms",value:function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=u(r[e],2),i=n[0],a=n[1];void 0!==this.layout[i]?this._setValue(i,a):o.log.warn("Unknown uniform ".concat(i))}}},{key:"getData",value:function(){return this.data}},{key:"_setValue",value:function(t,e){var r=this.layout.layout[t];(0,n.assert)(r,"UniformLayoutStd140 illegal argument");var o=this.typedArray[r.type];1===r.size?o[r.offset]=e:o.set(e,r.offset)}}])&&l(e.prototype,r),i&&l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=p},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decodeVertexFormat=function(t){var e=(l=t.split("x"),f=2,function(t){if(Array.isArray(t))return t}(l)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(l,f)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}(l,f)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),r=e[0],i=e[1],u=r,a=i?parseInt(i):1,c=(0,n.decodeVertexType)(u);var l,f;return{type:u,components:a,byteLength:c.byteLength*a,integer:c.integer,signed:c.signed,normalized:c.normalized}};var n=r(20);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0}),e.decodeTextureFormat=function(t){var e=t.match(c);if(e){var r=(v=6,function(t){if(Array.isArray(t))return t}(h=e)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(h,v)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(h,v)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),n=r[1],l=r[2],f=r[3],s=r[4],p=r[5];if(n){var d="".concat(f).concat(l),y=(0,o.decodeVertexType)(d);return function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?i(Object(r),!0).forEach((function(e){u(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({format:n,components:0,srgb:"-srgb"===s,unsized:"-unsized"===p,webgl:"-webgl"===p},y)}}var h,v;throw new Error("Unknown format ".concat(t))};var o=r(20);function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function u(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var c=/^(rg?b?a?)([0-9]*)([a-z]*)(-srgb)?(-webgl|-unsized)?$/},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cast=function(t){return t}},function(t,e,r){"use strict";function n(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.maxElts,n=void 0===r?16:r,i=e.size,u=void 0===i?1:i,a="[",c=0;c<t.length&&c<n;++c)c>0&&(a+=",".concat(c%u==0?" ":"")),a+=o(t[c],e);var l=t.length>n?"...":"]";return"".concat(a).concat(l)}function o(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=1e-16,o=e.isInteger,i=void 0!==o&&o;if(Array.isArray(t)||ArrayBuffer.isView(t))return n(t,e);if("number"!=typeof t)return String(t);if(Math.abs(t)<r)return i?"0":"0.";if(i)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);var u=t.toPrecision(2),a=u.indexOf(".0");return a===u.length-2?u.slice(0,-1):u}Object.defineProperty(e,"__esModule",{value:!0}),e.formatValue=o},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stubRemovedMethods=function(t,e,r,o){var i="See luma.gl ".concat(r," Upgrade Guide at https://luma.gl/docs/upgrade-guide"),u=Object.getPrototypeOf(t);o.forEach((function(t){u.methodName||(u[t]=function(){throw n.log.removed("Calling removed method ".concat(e,".").concat(t,": "),i)(),new Error(t)})}))};var n=r(4)},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkProps=function(t,e,r){var i=r.removedProps,u=void 0===i?{}:i,a=r.deprecatedProps,c=void 0===a?{}:a,l=r.replacedProps,f=void 0===l?{}:l;for(var s in u)if(s in e){var p=u[s]?"".concat(t,".").concat(u[s]):"N/A";n.log.removed("".concat(t,".").concat(s),p)()}for(var d in c)if(d in e){var y=c[d];n.log.deprecated("".concat(t,".").concat(d),"".concat(t,".").concat(y))()}for(var h=null,v=0,b=Object.entries(f);v<b.length;v++){var m=(O=b[v],j=2,function(t){if(Array.isArray(t))return t}(O)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(O,j)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(O,j)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=m[0],w=m[1];g in e&&(n.log.deprecated("".concat(t,".").concat(g),"".concat(t,".").concat(w))(),(h=h||Object.assign({},e))[w]=e[g],delete h[g])}var O,j;return h||e};var n=r(4);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},a=u.iterator||"@@iterator",c=u.asyncIterator||"@@asyncIterator",l=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,u=Object.create(o.prototype),a=new x(n||[]);return i(u,"_invoke",{value:P(t,r,a)}),u}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var d={};function y(){}function h(){}function v(){}var b={};f(b,a,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(T([])));g&&g!==e&&r.call(g,a)&&(b=g);var w=v.prototype=y.prototype=Object.create(b);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){var o;i(this,"_invoke",{value:function(i,u){function a(){return new e((function(o,a){!function o(i,u,a,c){var l=p(t[i],t,u);if("throw"!==l.type){var f=l.arg,s=f.value;return s&&"object"==n(s)&&r.call(s,"__await")?e.resolve(s.__await).then((function(t){o("next",t,a,c)}),(function(t){o("throw",t,a,c)})):e.resolve(s).then((function(t){f.value=t,a(f)}),(function(t){return o("throw",t,a,c)}))}c(l.arg)}(i,u,o,a)}))}return o=o?o.then(a,a):a()}})}function P(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return k()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var a=S(u,r);if(a){if(a===d)continue;return a}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=p(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function S(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=p(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=v,i(w,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:h,configurable:!0}),h.displayName=f(v,l,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,f(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},t.awrap=function(t){return{__await:t}},O(j.prototype),f(j.prototype,c,(function(){return this})),t.AsyncIterator=j,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var u=new j(s(e,r,n,o),i);return t.isGeneratorFunction(r)?u:u.next().then((function(t){return t.done?t.value:u.next()}))},O(w),f(w,l,"Generator"),f(w,a,(function(){return this})),f(w,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},t.values=T,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return u.type="throw",u.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(a&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var u=i?i.completion:{};return u.type=t,u.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}function i(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var u=t.apply(e,r);function a(t){i(u,n,o,a,c,"next",t)}function c(t){i(u,n,o,a,c,"throw",t)}a(void 0)}))}}Object.defineProperty(e,"__esModule",{value:!0}),e.loadFile=function(t,e){return c.apply(this,arguments)},e.loadImage=function(t,e){return f.apply(this,arguments)},e.loadImageBitmap=function(t,e){return l.apply(this,arguments)},e.loadScript=function(t,e){return s.apply(this,arguments)},e.setPathPrefix=function(t){a=t};var a="";function c(){return(c=u(o().mark((function t(e,r){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e.startsWith("http")?e:a+e,n=(null==r?void 0:r.dataType)||"text",t.next=4,fetch(e,r);case 4:return i=t.sent,t.next=7,i[n]();case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(){return(l=u(o().mark((function t(e,r){var n;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(n=new Image).crossOrigin=(null==r?void 0:r.crossOrigin)||"anonymous",n.src=e.startsWith("http")?e:a+e,t.next=5,n.decode();case 5:return t.next=7,createImageBitmap(n);case 7:return t.abrupt("return",t.sent);case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(){return(f=u(o().mark((function t(e,r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t,n){try{var o=new Image;o.onload=function(){return t(o)},o.onerror=function(){return n(new Error("Could not load image ".concat(e,".")))},o.crossOrigin=(null==r?void 0:r.crossOrigin)||"anonymous",o.src=e.startsWith("http")?e:a+e}catch(t){n(t)}})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=u(o().mark((function t(e,r){var n,i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=document.getElementsByTagName("head")[0]){t.next=3;break}throw new Error("loadScript");case 3:return(i=document.createElement("script")).setAttribute("type","text/javascript"),i.setAttribute("src",e),r&&(i.id=r),t.abrupt("return",new Promise((function(t,r){i.onload=t,i.onerror=function(t){return r(new Error("Unable to load script '".concat(e,"': ").concat(t)))},n.appendChild(i)})));case 8:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},function(t,e,r){"use strict";var n;function o(t){return(!n||n.byteLength<t)&&(n=new ArrayBuffer(t)),n}Object.defineProperty(e,"__esModule",{value:!0}),e.fillArray=function(t){for(var e=t.target,r=t.source,n=t.start,o=void 0===n?0:n,i=t.count,u=void 0===i?1:i,a=r.length,c=u*a,l=0,f=o;l<a;l++)e[f++]=r[l];for(;l<c;)l<c-l?(e.copyWithin(o+l,o,o+l),l*=2):(e.copyWithin(o+l,o,o+c-l),l=c);return t.target},e.getScratchArray=function(t,e){var r=o(t.BYTES_PER_ELEMENT*e);return new t(r,0,e)},e.getScratchArrayBuffer=o},function(t,e,r){"use strict";function n(){var t=1,e=1;return function(){return t=Math.sin(17.23*e),e=Math.cos(27.92*t),(r=1432.71*Math.abs(t*e))-Math.floor(r);var r}}Object.defineProperty(e,"__esModule",{value:!0}),e.getRandom=n,e.random=void 0;var o=n();e.random=o},function(t,e,r){"use strict";function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function o(t,e,r,n){if(null!=n&&n.showSourceCode){var o=t.linePos>0?"".concat(" ".repeat(t.linePos+5),"^^^\n"):"",u=function(t,e){for(var r="",n=e-2;n<=e;n++){var o=t[n];void 0!==o&&(r+="".concat(i(String(n),4),": ").concat(o,"\n"))}return r}(e,r);return"".concat(u).concat(o).concat(t.type.toUpperCase(),": ").concat(t.message,"\n\n")}return"".concat(t.type.toUpperCase(),": ").concat(t.message,"\n")}function i(t,e){for(var r="",n=t.length;n<e;++n)r+=" ";return r+t}Object.defineProperty(e,"__esModule",{value:!0}),e.formatCompilerLog=function(t,e,r){var i,u=e.split(/\r?\n/),a="",c=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,i=function(){};return{s:i,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}(t);try{for(c.s();!(i=c.n()).done;){var l=i.value;a+=o(l,u,l.lineNum,r)}}catch(t){c.e(t)}finally{c.f()}return a}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.cancelAnimationFrame=function(t){return"undefined"!=typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(t):clearTimeout(t)},e.requestAnimationFrame=function(t){return"undefined"!=typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(t):setTimeout(t,1e3/60)}},function(t,e,r){"use strict";var n,o=r(1),i=(n=r(21))&&n.__esModule?n:{default:n};o.luma.registerDevices([i.default])},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=r(1),i=(n=r(10))&&n.__esModule?n:{default:n};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,y(n.key),n)}}function c(t,e){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=p(t);if(e){var o=p(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return f(this,r)}}function f(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return s(t)}function s(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function d(t,e,r){return(e=y(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function y(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(u,t);var e,r,n,o=l(u);function u(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),d(s(r=o.call(this,t,e)),"device",void 0),d(s(r),"handle",void 0),d(s(r),"sampler",void 0),r.device=t,r.handle=r.props.handle||r.device.handle.importExternalTexture({source:e.source,colorSpace:e.colorSpace}),r.sampler=null,r}return e=u,(r=[{key:"destroy",value:function(){}},{key:"setSampler",value:function(t){return this.sampler=t instanceof i.default?t:new i.default(this.device,t),this}}])&&a(e.prototype,r),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(o.ExternalTexture);e.default=h},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1),o=r(58),i=r(15),u=r(59),a=r(60);function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return f(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,m(n.key),n)}}function p(t,e){return(p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return y(this,r)}}function y(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return h(t)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function b(t,e,r){return(e=m(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function m(t){var e=function(t,e){if("object"!==c(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===c(e)?e:String(e)}var g=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(y,t);var e,r,c,f=d(y);function y(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,y),b(h(r=f.call(this,t,e)),"device",void 0),b(h(r),"handle",void 0),b(h(r),"vs",void 0),b(h(r),"fs",null),b(h(r),"_bufferSlots",void 0),b(h(r),"_buffers",void 0),b(h(r),"_indexBuffer",null),b(h(r),"_bindGroupLayout",void 0),b(h(r),"_bindGroup",null),r.device=t,r.handle=r.props.handle||r.createHandle(),r.handle.label=r.props.id,r.vs=(0,n.cast)(e.vs),r.fs=(0,n.cast)(e.fs),r._bufferSlots=(0,a.getBufferSlots)(r.props.layout,r.props.bufferMap),r._buffers=new Array(Object.keys(r._bufferSlots).length).fill(null),r._bindGroupLayout=r.handle.getBindGroupLayout(0),r}return e=y,(r=[{key:"createHandle",value:function(){var t=this._getRenderPipelineDescriptor(),e=this.device.handle.createRenderPipeline(t);return n.log.groupCollapsed(1,"new WebGPRenderPipeline(".concat(this.id,")"))(),n.log.log(1,JSON.stringify(t,null,2))(),n.log.groupEnd(1)(),e}},{key:"destroy",value:function(){}},{key:"setIndexBuffer",value:function(t){this._indexBuffer=(0,n.cast)(t)}},{key:"setAttributes",value:function(t){for(var e=0,r=Object.entries(t);e<r.length;e++){var n=l(r[e],2),o=n[0],i=n[1],u=this._bufferSlots[o];if(!(u>=0))throw new Error("Setting attribute '".concat(o,"' not listed in shader layout for program ").concat(this.id));this._buffers[u]=i}}},{key:"setBindings",value:function(t){(0,n.isObjectEmpty)(this.props.bindings)||(Object.assign(this.props.bindings,t),this._bindGroup=(0,u.getBindGroup)(this.device.handle,this._bindGroupLayout,this.props.layout,this.props.bindings))}},{key:"setUniforms",value:function(t){if(!(0,n.isObjectEmpty)(t))throw new Error("WebGPU does not support uniforms")}},{key:"_getBuffers",value:function(){return this._buffers}},{key:"_getBindGroup",value:function(){return this._bindGroup}},{key:"_getRenderPipelineDescriptor",value:function(){var t,e,r,u={module:(0,n.cast)(this.props.vs).handle,entryPoint:this.props.vsEntryPoint||"main",buffers:(0,a.getVertexBufferLayout)(this.props.layout,this.props.bufferMap)};switch(this.props.fs&&(t={module:(0,n.cast)(this.props.fs).handle,entryPoint:this.props.fsEntryPoint||"main",targets:[{format:(0,i.getWebGPUTextureFormat)(null===(e=this.device)||void 0===e||null===(r=e.canvasContext)||void 0===r?void 0:r.format)}]}),this.props.topology){case"triangle-fan":case"line-loop":throw new Error("WebGPU does not support primitive topology ".concat(this.props.topology))}var c={vertex:u,fragment:t,primitive:{topology:this.props.topology},layout:"auto"};return(0,o.applyParametersToRenderPipelineDescriptor)(c,this.props.parameters),c}},{key:"draw",value:function(t){var e=(0,n.cast)(t.renderPass)||this.device.getDefaultRenderPass();e.handle.setPipeline(this.handle);var r=this._getBindGroup();r&&e.handle.setBindGroup(0,r),this._setAttributeBuffers(e),t.indexCount?e.handle.drawIndexed(t.indexCount,t.instanceCount,t.firstIndex,t.baseVertex,t.firstInstance):e.handle.draw(t.vertexCount||0,t.instanceCount,t.firstIndex,t.firstInstance)}},{key:"_setAttributeBuffers",value:function(t){var e=this;this._indexBuffer&&t.handle.setIndexBuffer(this._indexBuffer.handle,this._indexBuffer.props.indexType);for(var r=this._getBuffers(),o=function(o){var i=(0,n.cast)(r[o]);if(!i){var u=e.props.layout.attributes.find((function(t){return t.location===o}));throw new Error("No buffer provided for attribute '".concat((null==u?void 0:u.name)||"","' in Model '").concat(e.props.id,"'"))}t.handle.setVertexBuffer(o,i.handle)},i=0;i<r.length;++i)o(i)}}])&&s(e.prototype,r),c&&s(e,c),Object.defineProperty(e,"prototype",{writable:!1}),y}(n.RenderPipeline);e.default=g},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function a(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){c(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function c(t,e,r){return(e=function(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===n(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function l(t){return t.depthStencil=t.depthStencil||{format:"depth24plus",stencilFront:{},stencilBack:{},depthWriteEnabled:void 0,depthCompare:void 0},t.depthStencil}Object.defineProperty(e,"__esModule",{value:!0}),e.PARAMETER_TABLE=void 0,e.applyParametersToRenderPipelineDescriptor=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.assign(t,a(a({},s),t)),p(t,e)};var f={cullMode:function(t,e,r){r.primitive=r.primitive||{},r.primitive.cullMode=e},frontFace:function(t,e,r){r.primitive=r.primitive||{},r.primitive.frontFace=e},depthWriteEnabled:function(t,e,r){l(r).depthWriteEnabled=e},depthCompare:function(t,e,r){l(r).depthCompare=e},depthFormat:function(t,e,r){l(r).format=e},depthBias:function(t,e,r){l(r).depthBias=e},depthBiasSlopeScale:function(t,e,r){l(r).depthBiasSlopeScale=e},depthBiasClamp:function(t,e,r){l(r).depthBiasClamp=e},stencilReadMask:function(t,e,r){l(r).stencilReadMask=e},stencilWriteMask:function(t,e,r){l(r).stencilWriteMask=e},stencilCompare:function(t,e,r){var n=l(r);n.stencilFront.compare=e,n.stencilBack.compare=e},stencilPassOperation:function(t,e,r){var n=l(r);n.stencilFront.passOp=e,n.stencilBack.passOp=e},stencilFailOperation:function(t,e,r){var n=l(r);n.stencilFront.failOp=e,n.stencilBack.failOp=e},stencilDepthFailOperation:function(t,e,r){var n=l(r);n.stencilFront.depthFailOp=e,n.stencilBack.depthFailOp=e},sampleCount:function(t,e,r){r.multisample=r.multisample||{},r.multisample.count=e},sampleMask:function(t,e,r){r.multisample=r.multisample||{},r.multisample.mask=e},sampleAlphaToCoverageEnabled:function(t,e,r){r.multisample=r.multisample||{},r.multisample.alphaToCoverageEnabled=e},colorMask:function(t,e,r){d(r)[0].writeMask=e},blendColorOperation:function(t,e,r){d(r)}};e.PARAMETER_TABLE=f;var s={primitive:{cullMode:"back",topology:"triangle-list"},vertex:{module:void 0,entryPoint:"main"},fragment:{module:void 0,entryPoint:"main",targets:[]},layout:"auto"};function p(t,e){for(var r=0,n=Object.entries(e);r<n.length;r++){var i=o(n[r],2),u=i[0],a=i[1],c=f[u];if(!c)throw new Error("Illegal parameter ".concat(u));c(u,a,t)}}function d(t){var e,r,n,o,i,u;if(t.fragment.targets=(null===(e=t.fragment)||void 0===e?void 0:e.targets)||[],!Array.isArray(null===(r=t.fragment)||void 0===r?void 0:r.targets))throw new Error("colorstate");0===(null===(n=t.fragment)||void 0===n||null===(o=n.targets)||void 0===o?void 0:o.length)&&(null===(u=t.fragment.targets)||void 0===u||u.push({}));return null===(i=t.fragment)||void 0===i?void 0:i.targets}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBindGroup=function(t,e,r,n){var a=function(t,e){for(var r=[],n=0,a=Object.entries(t);n<a.length;n++){var c=(p=a[n],d=2,function(t){if(Array.isArray(t))return t}(p)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(p,d)||function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return o(t,e)}(p,d)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=c[0],f=c[1],s=i(e,l);s&&r.push(u(f,s.location))}var p,d;return r}(n,r);return t.createBindGroup({layout:e,entries:a})},e.getShaderLayoutBinding=i,e.makeBindGroupLayout=function(t,e,r){throw new Error("not implemented")};var n=r(1);function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){var r=t.bindings.find((function(t){return t.name===e}));return r||n.log.warn("Binding ".concat(e," not set: Not found in shader layout."))(),r}function u(t,e){if(t instanceof n.Buffer)return{binding:e,resource:{buffer:(0,n.cast)(t).handle}};if(t instanceof n.Sampler)return{binding:e,resource:(0,n.cast)(t).handle};if(t instanceof n.Texture)return{binding:e,resource:(0,n.cast)(t).handle.createView()};throw new Error("invalid binding")}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getBufferSlots=function(t,e){var r,n=new Set,i=0,u={},a=o(e);try{for(a.s();!(r=a.n()).done;){var c=r.value;if("attributes"in c){var l,f=o(c.attributes);try{for(f.s();!(l=f.n()).done;){var s=l.value;n.add(s.name)}}catch(t){f.e(t)}finally{f.f()}}else n.add(c.name);u[c.name]=i++}}catch(t){a.e(t)}finally{a.f()}var p,d=o(t.attributes);try{for(d.s();!(p=d.n()).done;){var y=p.value;n.has(y.name)||(u[y.name]=i++)}}catch(t){d.e(t)}finally{d.f()}return u},e.getVertexBufferLayout=function(t,e){var r,i=[],a=new Set,c=o(e);try{for(c.s();!(r=c.n()).done;){var l=r.value,f=[],s="vertex",p=0,d=l.byteOffset||0;if("attributes"in l){var y,h=o(l.attributes);try{for(h.s();!(y=h.n()).done;){var v=y.value,b=u(t,v.name,a);s=b.stepMode||"vertex",f.push({format:b.format,offset:d+p,shaderLocation:b.location}),p+=(0,n.decodeVertexFormat)(b.format).byteLength}}catch(t){h.e(t)}finally{h.f()}}else{var m=u(t,l.name,a);p=(0,n.decodeVertexFormat)(m.format).byteLength,s=m.stepMode||"vertex",f.push({format:m.format,offset:d,shaderLocation:m.location})}i.push({arrayStride:l.byteStride||p,stepMode:s||"vertex",attributes:f})}}catch(t){c.e(t)}finally{c.f()}var g,w=o(t.attributes);try{for(w.s();!(g=w.n()).done;){var O=g.value;a.has(O.name)||i.push({arrayStride:(0,n.decodeVertexFormat)(O.format).byteLength,stepMode:O.stepMode||"vertex",attributes:[{format:O.format,offset:0,shaderLocation:O.location}]})}}catch(t){w.e(t)}finally{w.f()}return i};var n=r(1);function o(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,u=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw u}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e,r){var n=t.attributes.find((function(t){return t.name===e}));if(!n)throw new Error("Unknown attribute ".concat(e));if(r.has(e))throw new Error("Duplicate attribute ".concat(e));return r.add(e),n}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,r,o,c=a(f);function f(t,e){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),s(l(r=c.call(this,t,e)),"device",void 0),s(l(r),"handle",void 0),r.device=t;var o=(0,n.cast)(r.props.cs).handle;return r.handle=r.props.handle||r.device.handle.createComputePipeline({label:r.props.id,compute:{module:o,entryPoint:r.props.csEntryPoint},layout:"auto"}),r}return e=f,(r=[{key:"_getBindGroupLayout",value:function(){return this.handle.getBindGroupLayout(0)}}])&&i(e.prototype,r),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),f}(n.ComputePipeline);e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,d(n.key),n)}}function a(t,e){return(a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var o=s(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return l(this,r)}}function l(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return f(t)}function f(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e,r){return(e=d(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(s,t);var e,r,o,l=c(s);function s(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,s),p(f(e=l.call(this,t,r)),"device",void 0),p(f(e),"handle",void 0),p(f(e),"pipeline",null),e.device=t;var n=r.framebuffer||t.canvasContext.getCurrentFramebuffer(),o=n.renderPassDescriptor;return e.handle=e.props.handle||t.commandEncoder.beginRenderPass(o),e.handle.label=e.props.id,e}return e=s,(r=[{key:"destroy",value:function(){}},{key:"end",value:function(){this.handle.end()}},{key:"setPipeline",value:function(t){this.pipeline=(0,n.cast)(t),this.handle.setPipeline(this.pipeline.handle)}},{key:"setBindings",value:function(t){var e,r;null===(e=this.pipeline)||void 0===e||e.setBindings(t);var n=null===(r=this.pipeline)||void 0===r?void 0:r._getBindGroup();n&&this.handle.setBindGroup(0,n)}},{key:"setIndexBuffer",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3?arguments[3]:void 0;this.handle.setIndexBuffer((0,n.cast)(t).handle,e,r,o)}},{key:"setVertexBuffer",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.handle.setVertexBuffer(t,(0,n.cast)(e).handle,r)}},{key:"draw",value:function(t){t.indexCount?this.handle.drawIndexed(t.indexCount,t.instanceCount,t.firstIndex,t.baseVertex,t.firstInstance):this.handle.draw(t.vertexCount||0,t.instanceCount,t.firstIndex,t.firstInstance)}},{key:"drawIndirect",value:function(){}},{key:"setParameters",value:function(t){var e=t.blendConstant,r=t.stencilReference,n=t.scissorRect,o=t.viewport;e&&this.handle.setBlendConstant(e),r&&this.handle.setStencilReference(r),n&&this.handle.setScissorRect(n[0],n[1],n[2],n[3]),o&&this.handle.setViewport(o[0],o[1],o[2],o[3],o[4],o[5])}},{key:"pushDebugGroup",value:function(t){this.handle.pushDebugGroup(t)}},{key:"popDebugGroup",value:function(){this.handle.popDebugGroup()}},{key:"insertDebugMarker",value:function(t){this.handle.insertDebugMarker(t)}}])&&u(e.prototype,r),o&&u(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(n.RenderPass);e.default=y},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=r(1);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,p(n.key),n)}}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return c(this,r)}}function c(t,e){if(e&&("object"===o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return l(t)}function l(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e,r){return(e=p(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(f,t);var e,r,o,c=a(f);function f(t,e){var r,n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,f),s(l(n=c.call(this,t,e)),"device",void 0),s(l(n),"handle",void 0),s(l(n),"_bindGroupLayout",null),n.device=t,n.handle=n.props.handle||(null===(r=t.commandEncoder)||void 0===r?void 0:r.beginComputePass({label:n.props.id})),n}return e=f,(r=[{key:"destroy",value:function(){}},{key:"end",value:function(){this.handle.end()}},{key:"setPipeline",value:function(t){var e=(0,n.cast)(t);this.handle.setPipeline(e.handle),this._bindGroupLayout=e._getBindGroupLayout()}},{key:"setBindings",value:function(t){throw new Error("fix me")}},{key:"dispatch",value:function(t,e,r){this.handle.dispatchWorkgroups(t,e,r)}},{key:"dispatchIndirect",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.handle.dispatchWorkgroupsIndirect((0,n.cast)(t).handle,e)}},{key:"pushDebugGroup",value:function(t){this.handle.pushDebugGroup(t)}},{key:"popDebugGroup",value:function(){this.handle.popDebugGroup()}},{key:"insertDebugMarker",value:function(t){this.handle.insertDebugMarker(t)}}])&&i(e.prototype,r),o&&i(e,o),Object.defineProperty(e,"prototype",{writable:!1}),f}(n.ComputePass);e.default=d},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=r(1),i=r(15),u=(n=r(65))&&n.__esModule?n:{default:n};function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,u,a=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(u=r.return(),Object(u)!==u))return}finally{if(l)throw o}}return a}}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return l(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return l(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,b(n.key),n)}}function s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=h(t);if(e){var o=h(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return d(this,r)}}function d(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return y(t)}function y(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e,r){return(e=b(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function b(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}var m=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(l,t);var e,r,n,a=p(l);function l(t,e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),v(y(n=a.call(this,r)),"device",void 0),v(y(n),"gpuCanvasContext",void 0),v(y(n),"format",void 0),v(y(n),"depthStencilFormat","depth24plus"),v(y(n),"sampleCount",1),v(y(n),"depthStencilAttachment",null),n.device=t,n.width=-1,n.height=-1,n._setAutoCreatedCanvasId("".concat(n.device.id,"-canvas")),n.gpuCanvasContext=n.canvas.getContext("webgpu"),n.format=n.gpuCanvasContext.getPreferredFormat(e),n}return e=l,(r=[{key:"destroy",value:function(){this.gpuCanvasContext.unconfigure()}},{key:"getCurrentFramebuffer",value:function(){this.update();var t=this.device.createTexture({id:"default-render-target",handle:this.gpuCanvasContext.getCurrentTexture(),format:this.format,width:this.width,height:this.height});return this._createDepthStencilAttachment(),new u.default(this.device,{colorAttachments:[t],depthStencilAttachment:this.depthStencilAttachment})}},{key:"update",value:function(){var t=c(this.getPixelSize(),2),e=t[0],r=t[1];(e!==this.width||r!==this.height)&&(this.width=e,this.height=r,this.depthStencilAttachment&&(this.depthStencilAttachment.destroy(),this.depthStencilAttachment=null),this.gpuCanvasContext.configure({device:this.device.handle,format:(0,i.getWebGPUTextureFormat)(this.format),colorSpace:this.props.colorSpace,alphaMode:this.props.alphaMode}),o.log.log(1,"Resized to ".concat(this.width,"x").concat(this.height,"px"))())}},{key:"resize",value:function(t){this.update()}},{key:"_createDepthStencilAttachment",value:function(){return this.depthStencilAttachment||(this.depthStencilAttachment=this.device.createTexture({id:"depth-stencil-target",format:this.depthStencilFormat,width:this.width,height:this.height,usage:GPUTextureUsage.RENDER_ATTACHMENT})),this.depthStencilAttachment}}])&&f(e.prototype,r),n&&f(e,n),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.CanvasContext);e.default=m},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,o=r(1),i=(n=r(14))&&n.__esModule?n:{default:n};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function f(t,e){return(f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return d(t)}function d(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function h(t,e,r){return(e=v(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function v(t){var e=function(t,e){if("object"!==u(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===u(e)?e:String(e)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(a,t);var e,r,n,u=s(a);function a(t,e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),h(d(r=u.call(this,t,e)),"device",void 0),h(d(r),"colorAttachments",[]),h(d(r),"depthStencilAttachment",null),h(d(r),"renderPassDescriptor",{colorAttachments:[]}),r.device=t,e.depthStencilAttachment&&(r.depthStencilAttachment=r.createDepthStencilTexture(e)),e.colorAttachments&&(r.colorAttachments=e.colorAttachments.map((function(t){return r.createColorTexture(r.props,t)}))),r.depthStencilAttachment&&(r.renderPassDescriptor.depthStencilAttachment={view:r.depthStencilAttachment.handle.createView(),depthClearValue:1,depthStoreOp:"store",stencilClearValue:0,stencilStoreOp:"store"}),r.colorAttachments.length>0&&(r.renderPassDescriptor.colorAttachments=r.colorAttachments.map((function(t){return{view:t.handle.createView(),loadOp:"clear",loadValue:[0,0,0,0],storeOp:"store"}}))),r}return e=a,(r=[{key:"createDepthStencilTexture",value:function(t){if(t.depthStencilAttachment instanceof i.default)return t.depthStencilAttachment;if("string"==typeof t.depthStencilAttachment)return this.device._createTexture({id:"depth-stencil-attachment",format:t.depthStencilAttachment,width:t.width,height:t.height,usage:o.Texture.RENDER_ATTACHMENT});throw new Error("type")}},{key:"createColorTexture",value:function(t,e){if(e instanceof i.default)return e;if("string"==typeof e)return this.device._createTexture({id:"color-attachment",format:e,width:t.width,height:t.height,usage:o.Texture.RENDER_ATTACHMENT});throw new Error("type")}},{key:"_resizeAttachments",value:function(t,e){for(var r=0;r<this.colorAttachments.length;++r)if(this.colorAttachments[r]){var n=this.device._createTexture(c(c({},this.colorAttachments[r].props),{},{width:t,height:e}));this.colorAttachments[r].destroy(),this.colorAttachments[r]=n,this.renderPassDescriptor.colorAttachments[r].view=n.handle.createView()}if(this.depthStencilAttachment){var o=this.device._createTexture(c(c({},this.depthStencilAttachment.props),{},{width:t,height:e}));this.depthStencilAttachment.destroy(),this.depthStencilAttachment=o,this.renderPassDescriptor.depthStencilAttachment.view=o.handle.createView()}}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(o.Framebuffer);e.default=b},function(t,e,r){"use strict";r.r(e),r.d(e,"Log",(function(){return P})),r.d(e,"COLOR",(function(){return s})),r.d(e,"addColor",(function(){return d})),r.d(e,"leftPad",(function(){return c})),r.d(e,"rightPad",(function(){return l})),r.d(e,"autobind",(function(){return y})),r.d(e,"LocalStorage",(function(){return a})),r.d(e,"getHiResTimestamp",(function(){return b}));var n=r(0),o=r.n(n),i=r(5),u=r(16);class a{constructor(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"sessionStorage";o()(this,"storage",void 0),o()(this,"id",void 0),o()(this,"config",void 0),this.storage=function(t){try{const e=window[t],r="__storage_test__";return e.setItem(r,r),e.removeItem(r),e}catch(t){return null}}(r),this.id=t,this.config=e,this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function c(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const r=Math.max(e-t.length,0);return"".concat(" ".repeat(r)).concat(t)}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;const r=Math.max(e-t.length,0);return"".concat(t).concat(" ".repeat(r))}function f(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:600;const o=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>n&&(r=Math.min(r,n/t.width));const i=t.width*r,u=t.height*r,a=["font-size:1px;","padding:".concat(Math.floor(u/2),"px ").concat(Math.floor(i/2),"px;"),"line-height:".concat(u,"px;"),"background:url(".concat(o,");"),"background-size:".concat(i,"px ").concat(u,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}let s;!function(t){t[t.BLACK=30]="BLACK",t[t.RED=31]="RED",t[t.GREEN=32]="GREEN",t[t.YELLOW=33]="YELLOW",t[t.BLUE=34]="BLUE",t[t.MAGENTA=35]="MAGENTA",t[t.CYAN=36]="CYAN",t[t.WHITE=37]="WHITE",t[t.BRIGHT_BLACK=90]="BRIGHT_BLACK",t[t.BRIGHT_RED=91]="BRIGHT_RED",t[t.BRIGHT_GREEN=92]="BRIGHT_GREEN",t[t.BRIGHT_YELLOW=93]="BRIGHT_YELLOW",t[t.BRIGHT_BLUE=94]="BRIGHT_BLUE",t[t.BRIGHT_MAGENTA=95]="BRIGHT_MAGENTA",t[t.BRIGHT_CYAN=96]="BRIGHT_CYAN",t[t.BRIGHT_WHITE=97]="BRIGHT_WHITE"}(s||(s={}));function p(t){return"string"!=typeof t?t:(t=t.toUpperCase(),s[t]||s.WHITE)}function d(t,e,r){if(!i.a&&"string"==typeof t){if(e){const r=p(e);t="[".concat(r,"m").concat(t,"")}if(r){const e=p(r);t="[".concat(e+10,"m").concat(t,"")}}return t}function y(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["constructor"];const r=Object.getPrototypeOf(t),n=Object.getOwnPropertyNames(r),o=t;for(const r of n){const n=o[r];"function"==typeof n&&(e.find(t=>r===t)||(o[r]=n.bind(t)))}}function h(t,e){if(!t)throw new Error(e||"Assertion failed")}var v=r(2);function b(){let t;var e,r;if(Object(i.a)()&&v.g.performance)t=null===v.g||void 0===v.g||null===(e=v.g.performance)||void 0===e||null===(r=e.now)||void 0===r?void 0:r.call(e);else if("hrtime"in v.e){var n;const e=null===v.e||void 0===v.e||null===(n=v.e.hrtime)||void 0===n?void 0:n.call(v.e);t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const m={debug:Object(i.a)()&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},g={enabled:!0,level:0};function w(){}const O={},j={once:!0};class P{constructor(){let{id:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{id:""};o()(this,"id",void 0),o()(this,"VERSION",u.a),o()(this,"_startTs",b()),o()(this,"_deltaTs",b()),o()(this,"_storage",void 0),o()(this,"userData",{}),o()(this,"LOG_THROTTLE_TIMEOUT",0),this.id=t,this.userData={},this._storage=new a("__probe-".concat(this.id,"__"),g),this.timeStamp("".concat(this.id," started")),y(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((b()-this._startTs).toPrecision(10))}getDelta(){return Number((b()-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&&void 0!==arguments[0])||arguments[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,e){this._storage.setConfiguration({[t]:e})}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}assert(t,e){h(t,e)}warn(t){return this._getLogFunction(0,t,m.warn,arguments,j)}error(t){return this._getLogFunction(0,t,m.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,m.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,m.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,m.debug||m.info,arguments,j)}table(t,e,r){return e?this._getLogFunction(t,e,console.table||w,r&&[r],{tag:E(e)}):w}image(t){let{logLevel:e,priority:r,image:n,message:o="",scale:u=1}=t;return this._shouldLog(e||r)?Object(i.a)()?function(t){let{image:e,message:r="",scale:n=1}=t;if("string"==typeof e){const t=new Image;return t.onload=()=>{const e=f(t,r,n);console.log(...e)},t.src=e,w}const o=e.nodeName||"";if("img"===o.toLowerCase())return console.log(...f(e,r,n)),w;if("canvas"===o.toLowerCase()){const t=new Image;return t.onload=()=>console.log(...f(t,r,n)),t.src=e.toDataURL(),w}return w}({image:n,message:o,scale:u}):function(t){let{image:e,message:r="",scale:n=1}=t;return console.warn("removed"),w}({image:n,message:o,scale:u}):w}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||w)}group(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{collapsed:!1};const n=_({logLevel:t,message:e,opts:r}),{collapsed:o}=r;return n.method=(o?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.group(t,e,Object.assign({},r,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||w)}withGroup(t,e,r){this.group(t,e)();try{r()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=S(t)}_getLogFunction(t,e,r,n,o){if(this._shouldLog(t)){o=_({logLevel:t,message:e,args:n,opts:o}),h(r=r||o.method),o.total=this.getTotal(),o.delta=this.getDelta(),this._deltaTs=b();const i=o.tag||o.message;if(o.once&&i){if(O[i])return w;O[i]=b()}return e=function(t,e,r){if("string"==typeof e){const n=r.time?c(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(r.total)):"";e=d(e=r.time?"".concat(t,": ").concat(n," ").concat(e):"".concat(t,": ").concat(e),r.color,r.background)}return e}(this.id,o.message,o),r.bind(console,e,...o.args)}return w}}function S(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return h(Number.isFinite(e)&&e>=0),e}function _(t){const{logLevel:e,message:r}=t;t.logLevel=S(e);const n=t.args?Array.from(t.args):[];for(;n.length&&n.shift()!==r;);switch(typeof e){case"string":case"function":void 0!==r&&n.unshift(r),t.message=e;break;case"object":Object.assign(t,e)}"function"==typeof t.message&&(t.message=t.message());const o=typeof t.message;return h("string"===o||"object"===o),Object.assign(t,{args:n},t.opts)}function E(t){for(const e in t)for(const r in t[e])return r||"untitled";return"empty"}o()(P,"VERSION",u.a);e.default=new P({id:"@probe.gl/log"})},function(t,e,r){"use strict";r.r(e),r.d(e,"Stats",(function(){return a})),r.d(e,"Stat",(function(){return u})),r.d(e,"_getHiResTimestamp",(function(){return i.a}));var n=r(0),o=r.n(n),i=r(8);class u{constructor(t,e){o()(this,"name",void 0),o()(this,"type",void 0),o()(this,"sampleSize",1),o()(this,"time",0),o()(this,"count",0),o()(this,"samples",0),o()(this,"lastTiming",0),o()(this,"lastSampleTime",0),o()(this,"lastSampleCount",0),o()(this,"_count",0),o()(this,"_time",0),o()(this,"_samples",0),o()(this,"_startTime",0),o()(this,"_timerPending",!1),this.name=t,this.type=e,this.reset()}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(i.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(i.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class a{constructor(t){o()(this,"id",void 0),o()(this,"stats",{}),this.id=t.id,this.stats={},this._initializeStats(t.stats),Object.seal(this)}get(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"count";return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t of Object.values(this.stats))t.reset();return this}forEach(t){for(const e of Object.values(this.stats))t(e)}getTable(){const t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:r}=t;return this.stats[e]||(this.stats[e]=t instanceof u?t:new u(e,r)),this.stats[e]||null}}}])}));
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=accessor-to-format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accessor-to-format.js","names":[],"sources":["../../../../src/adapter/helpers/accessor-to-format.ts"],"sourcesContent":["/*\nimport {assert} from '@luma.gl/api';\nimport GL from '@luma.gl/constants';\n\ntype Accessor = Record<string, any>;\n\nconst FORMAT_TO_ACCESSOR: Record<GPUVertexFormat, Accessor> = {\n uchar2: {type: 'uchar', size: 2},\n uchar4: {type: 'uchar', size: 4},\n char2: {type: 'char', size: 2},\n char4: {type: 'char', size: 4},\n uchar2norm: {type: 'uchar', size: 2, normalized: true},\n uchar4norm: {type: 'uchar', size: 4, normalized: true},\n char2norm: {type: 'char', size: 2, normalized: true},\n char4norm: {type: 'char', size: 4, normalized: true},\n ushort2: {type: 'ushort', size: 2},\n ushort4: {type: 'ushort', size: 4},\n short2: {type: 'short', size: 2},\n short4: {type: 'short', size: 4},\n ushort2norm: {type: 'ushort', size: 2, normalized: true},\n ushort4norm: {type: 'ushort', size: 4, normalized: true},\n short2norm: {type: 'short', size: 1, normalized: true},\n short4norm: {type: 'short', size: 1, normalized: true},\n half2: {type: 'half', size: 2},\n half4: {type: 'half', size: 4},\n float: {type: 'float', size: 1},\n float2: {type: 'float', size: 2},\n float3: {type: 'float', size: 3},\n float4: {type: 'float', size: 4},\n uint: {type: 'uint', size: 1, integer: true},\n uint2: {type: 'uint', size: 2, integer: true},\n uint3: {type: 'uint', size: 3, integer: true},\n uint4: {type: 'uint', size: 4, integer: true},\n int: {type: 'int', size: 1, integer: true},\n int2: {type: 'int', size: 2, integer: true},\n int3: {type: 'int', size: 3, integer: true},\n int4: {type: 'int', size: 4, integer: true}\n};\n\n/**\n * Convert from WebGPU attribute format strings to accessor {type, size, normalized, integer}\n * @param {*} format\n *\nexport function mapWebGPUFormatToAccessor(format) {\n const accessorDefinition = FORMAT_TO_ACCESSOR[format];\n assert(accessorDefinition, 'invalid attribute format');\n return Object.freeze(accessorDefinition);\n}\n\n/**\n * Convert from accessor {type, size, normalized, integer} to WebGPU attribute format strings\n * @param {*} format\n *\nexport function mapAccessorToWebGPUFormat(accessor) {\n const {type = GL.FLOAT, size = 1, normalized = false, integer = false} = accessor;\n assert(size >=1 && size <=4);\n // `norm` suffix (uchar4norm)\n const norm = normalized ? 'norm' : '';\n // size 1 is ommitted in format names (float vs float2)\n const count = size === 1 ? '' : size;\n switch (type) {\n case GL.UNSIGNED_BYTE:\n switch (size) {\n case 2:\n case 4:\n return `uchar${count}${norm}`;\n }\n case GL.BYTE:\n switch (size) {\n case 2:\n case 4:\n return `char${count}${norm}`;\n }\n case GL.UNSIGNED_SHORT:\n switch (size) {\n case 2:\n case 4:\n return `ushort${count}${norm}`;\n }\n case GL.SHORT:\n switch (size) {\n case 2:\n case 4:\n return `short${count}${norm}`;\n }\n case GL.HALF_FLOAT:\n switch (size) {\n case 2:\n case 4:\n return `half${count}`;\n }\n case GL.FLOAT:\n return `float${count}`;\n case GL.UNSIGNED_INT:\n return `uint${count}`;\n case GL.INT:\n return `int${count}`;\n }\n throw new Error('illegal accessor');\n}\n*/"],"mappings":""}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getWebGPUTextureFormat = getWebGPUTextureFormat;
7
- function getWebGPUTextureFormat(format) {
8
- if (format.includes('webgl')) {
9
- throw new Error('webgl-only format');
10
- }
11
- return format;
12
- }
13
- //# sourceMappingURL=convert-texture-format.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert-texture-format.js","names":["getWebGPUTextureFormat","format","includes","Error"],"sources":["../../../../src/adapter/helpers/convert-texture-format.ts"],"sourcesContent":["// luma.gl, MIT license\nimport {TextureFormat} from '@luma.gl/api';\n\n/** Ensure a texture format is WebGPU compatible */\nexport function getWebGPUTextureFormat(format: TextureFormat): GPUTextureFormat {\n if (format.includes('webgl')) {\n throw new Error('webgl-only format');\n }\n return format as GPUTextureFormat;\n}\n"],"mappings":";;;;;;AAIO,SAASA,sBAAsBA,CAACC,MAAqB,EAAoB;EAC9E,IAAIA,MAAM,CAACC,QAAQ,CAAC,OAAO,CAAC,EAAE;IAC5B,MAAM,IAAIC,KAAK,CAAC,mBAAmB,CAAC;EACtC;EACA,OAAOF,MAAM;AACf"}