@arcgis/core 5.2.0-next.14 → 5.2.0-next.15

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 (175) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{31762eb20a9a0ed3f8b0.js → 011a4d4201696fa10408.js} +1 -1
  3. package/assets/esri/core/workers/chunks/01ba5319cac3e0f14205.js +1 -0
  4. package/assets/esri/core/workers/chunks/0436fe89adc78696251c.js +1 -0
  5. package/assets/esri/core/workers/chunks/079b412d07d02504f1db.js +1 -0
  6. package/assets/esri/core/workers/chunks/{38cfedce779dd75bd217.js → 07ca020796c57cefda62.js} +1 -1
  7. package/assets/esri/core/workers/chunks/0b45d34938fa7862f746.js +1 -0
  8. package/assets/esri/core/workers/chunks/{a4b970a841b3085500fc.js → 0b55fc5050e718371e05.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{97a654e8054302582a3b.js → 0bf72e9d0a6deceeb406.js} +1 -1
  10. package/assets/esri/core/workers/chunks/11c3b1e8ca21ad62fdd1.js +1 -0
  11. package/assets/esri/core/workers/chunks/1bd49e8d2657c72bf3f9.js +1 -0
  12. package/assets/esri/core/workers/chunks/1d81e667a580c5cdeda1.js +262 -0
  13. package/assets/esri/core/workers/chunks/25c1f5e2561986330b80.js +1 -0
  14. package/assets/esri/core/workers/chunks/2bc4aff77c830061e16e.js +1 -0
  15. package/assets/esri/core/workers/chunks/{8c443c52c846a096a250.js → 36dd3ad3ef2fbfc15cbd.js} +1 -1
  16. package/assets/esri/core/workers/chunks/39a10b2092a98083f4cf.js +1 -0
  17. package/assets/esri/core/workers/chunks/3bd32387af52fa48d747.js +1 -0
  18. package/assets/esri/core/workers/chunks/3dc6e9494af16f7b8009.js +1 -0
  19. package/assets/esri/core/workers/chunks/42e5e00610f281ca8ffa.js +1 -0
  20. package/assets/esri/core/workers/chunks/{73c355b895fd6a34fcb8.js → 45b560ca01fb566ba560.js} +1 -1
  21. package/assets/esri/core/workers/chunks/47d630561f3fce5c63c4.js +1 -0
  22. package/assets/esri/core/workers/chunks/4cc78493805671708a9b.js +1 -0
  23. package/assets/esri/core/workers/chunks/4e59e5a5d0ff887ff899.js +1 -0
  24. package/assets/esri/core/workers/chunks/4efef5fa8bf23aaf34cd.js +1 -0
  25. package/assets/esri/core/workers/chunks/511b9c12a7479d39dac0.js +1 -0
  26. package/assets/esri/core/workers/chunks/{20c729fca2e4b4c6b28d.js → 57b7e5fde972d3ad7884.js} +1 -1
  27. package/assets/esri/core/workers/chunks/57e04b7ec238f7b24274.js +1 -0
  28. package/assets/esri/core/workers/chunks/5d8924fdcdb473d261cd.js +1 -0
  29. package/assets/esri/core/workers/chunks/62de9e83331fb10aac6a.js +2 -0
  30. package/assets/esri/core/workers/chunks/{854c320af09b6afc4b80.js → 641cddee377599916de2.js} +2 -2
  31. package/assets/esri/core/workers/chunks/65cc9a48ac95523f7aa8.js +1 -0
  32. package/assets/esri/core/workers/chunks/66392ff750c28064040a.js +1 -0
  33. package/assets/esri/core/workers/chunks/668d84dc512b3085a960.js +1 -0
  34. package/assets/esri/core/workers/chunks/{318a2702632aaa4d3a63.js → 6a1b6f8c868f8edce1d7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/6f5a82388a5eb5fcf1b7.js +1 -0
  36. package/assets/esri/core/workers/chunks/73b0edabddbb72fe1104.js +1 -0
  37. package/assets/esri/core/workers/chunks/7ee76504e7fea389a1c9.js +1 -0
  38. package/assets/esri/core/workers/chunks/7f849c8255140be6097f.js +1 -0
  39. package/assets/esri/core/workers/chunks/8927fb4aa68f7e541a39.js +30 -0
  40. package/assets/esri/core/workers/chunks/8eda85fc01a71aedd9e4.js +1 -0
  41. package/assets/esri/core/workers/chunks/8f25d91ea7b99597124e.js +1 -0
  42. package/assets/esri/core/workers/chunks/92341f36a8b15f34bcca.js +1 -0
  43. package/assets/esri/core/workers/chunks/9f93c29af2a18f7cb160.js +1 -0
  44. package/assets/esri/core/workers/chunks/a18cb809dd56c5537b3b.js +1 -0
  45. package/assets/esri/core/workers/chunks/a4f3bcfabd4ad127abf2.js +1 -0
  46. package/assets/esri/core/workers/chunks/a63bba226de6c5e464b0.js +1 -0
  47. package/assets/esri/core/workers/chunks/{7dcf804e1918b94fa4e1.js → a98905bf6050ad3b8721.js} +1 -1
  48. package/assets/esri/core/workers/chunks/a9f29ff36a7ae5bae686.js +1 -0
  49. package/assets/esri/core/workers/chunks/{1d5db8746a4f1ed1d18f.js → b102beeeb7a919f68b51.js} +1 -1
  50. package/assets/esri/core/workers/chunks/b75a4753cea6544da8bb.js +1 -0
  51. package/assets/esri/core/workers/chunks/bd36c57dd0cd28dee55f.js +30 -0
  52. package/assets/esri/core/workers/chunks/c8460bdf60aca749ed05.js +30 -0
  53. package/assets/esri/core/workers/chunks/c9057b0ad2c2bae4a8ce.js +1 -0
  54. package/assets/esri/core/workers/chunks/e73bb7c8de7412d9975c.js +1 -0
  55. package/assets/esri/core/workers/chunks/e8546ab510fc9515bd23.js +1 -0
  56. package/assets/esri/core/workers/chunks/e9acc05b0cf9e05f31a8.js +1 -0
  57. package/assets/esri/core/workers/chunks/{e77df11aee136d64ff0f.js → eb91dc957c328674e119.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{0a8ba5cb857f61de40fb.js → ed2a1c371dfc5d4a744e.js} +28 -28
  59. package/assets/esri/core/workers/chunks/f0832b413612c77a62ca.js +1 -0
  60. package/assets/esri/core/workers/chunks/f955b35337a08f9f747d.js +1 -0
  61. package/assets/esri/core/workers/chunks/fea3b6bef761ef78630e.js +1 -0
  62. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  63. package/assets/esri/views/3d/analysis/ShadowCast/t9n/ShadowCastAnalysis_fr.json +1 -1
  64. package/chunks/Component.glsl.js +3 -3
  65. package/chunks/GaussianSplatComposition.glsl.js +1 -1
  66. package/chunks/GlobalIlluminationBlur.glsl.js +11 -11
  67. package/chunks/OITBlend.glsl.js +1 -24
  68. package/chunks/OITBlendEmission.glsl.js +9 -9
  69. package/chunks/OITDimOpaque.glsl.js +3 -9
  70. package/chunks/lyr3DMain.js +1 -1
  71. package/config.js +1 -1
  72. package/core/reactiveUtils.d.ts +410 -109
  73. package/kernel.js +1 -1
  74. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  75. package/layers/graphics/sources/MemorySource.js +1 -1
  76. package/layers/mixins/OperationalLayer.js +1 -1
  77. package/layers/support/ExportImageServiceParameters.js +1 -1
  78. package/layers/support/layersMapping.js +1 -1
  79. package/package.json +3 -3
  80. package/rest/print.js +1 -1
  81. package/support/revision.js +1 -1
  82. package/views/2d/engine/webgl/TextureManager.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  84. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  85. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  87. package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +2 -2
  88. package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
  89. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  90. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  91. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  92. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  93. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  94. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  95. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  96. package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
  97. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  98. package/views/3d/webgl-engine/effects/transparency/OITBlendEmission.glsl.js +1 -1
  99. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechnique.js +1 -1
  100. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +2 -0
  101. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  102. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  103. package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
  104. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
  105. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +2 -0
  106. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  107. package/views/3d/webgl-engine/lib/Material.js +1 -1
  108. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  109. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  110. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  111. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  112. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  113. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  114. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  115. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  116. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  117. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  118. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  119. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  120. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  121. package/views/View2D.d.ts +2 -3
  122. package/webdoc/support/writeUtils.js +1 -1
  123. package/widgets/Editor.js +1 -1
  124. package/widgets/Print/PrintViewModel.d.ts +11 -1
  125. package/widgets/Print/PrintViewModel.js +1 -1
  126. package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +0 -1
  127. package/assets/esri/core/workers/chunks/1a95370ddc22729ab3c6.js +0 -1
  128. package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +0 -1
  129. package/assets/esri/core/workers/chunks/23d50c4478f40a7d62bf.js +0 -1
  130. package/assets/esri/core/workers/chunks/2623cd08487fdc9a94f1.js +0 -1
  131. package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +0 -1
  132. package/assets/esri/core/workers/chunks/2b00229c238aae70b948.js +0 -1
  133. package/assets/esri/core/workers/chunks/2b814bb51704a5b4fdc2.js +0 -30
  134. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +0 -1
  135. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +0 -1
  136. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +0 -30
  137. package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +0 -1
  138. package/assets/esri/core/workers/chunks/426b8e1e2eef2460851d.js +0 -1
  139. package/assets/esri/core/workers/chunks/4376bc2934a996d8bc27.js +0 -1
  140. package/assets/esri/core/workers/chunks/44e52fe98ffafe6a2807.js +0 -1
  141. package/assets/esri/core/workers/chunks/4d09ef7c57ab7f9782fe.js +0 -1
  142. package/assets/esri/core/workers/chunks/5022413f5a41b5d435ea.js +0 -1
  143. package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +0 -1
  144. package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +0 -1
  145. package/assets/esri/core/workers/chunks/59dafa1e1340ea4043e6.js +0 -1
  146. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +0 -1
  147. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +0 -1
  148. package/assets/esri/core/workers/chunks/6d696beddcc5fbed5875.js +0 -1
  149. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +0 -1
  150. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +0 -1
  151. package/assets/esri/core/workers/chunks/6f7193b9ff5942c0d354.js +0 -1
  152. package/assets/esri/core/workers/chunks/70737052bab29fcaa120.js +0 -1
  153. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +0 -1
  154. package/assets/esri/core/workers/chunks/851705cf276eae8d4d37.js +0 -1
  155. package/assets/esri/core/workers/chunks/882ee7ed8a3a0215f9b9.js +0 -1
  156. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +0 -1
  157. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +0 -1
  158. package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +0 -1
  159. package/assets/esri/core/workers/chunks/b9935cc8e2bd4045058a.js +0 -1
  160. package/assets/esri/core/workers/chunks/bdc66ef2b6ed783047d5.js +0 -1
  161. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +0 -1
  162. package/assets/esri/core/workers/chunks/c424a66f1546275e2bcb.js +0 -30
  163. package/assets/esri/core/workers/chunks/d2f47f21ce0b0ab4da17.js +0 -262
  164. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +0 -1
  165. package/assets/esri/core/workers/chunks/dbd2bfcbf3e0f86f07b8.js +0 -1
  166. package/assets/esri/core/workers/chunks/df54e741db40b308c2dd.js +0 -2
  167. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +0 -1
  168. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +0 -1
  169. package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +0 -1
  170. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +0 -1
  171. package/assets/esri/core/workers/chunks/fa3faec65882c5b6f1a0.js +0 -1
  172. package/views/3d/webgl-engine/effects/transparency/OITBlendEmissionTechniqueConfiguration.js +0 -2
  173. package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechniqueConfiguration.js +0 -2
  174. /package/assets/esri/core/workers/chunks/{df54e741db40b308c2dd.js.LICENSE.txt → 62de9e83331fb10aac6a.js.LICENSE.txt} +0 -0
  175. /package/assets/esri/core/workers/chunks/{854c320af09b6afc4b80.js.LICENSE.txt → 641cddee377599916de2.js.LICENSE.txt} +0 -0
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as c}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{ditherNoise as p}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{NoParameters as d}from"../views/webgl/NoParameters.js";import{ShaderBuilder as h}from"../views/webgl/ShaderBuilder.js";const f=4;class g extends d{constructor(){super(...arguments),this.blurSize=e()}}function b(){const e=new h,d=e.fragment;e.include(l),e.include(t),e.include(i);const g=(f+3)/2,b=1/(2*g*g);d.include(o),d.include(p,{useFloatBlend:!1}),d.include(c);const S=5e4;d.uniforms.add(new a("hasEmission",e=>e.hasEmission),new m("depthMap",e=>e.depthTexture),new m("normalMap",e=>e.normalTexture),new u("globalIlluminationTexture",e=>e.texture),new u("globalIlluminationWeightTexture",e=>e.weightTexture),new n("blurSize",e=>e.blurSize),new s("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new s("projScale",(e,l)=>{const o=l.camera.distance;return o>S?Math.max(0,e.projScale-(o-S)):e.projScale}));const w=.1,v=400,W=.03,I=.08,O=1.5,x=1/32768,D=.85;return d.code.add(r`
2
+ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{ScreenSpacePass as l}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadDepth as o}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{GlobalIlluminationWeights as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js";import{CameraSpace as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/CameraSpace.glsl.js";import{BooleanBindUniform as a}from"../views/3d/webgl-engine/core/shaderModules/BooleanBindUniform.js";import{Float2DrawUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Float2DrawUniform.js";import{FloatPassUniform as s}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DDrawUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DDrawUniform.js";import{Texture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{GlobalIlluminationColorQuantization as c}from"../views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationColorQuantization.glsl.js";import{ditherNoise as p}from"../views/3d/webgl-engine/shaders/ditherNoise.glsl.js";import{OITResolutionConfiguration as d}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{NoParameters as h}from"../views/webgl/NoParameters.js";import{ShaderBuilder as f}from"../views/webgl/ShaderBuilder.js";const g=4;class b extends h{constructor(){super(...arguments),this.blurSize=e()}}function S(){const e=new f,d=e.fragment;e.include(l),e.include(t),e.include(i);const h=(g+3)/2,b=1/(2*h*h);d.include(o),d.include(p,w),d.include(c);const S=5e4;d.uniforms.add(new a("hasEmission",e=>e.hasEmission),new m("depthMap",e=>e.depthTexture),new m("normalMap",e=>e.normalTexture),new u("globalIlluminationTexture",e=>e.texture),new u("globalIlluminationWeightTexture",e=>e.weightTexture),new n("blurSize",e=>e.blurSize),new s("scaleGlobalIllumination",e=>e.scaleGlobalIllumination),new s("projScale",(e,l)=>{const o=l.camera.distance;return o>S?Math.max(0,e.projScale-(o-S)):e.projScale}));const v=.1,W=400,I=.03,O=.08,x=1.5,D=1/32768,j=.85;return d.code.add(r`
3
3
  void accumulateBlurSample(
4
4
  vec2 sampleUv,
5
5
  float sampleOffset,
@@ -22,10 +22,10 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
22
22
  float normalSimilarityWeight = globalIlluminationNormalSimilarityWeight(sampleNormal, centerNormal);
23
23
  float depthNormalCorrection = globalIlluminationDepthNormalCorrection(sampleNormal);
24
24
  vec3 emission = sampleGlobalIllumination.rgb;
25
- float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${r.float(v)} : 1.0;
25
+ float emissionSpatialWeightMultiplier = isScaledGlobalIllumination ? ${r.float(W)} : 1.0;
26
26
 
27
27
  float emissionWeight = exp(
28
- -sampleOffset * sampleOffset * ${r.float(b)} * ${r.float(w)} * emissionSpatialWeightMultiplier
28
+ -sampleOffset * sampleOffset * ${r.float(b)} * ${r.float(v)} * emissionSpatialWeightMultiplier
29
29
  - depthDelta * depthDelta * depthSharpness * depthNormalCorrection
30
30
  );
31
31
  emissionWeight *= normalSimilarityWeight;
@@ -36,9 +36,9 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
36
36
  return;
37
37
  }
38
38
 
39
- float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${r.float(W)}
40
- ? ${r.float(I)}
41
- : ${r.float(O)};
39
+ float occlusionSpatialKernelScale = centerOcclusionBlendWeight > ${r.float(I)}
40
+ ? ${r.float(O)}
41
+ : ${r.float(x)};
42
42
  float occlusionWeight = exp(-sampleOffset * sampleOffset * occlusionSpatialKernelScale - depthDelta * depthDelta * depthSharpness);
43
43
  occlusionWeight *= normalSimilarityWeight;
44
44
  occlusionWeightSum += occlusionWeight;
@@ -51,7 +51,7 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
51
51
  vec4 centerGlobalIllumination = texture(globalIlluminationTexture, uv);
52
52
  float centerOcclusionBlendWeight = texture(globalIlluminationWeightTexture, uv).r;
53
53
  bool isScaledGlobalIllumination = scaleGlobalIllumination < 1.0;
54
- bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${r.float(W)};
54
+ bool shouldReuseCenterOcclusion = isScaledGlobalIllumination && centerOcclusionBlendWeight <= ${r.float(I)};
55
55
  bool shouldSkipLowQualityBlur = !hasEmission && shouldReuseCenterOcclusion;
56
56
  if (shouldSkipLowQualityBlur) {
57
57
  fragColor = vec4(
@@ -67,7 +67,7 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
67
67
  float occlusionWeightSum = 0.0;
68
68
 
69
69
  float depthSharpness = globalIlluminationDepthSharpness(projScale, centerDepth);
70
- for (int sampleOffset = -${r.int(f)}; sampleOffset <= ${r.int(f)}; ++sampleOffset) {
70
+ for (int sampleOffset = -${r.int(g)}; sampleOffset <= ${r.int(g)}; ++sampleOffset) {
71
71
  float sampleOffsetFloat = float(sampleOffset);
72
72
  vec2 sampleUv = uv + sampleOffsetFloat * blurSize;
73
73
  accumulateBlurSample(
@@ -89,8 +89,8 @@ import{create as e}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{Sc
89
89
  vec3 blurredEmission = (emissionSum / emissionWeightSum).rgb;
90
90
 
91
91
  // Dither the blurred color to reduce quantization banding and wrong color accumulation.
92
- float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${r.float(x)};
93
- blurredEmission += isScaledGlobalIllumination ? ${r.float(D)} * dither : dither;
92
+ float dither = ditherNoise(vec4(blurredEmission, occlusion)) - ${r.float(D)};
93
+ blurredEmission += isScaledGlobalIllumination ? ${r.float(j)} * dither : dither;
94
94
 
95
95
  fragColor = vec4(quantizeGlobalIlluminationColor(blurredEmission), occlusion);
96
- `),e}const S=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:g,build:b},Symbol.toStringTag,{value:"Module"}));export{g as G,S as a,b};
96
+ `),e}const w=new d;w.useFloatBlend=!1;const v=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:b,build:S},Symbol.toStringTag,{value:"Module"}));export{b as G,v as a,S as b};
@@ -1,25 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{If as r,glsl as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as a}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{O as t}from"./OITDimOpaque.glsl.js";import{alphaCutoff as l}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{oitResolution as n}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";class c extends t{}function u(t){const c=new s;c.include(e);const{frontFaceMask:u,computeHudOcclusion:f,hasOpaqueEmission:i,useFloatBlend:d}=t,{fragment:g,outputs:p}=c;g.include(n,t),g.include(l);let m=0;return p.add("fragColor","vec4",m++),i&&m++,f&&p.add("fragOcclusion","vec4",m++),g.uniforms.add(new a("colorTexture",e=>e.colorTexture),new a("alphaTexture",e=>e.alphaTexture),new a("frontFaceTexture",e=>e.frontFaceTexture)),g.main.add(o`
3
- float srcAlpha = texture(alphaTexture, uv).r * floatBlendInputScale;
4
- ${r(f,"fragOcclusion = vec4(1.0, 0.0, 0.0, 1.0);")}
5
-
6
- if(srcAlpha < alphaCutoff) {
7
- fragColor = vec4(0.0);
8
- return;
9
- }
10
- vec4 frontFace = texture(frontFaceTexture, uv);
11
-
12
- ${r(u,o`
13
- if (frontFace.a == 0.0) {
14
- fragColor = vec4(0.0);
15
- return;
16
- }
17
- `)}
18
-
19
- vec4 srcColor = texture(colorTexture, uv);
20
- ${r(!d,"float frontWeight = srcAlpha * floatBlendOutputScale;\n frontWeight = clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0);\n\n float toAlpha = (1.0 + frontFace.a) * 0.5;\n frontFace.a = mix(frontFace.a, toAlpha, frontWeight);")}
21
- vec3 backColor = srcColor.rgb * floatBlendInputScale / srcAlpha;
22
- fragColor = vec4(mix(backColor, frontFace.rgb, frontFace.a), 1.0 - srcColor.a);
23
-
24
- ${r(f,"fragOcclusion.r = pow(srcColor.a, 0.5);")}
25
- `),c}const f=Object.freeze(Object.defineProperty({__proto__:null,OITBlendPassParameters:c,build:u},Symbol.toStringTag,{value:"Module"}));export{c as O,f as a,u as b};
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{oitBlendFragment as r}from"../views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js";import{ShaderBuilder as o}from"../views/webgl/ShaderBuilder.js";function n(n){const a=new o;a.include(e);const{computeHudOcclusion:t,hasOpaqueEmission:i}=n,{fragment:l,outputs:s}=a;let c=0;return s.add("fragColor","vec4",c++),i&&c++,t&&s.add("fragOcclusion","vec4",c++),l.include(r,n),l.main.add("fragColor = oitBlendFragment();"),t&&l.main.add("fragOcclusion = vec4(pow(1.0 - fragColor.a, 0.5), 0.0, 0.0, 1.0);"),a}const a=Object.freeze(Object.defineProperty({__proto__:null,build:n},Symbol.toStringTag,{value:"Module"}));export{a as O,n as b};
@@ -1,22 +1,22 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{If as t,glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{O as s}from"./OITDimOpaque.glsl.js";import{alphaCutoff as n}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{oitResolution as a}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ShaderBuilder as i}from"../views/webgl/ShaderBuilder.js";class l extends s{}function c(s){const l=new i;l.include(e);const{fragment:c,outputs:u}=l,{useFloatBlend:m}=s;return c.include(a,s),c.include(n),c.uniforms.add(new o("colorTexture",e=>e.colorTexture),new o("alphaTexture",e=>e.alphaTexture),new o("emissionTexture",e=>e.emissionTexture),new o("frontFaceTexture",e=>e.frontFaceTexture),new o("frontFaceEmissionTexture",e=>e.frontFaceEmissionTexture)),u.add("fragEmission","vec4",1),c.main.add(r`
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{If as t,glsl as r}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{OITBlendFragmentPassParameters as s}from"../views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js";import{alphaCutoff as n}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{oitResolution as a}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{ShaderBuilder as i}from"../views/webgl/ShaderBuilder.js";class l extends s{}function c(s){const l=new i;l.include(e);const{fragment:c,outputs:u}=l;return u.add("fragEmission","vec4",1),c.include(a,s),c.include(n),c.uniforms.add(new o("colorTexture",e=>e.colorTexture),new o("alphaTexture",e=>e.alphaTexture),new o("emissionTexture",e=>e.emissionTexture),new o("frontFaceTexture",e=>e.frontFaceTexture),new o("frontFaceEmissionTexture",e=>e.frontFaceEmissionTexture)),c.main.add(r`
3
3
  float srcAlpha = texture(alphaTexture, uv).r * floatBlendInputScale;
4
4
  if(srcAlpha < alphaCutoff) {
5
5
  fragEmission = vec4(0.0);
6
6
  return;
7
7
  }
8
+
8
9
  vec4 frontFace = texture(frontFaceTexture, uv);
9
- vec4 srcColor = texture(colorTexture, uv);
10
- ${t(!m,"float frontWeight = srcAlpha * floatBlendOutputScale;\n frontWeight = clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0);\n\n float toAlpha = (1.0 + frontFace.a) * 0.5;\n frontFace.a = mix(frontFace.a, toAlpha, frontWeight);")}
10
+ ${t(!s.useFloatBlend,"float frontWeight = srcAlpha * floatBlendOutputScale;\n frontWeight = clamp((frontWeight - 0.9) * 10.0, 0.0, 1.0);\n\n float toAlpha = (1.0 + frontFace.a) * 0.5;\n frontFace.a = mix(frontFace.a, toAlpha, frontWeight);")}
11
11
 
12
- vec4 emission = texture(emissionTexture, uv);
13
- emission.rgb *= floatBlendInputScale;
12
+ float srcColorAlpha = texture(colorTexture, uv).a;
13
+ vec3 emission = texture(emissionTexture, uv).rgb * floatBlendInputScale;
14
14
  vec4 emissionFrontFace = texture(frontFaceEmissionTexture, uv);
15
15
  emissionFrontFace.rgb *= floatBlendInputScale;
16
16
 
17
17
  // Modulate transparent emitter by front faces. This case is important for surfaces which contain emitter and
18
18
  // non-emitter at the same time. Non-emitter surface parts need to modulate emissions as well.
19
- emission.rgb = emission.rgb * (1.0 - frontFace.a);
20
-
21
- fragEmission = vec4(mix(emission.rgb / srcAlpha, emissionFrontFace.rgb, emissionFrontFace.a) * floatBlendOutputScale, 1.0 - srcColor.a);
22
- `),l}const u=Object.freeze(Object.defineProperty({__proto__:null,OITBlendEmissionPassParameters:l,build:c},Symbol.toStringTag,{value:"Module"}));export{u as O,l as a,c as b};
19
+ emission = emission * (1.0 - frontFace.a);
20
+ emission = mix(emission / srcAlpha, emissionFrontFace.rgb, emissionFrontFace.a) * (1.0 - srcColorAlpha);
21
+ fragEmission = vec4(emission * floatBlendOutputScale, 1.0 - srcColorAlpha);
22
+ `),l}const u=Object.freeze(Object.defineProperty({__proto__:null,OITBlendEmissionPassParameters:l,build:c},Symbol.toStringTag,{value:"Module"}));export{l as O,u as a,c as b};
@@ -1,10 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{emissionDimming as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js";import{glsl as s}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as o}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{alphaCutoff as i}from"../views/3d/webgl-engine/shaders/alphaCutoff.glsl.js";import{oitResolution as l}from"../views/3d/webgl-engine/shaders/oitResolution.glsl.js";import{NoParameters as a}from"../views/webgl/NoParameters.js";import{ShaderBuilder as n}from"../views/webgl/ShaderBuilder.js";class t extends a{}function m(a){const t=new n;t.include(e);const{fragment:m,outputs:u}=t;return u.add("fragEmission","vec4",1),m.include(r),m.include(l,a),m.include(i),m.uniforms.add(new o("colorTexture",e=>e.colorTexture),new o("alphaTexture",e=>e.alphaTexture)).main.add(s`float srcAlpha = texture(alphaTexture, uv).r * floatBlendInputScale;
3
- if(srcAlpha < alphaCutoff) {
4
- fragEmission = vec4(1.0);
5
- return;
6
- }
7
- vec4 srcColor = texture(colorTexture, uv);
8
- srcColor.rgb *= floatBlendInputScale / srcAlpha;
9
- vec3 dimming = emissionDimming(srcColor.rgb, srcColor.a);
10
- fragEmission = vec4(dimming, 0.0);`),t}const u=Object.freeze(Object.defineProperty({__proto__:null,OITDimOpaquePassParameters:t,build:m},Symbol.toStringTag,{value:"Module"}));export{t as O,u as a,m as b};
2
+ import{ScreenSpacePass as e}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{emissionDimming as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js";import{glsl as i}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{oitBlendFragment as n}from"../views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";function o(o){const t=new s;t.include(e);const{fragment:l,outputs:a}=t;return a.add("fragEmission","vec4",1),l.include(n,o),l.include(r,o),l.main.add(i`vec4 transparentColor = oitBlendFragment();
3
+ vec3 dimming = emissionDimming(transparentColor.rgb, 1.0 - transparentColor.a);
4
+ fragEmission = vec4(dimming, 0.0);`),t}const t=Object.freeze(Object.defineProperty({__proto__:null,build:o},Symbol.toStringTag,{value:"Module"}));export{t as O,o as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- async function r(r={}){var e,t=r,n="./this.program",a="",o="";function i(r){return t.locateFile?t.locateFile(r,o):o+r}try{o=new URL(".",a).href}catch{}e=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)};var u,s,l,f,c,p,h,v,d,y,g,m,w,T,b=console.log.bind(console),A=console.error.bind(console),C=!1,W=!1;function F(){var r=$e.buffer;v=new Int8Array(r),c=new Int16Array(r),t.HEAPU8=T=new Uint8Array(r),g=new Uint16Array(r),p=new Int32Array(r),t.HEAPU32=m=new Uint32Array(r),d=new Float32Array(r),t.HEAPF64=y=new Float64Array(r),h=new BigInt64Array(r),w=new BigUint64Array(r)}function P(){if(t.preRun)for("function"==typeof t.preRun&&(t.preRun=[t.preRun]);t.preRun.length;)H(t.preRun.shift());D(O)}function $(){W=!0,Xe.I()}function E(){if(t.postRun)for("function"==typeof t.postRun&&(t.postRun=[t.postRun]);t.postRun.length;)k(t.postRun.shift());D(B)}function R(r){t.onAbort?.(r),A(r=`Aborted(${r})`),C=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw l?.(e),e}function x(){return t.locateFile?i("lyr3DMain.wasm"):new URL("lyr3DMain.wasm","").href}function _(r){if(r==f&&u)return new Uint8Array(u);throw"both async and sync fetching of the wasm failed"}async function I(r){if(!u)try{var t=await e(r);return new Uint8Array(t)}catch{}return _(r)}async function V(r,e){try{var t=await I(r);return await WebAssembly.instantiate(t,e)}catch(n){A(`failed to asynchronously prepare wasm: ${n}`),R(n)}}async function S(r,e,t){if(!r)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(a){A(`wasm streaming compile failed: ${a}`),A("falling back to ArrayBuffer instantiation")}return V(e,t)}function U(){return{a:Ze}}async function M(){function r(r,e){return Qe(Xe=r.exports),F(),Xe}function e(e){return r(e.instance)}var n=U();return t.instantiateWasm?new Promise((e,a)=>{t.instantiateWasm(n,(t,n)=>{e(r(t))})}):(f??=x(),e(await S(u,f,n)))}var D=r=>{for(;r.length>0;)r.shift()(t)},B=[],k=r=>B.push(r),O=[],H=r=>O.push(r);class N{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){m[this.ptr+4>>2]=r}get_type(){return m[this.ptr+4>>2]}set_destructor(r){m[this.ptr+8>>2]=r}get_destructor(){return m[this.ptr+8>>2]}set_caught(r){r=r?1:0,v[this.ptr+12]=r}get_caught(){return 0!=v[this.ptr+12]}set_rethrown(r){r=r?1:0,v[this.ptr+13]=r}get_rethrown(){return 0!=v[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){m[this.ptr+16>>2]=r}get_adjusted_ptr(){return m[this.ptr+16>>2]}}var j=(r,e,t)=>{new N(r).init(e,t),R()},L=()=>R(""),z={},G=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function Y(r){return this.fromWireType(m[r>>2])}var q={},J={},K={},Q=class extends Error{constructor(r){super(r),this.name="InternalError"}},X=r=>{throw new Q(r)},Z=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&X("Mismatched type converter count");for(var a=0;a<r.length;++a)ur(r[a],n[a])}r.forEach(r=>K[r]=e);var a=new Array(e.length),o=[],i=0;for(let[u,s]of e.entries())J.hasOwnProperty(s)?a[u]=J[s]:(o.push(s),q.hasOwnProperty(s)||(q[s]=[]),q[s].push(()=>{a[u]=J[s],++i===o.length&&n(a)}));0===o.length&&n(a)},rr=r=>{var e=z[r];delete z[r];var t=e.elements,n=t.length,a=t.map(r=>r.getterReturnType).concat(t.map(r=>r.setterArgumentType)),o=e.rawConstructor,i=e.rawDestructor;Z([r],a,r=>{for(const[e,a]of t.entries()){const t=r[e],o=a.getter,i=a.getterContext,u=r[e+n],s=a.setter,l=a.setterContext;a.read=r=>t.fromWireType(o(i,r)),a.write=(r,e)=>{var t=[];s(l,r,u.toWireType(t,e)),G(t)}}return[{name:e.name,fromWireType:r=>{for(var e=new Array(n),a=0;a<n;++a)e[a]=t[a].read(r);return i(r),e},toWireType:(r,a)=>{if(n!==a.length)throw new TypeError(`Incorrect number of tuple elements for ${e.name}: expected=${n}, actual=${a.length}`);for(var u=o(),s=0;s<n;++s)t[s].write(u,a[s]);return null!==r&&r.push(i,u),u},readValueFromPointer:Y,destructorFunction:i}]})},er={},tr=r=>{var e=er[r];delete er[r];var t=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(r=>r.getterReturnType).concat(a.map(r=>r.setterArgumentType));Z([r],o,r=>{var o={};for(var[i,u]of a.entries()){const e=r[i],t=u.getter,n=u.getterContext,s=r[i+a.length],l=u.setter,f=u.setterContext;o[u.fieldName]={read:r=>e.fromWireType(t(n,r)),write:(r,e)=>{var t=[];l(f,r,s.toWireType(t,e)),G(t)},optional:e.optional}}return[{name:e.name,fromWireType:r=>{var e={};for(var t in o)e[t]=o[t].read(r);return n(r),e},toWireType:(r,e)=>{for(var a in o)if(!(a in e)&&!o[a].optional)throw new TypeError(`Missing field: "${a}"`);var i=t();for(a in o)o[a].write(i,e[a]);return null!==r&&r.push(n,i),i},readValueFromPointer:Y,destructorFunction:n}]})},nr=r=>{for(var e="";;){var t=T[r++];if(!t)return e;e+=String.fromCharCode(t)}},ar=class extends Error{constructor(r){super(r),this.name="BindingError"}},or=r=>{throw new ar(r)};function ir(r,e,t={}){var n=e.name;if(r||or(`type "${n}" must have a positive integer typeid pointer`),J.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;or(`Cannot register type '${n}' twice`)}if(J[r]=e,delete K[r],q.hasOwnProperty(r)){var a=q[r];delete q[r],a.forEach(r=>r())}}function ur(r,e,t={}){return ir(r,e,t)}var sr=(r,e,t)=>{switch(e){case 1:return t?r=>v[r]:r=>T[r];case 2:return t?r=>c[r>>1]:r=>g[r>>1];case 4:return t?r=>p[r>>2]:r=>m[r>>2];case 8:return t?r=>h[r>>3]:r=>w[r>>3];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},lr=(r,e,t,n,a)=>{e=nr(e);const o=0n===n;let i=r=>r;if(o){const r=8*t;i=e=>BigInt.asUintN(r,e),a=i(a)}ur(r,{name:e,fromWireType:i,toWireType:(r,e)=>("number"==typeof e&&(e=BigInt(e)),e),readValueFromPointer:sr(e,t,!o),destructorFunction:null})},fr=(r,e,t,n)=>{ur(r,{name:e=nr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},readValueFromPointer:function(r){return this.fromWireType(T[r])},destructorFunction:null})},cr=[],pr=[0,1,,1,null,1,!0,1,!1,1],hr=r=>{r>9&&0===--pr[r+1]&&(pr[r]=void 0,cr.push(r))},vr={toValue:r=>(r||or(`Cannot use deleted val. handle = ${r}`),pr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=cr.pop()||pr.length;return pr[e]=r,pr[e+1]=1,e}}}},dr={name:"emscripten::val",fromWireType:r=>{var e=vr.toValue(r);return hr(r),e},toWireType:(r,e)=>vr.toHandle(e),readValueFromPointer:Y,destructorFunction:null},yr=r=>ur(r,dr),gr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(d[r>>2])};case 8:return function(r){return this.fromWireType(y[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},mr=(r,e,t)=>{ur(r,{name:e=nr(e),fromWireType:r=>r,toWireType:(r,e)=>e,readValueFromPointer:gr(e,t),destructorFunction:null})},wr=(r,e)=>Object.defineProperty(e,"name",{value:r});function Tr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function br(r,e,t,n,a,o){var i=e.length;i<2&&or("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var u=Tr(e),s=!e[0].isVoid,l=i-2,f=new Array(l),c=[],p=[];return wr(r,function(...r){var t;p.length=0,c.length=1,c[0]=a;for(var o=0;o<l;++o)f[o]=e[o+2].toWireType(p,r[o]),c.push(f[o]);function i(r){if(u)G(p);else for(var n=2;n<e.length;n++){var a=1===n?t:f[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(a)}if(s)return e[0].fromWireType(r)}return i(n(...c))})}var Ar=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||or(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Cr=(r,e,n)=>{t.hasOwnProperty(r)?((void 0===n||void 0!==t[r].overloadTable&&void 0!==t[r].overloadTable[n])&&or(`Cannot register public name '${r}' twice`),Ar(t,r,r),t[r].overloadTable.hasOwnProperty(n)&&or(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`),t[r].overloadTable[n]=e):(t[r]=e,t[r].argCount=n)},Wr=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(m[e+4*n>>2]);return t},Fr=(r,e,n)=>{t.hasOwnProperty(r)||X("Replacing nonexistent public symbol"),void 0!==t[r].overloadTable&&void 0!==n?t[r].overloadTable[n]=e:(t[r]=e,t[r].argCount=n)},Pr=[],$r=r=>{var e=Pr[r];return e||(Pr[r]=e=Ee.get(r)),e},Er=(r,e,t=!1)=>{function n(){return $r(e)}r=nr(r);var a=n();return"function"!=typeof a&&or(`unknown function pointer with signature ${r}: ${e}`),a};class Rr extends Error{}var xr=r=>{var e=We(r),t=nr(e);return Pe(e),t},_r=(r,e)=>{var t=[],n={};function a(r){n[r]||J[r]||(K[r]?K[r].forEach(a):(t.push(r),n[r]=!0))}throw e.forEach(a),new Rr(`${r}: `+t.map(xr).join([", "]))},Ir=r=>{const e=(r=r.trim()).indexOf("(");return-1===e?r:r.slice(0,e)},Vr=(r,e,t,n,a,o,i,u)=>{var s=Wr(e,t);r=nr(r),r=Ir(r),a=Er(n,a,i),Cr(r,function(){_r(`Cannot call ${r} due to unbound types`,s)},e-1),Z([],s,t=>{var n=[t[0],null].concat(t.slice(1));return Fr(r,br(r,n,null,a,o),e-1),[]})},Sr=(r,e,t,n,a)=>{e=nr(e);let o=r=>r;if(0===n){var i=32-8*t;o=r=>r<<i>>>i,a=o(a)}ur(r,{name:e,fromWireType:o,toWireType:(r,e)=>e,readValueFromPointer:sr(e,t,0!==n),destructorFunction:null})},Ur=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][e];function a(r){var e=m[r>>2],t=m[r+4>>2];return new n(v.buffer,t,e)}ur(r,{name:t=nr(t),fromWireType:a,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},Mr=(r,e,t,n)=>{if(!(n>0))return 0;for(var a=t,o=t+n-1,i=0;i<r.length;++i){var u=r.codePointAt(i);if(u<=127){if(t>=o)break;e[t++]=u}else if(u<=2047){if(t+1>=o)break;e[t++]=192|u>>6,e[t++]=128|63&u}else if(u<=65535){if(t+2>=o)break;e[t++]=224|u>>12,e[t++]=128|u>>6&63,e[t++]=128|63&u}else{if(t+3>=o)break;e[t++]=240|u>>18,e[t++]=128|u>>12&63,e[t++]=128|u>>6&63,e[t++]=128|63&u,i++}}return e[t]=0,t-a},Dr=(r,e,t)=>Mr(r,T,e,t),Br=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},kr=globalThis.TextDecoder&&new TextDecoder,Or=(r,e,t,n)=>{var a=e+t;if(n)return a;for(;r[e]&&!(e>=a);)++e;return e},Hr=(r,e=0,t,n)=>{var a=Or(r,e,t,n);if(a-e>16&&r.buffer&&kr)return kr.decode(r.subarray(e,a));for(var o="";e<a;){var i=r[e++];if(128&i){var u=63&r[e++];if(192!=(224&i)){var s=63&r[e++];if((i=224==(240&i)?(15&i)<<12|u<<6|s:(7&i)<<18|u<<12|s<<6|63&r[e++])<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else o+=String.fromCharCode((31&i)<<6|u)}else o+=String.fromCharCode(i)}return o},Nr=(r,e,t)=>r?Hr(T,r,e,t):"",jr=(r,e)=>{ur(r,{name:e=nr(e),fromWireType(r){var e,t=m[r>>2];return e=Nr(r+4,t,!0),Pe(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||ArrayBuffer.isView(e)&&1==e.BYTES_PER_ELEMENT||or("Cannot pass non-string to std::string"),t=n?Br(e):e.length;var a=Fe(4+t+1),o=a+4;return m[a>>2]=t,n?Dr(e,o,t+1):T.set(e,o),null!==r&&r.push(Pe,a),a},readValueFromPointer:Y,destructorFunction(r){Pe(r)}})},Lr=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,zr=(r,e,t)=>{var n=r>>1,a=Or(g,n,e/2,t);if(a-n>16&&Lr)return Lr.decode(g.subarray(n,a));for(var o="",i=n;i<a;++i){var u=g[i];o+=String.fromCharCode(u)}return o},Gr=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,a=(t-=2)<2*r.length?t/2:r.length,o=0;o<a;++o){var i=r.charCodeAt(o);c[e>>1]=i,e+=2}return c[e>>1]=0,e-n},Yr=r=>2*r.length,qr=(r,e,t)=>{for(var n="",a=r>>2,o=0;!(o>=e/4);o++){var i=m[a+o];if(!i&&!t)break;n+=String.fromCodePoint(i)}return n},Jr=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,a=n+t-4,o=0;o<r.length;++o){var i=r.codePointAt(o);if(i>65535&&o++,p[e>>2]=i,(e+=4)+4>a)break}return p[e>>2]=0,e-n},Kr=r=>{for(var e=0,t=0;t<r.length;++t){r.codePointAt(t)>65535&&t++,e+=4}return e},Qr=(r,e,t)=>{var n,a,o;t=nr(t),2===e?(n=zr,a=Gr,o=Yr):(n=qr,a=Jr,o=Kr),ur(r,{name:t,fromWireType:r=>{var t=m[r>>2],a=n(r+4,t*e,!0);return Pe(r),a},toWireType:(r,n)=>{"string"!=typeof n&&or(`Cannot pass non-string to C++ string type ${t}`);var i=o(n),u=Fe(4+i+e);return m[u>>2]=i/e,a(n,u+4,i+e),null!==r&&r.push(Pe,u),u},readValueFromPointer:Y,destructorFunction(r){Pe(r)}})},Xr=(r,e,t,n,a,o)=>{z[r]={name:nr(e),rawConstructor:Er(t,n),rawDestructor:Er(a,o),elements:[]}},Zr=(r,e,t,n,a,o,i,u,s)=>{z[r].elements.push({getterReturnType:e,getter:Er(t,n),getterContext:a,setterArgumentType:o,setter:Er(i,u),setterContext:s})},re=(r,e,t,n,a,o)=>{er[r]={name:nr(e),rawConstructor:Er(t,n),rawDestructor:Er(a,o),fields:[]}},ee=(r,e,t,n,a,o,i,u,s,l)=>{er[r].fields.push({fieldName:nr(e),getterReturnType:t,getter:Er(n,a),getterContext:o,setterArgumentType:i,setter:Er(u,s),setterContext:l})},te=(r,e)=>{ur(r,{isVoid:!0,name:e=nr(e),fromWireType:()=>{},toWireType:(r,e)=>{}})},ne=[],ae=r=>{var e=ne.length;return ne.push(r),e},oe=(r,e)=>{var t=J[r];return void 0===t&&or(`${e} has unknown type ${xr(r)}`),t},ie=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=oe(m[e+4*n>>2],`parameter ${n}`);return t},ue=(r,e,t)=>{var n=[],a=r(n,t);return n.length&&(m[e>>2]=vr.toHandle(n)),a},se={},le=r=>{var e=se[r];return void 0===e?nr(r):e},fe=(r,e,t)=>{var n=8,[a,...o]=ie(r,e),i=a.toWireType.bind(a),u=o.map(r=>r.readValueFromPointer.bind(r));r--;var s=new Array(r),l=(e,a,o,l)=>{for(var f,c=0,p=0;p<r;++p)s[p]=u[p](l+c),c+=n;switch(t){case 0:f=vr.toValue(e).apply(null,s);break;case 2:f=Reflect.construct(vr.toValue(e),s);break;case 3:f=s[0];break;case 1:f=vr.toValue(e)[le(a)](...s)}return ue(i,o,f)},f=`methodCaller<(${o.map(r=>r.name)}) => ${a.name}>`;return ae(wr(f,l))},ce=r=>{r>9&&(pr[r+1]+=1)},pe=(r,e,t,n,a)=>ne[r](e,t,n,a),he=()=>vr.toHandle([]),ve=r=>vr.toHandle(le(r)),de=()=>vr.toHandle({}),ye=r=>{var e=vr.toValue(r);G(e),hr(r)},ge=(r,e,t)=>{r=vr.toValue(r),e=vr.toValue(e),t=vr.toValue(t),r[e]=t},me=(r,e,t,n)=>{var a=(new Date).getFullYear(),o=new Date(a,0,1),i=new Date(a,6,1),u=o.getTimezoneOffset(),s=i.getTimezoneOffset(),l=Math.max(u,s);m[r>>2]=60*l,p[e>>2]=Number(u!=s);var f=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=f(u),h=f(s);s<u?(Dr(c,t,17),Dr(h,n,17)):(Dr(c,n,17),Dr(h,t,17))},we=()=>performance.now(),Te=()=>Date.now(),be=r=>r>=0&&r<=3;function Ae(r,e,t){if(!be(r))return 28;var n;n=0===r?Te():we();var a=Math.round(1e3*n*1e3);return h[t>>3]=BigInt(a),0}var Ce,We,Fe,Pe,$e,Ee,Re=()=>2147483648,xe=(r,e)=>Math.ceil(r/e)*e,_e=r=>{var e=(r-$e.buffer.byteLength+65535)/65536|0;try{return $e.grow(e),F(),1}catch(t){}},Ie=r=>{var e=T.length;r>>>=0;var t=Re();if(r>t)return!1;for(var n=1;n<=4;n*=2){var a=e*(1+.2/n);a=Math.min(a,r+100663296);var o=Math.min(t,xe(Math.max(r,a),65536));if(_e(o))return!0}return!1},Ve={},Se=()=>n,Ue=()=>{if(!Ue.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:Se()};for(var e in Ve)void 0===Ve[e]?delete r[e]:r[e]=Ve[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Ue.strings=t}return Ue.strings},Me=(r,e)=>{var t=0,n=0;for(var a of Ue()){var o=e+t;m[r+n>>2]=o,t+=Dr(a,o,1/0)+1,n+=4}return 0},De=(r,e)=>{var t=Ue();m[r>>2]=t.length;var n=0;for(var a of t)n+=Br(a)+1;return m[e>>2]=n,0},Be=[null,[],[]],ke=(r,e)=>{var t=Be[r];0===e||10===e?((1===r?b:A)(Hr(t)),t.length=0):t.push(e)},Oe=(r,e,t,n)=>{for(var a=0,o=0;o<t;o++){var i=m[e>>2],u=m[e+4>>2];e+=8;for(var s=0;s<u;s++)ke(r,T[i+s]);a+=u}return m[n>>2]=a,0},He=(r,e)=>{if(Ce)for(var t=r;t<r+e;t++){var n=$r(t);n&&Ce.set(n,t)}},Ne=r=>(Ce||(Ce=new WeakMap,He(0,Ee.length)),Ce.get(r)||0),je=[],Le=()=>je.length?je.pop():Ee.grow(1),ze=(r,e)=>{Ee.set(r,e),Pr[r]=Ee.get(r)},Ge=r=>{const e=r.length;return[e%128|128,e>>7,...r]},Ye={i:127,p:127,j:126,f:125,d:124,e:111},qe=r=>Ge(Array.from(r,r=>Ye[r])),Je=(r,e)=>{var t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Ge([1,96,...qe(e.slice(1)),...qe("v"===e[0]?"":e[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(t);return new WebAssembly.Instance(n,{e:{f:r}}).exports.f},Ke=(r,e)=>{var t=Ne(r);if(t)return t;var n=Le();try{ze(n,r)}catch(A){if(!(A instanceof TypeError))throw A;var a=Je(r,e);ze(n,a)}return Ce.set(r,n),n};if(t.noExitRuntime&&t.noExitRuntime,t.print&&(b=t.print),t.printErr&&(A=t.printErr),t.wasmBinary&&(u=t.wasmBinary),t.arguments&&t.arguments,t.thisProgram&&(n=t.thisProgram),t.preInit)for("function"==typeof t.preInit&&(t.preInit=[t.preInit]);t.preInit.length>0;)t.preInit.shift()();function Qe(r){We=r.J,Fe=t._malloc=r.L,Pe=t._free=r.M,$e=r.H,Ee=r.K}t.addFunction=Ke,t.UTF8ToString=Nr;var Xe,Ze={c:j,B:L,n:rr,r:tr,v:lr,F:fr,D:yr,u:mr,b:Vr,i:Sr,d:Ur,E:jr,q:Qr,o:Xr,h:Zr,s:re,g:ee,G:te,j:fe,a:hr,p:ce,m:pe,C:he,e:ve,k:de,l:ye,f:ge,w:me,z:Ae,A:Ie,x:Me,y:De,t:Oe};function rt(){function r(){t.calledRun=!0,C||($(),s?.(t),t.onRuntimeInitialized?.(),E())}P(),t.setStatus?(t.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>t.setStatus(""),1),r()},1)):r()}return Xe=await M(),rt(),W?t:new Promise((r,e)=>{s=r,l=e})}export{r as default};
2
+ async function e(e={}){var r,t,n=e,o="./this.program",a="",i="";function s(e){return n.locateFile?n.locateFile(e,i):i+e}try{i=new URL(".",a).href}catch{}r=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)};var l,u,d,c,m,f,h,p,v,w,g,y,E,k,b=console.log.bind(console),_=console.error.bind(console),T=!1,A=!1;function D(){var e=wt.buffer;p=new Int8Array(e),m=new Int16Array(e),n.HEAPU8=k=new Uint8Array(e),g=new Uint16Array(e),f=new Int32Array(e),n.HEAPU32=y=new Uint32Array(e),v=new Float32Array(e),n.HEAPF64=w=new Float64Array(e),h=new BigInt64Array(e),E=new BigUint64Array(e)}function F(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)L(n.preRun.shift());I(O)}function P(){A=!0,n.noFSInit||at.initialized||at.init(),Ct.L(),at.ignorePermissions=!1}function S(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)j(n.postRun.shift());I(W)}function C(e){n.onAbort?.(e),_(e=`Aborted(${e})`),T=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw d?.(r),r}function x(){return n.locateFile?s("lyr3DMain.wasm"):new URL("lyr3DMain.wasm","").href}function M(e){if(e==c&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}async function R(e){if(!l)try{var t=await r(e);return new Uint8Array(t)}catch{}return M(e)}async function N(e,r){try{var t=await R(e);return await WebAssembly.instantiate(t,r)}catch(n){_(`failed to asynchronously prepare wasm: ${n}`),C(n)}}async function z(e,r,t){if(!e)try{var n=fetch(r,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(o){_(`wasm streaming compile failed: ${o}`),_("falling back to ArrayBuffer instantiation")}return N(r,t)}function B(){return{a:xt}}async function $(){function e(e,r){return St(Ct=e.exports),D(),Ct}function r(r){return e(r.instance)}var t=B();return n.instantiateWasm?new Promise((r,o)=>{n.instantiateWasm(t,(t,n)=>{r(e(t))})}):(c??=x(),r(await z(l,c,t)))}var I=e=>{for(;e.length>0;)e.shift()(n)},W=[],j=e=>W.push(e),O=[],L=e=>O.push(e);class U{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){y[this.ptr+4>>2]=e}get_type(){return y[this.ptr+4>>2]}set_destructor(e){y[this.ptr+8>>2]=e}get_destructor(){return y[this.ptr+8>>2]}set_caught(e){e=e?1:0,p[this.ptr+12]=e}get_caught(){return 0!=p[this.ptr+12]}set_rethrown(e){e=e?1:0,p[this.ptr+13]=e}get_rethrown(){return 0!=p[this.ptr+13]}init(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)}set_adjusted_ptr(e){y[this.ptr+16>>2]=e}get_adjusted_ptr(){return y[this.ptr+16>>2]}}var H=(e,r,t)=>{new U(e).init(r,t),C()},V=()=>C(""),q={},X=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function G(e){return this.fromWireType(y[e>>2])}var K={},Y={},J={},Q=class extends Error{constructor(e){super(e),this.name="InternalError"}},Z=e=>{throw new Q(e)},ee=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Z("Mismatched type converter count");for(var o=0;o<e.length;++o)le(e[o],n[o])}e.forEach(e=>J[e]=r);var o=new Array(r.length),a=[],i=0;for(let[s,l]of r.entries())Y.hasOwnProperty(l)?o[s]=Y[l]:(a.push(l),K.hasOwnProperty(l)||(K[l]=[]),K[l].push(()=>{o[s]=Y[l],++i===a.length&&n(o)}));0===a.length&&n(o)},re=e=>{var r=q[e];delete q[e];var t=r.elements,n=t.length,o=t.map(e=>e.getterReturnType).concat(t.map(e=>e.setterArgumentType)),a=r.rawConstructor,i=r.rawDestructor;ee([e],o,e=>{for(const[r,o]of t.entries()){const t=e[r],a=o.getter,i=o.getterContext,s=e[r+n],l=o.setter,u=o.setterContext;o.read=e=>t.fromWireType(a(i,e)),o.write=(e,r)=>{var t=[];l(u,e,s.toWireType(t,r)),X(t)}}return[{name:r.name,fromWireType:e=>{for(var r=new Array(n),o=0;o<n;++o)r[o]=t[o].read(e);return i(e),r},toWireType:(e,o)=>{if(n!==o.length)throw new TypeError(`Incorrect number of tuple elements for ${r.name}: expected=${n}, actual=${o.length}`);for(var s=a(),l=0;l<n;++l)t[l].write(s,o[l]);return null!==e&&e.push(i,s),s},readValueFromPointer:G,destructorFunction:i}]})},te={},ne=e=>{var r=te[e];delete te[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map(e=>e.getterReturnType).concat(o.map(e=>e.setterArgumentType));ee([e],a,e=>{var a={};for(var[i,s]of o.entries()){const r=e[i],t=s.getter,n=s.getterContext,l=e[i+o.length],u=s.setter,d=s.setterContext;a[s.fieldName]={read:e=>r.fromWireType(t(n,e)),write:(e,r)=>{var t=[];u(d,e,l.toWireType(t,r)),X(t)},optional:r.optional}}return[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r)&&!a[o].optional)throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},readValueFromPointer:G,destructorFunction:n}]})},oe=e=>{for(var r="";;){var t=k[e++];if(!t)return r;r+=String.fromCharCode(t)}},ae=class extends Error{constructor(e){super(e),this.name="BindingError"}},ie=e=>{throw new ae(e)};function se(e,r,t={}){var n=r.name;if(e||ie(`type "${n}" must have a positive integer typeid pointer`),Y.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;ie(`Cannot register type '${n}' twice`)}if(Y[e]=r,delete J[e],K.hasOwnProperty(e)){var o=K[e];delete K[e],o.forEach(e=>e())}}function le(e,r,t={}){return se(e,r,t)}var ue=(e,r,t)=>{switch(r){case 1:return t?e=>p[e]:e=>k[e];case 2:return t?e=>m[e>>1]:e=>g[e>>1];case 4:return t?e=>f[e>>2]:e=>y[e>>2];case 8:return t?e=>h[e>>3]:e=>E[e>>3];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},de=(e,r,t,n,o)=>{r=oe(r);const a=0n===n;let i=e=>e;if(a){const e=8*t;i=r=>BigInt.asUintN(e,r),o=i(o)}le(e,{name:r,fromWireType:i,toWireType:(e,r)=>("number"==typeof r&&(r=BigInt(r)),r),readValueFromPointer:ue(r,t,!a),destructorFunction:null})},ce=(e,r,t,n)=>{le(e,{name:r=oe(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},readValueFromPointer:function(e){return this.fromWireType(k[e])},destructorFunction:null})},me=[],fe=[0,1,,1,null,1,!0,1,!1,1],he=e=>{e>9&&0===--fe[e+1]&&(fe[e]=void 0,me.push(e))},pe={toValue:e=>(e||ie(`Cannot use deleted val. handle = ${e}`),fe[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=me.pop()||fe.length;return fe[r]=e,fe[r+1]=1,r}}}},ve={name:"emscripten::val",fromWireType:e=>{var r=pe.toValue(e);return he(e),r},toWireType:(e,r)=>pe.toHandle(r),readValueFromPointer:G,destructorFunction:null},we=e=>le(e,ve),ge=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(v[e>>2])};case 8:return function(e){return this.fromWireType(w[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ye=(e,r,t)=>{le(e,{name:r=oe(r),fromWireType:e=>e,toWireType:(e,r)=>r,readValueFromPointer:ge(r,t),destructorFunction:null})},Ee=(e,r)=>Object.defineProperty(r,"name",{value:e});function ke(e){for(var r=1;r<e.length;++r)if(null!==e[r]&&void 0===e[r].destructorFunction)return!0;return!1}function be(e,r,t,n,o,a){var i=r.length;i<2&&ie("argTypes array size mismatch! Must at least get return value and 'this' types!"),r[1];var s=ke(r),l=!r[0].isVoid,u=i-2,d=new Array(u),c=[],m=[];return Ee(e,function(...e){var t;m.length=0,c.length=1,c[0]=o;for(var a=0;a<u;++a)d[a]=r[a+2].toWireType(m,e[a]),c.push(d[a]);function i(e){if(s)X(m);else for(var n=2;n<r.length;n++){var o=1===n?t:d[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(l)return r[0].fromWireType(e)}return i(n(...c))})}var _e=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(...n){return e[r].overloadTable.hasOwnProperty(n.length)||ie(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[n.length].apply(this,n)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},Te=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&ie(`Cannot register public name '${e}' twice`),_e(n,e,e),n[e].overloadTable.hasOwnProperty(t)&&ie(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,n[e].argCount=t)},Ae=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(y[r+4*n>>2]);return t},De=(e,r,t)=>{n.hasOwnProperty(e)||Z("Replacing nonexistent public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},Fe=[],Pe=e=>{var r=Fe[e];return r||(Fe[e]=r=gt.get(e)),r},Se=(e,r,t=!1)=>{function n(){return Pe(r)}e=oe(e);var o=n();return"function"!=typeof o&&ie(`unknown function pointer with signature ${e}: ${r}`),o};class Ce extends Error{}var xe=e=>{var r=ht(e),t=oe(r);return vt(r),t},Me=(e,r)=>{var t=[],n={};function o(e){n[e]||Y[e]||(J[e]?J[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new Ce(`${e}: `+t.map(xe).join([", "]))},Re=e=>{const r=(e=e.trim()).indexOf("(");return-1===r?e:e.slice(0,r)},Ne=(e,r,t,n,o,a,i,s)=>{var l=Ae(r,t);e=oe(e),e=Re(e),o=Se(n,o,i),Te(e,function(){Me(`Cannot call ${e} due to unbound types`,l)},r-1),ee([],l,t=>{var n=[t[0],null].concat(t.slice(1));return De(e,be(e,n,null,o,a),r-1),[]})},ze=(e,r,t,n,o)=>{r=oe(r);let a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i,o=a(o)}le(e,{name:r,fromWireType:a,toWireType:(e,r)=>r,readValueFromPointer:ue(r,t,0!==n),destructorFunction:null})},Be=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][r];function o(e){var r=y[e>>2],t=y[e+4>>2];return new n(p.buffer,t,r)}le(e,{name:t=oe(t),fromWireType:o,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},$e=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.codePointAt(i);if(s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s,i++}}return r[t]=0,t-o},Ie=(e,r,t)=>$e(e,k,r,t),We=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},je=globalThis.TextDecoder&&new TextDecoder,Oe=(e,r,t,n)=>{var o=r+t;if(n)return o;for(;e[r]&&!(r>=o);)++r;return r},Le=(e,r=0,t,n)=>{var o=Oe(e,r,t,n);if(o-r>16&&e.buffer&&je)return je.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var l=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},Ue=(e,r,t)=>e?Le(k,e,r,t):"",He=(e,r)=>{le(e,{name:r=oe(r),fromWireType(e){var r,t=y[e>>2];return r=Ue(e+4,t,!0),vt(e),r},toWireType(e,r){var t;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var n="string"==typeof r;n||ArrayBuffer.isView(r)&&1==r.BYTES_PER_ELEMENT||ie("Cannot pass non-string to std::string"),t=n?We(r):r.length;var o=pt(4+t+1),a=o+4;return y[o>>2]=t,n?Ie(r,a,t+1):k.set(r,a),null!==e&&e.push(vt,o),o},readValueFromPointer:G,destructorFunction(e){vt(e)}})},Ve=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,qe=(e,r,t)=>{var n=e>>1,o=Oe(g,n,r/2,t);if(o-n>16&&Ve)return Ve.decode(g.subarray(n,o));for(var a="",i=n;i<o;++i){var s=g[i];a+=String.fromCharCode(s)}return a},Xe=(e,r,t)=>{if(t??=2147483647,t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);m[r>>1]=i,r+=2}return m[r>>1]=0,r-n},Ge=e=>2*e.length,Ke=(e,r,t)=>{for(var n="",o=e>>2,a=0;!(a>=r/4);a++){var i=y[o+a];if(!i&&!t)break;n+=String.fromCodePoint(i)}return n},Ye=(e,r,t)=>{if(t??=2147483647,t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.codePointAt(a);if(i>65535&&a++,f[r>>2]=i,(r+=4)+4>o)break}return f[r>>2]=0,r-n},Je=e=>{for(var r=0,t=0;t<e.length;++t){e.codePointAt(t)>65535&&t++,r+=4}return r},Qe=(e,r,t)=>{var n,o,a;t=oe(t),2===r?(n=qe,o=Xe,a=Ge):(n=Ke,o=Ye,a=Je),le(e,{name:t,fromWireType:e=>{var t=y[e>>2],o=n(e+4,t*r,!0);return vt(e),o},toWireType:(e,n)=>{"string"!=typeof n&&ie(`Cannot pass non-string to C++ string type ${t}`);var i=a(n),s=pt(4+i+r);return y[s>>2]=i/r,o(n,s+4,i+r),null!==e&&e.push(vt,s),s},readValueFromPointer:G,destructorFunction(e){vt(e)}})},Ze=(e,r,t,n,o,a)=>{q[e]={name:oe(r),rawConstructor:Se(t,n),rawDestructor:Se(o,a),elements:[]}},er=(e,r,t,n,o,a,i,s,l)=>{q[e].elements.push({getterReturnType:r,getter:Se(t,n),getterContext:o,setterArgumentType:a,setter:Se(i,s),setterContext:l})},rr=(e,r,t,n,o,a)=>{te[e]={name:oe(r),rawConstructor:Se(t,n),rawDestructor:Se(o,a),fields:[]}},tr=(e,r,t,n,o,a,i,s,l,u)=>{te[e].fields.push({fieldName:oe(r),getterReturnType:t,getter:Se(n,o),getterContext:a,setterArgumentType:i,setter:Se(s,l),setterContext:u})},nr=(e,r)=>{le(e,{isVoid:!0,name:r=oe(r),fromWireType:()=>{},toWireType:(e,r)=>{}})},or=[],ar=e=>{var r=or.length;return or.push(e),r},ir=(e,r)=>{var t=Y[e];return void 0===t&&ie(`${r} has unknown type ${xe(e)}`),t},sr=(e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=ir(y[r+4*n>>2],`parameter ${n}`);return t},lr=(e,r,t)=>{var n=[],o=e(n,t);return n.length&&(y[r>>2]=pe.toHandle(n)),o},ur={},dr=e=>{var r=ur[e];return void 0===r?oe(e):r},cr=(e,r,t)=>{var n=8,[o,...a]=sr(e,r),i=o.toWireType.bind(o),s=a.map(e=>e.readValueFromPointer.bind(e));e--;var l=new Array(e),u=(r,o,a,u)=>{for(var d,c=0,m=0;m<e;++m)l[m]=s[m](u+c),c+=n;switch(t){case 0:d=pe.toValue(r).apply(null,l);break;case 2:d=Reflect.construct(pe.toValue(r),l);break;case 3:d=l[0];break;case 1:d=pe.toValue(r)[dr(o)](...l)}return lr(i,a,d)},d=`methodCaller<(${a.map(e=>e.name)}) => ${o.name}>`;return ar(Ee(d,u))},mr=e=>{e>9&&(fe[e+1]+=1)},fr=(e,r,t,n,o)=>or[e](r,t,n,o),hr=()=>pe.toHandle([]),pr=e=>pe.toHandle(dr(e)),vr=()=>pe.toHandle({}),wr=e=>{var r=pe.toValue(e);X(r),he(e)},gr=(e,r,t)=>{e=pe.toValue(e),r=pe.toValue(r),t=pe.toValue(t),e[r]=t},yr=(e,r,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),u=Math.max(s,l);y[e>>2]=60*u,f[r>>2]=Number(s!=l);var d=e=>{var r=e>=0?"-":"+",t=Math.abs(e);return`UTC${r}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),m=d(l);l<s?(Ie(c,t,17),Ie(m,n,17)):(Ie(c,n,17),Ie(m,t,17))},Er=()=>performance.now(),kr=()=>Date.now(),br=e=>e>=0&&e<=3,_r=9007199254740992,Tr=-9007199254740992,Ar=e=>e<Tr||e>_r?NaN:Number(e);function Dr(e,r,t){if(!br(e))return 28;var n;n=0===e?kr():Er();var o=Math.round(1e3*n*1e3);return h[t>>3]=BigInt(o),0}var Fr=()=>2147483648,Pr=(e,r)=>Math.ceil(e/r)*r,Sr=e=>{var r=(e-wt.buffer.byteLength+65535)/65536|0;try{return wt.grow(r),D(),1}catch(t){}},Cr=e=>{var r=k.length;e>>>=0;var t=Fr();if(e>t)return!1;for(var n=1;n<=4;n*=2){var o=r*(1+.2/n);o=Math.min(o,e+100663296);var a=Math.min(t,Pr(Math.max(e,o),65536));if(Sr(a))return!0}return!1},xr={},Mr=()=>o,Rr=()=>{if(!Rr.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:Mr()};for(var r in xr)void 0===xr[r]?delete e[r]:e[r]=xr[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Rr.strings=t}return Rr.strings},Nr=(e,r)=>{var t=0,n=0;for(var o of Rr()){var a=r+t;y[e+n>>2]=a,t+=Ie(o,a,1/0)+1,n+=4}return 0},zr=(e,r)=>{var t=Rr();y[e>>2]=t.length;var n=0;for(var o of t)n+=We(o)+1;return y[r>>2]=n,0},Br={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=Br.isAbs(e),t="/"===e.slice(-1);return(e=Br.normalizeArray(e.split("/").filter(e=>!!e),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=Br.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.slice(0,-1)),t+n):"."},basename:e=>e&&e.match(/([^\/]+|\/)\/*$/)[1],join:(...e)=>Br.normalize(e.join("/")),join2:(e,r)=>Br.normalize(e+"/"+r)},$r=()=>e=>(crypto.getRandomValues(e),0),Ir=e=>(Ir=$r())(e),Wr={resolve:(...e)=>{for(var r="",t=!1,n=e.length-1;n>=-1&&!t;n--){var o=n>=0?e[n]:at.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";r=o+"/"+r,t=Br.isAbs(o)}return(t?"/":"")+(r=Br.normalizeArray(r.split("/").filter(e=>!!e),!t).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=Wr.resolve(e).slice(1),r=Wr.resolve(r).slice(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},jr=[],Or=(e,r,t)=>{var n=We(e)+1,o=new Array(n),a=$e(e,o,0,o.length);return o.length=a,o},Lr=()=>{if(!jr.length){var e=null;if(globalThis.window?.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e)return null;jr=Or(e)}return jr.shift()},Ur={ttys:[],init(){},shutdown(){},register(e,r){Ur.ttys[e]={input:[],output:[],ops:r},at.registerDevice(e,Ur.stream_ops)},stream_ops:{open(e){var r=Ur.ttys[e.node.rdev];if(!r)throw new at.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new at.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(l){throw new at.ErrnoError(29)}if(void 0===s&&0===a)throw new at.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.atime=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new at.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new at.ErrnoError(29)}return n&&(e.node.mtime=e.node.ctime=Date.now()),a}},default_tty_ops:{get_char:e=>Lr(),put_char(e,r){null===r||10===r?(b(Le(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output?.length>0&&(b(Le(e.output)),e.output=[])},ioctl_tcgets:e=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(_(Le(e.output)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output?.length>0&&(_(Le(e.output)),e.output=[])}}},Hr=e=>{C()},Vr={ops_table:null,mount:e=>Vr.createNode(null,"/",16895,0),createNode(e,r,t,n){if(at.isBlkdev(t)||at.isFIFO(t))throw new at.ErrnoError(63);Vr.ops_table||={dir:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr,lookup:Vr.node_ops.lookup,mknod:Vr.node_ops.mknod,rename:Vr.node_ops.rename,unlink:Vr.node_ops.unlink,rmdir:Vr.node_ops.rmdir,readdir:Vr.node_ops.readdir,symlink:Vr.node_ops.symlink},stream:{llseek:Vr.stream_ops.llseek}},file:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr},stream:{llseek:Vr.stream_ops.llseek,read:Vr.stream_ops.read,write:Vr.stream_ops.write,mmap:Vr.stream_ops.mmap,msync:Vr.stream_ops.msync}},link:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr,readlink:Vr.node_ops.readlink},stream:{}},chrdev:{node:{getattr:Vr.node_ops.getattr,setattr:Vr.node_ops.setattr},stream:at.chrdev_stream_ops}};var o=at.createNode(e,r,t,n);return at.isDir(o.mode)?(o.node_ops=Vr.ops_table.dir.node,o.stream_ops=Vr.ops_table.dir.stream,o.contents={}):at.isFile(o.mode)?(o.node_ops=Vr.ops_table.file.node,o.stream_ops=Vr.ops_table.file.stream,o.usedBytes=0,o.contents=Vr.emptyFileContents??=new Uint8Array(0)):at.isLink(o.mode)?(o.node_ops=Vr.ops_table.link.node,o.stream_ops=Vr.ops_table.link.stream):at.isChrdev(o.mode)&&(o.node_ops=Vr.ops_table.chrdev.node,o.stream_ops=Vr.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),e&&(e.contents[r]=o,e.atime=e.mtime=e.ctime=o.atime),o},getFileDataAsTypedArray:e=>e.contents.subarray(0,e.usedBytes),expandFileStorage(e,r){var t=e.contents.length;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),t&&(r=Math.max(r,256));var o=Vr.getFileDataAsTypedArray(e);e.contents=new Uint8Array(r),e.contents.set(o)}},resizeFileStorage(e,r){if(e.usedBytes!=r){var t=e.contents;e.contents=new Uint8Array(r),e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=at.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,at.isDir(e.mode)?r.size=4096:at.isFile(e.mode)?r.size=e.usedBytes:at.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.atime),r.mtime=new Date(e.mtime),r.ctime=new Date(e.ctime),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){for(const t of["mode","atime","mtime","ctime"])null!=r[t]&&(e[t]=r[t]);void 0!==r.size&&Vr.resizeFileStorage(e,r.size)},lookup(e,r){throw Vr.doesNotExistError||(Vr.doesNotExistError=new at.ErrnoError(44),Vr.doesNotExistError.stack="<generic error, no stack>"),Vr.doesNotExistError},mknod:(e,r,t,n)=>Vr.createNode(e,r,t,n),rename(e,r,t){var n;try{n=at.lookupNode(r,t)}catch(a){}if(n){if(at.isDir(e.mode))for(var o in n.contents)throw new at.ErrnoError(55);at.hashRemoveNode(n)}delete e.parent.contents[e.name],r.contents[t]=e,e.name=t,r.ctime=r.mtime=e.parent.ctime=e.parent.mtime=Date.now()},unlink(e,r){delete e.contents[r],e.ctime=e.mtime=Date.now()},rmdir(e,r){var t=at.lookupNode(e,r);for(var n in t.contents)throw new at.ErrnoError(55);delete e.contents[r],e.ctime=e.mtime=Date.now()},readdir:e=>[".","..",...Object.keys(e.contents)],symlink(e,r,t){var n=Vr.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!at.isLink(e.mode))throw new at.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);return r.set(a.subarray(o,o+i),t),i},write(e,r,t,n,o,a){if(r.buffer===p.buffer&&(a=!1),!n)return 0;var i=e.node;return i.mtime=i.ctime=Date.now(),a?(i.contents=r.subarray(t,t+n),i.usedBytes=n):0===i.usedBytes&&0===o?(i.contents=r.slice(t,t+n),i.usedBytes=n):(Vr.expandFileStorage(i,o+n),i.contents.set(r.subarray(t,t+n),o),i.usedBytes=Math.max(i.usedBytes,o+n)),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&at.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new at.ErrnoError(28);return n},mmap(e,r,t,n,o){if(!at.isFile(e.node.mode))throw new at.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==p.buffer){if(i=!0,!(a=Hr()))throw new at.ErrnoError(48);s&&((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),p.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(Vr.stream_ops.write(e,r,0,n,t,!1),0)}},qr=e=>{if("string"!=typeof e)return e;var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},Xr=e=>("string"==typeof e&&(e=Or(e)),e.subarray||(e=new Uint8Array(e)),e),Gr=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Kr=async e=>{var t=await r(e);return new Uint8Array(t)},Yr=(...e)=>at.createDataFile(...e),Jr=0,Qr=null,Zr=e=>{if(Jr--,n.monitorRunDependencies?.(Jr),0==Jr&&Qr){var r=Qr;Qr=null,r()}},et=e=>{Jr++,n.monitorRunDependencies?.(Jr)},rt=[],tt=async(e,r)=>{for(var t of("undefined"!=typeof Browser&&Browser.init(),rt))if(t.canHandle(r))return t.handle(e,r);return e},nt=async(e,r,t,n,o,a,i,s)=>{var l=r?Wr.resolve(Br.join2(e,r)):e;et();try{var u=t;"string"==typeof t&&(u=await Kr(t)),u=await tt(u,l),s?.(),a||Yr(e,r,u,n,o,i)}finally{Zr()}},ot=(e,r,t,n,o,a,i,s,l,u)=>{nt(e,r,t,n,o,s,l,u).then(a).catch(i)},at={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,filesystems:null,syncFSRequests:0,ErrnoError:class{name="ErrnoError";constructor(e){this.errno=e}},FSStream:class{shared={};get object(){return this.node}set object(e){this.node=e}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(e){this.shared.flags=e}get position(){return this.shared.position}set position(e){this.shared.position=e}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.id=at.nextInode++,this.name=r,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(e){e?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(e){e?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return at.isDir(this.mode)}get isDevice(){return at.isChrdev(this.mode)}},lookupPath(e,r={}){if(!e)throw new at.ErrnoError(44);r.follow_mount??=!0,Br.isAbs(e)||(e=at.cwd()+"/"+e);e:for(var t=0;t<40;t++){for(var n=e.split("/").filter(e=>!!e),o=at.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if("."!==n[i])if(".."!==n[i]){a=Br.join2(a,n[i]);try{o=at.lookupNode(o,n[i])}catch(u){if(44===u?.errno&&s&&r.noent_okay)return{path:a};throw u}if(!at.isMountpoint(o)||s&&!r.follow_mount||(o=o.mounted.root),at.isLink(o.mode)&&(!s||r.follow)){if(!o.node_ops.readlink)throw new at.ErrnoError(52);var l=o.node_ops.readlink(o);Br.isAbs(l)||(l=Br.dirname(a)+"/"+l),e=l+"/"+n.slice(i+1).join("/");continue e}}else{if(a=Br.dirname(a),at.isRoot(o)){e=a+"/"+n.slice(i+1).join("/"),t--;continue e}o=o.parent}}return{path:a,node:o}}throw new at.ErrnoError(32)},getPath(e){for(var r;;){if(at.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%at.nameTable.length},hashAddNode(e){var r=at.hashName(e.parent.id,e.name);e.name_next=at.nameTable[r],at.nameTable[r]=e},hashRemoveNode(e){var r=at.hashName(e.parent.id,e.name);if(at.nameTable[r]===e)at.nameTable[r]=e.name_next;else for(var t=at.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=at.mayLookup(e);if(t)throw new at.ErrnoError(t);for(var n=at.hashName(e.id,r),o=at.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return at.lookup(e,r)},createNode(e,r,t,n){var o=new at.FSNode(e,r,t,n);return at.hashAddNode(o),o},destroyNode(e){at.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>at.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){if(!at.isDir(e.mode))return 54;var r=at.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){if(!at.isDir(e.mode))return 54;try{at.lookupNode(e,r);return 20}catch(t){}return at.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=at.lookupNode(e,r)}catch(a){return a.errno}var o=at.nodePermissions(e,"wx");if(o)return o;if(t){if(!at.isDir(n.mode))return 54;if(at.isRoot(n)||at.getPath(n)===at.cwd())return 10}else if(at.isDir(n.mode))return 31;return 0},mayOpen(e,r){if(!e)return 44;if(at.isLink(e.mode))return 32;var t=at.flagsToPermissionString(r);return at.isDir(e.mode)&&("r"!==t||576&r)?31:at.nodePermissions(e,t)},checkOpExists(e,r){if(!e)throw new at.ErrnoError(r);return e},MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=at.MAX_OPEN_FDS;e++)if(!at.streams[e])return e;throw new at.ErrnoError(33)},getStreamChecked(e){var r=at.getStream(e);if(!r)throw new at.ErrnoError(8);return r},getStream:e=>at.streams[e],createStream:(e,r=-1)=>(e=Object.assign(new at.FSStream,e),-1==r&&(r=at.nextfd()),e.fd=r,at.streams[r]=e,e),closeStream(e){at.streams[e]=null},dupStream(e,r=-1){var t=at.createStream(e,r);return t.stream_ops?.dup?.(t),t},doSetAttr(e,r,t){var n=e?.stream_ops.setattr,o=n?e:r;n??=r.node_ops.setattr,at.checkOpExists(n,63);try{n(o,t)}catch(a){if(a instanceof RangeError)throw new at.ErrnoError(22);throw a}},chrdev_stream_ops:{open(e){var r=at.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open?.(e)},llseek(){throw new at.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){at.devices[e]={stream_ops:r}},getDevice:e=>at.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push(...n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),at.syncFSRequests++,at.syncFSRequests>1&&_(`warning: ${at.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=at.getMounts(at.root.mount),n=0;function o(e){return at.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}for(var i of t)i.type.syncfs?i.type.syncfs(i,e,a):a(null)},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&at.root)throw new at.ErrnoError(10);if(!o&&!a){var i=at.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,at.isMountpoint(n))throw new at.ErrnoError(10);if(!at.isDir(n.mode))throw new at.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,o?at.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(e){var r=at.lookupPath(e,{follow_mount:!1});if(!at.isMountpoint(r.node))throw new at.ErrnoError(28);var t=r.node,n=t.mounted,o=at.getMounts(n);for(var[a,i]of Object.entries(at.nameTable))for(;i;){var s=i.name_next;o.includes(i.mount)&&at.destroyNode(i),i=s}t.mounted=null;var l=t.mount.mounts.indexOf(n);t.mount.mounts.splice(l,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=at.lookupPath(e,{parent:!0}).node,o=Br.basename(e);if(!o)throw new at.ErrnoError(28);if("."===o||".."===o)throw new at.ErrnoError(20);var a=at.mayCreate(n,o);if(a)throw new at.ErrnoError(a);if(!n.node_ops.mknod)throw new at.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},statfs:e=>at.statfsNode(at.lookupPath(e,{follow:!0}).node),statfsStream:e=>at.statfsNode(e.node),statfsNode(e){var r={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:at.nextInode,ffree:at.nextInode-1,fsid:42,flags:2,namelen:255};return e.node_ops.statfs&&Object.assign(r,e.node_ops.statfs(e.mount.opts.root)),r},create:(e,r=438)=>(r&=4095,r|=32768,at.mknod(e,r,0)),mkdir:(e,r=511)=>(r&=1023,r|=16384,at.mknod(e,r,0)),mkdirTree(e,r){var t=e.split("/"),n="";for(var o of t)if(o){(n||Br.isAbs(e))&&(n+="/"),n+=o;try{at.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,at.mknod(e,r,t)),symlink(e,r){if(!Wr.resolve(e))throw new at.ErrnoError(44);var t=at.lookupPath(r,{parent:!0}).node;if(!t)throw new at.ErrnoError(44);var n=Br.basename(r),o=at.mayCreate(t,n);if(o)throw new at.ErrnoError(o);if(!t.node_ops.symlink)throw new at.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=Br.dirname(e),a=Br.dirname(r),i=Br.basename(e),s=Br.basename(r);if(t=at.lookupPath(e,{parent:!0}).node,n=at.lookupPath(r,{parent:!0}).node,!t||!n)throw new at.ErrnoError(44);if(t.mount!==n.mount)throw new at.ErrnoError(75);var l,u=at.lookupNode(t,i),d=Wr.relative(e,a);if("."!==d.charAt(0))throw new at.ErrnoError(28);if("."!==(d=Wr.relative(r,o)).charAt(0))throw new at.ErrnoError(55);try{l=at.lookupNode(n,s)}catch(f){}if(u!==l){var c=at.isDir(u.mode),m=at.mayDelete(t,i,c);if(m)throw new at.ErrnoError(m);if(m=l?at.mayDelete(n,s,c):at.mayCreate(n,s))throw new at.ErrnoError(m);if(!t.node_ops.rename)throw new at.ErrnoError(63);if(at.isMountpoint(u)||l&&at.isMountpoint(l))throw new at.ErrnoError(10);if(n!==t&&(m=at.nodePermissions(t,"w")))throw new at.ErrnoError(m);at.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(f){throw f}finally{at.hashAddNode(u)}}},rmdir(e){var r=at.lookupPath(e,{parent:!0}).node,t=Br.basename(e),n=at.lookupNode(r,t),o=at.mayDelete(r,t,!0);if(o)throw new at.ErrnoError(o);if(!r.node_ops.rmdir)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);r.node_ops.rmdir(r,t),at.destroyNode(n)},readdir(e){var r=at.lookupPath(e,{follow:!0}).node;return at.checkOpExists(r.node_ops.readdir,54)(r)},unlink(e){var r=at.lookupPath(e,{parent:!0}).node;if(!r)throw new at.ErrnoError(44);var t=Br.basename(e),n=at.lookupNode(r,t),o=at.mayDelete(r,t,!1);if(o)throw new at.ErrnoError(o);if(!r.node_ops.unlink)throw new at.ErrnoError(63);if(at.isMountpoint(n))throw new at.ErrnoError(10);r.node_ops.unlink(r,t),at.destroyNode(n)},readlink(e){var r=at.lookupPath(e).node;if(!r)throw new at.ErrnoError(44);if(!r.node_ops.readlink)throw new at.ErrnoError(28);return r.node_ops.readlink(r)},stat(e,r){var t=at.lookupPath(e,{follow:!r}).node;return at.checkOpExists(t.node_ops.getattr,63)(t)},fstat(e){var r=at.getStreamChecked(e),t=r.node,n=r.stream_ops.getattr,o=n?r:t;return n??=t.node_ops.getattr,at.checkOpExists(n,63),n(o)},lstat:e=>at.stat(e,!0),doChmod(e,r,t,n){at.doSetAttr(e,r,{mode:4095&t|-4096&r.mode,ctime:Date.now(),dontFollow:n})},chmod(e,r,t){var n;"string"==typeof e?n=at.lookupPath(e,{follow:!t}).node:n=e;at.doChmod(null,n,r,t)},lchmod(e,r){at.chmod(e,r,!0)},fchmod(e,r){var t=at.getStreamChecked(e);at.doChmod(t,t.node,r,!1)},doChown(e,r,t){at.doSetAttr(e,r,{timestamp:Date.now(),dontFollow:t})},chown(e,r,t,n){var o;"string"==typeof e?o=at.lookupPath(e,{follow:!n}).node:o=e;at.doChown(null,o,n)},lchown(e,r,t){at.chown(e,r,t,!0)},fchown(e,r,t){var n=at.getStreamChecked(e);at.doChown(n,n.node,!1)},doTruncate(e,r,t){if(at.isDir(r.mode))throw new at.ErrnoError(31);if(!at.isFile(r.mode))throw new at.ErrnoError(28);var n=at.nodePermissions(r,"w");if(n)throw new at.ErrnoError(n);at.doSetAttr(e,r,{size:t,timestamp:Date.now()})},truncate(e,r){if(r<0)throw new at.ErrnoError(28);var t;"string"==typeof e?t=at.lookupPath(e,{follow:!0}).node:t=e;at.doTruncate(null,t,r)},ftruncate(e,r){var t=at.getStreamChecked(e);if(r<0||!(2097155&t.flags))throw new at.ErrnoError(28);at.doTruncate(t,t.node,r)},utime(e,r,t){var n=at.lookupPath(e,{follow:!0}).node;at.checkOpExists(n.node_ops.setattr,63)(n,{atime:r,mtime:t})},open(e,r,t=438){if(""===e)throw new at.ErrnoError(44);var n,o;if(t=64&(r=qr(r))?4095&t|32768:0,"object"==typeof e)n=e;else{o=e.endsWith("/");var a=at.lookupPath(e,{follow:!(131072&r),noent_okay:!0});n=a.node,e=a.path}var i=!1;if(64&r)if(n){if(128&r)throw new at.ErrnoError(20)}else{if(o)throw new at.ErrnoError(31);n=at.mknod(e,511|t,0),i=!0}if(!n)throw new at.ErrnoError(44);if(at.isChrdev(n.mode)&&(r&=-513),65536&r&&!at.isDir(n.mode))throw new at.ErrnoError(54);if(!i){var s=at.mayOpen(n,r);if(s)throw new at.ErrnoError(s)}512&r&&!i&&at.truncate(n,0),r&=-131713;var l=at.createStream({node:n,path:at.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),i&&at.chmod(n,511&t),l},close(e){if(at.isClosed(e))throw new at.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{at.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(at.isClosed(e))throw new at.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new at.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new at.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(1==(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.read)throw new at.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new at.ErrnoError(28);if(at.isClosed(e))throw new at.ErrnoError(8);if(!(2097155&e.flags))throw new at.ErrnoError(8);if(at.isDir(e.node.mode))throw new at.ErrnoError(31);if(!e.stream_ops.write)throw new at.ErrnoError(28);e.seekable&&1024&e.flags&&at.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new at.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},mmap(e,r,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new at.ErrnoError(2);if(1==(2097155&e.flags))throw new at.ErrnoError(2);if(!e.stream_ops.mmap)throw new at.ErrnoError(43);if(!r)throw new at.ErrnoError(28);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new at.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){r.flags=r.flags??0,r.encoding=r.encoding??"binary","utf8"!==r.encoding&&"binary"!==r.encoding&&C(`Invalid encoding type "${r.encoding}"`);var t=at.open(e,r.flags),n=at.stat(e).size,o=new Uint8Array(n);return at.read(t,o,0,n,0),"utf8"===r.encoding&&(o=Le(o)),at.close(t),o},writeFile(e,r,t={}){t.flags=t.flags??577;var n=at.open(e,t.flags,t.mode);r=Xr(r),at.write(n,r,0,r.byteLength,void 0,t.canOwn),at.close(n)},cwd:()=>at.currentPath,chdir(e){var r=at.lookupPath(e,{follow:!0});if(null===r.node)throw new at.ErrnoError(44);if(!at.isDir(r.node.mode))throw new at.ErrnoError(54);var t=at.nodePermissions(r.node,"x");if(t)throw new at.ErrnoError(t);at.currentPath=r.path},createDefaultDirectories(){at.mkdir("/tmp"),at.mkdir("/home"),at.mkdir("/home/web_user")},createDefaultDevices(){at.mkdir("/dev"),at.registerDevice(at.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n,llseek:()=>0}),at.mkdev("/dev/null",at.makedev(1,3)),Ur.register(at.makedev(5,0),Ur.default_tty_ops),Ur.register(at.makedev(6,0),Ur.default_tty1_ops),at.mkdev("/dev/tty",at.makedev(5,0)),at.mkdev("/dev/tty1",at.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(Ir(e),r=e.byteLength),e[--r]);at.createDevice("/dev","random",t),at.createDevice("/dev","urandom",t),at.mkdir("/dev/shm"),at.mkdir("/dev/shm/tmp")},createSpecialDirectories(){at.mkdir("/proc");var e=at.mkdir("/proc/self");at.mkdir("/proc/self/fd"),at.mount({mount(){var r=at.createNode(e,"fd",16895,73);return r.stream_ops={llseek:Vr.stream_ops.llseek},r.node_ops={lookup(e,r){var t=+r,n=at.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(at.streams.entries()).filter(([e,r])=>r).map(([e,r])=>e.toString())},r}},{},"/proc/self/fd")},createStandardStreams(e,r,t){e?at.createDevice("/dev","stdin",e):at.symlink("/dev/tty","/dev/stdin"),r?at.createDevice("/dev","stdout",null,r):at.symlink("/dev/tty","/dev/stdout"),t?at.createDevice("/dev","stderr",null,t):at.symlink("/dev/tty1","/dev/stderr"),at.open("/dev/stdin",0),at.open("/dev/stdout",1),at.open("/dev/stderr",1)},staticInit(){at.nameTable=new Array(4096),at.mount(Vr,{},"/"),at.createDefaultDirectories(),at.createDefaultDevices(),at.createSpecialDirectories(),at.filesystems={MEMFS:Vr}},init(e,r,t){at.initialized=!0,e??=n.stdin,r??=n.stdout,t??=n.stderr,at.createStandardStreams(e,r,t)},quit(){for(var e of(at.initialized=!1,at.streams))e&&at.close(e)},findObject(e,r){var t=at.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=at.lookupPath(e,{follow:!r})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=at.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Br.basename(e),n=at.lookupPath(e,{follow:!r}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(e,r,t,n){e="string"==typeof e?e:at.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Br.join2(e,a);try{at.mkdir(i)}catch(s){if(20!=s.errno)throw s}e=i}}return i},createFile(e,r,t,n,o){var a=Br.join2("string"==typeof e?e:at.getPath(e),r),i=Gr(n,o);return at.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:at.getPath(e),i=r?Br.join2(e,r):e);var s=Gr(n,o),l=at.create(i,s);if(t){t=Xr(t),at.chmod(l,146|s);var u=at.open(l,577);at.write(u,t,0,t.length,0,a),at.close(u),at.chmod(l,s)}},createDevice(e,r,t,n){var o=Br.join2("string"==typeof e?e:at.getPath(e),r),a=Gr(!!t,!!n);at.createDevice.major??=64;var i=at.makedev(at.createDevice.major++,0);return at.registerDevice(i,{open(e){e.seekable=!1},close(e){n?.buffer?.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(u){throw new at.ErrnoError(29)}if(void 0===l&&0===i)throw new at.ErrnoError(6);if(null==l)break;i++,r[n+s]=l}return i&&(e.node.atime=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new at.ErrnoError(29)}return o&&(e.node.mtime=e.node.ctime=Date.now()),i}}),at.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if(globalThis.XMLHttpRequest)C("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");else try{e.contents=t(e.url)}catch(r){throw new at.ErrnoError(29)}},createLazyFile(e,r,t,n,o){class a{lengthKnown=!1;chunks=[];get(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}}setDataGetter(e){this.getter=e}cacheLength(){var e=new XMLHttpRequest;e.open("HEAD",t,!1),e.send(null),e.status>=200&&e.status<300||304===e.status||C("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{e>r&&C(`invalid range (${e}, ${r}) or no bytes requested!`),r>n-1&&C(`only ${n} bytes available! programmer error!`);var o=new XMLHttpRequest;return o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+e+"-"+r),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),o.status>=200&&o.status<300||304===o.status||C("Couldn't load "+t+". Status: "+o.status),void 0!==o.response?new Uint8Array(o.response||[]):Or(o.responseText??"")},l=this;l.setDataGetter(e=>{var r=e*i,t=(e+1)*i-1;return t=Math.min(t,n-1),void 0===l.chunks[e]&&(l.chunks[e]=s(r,t)),void 0===l.chunks[e]&&C("doXHR failed!"),l.chunks[e]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,b("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if(globalThis.XMLHttpRequest){C("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var s=at.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};for(const[d,c]of Object.entries(s.stream_ops))l[d]=(...e)=>(at.forceLoadFile(s),c(...e));function u(e,r,t,n,o){var a=e.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return l.read=(e,r,t,n,o)=>(at.forceLoadFile(s),u(e,r,t,n,o)),l.mmap=(e,r,t,n,o)=>{at.forceLoadFile(s);var a=Hr();if(!a)throw new at.ErrnoError(48);return u(e,p,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=l,s}},it={currentUmask:18,calculateAt(e,r,t){if(Br.isAbs(r))return r;var n;-100===e?n=at.cwd():n=it.getStreamFromFD(e).path;if(0==r.length){if(!t)throw new at.ErrnoError(44);return n}return n+"/"+r},writeStat(e,r){y[e>>2]=r.dev,y[e+4>>2]=r.mode,y[e+8>>2]=r.nlink,y[e+12>>2]=r.uid,y[e+16>>2]=r.gid,y[e+20>>2]=r.rdev,h[e+24>>3]=BigInt(r.size),f[e+32>>2]=4096,f[e+36>>2]=r.blocks;var t=r.atime.getTime(),n=r.mtime.getTime(),o=r.ctime.getTime();return h[e+40>>3]=BigInt(Math.floor(t/1e3)),y[e+48>>2]=t%1e3*1e3*1e3,h[e+56>>3]=BigInt(Math.floor(n/1e3)),y[e+64>>2]=n%1e3*1e3*1e3,h[e+72>>3]=BigInt(Math.floor(o/1e3)),y[e+80>>2]=o%1e3*1e3*1e3,h[e+88>>3]=BigInt(r.ino),0},writeStatFs(e,r){y[e+4>>2]=r.bsize,y[e+60>>2]=r.bsize,h[e+8>>3]=BigInt(r.blocks),h[e+16>>3]=BigInt(r.bfree),h[e+24>>3]=BigInt(r.bavail),h[e+32>>3]=BigInt(r.files),h[e+40>>3]=BigInt(r.ffree),y[e+48>>2]=r.fsid,y[e+64>>2]=r.flags,y[e+56>>2]=r.namelen},doMsync(e,r,t,n,o){if(!at.isFile(r.node.mode))throw new at.ErrnoError(43);if(2&n)return 0;var a=k.slice(e,e+t);at.msync(r,a,o,t,n)},getStreamFromFD:e=>at.getStreamChecked(e),varargs:void 0,getStr:e=>Ue(e)};function st(e){try{var r=it.getStreamFromFD(e);return at.close(r),0}catch(t){if(void 0===at||"ErrnoError"!==t.name)throw t;return t.errno}}var lt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=y[r>>2],s=y[r+4>>2];r+=8;var l=at.read(e,p,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function ut(e,r,t,n){try{var o=it.getStreamFromFD(e),a=lt(o,r,t);return y[n>>2]=a,0}catch(i){if(void 0===at||"ErrnoError"!==i.name)throw i;return i.errno}}function dt(e,r,t,n){r=Ar(r);try{if(isNaN(r))return 22;var o=it.getStreamFromFD(e);return at.llseek(o,r,t),h[n>>3]=BigInt(o.position),o.getdents&&0===r&&0===t&&(o.getdents=null),0}catch(a){if(void 0===at||"ErrnoError"!==a.name)throw a;return a.errno}}var ct=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=y[r>>2],s=y[r+4>>2];r+=8;var l=at.write(e,p,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function mt(e,r,t,n){try{var o=it.getStreamFromFD(e),a=ct(o,r,t);return y[n>>2]=a,0}catch(i){if(void 0===at||"ErrnoError"!==i.name)throw i;return i.errno}}var ft,ht,pt,vt,wt,gt,yt=(e,r)=>{if(ft)for(var t=e;t<e+r;t++){var n=Pe(t);n&&ft.set(n,t)}},Et=e=>(ft||(ft=new WeakMap,yt(0,gt.length)),ft.get(e)||0),kt=[],bt=()=>kt.length?kt.pop():gt.grow(1),_t=(e,r)=>{gt.set(e,r),Fe[e]=gt.get(e)},Tt=e=>{const r=e.length;return[r%128|128,r>>7,...e]},At={i:127,p:127,j:126,f:125,d:124,e:111},Dt=e=>Tt(Array.from(e,e=>At[e])),Ft=(e,r)=>{var t=Uint8Array.of(0,97,115,109,1,0,0,0,1,...Tt([1,96,...Dt(r.slice(1)),...Dt("v"===r[0]?"":r[0])]),2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0),n=new WebAssembly.Module(t);return new WebAssembly.Instance(n,{e:{f:e}}).exports.f},Pt=(e,r)=>{var t=Et(e);if(t)return t;var n=bt();try{_t(n,e)}catch(_){if(!(_ instanceof TypeError))throw _;var o=Ft(e,r);_t(n,o)}return ft.set(e,n),n};if(at.createPreloadedFile=ot,at.preloadFile=nt,at.staticInit(),n.noExitRuntime&&n.noExitRuntime,n.preloadPlugins&&(rt=n.preloadPlugins),n.print&&(b=n.print),n.printErr&&(_=n.printErr),n.wasmBinary&&(l=n.wasmBinary),n.arguments&&n.arguments,n.thisProgram&&(o=n.thisProgram),n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.shift()();function St(e){ht=e.M,pt=n._malloc=e.O,vt=n._free=e.P,wt=e.K,gt=e.N}n.addFunction=Pt,n.UTF8ToString=Ue;var Ct,xt={c:H,E:V,n:re,r:ne,v:de,I:ce,G:we,u:ye,b:Ne,i:ze,d:Be,H:He,q:Qe,o:Ze,h:er,s:rr,g:tr,J:nr,j:cr,a:he,p:mr,m:fr,F:hr,e:pr,k:vr,l:wr,f:gr,w:yr,C:Dr,D:Cr,x:Nr,y:zr,z:st,A:ut,B:dt,t:mt};function Mt(){function e(){n.calledRun=!0,T||(P(),u?.(n),n.onRuntimeInitialized?.(),S())}Jr>0?Qr=Mt:(F(),Jr>0?Qr=Mt:n.setStatus?(n.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>n.setStatus(""),1),e()},1)):e())}return Ct=await $(),Mt(),A?n:new Promise((e,r)=>{u=e,d=r})}export{e as default};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.14";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.15";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};