@xiping/react-components 1.0.29 → 1.0.31

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 (563) hide show
  1. package/dist/cjs/components/confetti-button/index.js +1 -1
  2. package/dist/cjs/components/qr-code/index.js +1 -1
  3. package/dist/cjs/components/txt-editor/TxtEditor.js +1 -1
  4. package/dist/cjs/components/video-dialog/VideoDialog.js +1 -1
  5. package/dist/cjs/hooks/useStayTimeReport.js +1 -1
  6. package/dist/cjs/index.js +1 -1
  7. package/dist/cjs/react-components.css +1 -1
  8. package/dist/es/components/confetti-button/index.js +6 -5
  9. package/dist/es/components/qr-code/index.js +1 -1
  10. package/dist/es/components/txt-editor/TxtEditor.js +10 -10
  11. package/dist/es/components/video-dialog/VideoDialog.js +11 -12
  12. package/dist/es/hooks/useStayTimeReport.js +1 -1
  13. package/dist/es/index.js +2 -2
  14. package/dist/es/react-components.css +1 -1
  15. package/package.json +16 -16
  16. package/dist/cjs/_virtual/_commonjsHelpers.js +0 -1
  17. package/dist/cjs/_virtual/alignment-pattern.js +0 -1
  18. package/dist/cjs/_virtual/browser.js +0 -1
  19. package/dist/cjs/_virtual/browser2.js +0 -1
  20. package/dist/cjs/_virtual/canvas.js +0 -1
  21. package/dist/cjs/_virtual/dijkstra.js +0 -1
  22. package/dist/cjs/_virtual/error-correction-code.js +0 -1
  23. package/dist/cjs/_virtual/error-correction-level.js +0 -1
  24. package/dist/cjs/_virtual/finder-pattern.js +0 -1
  25. package/dist/cjs/_virtual/format-info.js +0 -1
  26. package/dist/cjs/_virtual/galois-field.js +0 -1
  27. package/dist/cjs/_virtual/generateBounds.js +0 -1
  28. package/dist/cjs/_virtual/generateCreateBody.js +0 -1
  29. package/dist/cjs/_virtual/generateCreateDragForce.js +0 -1
  30. package/dist/cjs/_virtual/generateCreateSpringForce.js +0 -1
  31. package/dist/cjs/_virtual/generateIntegrator.js +0 -1
  32. package/dist/cjs/_virtual/generateQuadTree.js +0 -1
  33. package/dist/cjs/_virtual/index.js +0 -1
  34. package/dist/cjs/_virtual/index2.js +0 -1
  35. package/dist/cjs/_virtual/index3.js +0 -1
  36. package/dist/cjs/_virtual/index4.js +0 -1
  37. package/dist/cjs/_virtual/index5.js +0 -1
  38. package/dist/cjs/_virtual/index6.js +0 -1
  39. package/dist/cjs/_virtual/index7.js +0 -1
  40. package/dist/cjs/_virtual/mask-pattern.js +0 -1
  41. package/dist/cjs/_virtual/mode.js +0 -1
  42. package/dist/cjs/_virtual/polynomial.js +0 -1
  43. package/dist/cjs/_virtual/qrcode.js +0 -1
  44. package/dist/cjs/_virtual/react-is.development.js +0 -1
  45. package/dist/cjs/_virtual/react-is.production.min.js +0 -1
  46. package/dist/cjs/_virtual/regex.js +0 -1
  47. package/dist/cjs/_virtual/segments.js +0 -1
  48. package/dist/cjs/_virtual/svg-tag.js +0 -1
  49. package/dist/cjs/_virtual/utils.js +0 -1
  50. package/dist/cjs/_virtual/utils2.js +0 -1
  51. package/dist/cjs/_virtual/version-check.js +0 -1
  52. package/dist/cjs/_virtual/version.js +0 -1
  53. package/dist/cjs/node_modules/.pnpm/3d-force-graph@1.78.3/node_modules/3d-force-graph/dist/3d-force-graph.js +0 -28
  54. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -1
  55. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/construct.js +0 -1
  56. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js +0 -1
  57. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -1
  58. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -1
  59. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -1
  60. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -1
  61. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -1
  62. package/dist/cjs/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -1
  63. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js +0 -2
  64. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/config/index.js +0 -1
  65. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/loader/index.js +0 -1
  66. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/compose.js +0 -1
  67. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/curry.js +0 -1
  68. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js +0 -1
  69. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js +0 -1
  70. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js +0 -1
  71. package/dist/cjs/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/validators/index.js +0 -10
  72. package/dist/cjs/node_modules/.pnpm/@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@monaco-editor/react/dist/index.js +0 -1
  73. package/dist/cjs/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -1
  74. package/dist/cjs/node_modules/.pnpm/accessor-fn@1.5.3/node_modules/accessor-fn/dist/accessor-fn.js +0 -1
  75. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +0 -6
  76. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +0 -1
  77. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +0 -1
  78. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +0 -1
  79. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +0 -1
  80. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +0 -1
  81. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +0 -1
  82. package/dist/cjs/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +0 -1
  83. package/dist/cjs/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +0 -2
  84. package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +0 -1
  85. package/dist/cjs/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +0 -1
  86. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/add.js +0 -1
  87. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/binarytree.js +0 -1
  88. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/cover.js +0 -1
  89. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/data.js +0 -1
  90. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/extent.js +0 -1
  91. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/find.js +0 -1
  92. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/half.js +0 -1
  93. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/remove.js +0 -1
  94. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/root.js +0 -1
  95. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/size.js +0 -1
  96. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/visit.js +0 -1
  97. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/visitAfter.js +0 -1
  98. package/dist/cjs/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/x.js +0 -1
  99. package/dist/cjs/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -1
  100. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/center.js +0 -1
  101. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/constant.js +0 -1
  102. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/jiggle.js +0 -1
  103. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/lcg.js +0 -1
  104. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/link.js +0 -1
  105. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/manyBody.js +0 -1
  106. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/radial.js +0 -1
  107. package/dist/cjs/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/simulation.js +0 -1
  108. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/add.js +0 -1
  109. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/cover.js +0 -1
  110. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/data.js +0 -1
  111. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/extent.js +0 -1
  112. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/find.js +0 -1
  113. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/findAll.js +0 -1
  114. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/octant.js +0 -1
  115. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/octree.js +0 -1
  116. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/remove.js +0 -1
  117. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/root.js +0 -1
  118. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/size.js +0 -1
  119. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/visit.js +0 -1
  120. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/visitAfter.js +0 -1
  121. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/x.js +0 -1
  122. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/y.js +0 -1
  123. package/dist/cjs/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/z.js +0 -1
  124. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/add.js +0 -1
  125. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/cover.js +0 -1
  126. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/data.js +0 -1
  127. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/extent.js +0 -1
  128. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/find.js +0 -1
  129. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quad.js +0 -1
  130. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quadtree.js +0 -1
  131. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/remove.js +0 -1
  132. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/root.js +0 -1
  133. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/size.js +0 -1
  134. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visit.js +0 -1
  135. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visitAfter.js +0 -1
  136. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/x.js +0 -1
  137. package/dist/cjs/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/y.js +0 -1
  138. package/dist/cjs/node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/categorical/Paired.js +0 -1
  139. package/dist/cjs/node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/colors.js +0 -1
  140. package/dist/cjs/node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/init.js +0 -1
  141. package/dist/cjs/node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js +0 -1
  142. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js +0 -1
  143. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js +0 -1
  144. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js +0 -1
  145. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js +0 -1
  146. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js +0 -1
  147. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js +0 -1
  148. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js +0 -1
  149. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js +0 -1
  150. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js +0 -1
  151. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js +0 -1
  152. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js +0 -1
  153. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js +0 -1
  154. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js +0 -1
  155. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js +0 -1
  156. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js +0 -1
  157. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js +0 -1
  158. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js +0 -1
  159. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js +0 -1
  160. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js +0 -1
  161. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js +0 -1
  162. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js +0 -1
  163. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js +0 -1
  164. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +0 -1
  165. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js +0 -1
  166. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js +0 -1
  167. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js +0 -1
  168. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js +0 -1
  169. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js +0 -1
  170. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js +0 -1
  171. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js +0 -1
  172. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js +0 -1
  173. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js +0 -1
  174. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js +0 -1
  175. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js +0 -1
  176. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js +0 -1
  177. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js +0 -1
  178. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js +0 -1
  179. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js +0 -1
  180. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js +0 -1
  181. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js +0 -1
  182. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js +0 -1
  183. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js +0 -1
  184. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js +0 -1
  185. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js +0 -1
  186. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js +0 -1
  187. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js +0 -1
  188. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js +0 -1
  189. package/dist/cjs/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js +0 -1
  190. package/dist/cjs/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -1
  191. package/dist/cjs/node_modules/.pnpm/data-bind-mapper@1.0.3/node_modules/data-bind-mapper/dist/data-bind-mapper.js +0 -3
  192. package/dist/cjs/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -1
  193. package/dist/cjs/node_modules/.pnpm/float-tooltip@1.7.5/node_modules/float-tooltip/dist/float-tooltip.js +0 -13
  194. package/dist/cjs/node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js +0 -1
  195. package/dist/cjs/node_modules/.pnpm/jerrypick@1.1.2/node_modules/jerrypick/dist/jerrypick.js +0 -3
  196. package/dist/cjs/node_modules/.pnpm/kapsule@1.16.3/node_modules/kapsule/dist/kapsule.js +0 -2
  197. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -1
  198. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -1
  199. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -1
  200. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -1
  201. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -1
  202. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -1
  203. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -1
  204. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -1
  205. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -1
  206. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -1
  207. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -1
  208. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -1
  209. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -1
  210. package/dist/cjs/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -1
  211. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js +0 -6
  212. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -6
  213. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -6
  214. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js +0 -6
  215. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js +0 -6
  216. package/dist/cjs/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -6
  217. package/dist/cjs/node_modules/.pnpm/ngraph.events@1.2.2/node_modules/ngraph.events/index.js +0 -1
  218. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/index.js +0 -1
  219. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/createPatternBuilder.js +0 -2
  220. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateBounds.js +0 -55
  221. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateBody.js +0 -47
  222. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateDragForce.js +0 -9
  223. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateSpringForce.js +0 -33
  224. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateIntegrator.js +0 -35
  225. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateQuadTree.js +0 -325
  226. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/getVariableName.js +0 -1
  227. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/createPhysicsSimulator.js +0 -1
  228. package/dist/cjs/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/spring.js +0 -1
  229. package/dist/cjs/node_modules/.pnpm/ngraph.graph@20.0.1/node_modules/ngraph.graph/index.js +0 -3
  230. package/dist/cjs/node_modules/.pnpm/ngraph.merge@1.0.0/node_modules/ngraph.merge/index.js +0 -1
  231. package/dist/cjs/node_modules/.pnpm/ngraph.random@1.2.0/node_modules/ngraph.random/index.js +0 -1
  232. package/dist/cjs/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +0 -5
  233. package/dist/cjs/node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js +0 -149
  234. package/dist/cjs/node_modules/.pnpm/preact@10.26.9/node_modules/preact/dist/preact.module.js +0 -1
  235. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +0 -1
  236. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +0 -1
  237. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +0 -2
  238. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +0 -1
  239. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -1
  240. package/dist/cjs/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +0 -1
  241. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -1
  242. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -1
  243. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -1
  244. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -1
  245. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -1
  246. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -1
  247. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -1
  248. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -1
  249. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -1
  250. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -1
  251. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -1
  252. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -1
  253. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -2
  254. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -1
  255. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -1
  256. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -1
  257. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -1
  258. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -4
  259. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -1
  260. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -2
  261. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -2
  262. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -1
  263. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -1
  264. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -1
  265. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -1
  266. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -2
  267. package/dist/cjs/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -1
  268. package/dist/cjs/node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +0 -1
  269. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +0 -8
  270. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +0 -8
  271. package/dist/cjs/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +0 -1
  272. package/dist/cjs/node_modules/.pnpm/react-kapsule@2.5.7_react@19.1.0/node_modules/react-kapsule/dist/react-kapsule.js +0 -3
  273. package/dist/cjs/node_modules/.pnpm/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js +0 -1
  274. package/dist/cjs/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -3
  275. package/dist/cjs/node_modules/.pnpm/three-render-objects@1.40.4_three@0.178.0/node_modules/three-render-objects/dist/three-render-objects.js +0 -18
  276. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +0 -44
  277. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.module.js +0 -3784
  278. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +0 -392
  279. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/DragControls.js +0 -1
  280. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/FlyControls.js +0 -1
  281. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/OrbitControls.js +0 -1
  282. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/TrackballControls.js +0 -1
  283. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +0 -1
  284. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/MaskPass.js +0 -1
  285. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -1
  286. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/RenderPass.js +0 -1
  287. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -1
  288. package/dist/cjs/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -24
  289. package/dist/cjs/node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js +0 -1
  290. package/dist/es/_virtual/_commonjsHelpers.js +0 -6
  291. package/dist/es/_virtual/alignment-pattern.js +0 -4
  292. package/dist/es/_virtual/browser.js +0 -7
  293. package/dist/es/_virtual/browser2.js +0 -4
  294. package/dist/es/_virtual/canvas.js +0 -4
  295. package/dist/es/_virtual/dijkstra.js +0 -4
  296. package/dist/es/_virtual/error-correction-code.js +0 -4
  297. package/dist/es/_virtual/error-correction-level.js +0 -4
  298. package/dist/es/_virtual/finder-pattern.js +0 -4
  299. package/dist/es/_virtual/format-info.js +0 -4
  300. package/dist/es/_virtual/galois-field.js +0 -4
  301. package/dist/es/_virtual/generateBounds.js +0 -4
  302. package/dist/es/_virtual/generateCreateBody.js +0 -4
  303. package/dist/es/_virtual/generateCreateDragForce.js +0 -4
  304. package/dist/es/_virtual/generateCreateSpringForce.js +0 -4
  305. package/dist/es/_virtual/generateIntegrator.js +0 -4
  306. package/dist/es/_virtual/generateQuadTree.js +0 -4
  307. package/dist/es/_virtual/index.js +0 -7
  308. package/dist/es/_virtual/index2.js +0 -4
  309. package/dist/es/_virtual/index3.js +0 -4
  310. package/dist/es/_virtual/index4.js +0 -7
  311. package/dist/es/_virtual/index5.js +0 -7
  312. package/dist/es/_virtual/index6.js +0 -4
  313. package/dist/es/_virtual/index7.js +0 -4
  314. package/dist/es/_virtual/mask-pattern.js +0 -4
  315. package/dist/es/_virtual/mode.js +0 -4
  316. package/dist/es/_virtual/polynomial.js +0 -4
  317. package/dist/es/_virtual/qrcode.js +0 -4
  318. package/dist/es/_virtual/react-is.development.js +0 -4
  319. package/dist/es/_virtual/react-is.production.min.js +0 -4
  320. package/dist/es/_virtual/regex.js +0 -4
  321. package/dist/es/_virtual/segments.js +0 -4
  322. package/dist/es/_virtual/svg-tag.js +0 -4
  323. package/dist/es/_virtual/utils.js +0 -4
  324. package/dist/es/_virtual/utils2.js +0 -4
  325. package/dist/es/_virtual/version-check.js +0 -4
  326. package/dist/es/_virtual/version.js +0 -4
  327. package/dist/es/node_modules/.pnpm/3d-force-graph@1.78.3/node_modules/3d-force-graph/dist/3d-force-graph.js +0 -398
  328. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js +0 -7
  329. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/construct.js +0 -12
  330. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
  331. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +0 -8
  332. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -7
  333. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeFunction.js +0 -10
  334. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +0 -13
  335. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  336. package/dist/es/node_modules/.pnpm/@babel_runtime@7.27.6/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js +0 -29
  337. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js +0 -99
  338. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/config/index.js +0 -8
  339. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/loader/index.js +0 -101
  340. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/compose.js +0 -12
  341. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/curry.js +0 -14
  342. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js +0 -9
  343. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js +0 -6
  344. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js +0 -18
  345. package/dist/es/node_modules/.pnpm/@monaco-editor_loader@1.5.0/node_modules/@monaco-editor/loader/lib/es/validators/index.js +0 -37
  346. package/dist/es/node_modules/.pnpm/@monaco-editor_react@4.7.0_monaco-editor@0.52.2_react-dom@19.1.0_react@19.1.0__react@19.1.0/node_modules/@monaco-editor/react/dist/index.js +0 -154
  347. package/dist/es/node_modules/.pnpm/@tweenjs_tween.js@25.0.0/node_modules/@tweenjs/tween.js/dist/tween.esm.js +0 -396
  348. package/dist/es/node_modules/.pnpm/accessor-fn@1.5.3/node_modules/accessor-fn/dist/accessor-fn.js +0 -10
  349. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/bowser.js +0 -55
  350. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/constants.js +0 -113
  351. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-browsers.js +0 -404
  352. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-engines.js +0 -78
  353. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-os.js +0 -159
  354. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser-platforms.js +0 -238
  355. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/parser.js +0 -303
  356. package/dist/es/node_modules/.pnpm/bowser@2.11.0/node_modules/bowser/src/utils.js +0 -280
  357. package/dist/es/node_modules/.pnpm/canvas-confetti@1.9.3/node_modules/canvas-confetti/dist/confetti.module.js +0 -409
  358. package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/max.js +0 -15
  359. package/dist/es/node_modules/.pnpm/d3-array@3.2.4/node_modules/d3-array/src/min.js +0 -15
  360. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/add.js +0 -32
  361. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/binarytree.js +0 -48
  362. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/cover.js +0 -22
  363. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/data.js +0 -11
  364. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/extent.js +0 -6
  365. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/find.js +0 -20
  366. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/half.js +0 -6
  367. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/remove.js +0 -20
  368. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/root.js +0 -6
  369. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/size.js +0 -11
  370. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/visit.js +0 -13
  371. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/visitAfter.js +0 -18
  372. package/dist/es/node_modules/.pnpm/d3-binarytree@1.0.2/node_modules/d3-binarytree/src/x.js +0 -10
  373. package/dist/es/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +0 -64
  374. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/center.js +0 -25
  375. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/constant.js +0 -8
  376. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/jiggle.js +0 -6
  377. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/lcg.js +0 -7
  378. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/link.js +0 -58
  379. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/manyBody.js +0 -58
  380. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/radial.js +0 -34
  381. package/dist/es/node_modules/.pnpm/d3-force-3d@3.0.6/node_modules/d3-force-3d/src/simulation.js +0 -95
  382. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/add.js +0 -32
  383. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/cover.js +0 -40
  384. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/data.js +0 -11
  385. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/extent.js +0 -6
  386. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/find.js +0 -29
  387. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/findAll.js +0 -15
  388. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/octant.js +0 -6
  389. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/octree.js +0 -54
  390. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/remove.js +0 -20
  391. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/root.js +0 -6
  392. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/size.js +0 -11
  393. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/visit.js +0 -13
  394. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/visitAfter.js +0 -18
  395. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/x.js +0 -10
  396. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/y.js +0 -10
  397. package/dist/es/node_modules/.pnpm/d3-octree@1.1.0/node_modules/d3-octree/src/z.js +0 -10
  398. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/add.js +0 -29
  399. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/cover.js +0 -28
  400. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/data.js +0 -11
  401. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/extent.js +0 -6
  402. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/find.js +0 -25
  403. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quad.js +0 -6
  404. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/quadtree.js +0 -50
  405. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/remove.js +0 -20
  406. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/root.js +0 -6
  407. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/size.js +0 -11
  408. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visit.js +0 -13
  409. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/visitAfter.js +0 -18
  410. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/x.js +0 -10
  411. package/dist/es/node_modules/.pnpm/d3-quadtree@3.0.1/node_modules/d3-quadtree/src/y.js +0 -10
  412. package/dist/es/node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/categorical/Paired.js +0 -5
  413. package/dist/es/node_modules/.pnpm/d3-scale-chromatic@3.1.0/node_modules/d3-scale-chromatic/src/colors.js +0 -7
  414. package/dist/es/node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/init.js +0 -16
  415. package/dist/es/node_modules/.pnpm/d3-scale@4.0.2/node_modules/d3-scale/src/ordinal.js +0 -31
  416. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/array.js +0 -6
  417. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/constant.js +0 -8
  418. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/creator.js +0 -20
  419. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/matcher.js +0 -14
  420. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespace.js +0 -8
  421. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/namespaces.js +0 -12
  422. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/pointer.js +0 -18
  423. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/select.js +0 -7
  424. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/append.js +0 -10
  425. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/attr.js +0 -44
  426. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/call.js +0 -7
  427. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/classed.js +0 -54
  428. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/clone.js +0 -14
  429. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/data.js +0 -42
  430. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/datum.js +0 -6
  431. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/dispatch.js +0 -21
  432. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/each.js +0 -9
  433. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/empty.js +0 -6
  434. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/enter.js +0 -27
  435. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/exit.js +0 -8
  436. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/filter.js +0 -12
  437. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/html.js +0 -20
  438. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/index.js +0 -83
  439. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/insert.js +0 -14
  440. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/iterator.js +0 -8
  441. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/join.js +0 -7
  442. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/lower.js +0 -9
  443. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/merge.js +0 -12
  444. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/node.js +0 -11
  445. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/nodes.js +0 -6
  446. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/on.js +0 -52
  447. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/order.js +0 -9
  448. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/property.js +0 -22
  449. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/raise.js +0 -9
  450. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/remove.js +0 -10
  451. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/select.js +0 -12
  452. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectAll.js +0 -18
  453. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChild.js +0 -16
  454. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/selectChildren.js +0 -16
  455. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/size.js +0 -8
  456. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sort.js +0 -19
  457. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/sparse.js +0 -6
  458. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/style.js +0 -27
  459. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selection/text.js +0 -20
  460. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selector.js +0 -10
  461. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/selectorAll.js +0 -11
  462. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/sourceEvent.js +0 -8
  463. package/dist/es/node_modules/.pnpm/d3-selection@3.0.0/node_modules/d3-selection/src/window.js +0 -6
  464. package/dist/es/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +0 -62
  465. package/dist/es/node_modules/.pnpm/data-bind-mapper@1.0.3/node_modules/data-bind-mapper/dist/data-bind-mapper.js +0 -173
  466. package/dist/es/node_modules/.pnpm/dijkstrajs@1.0.3/node_modules/dijkstrajs/dijkstra.js +0 -72
  467. package/dist/es/node_modules/.pnpm/float-tooltip@1.7.5/node_modules/float-tooltip/dist/float-tooltip.js +0 -169
  468. package/dist/es/node_modules/.pnpm/internmap@2.0.3/node_modules/internmap/src/index.js +0 -35
  469. package/dist/es/node_modules/.pnpm/jerrypick@1.1.2/node_modules/jerrypick/dist/jerrypick.js +0 -92
  470. package/dist/es/node_modules/.pnpm/kapsule@1.16.3/node_modules/kapsule/dist/kapsule.js +0 -113
  471. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js +0 -5
  472. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js +0 -10
  473. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseTrim.js +0 -8
  474. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js +0 -4
  475. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js +0 -15
  476. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js +0 -7
  477. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js +0 -5
  478. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_trimmedEndIndex.js +0 -9
  479. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/debounce.js +0 -54
  480. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js +0 -7
  481. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js +0 -6
  482. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isSymbol.js +0 -9
  483. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/now.js +0 -7
  484. package/dist/es/node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/toNumber.js +0 -22
  485. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/Icon.js +0 -41
  486. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -27
  487. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -20
  488. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/play.js +0 -12
  489. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/icons/x.js +0 -15
  490. package/dist/es/node_modules/.pnpm/lucide-react@0.525.0_react@19.1.0/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -24
  491. package/dist/es/node_modules/.pnpm/ngraph.events@1.2.2/node_modules/ngraph.events/index.js +0 -57
  492. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/index.js +0 -239
  493. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/createPatternBuilder.js +0 -22
  494. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateBounds.js +0 -74
  495. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateBody.js +0 -74
  496. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateDragForce.js +0 -28
  497. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateCreateSpringForce.js +0 -53
  498. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateIntegrator.js +0 -55
  499. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/generateQuadTree.js +0 -403
  500. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/codeGenerators/getVariableName.js +0 -9
  501. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/createPhysicsSimulator.js +0 -273
  502. package/dist/es/node_modules/.pnpm/ngraph.forcelayout@3.3.1/node_modules/ngraph.forcelayout/lib/spring.js +0 -12
  503. package/dist/es/node_modules/.pnpm/ngraph.graph@20.0.1/node_modules/ngraph.graph/index.js +0 -319
  504. package/dist/es/node_modules/.pnpm/ngraph.merge@1.0.0/node_modules/ngraph.merge/index.js +0 -20
  505. package/dist/es/node_modules/.pnpm/ngraph.random@1.2.0/node_modules/ngraph.random/index.js +0 -71
  506. package/dist/es/node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js +0 -54
  507. package/dist/es/node_modules/.pnpm/polished@4.3.1/node_modules/polished/dist/polished.esm.js +0 -717
  508. package/dist/es/node_modules/.pnpm/preact@10.26.9/node_modules/preact/dist/preact.module.js +0 -257
  509. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js +0 -54
  510. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
  511. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
  512. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js +0 -17
  513. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
  514. package/dist/es/node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js +0 -7
  515. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/browser.js +0 -44
  516. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/can-promise.js +0 -9
  517. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alignment-pattern.js +0 -26
  518. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/alphanumeric-data.js +0 -73
  519. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-buffer.js +0 -28
  520. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/bit-matrix.js +0 -23
  521. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/byte-data.js +0 -23
  522. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-code.js +0 -362
  523. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/error-correction-level.js +0 -41
  524. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/finder-pattern.js +0 -22
  525. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/format-info.js +0 -18
  526. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/galois-field.js +0 -24
  527. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/kanji-data.js +0 -36
  528. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mask-pattern.js +0 -102
  529. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/mode.js +0 -68
  530. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/numeric-data.js +0 -26
  531. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/polynomial.js +0 -34
  532. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/qrcode.js +0 -154
  533. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/reed-solomon-encoder.js +0 -27
  534. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/regex.js +0 -23
  535. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/segments.js +0 -146
  536. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +0 -74
  537. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version-check.js +0 -10
  538. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/version.js +0 -75
  539. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/canvas.js +0 -32
  540. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg-tag.js +0 -32
  541. package/dist/es/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +0 -58
  542. package/dist/es/node_modules/.pnpm/react-force-graph-3d@1.28.0_react@19.1.0/node_modules/react-force-graph-3d/dist/react-force-graph-3d.js +0 -148
  543. package/dist/es/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js +0 -95
  544. package/dist/es/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js +0 -78
  545. package/dist/es/node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js +0 -10
  546. package/dist/es/node_modules/.pnpm/react-kapsule@2.5.7_react@19.1.0/node_modules/react-kapsule/dist/react-kapsule.js +0 -113
  547. package/dist/es/node_modules/.pnpm/state-local@1.0.7/node_modules/state-local/lib/es/state-local.js +0 -131
  548. package/dist/es/node_modules/.pnpm/three-forcegraph@1.43.0_three@0.178.0/node_modules/three-forcegraph/dist/three-forcegraph.js +0 -1037
  549. package/dist/es/node_modules/.pnpm/three-render-objects@1.40.4_three@0.178.0/node_modules/three-render-objects/dist/three-render-objects.js +0 -453
  550. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.core.js +0 -13236
  551. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.module.js +0 -9725
  552. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/build/three.webgpu.js +0 -24475
  553. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/DragControls.js +0 -116
  554. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/FlyControls.js +0 -188
  555. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/OrbitControls.js +0 -459
  556. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/controls/TrackballControls.js +0 -223
  557. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/EffectComposer.js +0 -139
  558. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/MaskPass.js +0 -55
  559. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/Pass.js +0 -89
  560. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/RenderPass.js +0 -38
  561. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/postprocessing/ShaderPass.js +0 -46
  562. package/dist/es/node_modules/.pnpm/three@0.178.0/node_modules/three/examples/jsm/shaders/CopyShader.js +0 -41
  563. package/dist/es/node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js +0 -711
@@ -1,44 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});/**
2
- * @license
3
- * Copyright 2010-2025 Three.js Authors
4
- * SPDX-License-Identifier: MIT
5
- */const ji="178",yr={ROTATE:0,DOLLY:1,PAN:2},xr={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},gr=0,Mr=1,wr=2,br=0,Sr=1,_r=2,Ar=3,Ye=0,Xi=1,vr=2,Ws=0,Pi=1,zr=2,Tr=3,Cr=4,Fr=5,Ii=100,Rr=101,Br=102,Er=103,Pr=104,Ir=200,Lr=201,Dr=202,kr=203,Li=204,Di=205,Or=206,Nr=207,Vr=208,Ur=209,Gr=210,Wr=211,qr=212,Jr=213,jr=214,Xr=0,Hr=1,Yr=2,ki=3,Zr=4,$r=5,Qr=6,Kr=7,Ke=0,ta=1,ea=2,ia=0,sa=1,na=2,ra=3,aa=4,oa=5,ha=6,la=7,Hi=300,qs=301,ca=302,ua=303,pa=304,da=306,Oi=1e3,Gt=1001,Ni=1002,lt=1003,fa=1004,ma=1005,we=1006,ya=1007,Yi=1008,ti=1009,Js=1010,js=1011,Xs=1012,Hs=1013,Zi=1014,$i=1015,Ys=1016,Zs=1017,$s=1018,xa=1020,Qs=35902,Ks=1021,tn=1022,Qi=1023,Vi=1026,en=1027,sn=1028,nn=1029,rn=1030,an=1031,ga=1032,on=1033,hn=33776,ln=33777,cn=33778,un=33779,pn=35840,dn=35841,fn=35842,mn=35843,yn=36196,xn=37492,gn=37496,Mn=37808,wn=37809,bn=37810,Sn=37811,_n=37812,An=37813,vn=37814,zn=37815,Tn=37816,Cn=37817,Fn=37818,Rn=37819,Bn=37820,En=37821,Pn=36492,In=36494,Ln=36495,Dn=36283,kn=36284,On=36285,Nn=36286,Vn=3200,Ma=3201,Wt=0,wa=1,Ki="",nt="srgb",Ui="srgb-linear",Gi="linear",Xe="srgb",ba=0,Vt=7680,Sa=7681,_a=7682,Aa=7683,va=34055,za=34056,Ta=5386,Ca=512,Fa=513,Ra=514,Ba=515,Ea=516,Pa=517,Ia=518,Wi=519,La=512,Da=513,ka=514,Oa=515,Na=516,Va=517,Ua=518,Ga=519,Ze=35044,Wa=35048,qa="300 es",ft=2e3,be=2001;class qt{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)}hasEventListener(t,e){const i=this._listeners;return i===void 0?!1:i[t]!==void 0&&i[t].indexOf(e)!==-1}removeEventListener(t,e){const i=this._listeners;if(i===void 0)return;const s=i[t];if(s!==void 0){const n=s.indexOf(e);n!==-1&&s.splice(n,1)}}dispatchEvent(t){const e=this._listeners;if(e===void 0)return;const i=e[t.type];if(i!==void 0){t.target=this;const s=i.slice(0);for(let n=0,r=s.length;n<r;n++)s[n].call(this,t);t.target=null}}}const q=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let xs=1234567;const ye=Math.PI/180,ae=180/Math.PI;function vt(){const c=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(q[c&255]+q[c>>8&255]+q[c>>16&255]+q[c>>24&255]+"-"+q[t&255]+q[t>>8&255]+"-"+q[t>>16&15|64]+q[t>>24&255]+"-"+q[e&63|128]+q[e>>8&255]+"-"+q[e>>16&255]+q[e>>24&255]+q[i&255]+q[i>>8&255]+q[i>>16&255]+q[i>>24&255]).toLowerCase()}function C(c,t,e){return Math.max(t,Math.min(e,c))}function ts(c,t){return(c%t+t)%t}function Ja(c,t,e,i,s){return i+(c-t)*(s-i)/(e-t)}function ja(c,t,e){return c!==t?(e-c)/(t-c):0}function xe(c,t,e){return(1-e)*c+e*t}function Xa(c,t,e,i){return xe(c,t,1-Math.exp(-e*i))}function Ha(c,t=1){return t-Math.abs(ts(c,t*2)-t)}function Ya(c,t,e){return c<=t?0:c>=e?1:(c=(c-t)/(e-t),c*c*(3-2*c))}function Za(c,t,e){return c<=t?0:c>=e?1:(c=(c-t)/(e-t),c*c*c*(c*(c*6-15)+10))}function $a(c,t){return c+Math.floor(Math.random()*(t-c+1))}function Qa(c,t){return c+Math.random()*(t-c)}function Ka(c){return c*(.5-Math.random())}function to(c){c!==void 0&&(xs=c);let t=xs+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function eo(c){return c*ye}function io(c){return c*ae}function so(c){return(c&c-1)===0&&c!==0}function no(c){return Math.pow(2,Math.ceil(Math.log(c)/Math.LN2))}function ro(c){return Math.pow(2,Math.floor(Math.log(c)/Math.LN2))}function ao(c,t,e,i,s){const n=Math.cos,r=Math.sin,o=n(e/2),a=r(e/2),h=n((t+i)/2),l=r((t+i)/2),u=n((t-i)/2),p=r((t-i)/2),d=n((i-t)/2),f=r((i-t)/2);switch(s){case"XYX":c.set(o*l,a*u,a*p,o*h);break;case"YZY":c.set(a*p,o*l,a*u,o*h);break;case"ZXZ":c.set(a*u,a*p,o*l,o*h);break;case"XZX":c.set(o*l,a*f,a*d,o*h);break;case"YXY":c.set(a*d,o*l,a*f,o*h);break;case"ZYZ":c.set(a*f,a*d,o*l,o*h);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Y(c,t){switch(t.constructor){case Float32Array:return c;case Uint32Array:return c/4294967295;case Uint16Array:return c/65535;case Uint8Array:return c/255;case Int32Array:return Math.max(c/2147483647,-1);case Int16Array:return Math.max(c/32767,-1);case Int8Array:return Math.max(c/127,-1);default:throw new Error("Invalid component type.")}}function T(c,t){switch(t.constructor){case Float32Array:return c;case Uint32Array:return Math.round(c*4294967295);case Uint16Array:return Math.round(c*65535);case Uint8Array:return Math.round(c*255);case Int32Array:return Math.round(c*2147483647);case Int16Array:return Math.round(c*32767);case Int8Array:return Math.round(c*127);default:throw new Error("Invalid component type.")}}const oo={DEG2RAD:ye,RAD2DEG:ae,generateUUID:vt,clamp:C,euclideanModulo:ts,mapLinear:Ja,inverseLerp:ja,lerp:xe,damp:Xa,pingpong:Ha,smoothstep:Ya,smootherstep:Za,randInt:$a,randFloat:Qa,randFloatSpread:Ka,seededRandom:to,degToRad:eo,radToDeg:io,isPowerOfTwo:so,ceilPowerOfTwo:no,floorPowerOfTwo:ro,setQuaternionFromProperEuler:ao,normalize:T,denormalize:Y};class z{constructor(t=0,e=0){z.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=C(this.x,t.x,e.x),this.y=C(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=C(this.x,t,e),this.y=C(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(C(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),n=this.x-t.x,r=this.y-t.y;return this.x=n*i-r*s+t.x,this.y=n*s+r*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class oe{constructor(t=0,e=0,i=0,s=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=i,this._w=s}static slerpFlat(t,e,i,s,n,r,o){let a=i[s+0],h=i[s+1],l=i[s+2],u=i[s+3];const p=n[r+0],d=n[r+1],f=n[r+2],y=n[r+3];if(o===0){t[e+0]=a,t[e+1]=h,t[e+2]=l,t[e+3]=u;return}if(o===1){t[e+0]=p,t[e+1]=d,t[e+2]=f,t[e+3]=y;return}if(u!==y||a!==p||h!==d||l!==f){let x=1-o;const g=a*p+h*d+l*f+u*y,b=g>=0?1:-1,w=1-g*g;if(w>Number.EPSILON){const S=Math.sqrt(w),v=Math.atan2(S,g*b);x=Math.sin(x*v)/S,o=Math.sin(o*v)/S}const M=o*b;if(a=a*x+p*M,h=h*x+d*M,l=l*x+f*M,u=u*x+y*M,x===1-o){const S=1/Math.sqrt(a*a+h*h+l*l+u*u);a*=S,h*=S,l*=S,u*=S}}t[e]=a,t[e+1]=h,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,i,s,n,r){const o=i[s],a=i[s+1],h=i[s+2],l=i[s+3],u=n[r],p=n[r+1],d=n[r+2],f=n[r+3];return t[e]=o*f+l*u+a*d-h*p,t[e+1]=a*f+l*p+h*u-o*d,t[e+2]=h*f+l*d+o*p-a*u,t[e+3]=l*f-o*u-a*p-h*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,s=t._y,n=t._z,r=t._order,o=Math.cos,a=Math.sin,h=o(i/2),l=o(s/2),u=o(n/2),p=a(i/2),d=a(s/2),f=a(n/2);switch(r){case"XYZ":this._x=p*l*u+h*d*f,this._y=h*d*u-p*l*f,this._z=h*l*f+p*d*u,this._w=h*l*u-p*d*f;break;case"YXZ":this._x=p*l*u+h*d*f,this._y=h*d*u-p*l*f,this._z=h*l*f-p*d*u,this._w=h*l*u+p*d*f;break;case"ZXY":this._x=p*l*u-h*d*f,this._y=h*d*u+p*l*f,this._z=h*l*f+p*d*u,this._w=h*l*u-p*d*f;break;case"ZYX":this._x=p*l*u-h*d*f,this._y=h*d*u+p*l*f,this._z=h*l*f-p*d*u,this._w=h*l*u+p*d*f;break;case"YZX":this._x=p*l*u+h*d*f,this._y=h*d*u+p*l*f,this._z=h*l*f-p*d*u,this._w=h*l*u-p*d*f;break;case"XZY":this._x=p*l*u-h*d*f,this._y=h*d*u-p*l*f,this._z=h*l*f+p*d*u,this._w=h*l*u+p*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+r)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],s=e[4],n=e[8],r=e[1],o=e[5],a=e[9],h=e[2],l=e[6],u=e[10],p=i+o+u;if(p>0){const d=.5/Math.sqrt(p+1);this._w=.25/d,this._x=(l-a)*d,this._y=(n-h)*d,this._z=(r-s)*d}else if(i>o&&i>u){const d=2*Math.sqrt(1+i-o-u);this._w=(l-a)/d,this._x=.25*d,this._y=(s+r)/d,this._z=(n+h)/d}else if(o>u){const d=2*Math.sqrt(1+o-i-u);this._w=(n-h)/d,this._x=(s+r)/d,this._y=.25*d,this._z=(a+l)/d}else{const d=2*Math.sqrt(1+u-i-o);this._w=(r-s)/d,this._x=(n+h)/d,this._y=(a+l)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<1e-8?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(C(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(i===0)return this;const s=Math.min(1,e/i);return this.slerp(t,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,s=t._y,n=t._z,r=t._w,o=e._x,a=e._y,h=e._z,l=e._w;return this._x=i*l+r*o+s*h-n*a,this._y=s*l+r*a+n*o-i*h,this._z=n*l+r*h+i*a-s*o,this._w=r*l-i*o-s*a-n*h,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const i=this._x,s=this._y,n=this._z,r=this._w;let o=r*t._w+i*t._x+s*t._y+n*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=r,this._x=i,this._y=s,this._z=n,this;const a=1-o*o;if(a<=Number.EPSILON){const d=1-e;return this._w=d*r+e*this._w,this._x=d*i+e*this._x,this._y=d*s+e*this._y,this._z=d*n+e*this._z,this.normalize(),this}const h=Math.sqrt(a),l=Math.atan2(h,o),u=Math.sin((1-e)*l)/h,p=Math.sin(e*l)/h;return this._w=r*u+this._w*p,this._x=i*u+this._x*p,this._y=s*u+this._y*p,this._z=n*u+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),n=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),n*Math.sin(e),n*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class m{constructor(t=0,e=0,i=0){m.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return i===void 0&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(gs.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(gs.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6]*s,this.y=n[1]*e+n[4]*i+n[7]*s,this.z=n[2]*e+n[5]*i+n[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=t.elements,r=1/(n[3]*e+n[7]*i+n[11]*s+n[15]);return this.x=(n[0]*e+n[4]*i+n[8]*s+n[12])*r,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*r,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*r,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,n=t.x,r=t.y,o=t.z,a=t.w,h=2*(r*s-o*i),l=2*(o*e-n*s),u=2*(n*i-r*e);return this.x=e+a*h+r*u-o*l,this.y=i+a*l+o*h-n*u,this.z=s+a*u+n*l-r*h,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,s=this.z,n=t.elements;return this.x=n[0]*e+n[4]*i+n[8]*s,this.y=n[1]*e+n[5]*i+n[9]*s,this.z=n[2]*e+n[6]*i+n[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=C(this.x,t.x,e.x),this.y=C(this.y,t.y,e.y),this.z=C(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=C(this.x,t,e),this.y=C(this.y,t,e),this.z=C(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,n=t.z,r=e.x,o=e.y,a=e.z;return this.x=s*a-n*o,this.y=n*r-i*a,this.z=i*o-s*r,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return ai.copy(this).projectOnVector(t),this.sub(ai)}reflect(t){return this.sub(ai.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(C(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ai=new m,gs=new oe;class yt{constructor(t,e,i,s,n,r,o,a,h){yt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,o,a,h)}set(t,e,i,s,n,r,o,a,h){const l=this.elements;return l[0]=t,l[1]=s,l[2]=o,l[3]=e,l[4]=n,l[5]=a,l[6]=i,l[7]=r,l[8]=h,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],o=i[3],a=i[6],h=i[1],l=i[4],u=i[7],p=i[2],d=i[5],f=i[8],y=s[0],x=s[3],g=s[6],b=s[1],w=s[4],M=s[7],S=s[2],v=s[5],A=s[8];return n[0]=r*y+o*b+a*S,n[3]=r*x+o*w+a*v,n[6]=r*g+o*M+a*A,n[1]=h*y+l*b+u*S,n[4]=h*x+l*w+u*v,n[7]=h*g+l*M+u*A,n[2]=p*y+d*b+f*S,n[5]=p*x+d*w+f*v,n[8]=p*g+d*M+f*A,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*r*l-e*o*h-i*n*l+i*o*a+s*n*h-s*r*a}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*r-o*h,p=o*a-l*n,d=h*n-r*a,f=e*u+i*p+s*d;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);const y=1/f;return t[0]=u*y,t[1]=(s*h-l*i)*y,t[2]=(o*i-s*r)*y,t[3]=p*y,t[4]=(l*e-s*a)*y,t[5]=(s*n-o*e)*y,t[6]=d*y,t[7]=(i*a-h*e)*y,t[8]=(r*e-i*n)*y,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,n,r,o){const a=Math.cos(n),h=Math.sin(n);return this.set(i*a,i*h,-i*(a*r+h*o)+r+t,-s*h,s*a,-s*(-h*r+a*o)+o+e,0,0,1),this}scale(t,e){return this.premultiply(oi.makeScale(t,e)),this}rotate(t){return this.premultiply(oi.makeRotation(-t)),this}translate(t,e){return this.premultiply(oi.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<9;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const oi=new yt;function Un(c){for(let t=c.length-1;t>=0;--t)if(c[t]>=65535)return!0;return!1}function Se(c){return document.createElementNS("http://www.w3.org/1999/xhtml",c)}function ho(){const c=Se("canvas");return c.style.display="block",c}const Ms={};function qi(c){c in Ms||(Ms[c]=!0,console.warn(c))}function lo(c,t,e){return new Promise(function(i,s){function n(){switch(c.clientWaitSync(t,c.SYNC_FLUSH_COMMANDS_BIT,0)){case c.WAIT_FAILED:s();break;case c.TIMEOUT_EXPIRED:setTimeout(n,e);break;default:i()}}setTimeout(n,e)})}function co(c){const t=c.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function uo(c){const t=c.elements;t[11]===-1?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const ws=new yt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),bs=new yt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function po(){const c={enabled:!0,workingColorSpace:Ui,spaces:{},convert:function(s,n,r){return this.enabled===!1||n===r||!n||!r||(this.spaces[n].transfer===Xe&&(s.r=zt(s.r),s.g=zt(s.g),s.b=zt(s.b)),this.spaces[n].primaries!==this.spaces[r].primaries&&(s.applyMatrix3(this.spaces[n].toXYZ),s.applyMatrix3(this.spaces[r].fromXYZ)),this.spaces[r].transfer===Xe&&(s.r=re(s.r),s.g=re(s.g),s.b=re(s.b))),s},workingToColorSpace:function(s,n){return this.convert(s,this.workingColorSpace,n)},colorSpaceToWorking:function(s,n){return this.convert(s,n,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Ki?Gi:this.spaces[s].transfer},getLuminanceCoefficients:function(s,n=this.workingColorSpace){return s.fromArray(this.spaces[n].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,n,r){return s.copy(this.spaces[n].toXYZ).multiply(this.spaces[r].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(s,n){return qi("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),c.workingToColorSpace(s,n)},toWorkingColorSpace:function(s,n){return qi("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),c.colorSpaceToWorking(s,n)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return c.define({[Ui]:{primaries:t,whitePoint:i,transfer:Gi,toXYZ:ws,fromXYZ:bs,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:nt},outputColorSpaceConfig:{drawingBufferColorSpace:nt}},[nt]:{primaries:t,whitePoint:i,transfer:Xe,toXYZ:ws,fromXYZ:bs,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:nt}}}),c}const et=po();function zt(c){return c<.04045?c*.0773993808:Math.pow(c*.9478672986+.0521327014,2.4)}function re(c){return c<.0031308?c*12.92:1.055*Math.pow(c,.41666)-.055}let jt;class Gn{static getDataURL(t,e="image/png"){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let i;if(t instanceof HTMLCanvasElement)i=t;else{jt===void 0&&(jt=Se("canvas")),jt.width=t.width,jt.height=t.height;const s=jt.getContext("2d");t instanceof ImageData?s.putImageData(t,0,0):s.drawImage(t,0,0,t.width,t.height),i=jt}return i.toDataURL(e)}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Se("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height),n=s.data;for(let r=0;r<n.length;r++)n[r]=zt(n[r]/255)*255;return i.putImageData(s,0,0),e}else if(t.data){const e=t.data.slice(0);for(let i=0;i<e.length;i++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[i]=Math.floor(zt(e[i]/255)*255):e[i]=zt(e[i]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let fo=0;class ei{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:fo++}),this.uuid=vt(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight):e!==null?t.set(e.width,e.height,e.depth||0):t.set(0,0,0),t}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let n;if(Array.isArray(s)){n=[];for(let r=0,o=s.length;r<o;r++)s[r].isDataTexture?n.push(hi(s[r].image)):n.push(hi(s[r]))}else n=hi(s);i.url=n}return e||(t.images[this.uuid]=i),i}}function hi(c){return typeof HTMLImageElement<"u"&&c instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&c instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&c instanceof ImageBitmap?Gn.getDataURL(c):c.data?{data:Array.from(c.data),width:c.width,height:c.height,type:c.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let mo=0;const li=new m;class j extends qt{constructor(t=j.DEFAULT_IMAGE,e=j.DEFAULT_MAPPING,i=Gt,s=Gt,n=we,r=Yi,o=Qi,a=ti,h=j.DEFAULT_ANISOTROPY,l=Ki){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:mo++}),this.uuid=vt(),this.name="",this.source=new ei(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=n,this.minFilter=r,this.anisotropy=h,this.format=o,this.internalFormat=null,this.type=a,this.offset=new z(0,0),this.repeat=new z(1,1),this.center=new z(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new yt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=l,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(t&&t.depth&&t.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(li).x}get height(){return this.source.getSize(li).y}get depth(){return this.source.getSize(li).z}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.renderTarget=t.renderTarget,this.isRenderTargetTexture=t.isRenderTargetTexture,this.isArrayTexture=t.isArrayTexture,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}setValues(t){for(const e in t){const i=t[e];if(i===void 0){console.warn(`THREE.Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){console.warn(`THREE.Texture.setValues(): property '${e}' does not exist.`);continue}s&&i&&s.isVector2&&i.isVector2||s&&i&&s.isVector3&&i.isVector3||s&&i&&s.isMatrix3&&i.isMatrix3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Hi)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case Oi:t.x=t.x-Math.floor(t.x);break;case Gt:t.x=t.x<0?0:1;break;case Ni:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case Oi:t.y=t.y-Math.floor(t.y);break;case Gt:t.y=t.y<0?0:1;break;case Ni:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}j.DEFAULT_IMAGE=null;j.DEFAULT_MAPPING=Hi;j.DEFAULT_ANISOTROPY=1;class H{constructor(t=0,e=0,i=0,s=1){H.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,n=this.w,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*s+r[12]*n,this.y=r[1]*e+r[5]*i+r[9]*s+r[13]*n,this.z=r[2]*e+r[6]*i+r[10]*s+r[14]*n,this.w=r[3]*e+r[7]*i+r[11]*s+r[15]*n,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,n;const a=t.elements,h=a[0],l=a[4],u=a[8],p=a[1],d=a[5],f=a[9],y=a[2],x=a[6],g=a[10];if(Math.abs(l-p)<.01&&Math.abs(u-y)<.01&&Math.abs(f-x)<.01){if(Math.abs(l+p)<.1&&Math.abs(u+y)<.1&&Math.abs(f+x)<.1&&Math.abs(h+d+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const w=(h+1)/2,M=(d+1)/2,S=(g+1)/2,v=(l+p)/4,A=(u+y)/4,_=(f+x)/4;return w>M&&w>S?w<.01?(i=0,s=.707106781,n=.707106781):(i=Math.sqrt(w),s=v/i,n=A/i):M>S?M<.01?(i=.707106781,s=0,n=.707106781):(s=Math.sqrt(M),i=v/s,n=_/s):S<.01?(i=.707106781,s=.707106781,n=0):(n=Math.sqrt(S),i=A/n,s=_/n),this.set(i,s,n,e),this}let b=Math.sqrt((x-f)*(x-f)+(u-y)*(u-y)+(p-l)*(p-l));return Math.abs(b)<.001&&(b=1),this.x=(x-f)/b,this.y=(u-y)/b,this.z=(p-l)/b,this.w=Math.acos((h+d+g-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=C(this.x,t.x,e.x),this.y=C(this.y,t.y,e.y),this.z=C(this.z,t.z,e.z),this.w=C(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=C(this.x,t,e),this.y=C(this.y,t,e),this.z=C(this.z,t,e),this.w=C(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(C(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Wn extends qt{constructor(t=1,e=1,i={}){super(),i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:we,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},i),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=i.depth,this.scissor=new H(0,0,t,e),this.scissorTest=!1,this.viewport=new H(0,0,t,e);const s={width:t,height:e,depth:i.depth},n=new j(s);this.textures=[];const r=i.count;for(let o=0;o<r;o++)this.textures[o]=n.clone(),this.textures[o].isRenderTargetTexture=!0,this.textures[o].renderTarget=this;this._setTextureOptions(i),this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=i.depthTexture,this.samples=i.samples,this.multiview=i.multiview}_setTextureOptions(t={}){const e={minFilter:we,generateMipmaps:!1,flipY:!1,internalFormat:null};t.mapping!==void 0&&(e.mapping=t.mapping),t.wrapS!==void 0&&(e.wrapS=t.wrapS),t.wrapT!==void 0&&(e.wrapT=t.wrapT),t.wrapR!==void 0&&(e.wrapR=t.wrapR),t.magFilter!==void 0&&(e.magFilter=t.magFilter),t.minFilter!==void 0&&(e.minFilter=t.minFilter),t.format!==void 0&&(e.format=t.format),t.type!==void 0&&(e.type=t.type),t.anisotropy!==void 0&&(e.anisotropy=t.anisotropy),t.colorSpace!==void 0&&(e.colorSpace=t.colorSpace),t.flipY!==void 0&&(e.flipY=t.flipY),t.generateMipmaps!==void 0&&(e.generateMipmaps=t.generateMipmaps),t.internalFormat!==void 0&&(e.internalFormat=t.internalFormat);for(let i=0;i<this.textures.length;i++)this.textures[i].setValues(e)}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}set depthTexture(t){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),t!==null&&(t.renderTarget=this),this._depthTexture=t}get depthTexture(){return this._depthTexture}setSize(t,e,i=1){if(this.width!==t||this.height!==e||this.depth!==i){this.width=t,this.height=e,this.depth=i;for(let s=0,n=this.textures.length;s<n;s++)this.textures[s].image.width=t,this.textures[s].image.height=e,this.textures[s].image.depth=i,this.textures[s].isArrayTexture=this.textures[s].image.depth>1;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let e=0,i=t.textures.length;e<i;e++){this.textures[e]=t.textures[e].clone(),this.textures[e].isRenderTargetTexture=!0,this.textures[e].renderTarget=this;const s=Object.assign({},t.textures[e].image);this.textures[e].source=new ei(s)}return this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class qn extends Wn{constructor(t=1,e=1,i={}){super(t,e,i),this.isWebGLRenderTarget=!0}}class yo extends j{constructor(t=null,e=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=lt,this.minFilter=lt,this.wrapR=Gt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class xo extends j{constructor(t=null,e=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=lt,this.minFilter=lt,this.wrapR=Gt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class he{constructor(t=new m(1/0,1/0,1/0),e=new m(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(at.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(at.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=at.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const n=i.getAttribute("position");if(e===!0&&n!==void 0&&t.isInstancedMesh!==!0)for(let r=0,o=n.count;r<o;r++)t.isMesh===!0?t.getVertexPosition(r,at):at.fromBufferAttribute(n,r),at.applyMatrix4(t.matrixWorld),this.expandByPoint(at);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),ze.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),ze.copy(i.boundingBox)),ze.applyMatrix4(t.matrixWorld),this.union(ze)}const s=t.children;for(let n=0,r=s.length;n<r;n++)this.expandByObject(s[n],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,at),at.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(le),Te.subVectors(this.max,le),Xt.subVectors(t.a,le),Ht.subVectors(t.b,le),Yt.subVectors(t.c,le),Ct.subVectors(Ht,Xt),Ft.subVectors(Yt,Ht),Dt.subVectors(Xt,Yt);let e=[0,-Ct.z,Ct.y,0,-Ft.z,Ft.y,0,-Dt.z,Dt.y,Ct.z,0,-Ct.x,Ft.z,0,-Ft.x,Dt.z,0,-Dt.x,-Ct.y,Ct.x,0,-Ft.y,Ft.x,0,-Dt.y,Dt.x,0];return!ci(e,Xt,Ht,Yt,Te)||(e=[1,0,0,0,1,0,0,0,1],!ci(e,Xt,Ht,Yt,Te))?!1:(Ce.crossVectors(Ct,Ft),e=[Ce.x,Ce.y,Ce.z],ci(e,Xt,Ht,Yt,Te))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,at).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(at).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Mt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Mt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Mt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Mt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Mt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Mt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Mt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Mt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Mt),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(t){return this.min.fromArray(t.min),this.max.fromArray(t.max),this}}const Mt=[new m,new m,new m,new m,new m,new m,new m,new m],at=new m,ze=new he,Xt=new m,Ht=new m,Yt=new m,Ct=new m,Ft=new m,Dt=new m,le=new m,Te=new m,Ce=new m,kt=new m;function ci(c,t,e,i,s){for(let n=0,r=c.length-3;n<=r;n+=3){kt.fromArray(c,n);const o=s.x*Math.abs(kt.x)+s.y*Math.abs(kt.y)+s.z*Math.abs(kt.z),a=t.dot(kt),h=e.dot(kt),l=i.dot(kt);if(Math.max(-Math.max(a,h,l),Math.min(a,h,l))>o)return!1}return!0}const go=new he,ce=new m,ui=new m;class _e{constructor(t=new m,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;e!==void 0?i.copy(e):go.setFromPoints(t).getCenter(i);let s=0;for(let n=0,r=t.length;n<r;n++)s=Math.max(s,i.distanceToSquared(t[n]));return this.radius=Math.sqrt(s),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;ce.subVectors(t,this.center);const e=ce.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(ce,s/i),this.radius+=s}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(ui.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(ce.copy(t.center).add(ui)),this.expandByPoint(ce.copy(t.center).sub(ui))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(t){return this.radius=t.radius,this.center.fromArray(t.center),this}}const wt=new m,pi=new m,Fe=new m,Rt=new m,di=new m,Re=new m,fi=new m;class ii{constructor(t=new m,e=new m(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,wt)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=wt.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(wt.copy(this.origin).addScaledVector(this.direction,e),wt.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){pi.copy(t).add(e).multiplyScalar(.5),Fe.copy(e).sub(t).normalize(),Rt.copy(this.origin).sub(pi);const n=t.distanceTo(e)*.5,r=-this.direction.dot(Fe),o=Rt.dot(this.direction),a=-Rt.dot(Fe),h=Rt.lengthSq(),l=Math.abs(1-r*r);let u,p,d,f;if(l>0)if(u=r*a-o,p=r*o-a,f=n*l,u>=0)if(p>=-f)if(p<=f){const y=1/l;u*=y,p*=y,d=u*(u+r*p+2*o)+p*(r*u+p+2*a)+h}else p=n,u=Math.max(0,-(r*p+o)),d=-u*u+p*(p+2*a)+h;else p=-n,u=Math.max(0,-(r*p+o)),d=-u*u+p*(p+2*a)+h;else p<=-f?(u=Math.max(0,-(-r*n+o)),p=u>0?-n:Math.min(Math.max(-n,-a),n),d=-u*u+p*(p+2*a)+h):p<=f?(u=0,p=Math.min(Math.max(-n,-a),n),d=p*(p+2*a)+h):(u=Math.max(0,-(r*n+o)),p=u>0?n:Math.min(Math.max(-n,-a),n),d=-u*u+p*(p+2*a)+h);else p=r>0?-n:n,u=Math.max(0,-(r*p+o)),d=-u*u+p*(p+2*a)+h;return i&&i.copy(this.origin).addScaledVector(this.direction,u),s&&s.copy(pi).addScaledVector(Fe,p),d}intersectSphere(t,e){wt.subVectors(t.center,this.origin);const i=wt.dot(this.direction),s=wt.dot(wt)-i*i,n=t.radius*t.radius;if(s>n)return null;const r=Math.sqrt(n-s),o=i-r,a=i+r;return a<0?null:o<0?this.at(a,e):this.at(o,e)}intersectsSphere(t){return t.radius<0?!1:this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return i===null?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,s,n,r,o,a;const h=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,p=this.origin;return h>=0?(i=(t.min.x-p.x)*h,s=(t.max.x-p.x)*h):(i=(t.max.x-p.x)*h,s=(t.min.x-p.x)*h),l>=0?(n=(t.min.y-p.y)*l,r=(t.max.y-p.y)*l):(n=(t.max.y-p.y)*l,r=(t.min.y-p.y)*l),i>r||n>s||((n>i||isNaN(i))&&(i=n),(r<s||isNaN(s))&&(s=r),u>=0?(o=(t.min.z-p.z)*u,a=(t.max.z-p.z)*u):(o=(t.max.z-p.z)*u,a=(t.min.z-p.z)*u),i>a||o>s)||((o>i||i!==i)&&(i=o),(a<s||s!==s)&&(s=a),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,wt)!==null}intersectTriangle(t,e,i,s,n){di.subVectors(e,t),Re.subVectors(i,t),fi.crossVectors(di,Re);let r=this.direction.dot(fi),o;if(r>0){if(s)return null;o=1}else if(r<0)o=-1,r=-r;else return null;Rt.subVectors(this.origin,t);const a=o*this.direction.dot(Re.crossVectors(Rt,Re));if(a<0)return null;const h=o*this.direction.dot(di.cross(Rt));if(h<0||a+h>r)return null;const l=-o*Rt.dot(fi);return l<0?null:this.at(l/r,n)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class L{constructor(t,e,i,s,n,r,o,a,h,l,u,p,d,f,y,x){L.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,r,o,a,h,l,u,p,d,f,y,x)}set(t,e,i,s,n,r,o,a,h,l,u,p,d,f,y,x){const g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=s,g[1]=n,g[5]=r,g[9]=o,g[13]=a,g[2]=h,g[6]=l,g[10]=u,g[14]=p,g[3]=d,g[7]=f,g[11]=y,g[15]=x,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new L().fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,i=t.elements,s=1/Zt.setFromMatrixColumn(t,0).length(),n=1/Zt.setFromMatrixColumn(t,1).length(),r=1/Zt.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*n,e[5]=i[5]*n,e[6]=i[6]*n,e[7]=0,e[8]=i[8]*r,e[9]=i[9]*r,e[10]=i[10]*r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,s=t.y,n=t.z,r=Math.cos(i),o=Math.sin(i),a=Math.cos(s),h=Math.sin(s),l=Math.cos(n),u=Math.sin(n);if(t.order==="XYZ"){const p=r*l,d=r*u,f=o*l,y=o*u;e[0]=a*l,e[4]=-a*u,e[8]=h,e[1]=d+f*h,e[5]=p-y*h,e[9]=-o*a,e[2]=y-p*h,e[6]=f+d*h,e[10]=r*a}else if(t.order==="YXZ"){const p=a*l,d=a*u,f=h*l,y=h*u;e[0]=p+y*o,e[4]=f*o-d,e[8]=r*h,e[1]=r*u,e[5]=r*l,e[9]=-o,e[2]=d*o-f,e[6]=y+p*o,e[10]=r*a}else if(t.order==="ZXY"){const p=a*l,d=a*u,f=h*l,y=h*u;e[0]=p-y*o,e[4]=-r*u,e[8]=f+d*o,e[1]=d+f*o,e[5]=r*l,e[9]=y-p*o,e[2]=-r*h,e[6]=o,e[10]=r*a}else if(t.order==="ZYX"){const p=r*l,d=r*u,f=o*l,y=o*u;e[0]=a*l,e[4]=f*h-d,e[8]=p*h+y,e[1]=a*u,e[5]=y*h+p,e[9]=d*h-f,e[2]=-h,e[6]=o*a,e[10]=r*a}else if(t.order==="YZX"){const p=r*a,d=r*h,f=o*a,y=o*h;e[0]=a*l,e[4]=y-p*u,e[8]=f*u+d,e[1]=u,e[5]=r*l,e[9]=-o*l,e[2]=-h*l,e[6]=d*u+f,e[10]=p-y*u}else if(t.order==="XZY"){const p=r*a,d=r*h,f=o*a,y=o*h;e[0]=a*l,e[4]=-u,e[8]=h*l,e[1]=p*u+y,e[5]=r*l,e[9]=d*u-f,e[2]=f*u-d,e[6]=o*l,e[10]=y*u+p}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Mo,t,wo)}lookAt(t,e,i){const s=this.elements;return Q.subVectors(t,e),Q.lengthSq()===0&&(Q.z=1),Q.normalize(),Bt.crossVectors(i,Q),Bt.lengthSq()===0&&(Math.abs(i.z)===1?Q.x+=1e-4:Q.z+=1e-4,Q.normalize(),Bt.crossVectors(i,Q)),Bt.normalize(),Be.crossVectors(Q,Bt),s[0]=Bt.x,s[4]=Be.x,s[8]=Q.x,s[1]=Bt.y,s[5]=Be.y,s[9]=Q.y,s[2]=Bt.z,s[6]=Be.z,s[10]=Q.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,n=this.elements,r=i[0],o=i[4],a=i[8],h=i[12],l=i[1],u=i[5],p=i[9],d=i[13],f=i[2],y=i[6],x=i[10],g=i[14],b=i[3],w=i[7],M=i[11],S=i[15],v=s[0],A=s[4],_=s[8],F=s[12],R=s[1],P=s[5],B=s[9],E=s[13],D=s[2],G=s[6],it=s[10],Lt=s[14],Tt=s[3],U=s[7],W=s[11],$=s[15];return n[0]=r*v+o*R+a*D+h*Tt,n[4]=r*A+o*P+a*G+h*U,n[8]=r*_+o*B+a*it+h*W,n[12]=r*F+o*E+a*Lt+h*$,n[1]=l*v+u*R+p*D+d*Tt,n[5]=l*A+u*P+p*G+d*U,n[9]=l*_+u*B+p*it+d*W,n[13]=l*F+u*E+p*Lt+d*$,n[2]=f*v+y*R+x*D+g*Tt,n[6]=f*A+y*P+x*G+g*U,n[10]=f*_+y*B+x*it+g*W,n[14]=f*F+y*E+x*Lt+g*$,n[3]=b*v+w*R+M*D+S*Tt,n[7]=b*A+w*P+M*G+S*U,n[11]=b*_+w*B+M*it+S*W,n[15]=b*F+w*E+M*Lt+S*$,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],s=t[8],n=t[12],r=t[1],o=t[5],a=t[9],h=t[13],l=t[2],u=t[6],p=t[10],d=t[14],f=t[3],y=t[7],x=t[11],g=t[15];return f*(+n*a*u-s*h*u-n*o*p+i*h*p+s*o*d-i*a*d)+y*(+e*a*d-e*h*p+n*r*p-s*r*d+s*h*l-n*a*l)+x*(+e*h*u-e*o*d-n*r*u+i*r*d+n*o*l-i*h*l)+g*(-s*o*l-e*a*u+e*o*p+s*r*u-i*r*p+i*a*l)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],r=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],p=t[10],d=t[11],f=t[12],y=t[13],x=t[14],g=t[15],b=u*x*h-y*p*h+y*a*d-o*x*d-u*a*g+o*p*g,w=f*p*h-l*x*h-f*a*d+r*x*d+l*a*g-r*p*g,M=l*y*h-f*u*h+f*o*d-r*y*d-l*o*g+r*u*g,S=f*u*a-l*y*a-f*o*p+r*y*p+l*o*x-r*u*x,v=e*b+i*w+s*M+n*S;if(v===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/v;return t[0]=b*A,t[1]=(y*p*n-u*x*n-y*s*d+i*x*d+u*s*g-i*p*g)*A,t[2]=(o*x*n-y*a*n+y*s*h-i*x*h-o*s*g+i*a*g)*A,t[3]=(u*a*n-o*p*n-u*s*h+i*p*h+o*s*d-i*a*d)*A,t[4]=w*A,t[5]=(l*x*n-f*p*n+f*s*d-e*x*d-l*s*g+e*p*g)*A,t[6]=(f*a*n-r*x*n-f*s*h+e*x*h+r*s*g-e*a*g)*A,t[7]=(r*p*n-l*a*n+l*s*h-e*p*h-r*s*d+e*a*d)*A,t[8]=M*A,t[9]=(f*u*n-l*y*n-f*i*d+e*y*d+l*i*g-e*u*g)*A,t[10]=(r*y*n-f*o*n+f*i*h-e*y*h-r*i*g+e*o*g)*A,t[11]=(l*o*n-r*u*n-l*i*h+e*u*h+r*i*d-e*o*d)*A,t[12]=S*A,t[13]=(l*y*s-f*u*s+f*i*p-e*y*p-l*i*x+e*u*x)*A,t[14]=(f*o*s-r*y*s-f*i*a+e*y*a+r*i*x-e*o*x)*A,t[15]=(r*u*s-l*o*s+l*i*a-e*u*a-r*i*p+e*o*p)*A,this}scale(t){const e=this.elements,i=t.x,s=t.y,n=t.z;return e[0]*=i,e[4]*=s,e[8]*=n,e[1]*=i,e[5]*=s,e[9]*=n,e[2]*=i,e[6]*=s,e[10]*=n,e[3]*=i,e[7]*=s,e[11]*=n,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),n=1-i,r=t.x,o=t.y,a=t.z,h=n*r,l=n*o;return this.set(h*r+i,h*o-s*a,h*a+s*o,0,h*o+s*a,l*o+i,l*a-s*r,0,h*a-s*o,l*a+s*r,n*a*a+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,n,r){return this.set(1,i,n,0,t,1,r,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,n=e._x,r=e._y,o=e._z,a=e._w,h=n+n,l=r+r,u=o+o,p=n*h,d=n*l,f=n*u,y=r*l,x=r*u,g=o*u,b=a*h,w=a*l,M=a*u,S=i.x,v=i.y,A=i.z;return s[0]=(1-(y+g))*S,s[1]=(d+M)*S,s[2]=(f-w)*S,s[3]=0,s[4]=(d-M)*v,s[5]=(1-(p+g))*v,s[6]=(x+b)*v,s[7]=0,s[8]=(f+w)*A,s[9]=(x-b)*A,s[10]=(1-(p+y))*A,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){const s=this.elements;let n=Zt.set(s[0],s[1],s[2]).length();const r=Zt.set(s[4],s[5],s[6]).length(),o=Zt.set(s[8],s[9],s[10]).length();this.determinant()<0&&(n=-n),t.x=s[12],t.y=s[13],t.z=s[14],ot.copy(this);const h=1/n,l=1/r,u=1/o;return ot.elements[0]*=h,ot.elements[1]*=h,ot.elements[2]*=h,ot.elements[4]*=l,ot.elements[5]*=l,ot.elements[6]*=l,ot.elements[8]*=u,ot.elements[9]*=u,ot.elements[10]*=u,e.setFromRotationMatrix(ot),i.x=n,i.y=r,i.z=o,this}makePerspective(t,e,i,s,n,r,o=ft){const a=this.elements,h=2*n/(e-t),l=2*n/(i-s),u=(e+t)/(e-t),p=(i+s)/(i-s);let d,f;if(o===ft)d=-(r+n)/(r-n),f=-2*r*n/(r-n);else if(o===be)d=-r/(r-n),f=-r*n/(r-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+o);return a[0]=h,a[4]=0,a[8]=u,a[12]=0,a[1]=0,a[5]=l,a[9]=p,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,i,s,n,r,o=ft){const a=this.elements,h=1/(e-t),l=1/(i-s),u=1/(r-n),p=(e+t)*h,d=(i+s)*l;let f,y;if(o===ft)f=(r+n)*u,y=-2*u;else if(o===be)f=n*u,y=-1*u;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+o);return a[0]=2*h,a[4]=0,a[8]=0,a[12]=-p,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=y,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<16;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const Zt=new m,ot=new L,Mo=new m(0,0,0),wo=new m(1,1,1),Bt=new m,Be=new m,Q=new m,Ss=new L,_s=new oe;class ct{constructor(t=0,e=0,i=0,s=ct.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const s=t.elements,n=s[0],r=s[4],o=s[8],a=s[1],h=s[5],l=s[9],u=s[2],p=s[6],d=s[10];switch(e){case"XYZ":this._y=Math.asin(C(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-r,n)):(this._x=Math.atan2(p,h),this._z=0);break;case"YXZ":this._x=Math.asin(-C(l,-1,1)),Math.abs(l)<.9999999?(this._y=Math.atan2(o,d),this._z=Math.atan2(a,h)):(this._y=Math.atan2(-u,n),this._z=0);break;case"ZXY":this._x=Math.asin(C(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-r,h)):(this._y=0,this._z=Math.atan2(a,n));break;case"ZYX":this._y=Math.asin(-C(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(p,d),this._z=Math.atan2(a,n)):(this._x=0,this._z=Math.atan2(-r,h));break;case"YZX":this._z=Math.asin(C(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-u,n)):(this._x=0,this._y=Math.atan2(o,d));break;case"XZY":this._z=Math.asin(-C(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(p,h),this._y=Math.atan2(o,n)):(this._x=Math.atan2(-l,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return Ss.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Ss,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return _s.setFromEuler(this),this.setFromQuaternion(_s,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}ct.DEFAULT_ORDER="XYZ";class es{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let bo=0;const As=new m,$t=new oe,bt=new L,Ee=new m,ue=new m,So=new m,_o=new oe,vs=new m(1,0,0),zs=new m(0,1,0),Ts=new m(0,0,1),Cs={type:"added"},Ao={type:"removed"},Qt={type:"childadded",child:null},mi={type:"childremoved",child:null};class k extends qt{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:bo++}),this.uuid=vt(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=k.DEFAULT_UP.clone();const t=new m,e=new ct,i=new oe,s=new m(1,1,1);function n(){i.setFromEuler(e,!1)}function r(){e.setFromQuaternion(i,void 0,!1)}e._onChange(n),i._onChange(r),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new L},normalMatrix:{value:new yt}}),this.matrix=new L,this.matrixWorld=new L,this.matrixAutoUpdate=k.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=k.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new es,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return $t.setFromAxisAngle(t,e),this.quaternion.multiply($t),this}rotateOnWorldAxis(t,e){return $t.setFromAxisAngle(t,e),this.quaternion.premultiply($t),this}rotateX(t){return this.rotateOnAxis(vs,t)}rotateY(t){return this.rotateOnAxis(zs,t)}rotateZ(t){return this.rotateOnAxis(Ts,t)}translateOnAxis(t,e){return As.copy(t).applyQuaternion(this.quaternion),this.position.add(As.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(vs,t)}translateY(t){return this.translateOnAxis(zs,t)}translateZ(t){return this.translateOnAxis(Ts,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(bt.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?Ee.copy(t):Ee.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),ue.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?bt.lookAt(ue,Ee,this.up):bt.lookAt(Ee,ue,this.up),this.quaternion.setFromRotationMatrix(bt),s&&(bt.extractRotation(s.matrixWorld),$t.setFromRotationMatrix(bt),this.quaternion.premultiply($t.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Cs),Qt.child=t,this.dispatchEvent(Qt),Qt.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Ao),mi.child=t,this.dispatchEvent(mi),mi.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),bt.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),bt.multiply(t.parent.matrixWorld)),t.applyMatrix4(bt),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Cs),Qt.child=t,this.dispatchEvent(Qt),Qt.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,s=this.children.length;i<s;i++){const r=this.children[i].getObjectByProperty(t,e);if(r!==void 0)return r}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].getObjectsByProperty(t,e,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ue,t,So),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ue,_o,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){const i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const s=this.children;for(let n=0,r=s.length;n<r;n++)s[n].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.geometryInfo=this._geometryInfo.map(o=>({...o,boundingBox:o.boundingBox?o.boundingBox.toJSON():void 0,boundingSphere:o.boundingSphere?o.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(o=>({...o})),s.availableInstanceIds=this._availableInstanceIds.slice(),s.availableGeometryIds=this._availableGeometryIds.slice(),s.nextIndexStart=this._nextIndexStart,s.nextVertexStart=this._nextVertexStart,s.geometryCount=this._geometryCount,s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.matricesTexture=this._matricesTexture.toJSON(t),s.indirectTexture=this._indirectTexture.toJSON(t),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(s.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(s.boundingBox=this.boundingBox.toJSON()));function n(o,a){return o[a.uuid]===void 0&&(o[a.uuid]=a.toJSON(t)),a.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=n(t.geometries,this.geometry);const o=this.geometry.parameters;if(o!==void 0&&o.shapes!==void 0){const a=o.shapes;if(Array.isArray(a))for(let h=0,l=a.length;h<l;h++){const u=a[h];n(t.shapes,u)}else n(t.shapes,a)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(n(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const o=[];for(let a=0,h=this.material.length;a<h;a++)o.push(n(t.materials,this.material[a]));s.material=o}else s.material=n(t.materials,this.material);if(this.children.length>0){s.children=[];for(let o=0;o<this.children.length;o++)s.children.push(this.children[o].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let o=0;o<this.animations.length;o++){const a=this.animations[o];s.animations.push(n(t.animations,a))}}if(e){const o=r(t.geometries),a=r(t.materials),h=r(t.textures),l=r(t.images),u=r(t.shapes),p=r(t.skeletons),d=r(t.animations),f=r(t.nodes);o.length>0&&(i.geometries=o),a.length>0&&(i.materials=a),h.length>0&&(i.textures=h),l.length>0&&(i.images=l),u.length>0&&(i.shapes=u),p.length>0&&(i.skeletons=p),d.length>0&&(i.animations=d),f.length>0&&(i.nodes=f)}return i.object=s,i;function r(o){const a=[];for(const h in o){const l=o[h];delete l.metadata,a.push(l)}return a}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let i=0;i<t.children.length;i++){const s=t.children[i];this.add(s.clone())}return this}}k.DEFAULT_UP=new m(0,1,0);k.DEFAULT_MATRIX_AUTO_UPDATE=!0;k.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const ht=new m,St=new m,yi=new m,_t=new m,Kt=new m,te=new m,Fs=new m,xi=new m,gi=new m,Mi=new m,wi=new H,bi=new H,Si=new H;class rt{constructor(t=new m,e=new m,i=new m){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),ht.subVectors(t,e),s.cross(ht);const n=s.lengthSq();return n>0?s.multiplyScalar(1/Math.sqrt(n)):s.set(0,0,0)}static getBarycoord(t,e,i,s,n){ht.subVectors(s,e),St.subVectors(i,e),yi.subVectors(t,e);const r=ht.dot(ht),o=ht.dot(St),a=ht.dot(yi),h=St.dot(St),l=St.dot(yi),u=r*h-o*o;if(u===0)return n.set(0,0,0),null;const p=1/u,d=(h*a-o*l)*p,f=(r*l-o*a)*p;return n.set(1-d-f,f,d)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,_t)===null?!1:_t.x>=0&&_t.y>=0&&_t.x+_t.y<=1}static getInterpolation(t,e,i,s,n,r,o,a){return this.getBarycoord(t,e,i,s,_t)===null?(a.x=0,a.y=0,"z"in a&&(a.z=0),"w"in a&&(a.w=0),null):(a.setScalar(0),a.addScaledVector(n,_t.x),a.addScaledVector(r,_t.y),a.addScaledVector(o,_t.z),a)}static getInterpolatedAttribute(t,e,i,s,n,r){return wi.setScalar(0),bi.setScalar(0),Si.setScalar(0),wi.fromBufferAttribute(t,e),bi.fromBufferAttribute(t,i),Si.fromBufferAttribute(t,s),r.setScalar(0),r.addScaledVector(wi,n.x),r.addScaledVector(bi,n.y),r.addScaledVector(Si,n.z),r}static isFrontFacing(t,e,i,s){return ht.subVectors(i,e),St.subVectors(t,e),ht.cross(St).dot(s)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ht.subVectors(this.c,this.b),St.subVectors(this.a,this.b),ht.cross(St).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return rt.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return rt.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,n){return rt.getInterpolation(t,this.a,this.b,this.c,e,i,s,n)}containsPoint(t){return rt.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return rt.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,s=this.b,n=this.c;let r,o;Kt.subVectors(s,i),te.subVectors(n,i),xi.subVectors(t,i);const a=Kt.dot(xi),h=te.dot(xi);if(a<=0&&h<=0)return e.copy(i);gi.subVectors(t,s);const l=Kt.dot(gi),u=te.dot(gi);if(l>=0&&u<=l)return e.copy(s);const p=a*u-l*h;if(p<=0&&a>=0&&l<=0)return r=a/(a-l),e.copy(i).addScaledVector(Kt,r);Mi.subVectors(t,n);const d=Kt.dot(Mi),f=te.dot(Mi);if(f>=0&&d<=f)return e.copy(n);const y=d*h-a*f;if(y<=0&&h>=0&&f<=0)return o=h/(h-f),e.copy(i).addScaledVector(te,o);const x=l*f-d*u;if(x<=0&&u-l>=0&&d-f>=0)return Fs.subVectors(n,s),o=(u-l)/(u-l+(d-f)),e.copy(s).addScaledVector(Fs,o);const g=1/(x+y+p);return r=y*g,o=p*g,e.copy(i).addScaledVector(Kt,r).addScaledVector(te,o)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Jn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Et={h:0,s:0,l:0},Pe={h:0,s:0,l:0};function _i(c,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?c+(t-c)*6*e:e<1/2?t:e<2/3?c+(t-c)*6*(2/3-e):c}class I{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(e===void 0&&i===void 0){const s=t;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=nt){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,et.colorSpaceToWorking(this,e),this}setRGB(t,e,i,s=et.workingColorSpace){return this.r=t,this.g=e,this.b=i,et.colorSpaceToWorking(this,s),this}setHSL(t,e,i,s=et.workingColorSpace){if(t=ts(t,1),e=C(e,0,1),i=C(i,0,1),e===0)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,r=2*i-n;this.r=_i(r,n,t+1/3),this.g=_i(r,n,t),this.b=_i(r,n,t-1/3)}return et.colorSpaceToWorking(this,s),this}setStyle(t,e=nt){function i(n){n!==void 0&&parseFloat(n)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let n;const r=s[1],o=s[2];switch(r){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(n[4]),this.setRGB(Math.min(255,parseInt(n[1],10))/255,Math.min(255,parseInt(n[2],10))/255,Math.min(255,parseInt(n[3],10))/255,e);if(n=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(n[4]),this.setRGB(Math.min(100,parseInt(n[1],10))/100,Math.min(100,parseInt(n[2],10))/100,Math.min(100,parseInt(n[3],10))/100,e);break;case"hsl":case"hsla":if(n=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return i(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=s[1],r=n.length;if(r===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(r===6)return this.setHex(parseInt(n,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=nt){const i=Jn[t.toLowerCase()];return i!==void 0?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=zt(t.r),this.g=zt(t.g),this.b=zt(t.b),this}copyLinearToSRGB(t){return this.r=re(t.r),this.g=re(t.g),this.b=re(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=nt){return et.workingToColorSpace(J.copy(this),t),Math.round(C(J.r*255,0,255))*65536+Math.round(C(J.g*255,0,255))*256+Math.round(C(J.b*255,0,255))}getHexString(t=nt){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=et.workingColorSpace){et.workingToColorSpace(J.copy(this),e);const i=J.r,s=J.g,n=J.b,r=Math.max(i,s,n),o=Math.min(i,s,n);let a,h;const l=(o+r)/2;if(o===r)a=0,h=0;else{const u=r-o;switch(h=l<=.5?u/(r+o):u/(2-r-o),r){case i:a=(s-n)/u+(s<n?6:0);break;case s:a=(n-i)/u+2;break;case n:a=(i-s)/u+4;break}a/=6}return t.h=a,t.s=h,t.l=l,t}getRGB(t,e=et.workingColorSpace){return et.workingToColorSpace(J.copy(this),e),t.r=J.r,t.g=J.g,t.b=J.b,t}getStyle(t=nt){et.workingToColorSpace(J.copy(this),t);const e=J.r,i=J.g,s=J.b;return t!==nt?`color(${t} ${e.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(t,e,i){return this.getHSL(Et),this.setHSL(Et.h+t,Et.s+e,Et.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(Et),t.getHSL(Pe);const i=xe(Et.h,Pe.h,e),s=xe(Et.s,Pe.s,e),n=xe(Et.l,Pe.l,e);return this.setHSL(i,s,n),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,i=this.g,s=this.b,n=t.elements;return this.r=n[0]*e+n[3]*i+n[6]*s,this.g=n[1]*e+n[4]*i+n[7]*s,this.b=n[2]*e+n[5]*i+n[8]*s,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const J=new I;I.NAMES=Jn;let vo=0;class Z extends qt{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:vo++}),this.uuid=vt(),this.name="",this.type="Material",this.blending=Pi,this.side=Ye,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Li,this.blendDst=Di,this.blendEquation=Ii,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new I(0,0,0),this.blendAlpha=0,this.depthFunc=ki,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Wi,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Vt,this.stencilZFail=Vt,this.stencilZPass=Vt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const i=t[e];if(i===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const i={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Pi&&(i.blending=this.blending),this.side!==Ye&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Li&&(i.blendSrc=this.blendSrc),this.blendDst!==Di&&(i.blendDst=this.blendDst),this.blendEquation!==Ii&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==ki&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Wi&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Vt&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Vt&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Vt&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(n){const r=[];for(const o in n){const a=n[o];delete a.metadata,r.push(a)}return r}if(e){const n=s(t.textures),r=s(t.images);n.length>0&&(i.textures=n),r.length>0&&(i.images=r)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(e!==null){const s=e.length;i=new Array(s);for(let n=0;n!==s;++n)i[n]=e[n].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}}class jn extends Z{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new I(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ct,this.combine=Ke,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const At=zo();function zo(){const c=new ArrayBuffer(4),t=new Float32Array(c),e=new Uint32Array(c),i=new Uint32Array(512),s=new Uint32Array(512);for(let a=0;a<256;++a){const h=a-127;h<-27?(i[a]=0,i[a|256]=32768,s[a]=24,s[a|256]=24):h<-14?(i[a]=1024>>-h-14,i[a|256]=1024>>-h-14|32768,s[a]=-h-1,s[a|256]=-h-1):h<=15?(i[a]=h+15<<10,i[a|256]=h+15<<10|32768,s[a]=13,s[a|256]=13):h<128?(i[a]=31744,i[a|256]=64512,s[a]=24,s[a|256]=24):(i[a]=31744,i[a|256]=64512,s[a]=13,s[a|256]=13)}const n=new Uint32Array(2048),r=new Uint32Array(64),o=new Uint32Array(64);for(let a=1;a<1024;++a){let h=a<<13,l=0;for(;(h&8388608)===0;)h<<=1,l-=8388608;h&=-8388609,l+=947912704,n[a]=h|l}for(let a=1024;a<2048;++a)n[a]=939524096+(a-1024<<13);for(let a=1;a<31;++a)r[a]=a<<23;r[31]=1199570944,r[32]=2147483648;for(let a=33;a<63;++a)r[a]=2147483648+(a-32<<23);r[63]=3347054592;for(let a=1;a<64;++a)a!==32&&(o[a]=1024);return{floatView:t,uint32View:e,baseTable:i,shiftTable:s,mantissaTable:n,exponentTable:r,offsetTable:o}}function K(c){Math.abs(c)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),c=C(c,-65504,65504),At.floatView[0]=c;const t=At.uint32View[0],e=t>>23&511;return At.baseTable[e]+((t&8388607)>>At.shiftTable[e])}function Ie(c){const t=c>>10;return At.uint32View[0]=At.mantissaTable[At.offsetTable[t]+(c&1023)]+At.exponentTable[t],At.floatView[0]}const O=new m,Le=new z;let To=0;class mt{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:To++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=Ze,this.updateRanges=[],this.gpuType=$i,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let s=0,n=this.itemSize;s<n;s++)this.array[t+s]=e.array[i+s];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,i=this.count;e<i;e++)Le.fromBufferAttribute(this,e),Le.applyMatrix3(t),this.setXY(e,Le.x,Le.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)O.fromBufferAttribute(this,e),O.applyMatrix3(t),this.setXYZ(e,O.x,O.y,O.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)O.fromBufferAttribute(this,e),O.applyMatrix4(t),this.setXYZ(e,O.x,O.y,O.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)O.fromBufferAttribute(this,e),O.applyNormalMatrix(t),this.setXYZ(e,O.x,O.y,O.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)O.fromBufferAttribute(this,e),O.transformDirection(t),this.setXYZ(e,O.x,O.y,O.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let i=this.array[t*this.itemSize+e];return this.normalized&&(i=Y(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=T(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Y(e,this.array)),e}setX(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Y(e,this.array)),e}setY(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Y(e,this.array)),e}setZ(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Y(e,this.array)),e}setW(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array),n=T(n,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this.array[t+3]=n,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==Ze&&(t.usage=this.usage),t}}class Xn extends mt{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class Hn extends mt{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class Co extends mt{constructor(t,e,i){super(new Uint16Array(t),e,i),this.isFloat16BufferAttribute=!0}getX(t){let e=Ie(this.array[t*this.itemSize]);return this.normalized&&(e=Y(e,this.array)),e}setX(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize]=K(e),this}getY(t){let e=Ie(this.array[t*this.itemSize+1]);return this.normalized&&(e=Y(e,this.array)),e}setY(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+1]=K(e),this}getZ(t){let e=Ie(this.array[t*this.itemSize+2]);return this.normalized&&(e=Y(e,this.array)),e}setZ(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+2]=K(e),this}getW(t){let e=Ie(this.array[t*this.itemSize+3]);return this.normalized&&(e=Y(e,this.array)),e}setW(t,e){return this.normalized&&(e=T(e,this.array)),this.array[t*this.itemSize+3]=K(e),this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array)),this.array[t+0]=K(e),this.array[t+1]=K(i),this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array)),this.array[t+0]=K(e),this.array[t+1]=K(i),this.array[t+2]=K(s),this}setXYZW(t,e,i,s,n){return t*=this.itemSize,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array),n=T(n,this.array)),this.array[t+0]=K(e),this.array[t+1]=K(i),this.array[t+2]=K(s),this.array[t+3]=K(n),this}}class V extends mt{constructor(t,e,i){super(new Float32Array(t),e,i)}}let Fo=0;const st=new L,Ai=new k,ee=new m,tt=new he,pe=new he,N=new m;class xt extends qt{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Fo++}),this.uuid=vt(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Un(t)?Hn:Xn)(t,1):this.index=t,this}setIndirect(t){return this.indirect=t,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const n=new yt().getNormalMatrix(t);i.applyNormalMatrix(n),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(t),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return st.makeRotationFromQuaternion(t),this.applyMatrix4(st),this}rotateX(t){return st.makeRotationX(t),this.applyMatrix4(st),this}rotateY(t){return st.makeRotationY(t),this.applyMatrix4(st),this}rotateZ(t){return st.makeRotationZ(t),this.applyMatrix4(st),this}translate(t,e,i){return st.makeTranslation(t,e,i),this.applyMatrix4(st),this}scale(t,e,i){return st.makeScale(t,e,i),this.applyMatrix4(st),this}lookAt(t){return Ai.lookAt(t),Ai.updateMatrix(),this.applyMatrix4(Ai.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ee).negate(),this.translate(ee.x,ee.y,ee.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const i=[];for(let s=0,n=t.length;s<n;s++){const r=t[s];i.push(r.x,r.y,r.z||0)}this.setAttribute("position",new V(i,3))}else{const i=Math.min(t.length,e.count);for(let s=0;s<i;s++){const n=t[s];e.setXYZ(s,n.x,n.y,n.z||0)}t.length>e.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new he);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new m(-1/0,-1/0,-1/0),new m(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,s=e.length;i<s;i++){const n=e[i];tt.setFromBufferAttribute(n),this.morphTargetsRelative?(N.addVectors(this.boundingBox.min,tt.min),this.boundingBox.expandByPoint(N),N.addVectors(this.boundingBox.max,tt.max),this.boundingBox.expandByPoint(N)):(this.boundingBox.expandByPoint(tt.min),this.boundingBox.expandByPoint(tt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new _e);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new m,1/0);return}if(t){const i=this.boundingSphere.center;if(tt.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){const o=e[n];pe.setFromBufferAttribute(o),this.morphTargetsRelative?(N.addVectors(tt.min,pe.min),tt.expandByPoint(N),N.addVectors(tt.max,pe.max),tt.expandByPoint(N)):(tt.expandByPoint(pe.min),tt.expandByPoint(pe.max))}tt.getCenter(i);let s=0;for(let n=0,r=t.count;n<r;n++)N.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(N));if(e)for(let n=0,r=e.length;n<r;n++){const o=e[n],a=this.morphTargetsRelative;for(let h=0,l=o.count;h<l;h++)N.fromBufferAttribute(o,h),a&&(ee.fromBufferAttribute(t,h),N.add(ee)),s=Math.max(s,i.distanceToSquared(N))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.position,s=e.normal,n=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new mt(new Float32Array(4*i.count),4));const r=this.getAttribute("tangent"),o=[],a=[];for(let _=0;_<i.count;_++)o[_]=new m,a[_]=new m;const h=new m,l=new m,u=new m,p=new z,d=new z,f=new z,y=new m,x=new m;function g(_,F,R){h.fromBufferAttribute(i,_),l.fromBufferAttribute(i,F),u.fromBufferAttribute(i,R),p.fromBufferAttribute(n,_),d.fromBufferAttribute(n,F),f.fromBufferAttribute(n,R),l.sub(h),u.sub(h),d.sub(p),f.sub(p);const P=1/(d.x*f.y-f.x*d.y);isFinite(P)&&(y.copy(l).multiplyScalar(f.y).addScaledVector(u,-d.y).multiplyScalar(P),x.copy(u).multiplyScalar(d.x).addScaledVector(l,-f.x).multiplyScalar(P),o[_].add(y),o[F].add(y),o[R].add(y),a[_].add(x),a[F].add(x),a[R].add(x))}let b=this.groups;b.length===0&&(b=[{start:0,count:t.count}]);for(let _=0,F=b.length;_<F;++_){const R=b[_],P=R.start,B=R.count;for(let E=P,D=P+B;E<D;E+=3)g(t.getX(E+0),t.getX(E+1),t.getX(E+2))}const w=new m,M=new m,S=new m,v=new m;function A(_){S.fromBufferAttribute(s,_),v.copy(S);const F=o[_];w.copy(F),w.sub(S.multiplyScalar(S.dot(F))).normalize(),M.crossVectors(v,F);const P=M.dot(a[_])<0?-1:1;r.setXYZW(_,w.x,w.y,w.z,P)}for(let _=0,F=b.length;_<F;++_){const R=b[_],P=R.start,B=R.count;for(let E=P,D=P+B;E<D;E+=3)A(t.getX(E+0)),A(t.getX(E+1)),A(t.getX(E+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new mt(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let p=0,d=i.count;p<d;p++)i.setXYZ(p,0,0,0);const s=new m,n=new m,r=new m,o=new m,a=new m,h=new m,l=new m,u=new m;if(t)for(let p=0,d=t.count;p<d;p+=3){const f=t.getX(p+0),y=t.getX(p+1),x=t.getX(p+2);s.fromBufferAttribute(e,f),n.fromBufferAttribute(e,y),r.fromBufferAttribute(e,x),l.subVectors(r,n),u.subVectors(s,n),l.cross(u),o.fromBufferAttribute(i,f),a.fromBufferAttribute(i,y),h.fromBufferAttribute(i,x),o.add(l),a.add(l),h.add(l),i.setXYZ(f,o.x,o.y,o.z),i.setXYZ(y,a.x,a.y,a.z),i.setXYZ(x,h.x,h.y,h.z)}else for(let p=0,d=e.count;p<d;p+=3)s.fromBufferAttribute(e,p+0),n.fromBufferAttribute(e,p+1),r.fromBufferAttribute(e,p+2),l.subVectors(r,n),u.subVectors(s,n),l.cross(u),i.setXYZ(p+0,l.x,l.y,l.z),i.setXYZ(p+1,l.x,l.y,l.z),i.setXYZ(p+2,l.x,l.y,l.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)N.fromBufferAttribute(t,e),N.normalize(),t.setXYZ(e,N.x,N.y,N.z)}toNonIndexed(){function t(o,a){const h=o.array,l=o.itemSize,u=o.normalized,p=new h.constructor(a.length*l);let d=0,f=0;for(let y=0,x=a.length;y<x;y++){o.isInterleavedBufferAttribute?d=a[y]*o.data.stride+o.offset:d=a[y]*l;for(let g=0;g<l;g++)p[f++]=h[d++]}return new mt(p,l,u)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new xt,i=this.index.array,s=this.attributes;for(const o in s){const a=s[o],h=t(a,i);e.setAttribute(o,h)}const n=this.morphAttributes;for(const o in n){const a=[],h=n[o];for(let l=0,u=h.length;l<u;l++){const p=h[l],d=t(p,i);a.push(d)}e.morphAttributes[o]=a}e.morphTargetsRelative=this.morphTargetsRelative;const r=this.groups;for(let o=0,a=r.length;o<a;o++){const h=r[o];e.addGroup(h.start,h.count,h.materialIndex)}return e}toJSON(){const t={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const a=this.parameters;for(const h in a)a[h]!==void 0&&(t[h]=a[h]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const a in i){const h=i[a];t.data.attributes[a]=h.toJSON(t.data)}const s={};let n=!1;for(const a in this.morphAttributes){const h=this.morphAttributes[a],l=[];for(let u=0,p=h.length;u<p;u++){const d=h[u];l.push(d.toJSON(t.data))}l.length>0&&(s[a]=l,n=!0)}n&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const r=this.groups;r.length>0&&(t.data.groups=JSON.parse(JSON.stringify(r)));const o=this.boundingSphere;return o!==null&&(t.data.boundingSphere=o.toJSON()),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone());const s=t.attributes;for(const h in s){const l=s[h];this.setAttribute(h,l.clone(e))}const n=t.morphAttributes;for(const h in n){const l=[],u=n[h];for(let p=0,d=u.length;p<d;p++)l.push(u[p].clone(e));this.morphAttributes[h]=l}this.morphTargetsRelative=t.morphTargetsRelative;const r=t.groups;for(let h=0,l=r.length;h<l;h++){const u=r[h];this.addGroup(u.start,u.count,u.materialIndex)}const o=t.boundingBox;o!==null&&(this.boundingBox=o.clone());const a=t.boundingSphere;return a!==null&&(this.boundingSphere=a.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Rs=new L,Ot=new ii,De=new _e,Bs=new m,ke=new m,Oe=new m,Ne=new m,vi=new m,Ve=new m,Es=new m,Ue=new m;class Yn extends k{constructor(t=new xt,e=new jn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const o=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=n}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,n=i.morphAttributes.position,r=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const o=this.morphTargetInfluences;if(n&&o){Ve.set(0,0,0);for(let a=0,h=n.length;a<h;a++){const l=o[a],u=n[a];l!==0&&(vi.fromBufferAttribute(u,t),r?Ve.addScaledVector(vi,l):Ve.addScaledVector(vi.sub(e),l))}e.add(Ve)}return e}raycast(t,e){const i=this.geometry,s=this.material,n=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),De.copy(i.boundingSphere),De.applyMatrix4(n),Ot.copy(t.ray).recast(t.near),!(De.containsPoint(Ot.origin)===!1&&(Ot.intersectSphere(De,Bs)===null||Ot.origin.distanceToSquared(Bs)>(t.far-t.near)**2))&&(Rs.copy(n).invert(),Ot.copy(t.ray).applyMatrix4(Rs),!(i.boundingBox!==null&&Ot.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,Ot)))}_computeIntersections(t,e,i){let s;const n=this.geometry,r=this.material,o=n.index,a=n.attributes.position,h=n.attributes.uv,l=n.attributes.uv1,u=n.attributes.normal,p=n.groups,d=n.drawRange;if(o!==null)if(Array.isArray(r))for(let f=0,y=p.length;f<y;f++){const x=p[f],g=r[x.materialIndex],b=Math.max(x.start,d.start),w=Math.min(o.count,Math.min(x.start+x.count,d.start+d.count));for(let M=b,S=w;M<S;M+=3){const v=o.getX(M),A=o.getX(M+1),_=o.getX(M+2);s=Ge(this,g,t,i,h,l,u,v,A,_),s&&(s.faceIndex=Math.floor(M/3),s.face.materialIndex=x.materialIndex,e.push(s))}}else{const f=Math.max(0,d.start),y=Math.min(o.count,d.start+d.count);for(let x=f,g=y;x<g;x+=3){const b=o.getX(x),w=o.getX(x+1),M=o.getX(x+2);s=Ge(this,r,t,i,h,l,u,b,w,M),s&&(s.faceIndex=Math.floor(x/3),e.push(s))}}else if(a!==void 0)if(Array.isArray(r))for(let f=0,y=p.length;f<y;f++){const x=p[f],g=r[x.materialIndex],b=Math.max(x.start,d.start),w=Math.min(a.count,Math.min(x.start+x.count,d.start+d.count));for(let M=b,S=w;M<S;M+=3){const v=M,A=M+1,_=M+2;s=Ge(this,g,t,i,h,l,u,v,A,_),s&&(s.faceIndex=Math.floor(M/3),s.face.materialIndex=x.materialIndex,e.push(s))}}else{const f=Math.max(0,d.start),y=Math.min(a.count,d.start+d.count);for(let x=f,g=y;x<g;x+=3){const b=x,w=x+1,M=x+2;s=Ge(this,r,t,i,h,l,u,b,w,M),s&&(s.faceIndex=Math.floor(x/3),e.push(s))}}}}function Ro(c,t,e,i,s,n,r,o){let a;if(t.side===Xi?a=i.intersectTriangle(r,n,s,!0,o):a=i.intersectTriangle(s,n,r,t.side===Ye,o),a===null)return null;Ue.copy(o),Ue.applyMatrix4(c.matrixWorld);const h=e.ray.origin.distanceTo(Ue);return h<e.near||h>e.far?null:{distance:h,point:Ue.clone(),object:c}}function Ge(c,t,e,i,s,n,r,o,a,h){c.getVertexPosition(o,ke),c.getVertexPosition(a,Oe),c.getVertexPosition(h,Ne);const l=Ro(c,t,e,i,ke,Oe,Ne,Es);if(l){const u=new m;rt.getBarycoord(Es,ke,Oe,Ne,u),s&&(l.uv=rt.getInterpolatedAttribute(s,o,a,h,u,new z)),n&&(l.uv1=rt.getInterpolatedAttribute(n,o,a,h,u,new z)),r&&(l.normal=rt.getInterpolatedAttribute(r,o,a,h,u,new m),l.normal.dot(i.direction)>0&&l.normal.multiplyScalar(-1));const p={a:o,b:a,c:h,normal:new m,materialIndex:0};rt.getNormal(ke,Oe,Ne,p.normal),l.face=p,l.barycoord=u}return l}class si extends xt{constructor(t=1,e=1,i=1,s=1,n=1,r=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:s,heightSegments:n,depthSegments:r};const o=this;s=Math.floor(s),n=Math.floor(n),r=Math.floor(r);const a=[],h=[],l=[],u=[];let p=0,d=0;f("z","y","x",-1,-1,i,e,t,r,n,0),f("z","y","x",1,-1,i,e,-t,r,n,1),f("x","z","y",1,1,t,i,e,s,r,2),f("x","z","y",1,-1,t,i,-e,s,r,3),f("x","y","z",1,-1,t,e,i,s,n,4),f("x","y","z",-1,-1,t,e,-i,s,n,5),this.setIndex(a),this.setAttribute("position",new V(h,3)),this.setAttribute("normal",new V(l,3)),this.setAttribute("uv",new V(u,2));function f(y,x,g,b,w,M,S,v,A,_,F){const R=M/A,P=S/_,B=M/2,E=S/2,D=v/2,G=A+1,it=_+1;let Lt=0,Tt=0;const U=new m;for(let W=0;W<it;W++){const $=W*P-E;for(let Jt=0;Jt<G;Jt++){const ve=Jt*R-B;U[y]=ve*b,U[x]=$*w,U[g]=D,h.push(U.x,U.y,U.z),U[y]=0,U[x]=0,U[g]=v>0?1:-1,l.push(U.x,U.y,U.z),u.push(Jt/A),u.push(1-W/_),Lt+=1}}for(let W=0;W<_;W++)for(let $=0;$<A;$++){const Jt=p+$+G*W,ve=p+$+G*(W+1),mr=p+($+1)+G*(W+1),ys=p+($+1)+G*W;a.push(Jt,ve,ys),a.push(ve,mr,ys),Tt+=6}o.addGroup(d,Tt,F),d+=Tt,p+=Lt}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new si(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function Ae(c){const t={};for(const e in c){t[e]={};for(const i in c[e]){const s=c[e][i];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][i]=null):t[e][i]=s.clone():Array.isArray(s)?t[e][i]=s.slice():t[e][i]=s}}return t}function Zn(c){const t={};for(let e=0;e<c.length;e++){const i=Ae(c[e]);for(const s in i)t[s]=i[s]}return t}function Bo(c){const t=[];for(let e=0;e<c.length;e++)t.push(c[e].clone());return t}function Eo(c){const t=c.getRenderTarget();return t===null?c.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:et.workingColorSpace}const Po={clone:Ae,merge:Zn};var Io=`void main() {
6
- gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
7
- }`,Lo=`void main() {
8
- gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
9
- }`;class $n extends Z{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=Io,this.fragmentShader=Lo,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Ae(t.uniforms),this.uniformsGroups=Bo(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const s in this.uniforms){const r=this.uniforms[s].value;r&&r.isTexture?e.uniforms[s]={type:"t",value:r.toJSON(t).uuid}:r&&r.isColor?e.uniforms[s]={type:"c",value:r.getHex()}:r&&r.isVector2?e.uniforms[s]={type:"v2",value:r.toArray()}:r&&r.isVector3?e.uniforms[s]={type:"v3",value:r.toArray()}:r&&r.isVector4?e.uniforms[s]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?e.uniforms[s]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?e.uniforms[s]={type:"m4",value:r.toArray()}:e.uniforms[s]={value:r}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}}class is extends k{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new L,this.projectionMatrix=new L,this.projectionMatrixInverse=new L,this.coordinateSystem=ft}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Pt=new m,Ps=new z,Is=new z;class dt extends is{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=ae*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(ye*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return ae*2*Math.atan(Math.tan(ye*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){Pt.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Pt.x,Pt.y).multiplyScalar(-t/Pt.z),Pt.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Pt.x,Pt.y).multiplyScalar(-t/Pt.z)}getViewSize(t,e){return this.getViewBounds(t,Ps,Is),e.subVectors(Is,Ps)}setViewOffset(t,e,i,s,n,r){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(ye*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,n=-.5*s;const r=this.view;if(this.view!==null&&this.view.enabled){const a=r.fullWidth,h=r.fullHeight;n+=r.offsetX*s/a,e-=r.offsetY*i/h,s*=r.width/a,i*=r.height/h}const o=this.filmOffset;o!==0&&(n+=t*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+s,e,e-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const ie=-90,se=1;class Qn extends k{constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new dt(ie,se,t,e);s.layers=this.layers,this.add(s);const n=new dt(ie,se,t,e);n.layers=this.layers,this.add(n);const r=new dt(ie,se,t,e);r.layers=this.layers,this.add(r);const o=new dt(ie,se,t,e);o.layers=this.layers,this.add(o);const a=new dt(ie,se,t,e);a.layers=this.layers,this.add(a);const h=new dt(ie,se,t,e);h.layers=this.layers,this.add(h)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[i,s,n,r,o,a]=e;for(const h of e)this.remove(h);if(t===ft)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),n.up.set(0,0,-1),n.lookAt(0,1,0),r.up.set(0,0,1),r.lookAt(0,-1,0),o.up.set(0,1,0),o.lookAt(0,0,1),a.up.set(0,1,0),a.lookAt(0,0,-1);else if(t===be)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),n.up.set(0,0,1),n.lookAt(0,1,0),r.up.set(0,0,-1),r.lookAt(0,-1,0),o.up.set(0,-1,0),o.lookAt(0,0,1),a.up.set(0,-1,0),a.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const h of e)this.add(h),h.updateMatrixWorld()}update(t,e){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[n,r,o,a,h,l]=this.children,u=t.getRenderTarget(),p=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),f=t.xr.enabled;t.xr.enabled=!1;const y=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,s),t.render(e,n),t.setRenderTarget(i,1,s),t.render(e,r),t.setRenderTarget(i,2,s),t.render(e,o),t.setRenderTarget(i,3,s),t.render(e,a),t.setRenderTarget(i,4,s),t.render(e,h),i.texture.generateMipmaps=y,t.setRenderTarget(i,5,s),t.render(e,l),t.setRenderTarget(u,p,d),t.xr.enabled=f,i.texture.needsPMREMUpdate=!0}}class Kn extends j{constructor(t=[],e=qs,i,s,n,r,o,a,h,l){super(t,e,i,s,n,r,o,a,h,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class Do extends qn{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const i={width:t,height:t,depth:1},s=[i,i,i,i,i,i];this.texture=new Kn(s),this._setTextureOptions(e),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
10
-
11
- varying vec3 vWorldDirection;
12
-
13
- vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
14
-
15
- return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
16
-
17
- }
18
-
19
- void main() {
20
-
21
- vWorldDirection = transformDirection( position, modelMatrix );
22
-
23
- #include <begin_vertex>
24
- #include <project_vertex>
25
-
26
- }
27
- `,fragmentShader:`
28
-
29
- uniform sampler2D tEquirect;
30
-
31
- varying vec3 vWorldDirection;
32
-
33
- #include <common>
34
-
35
- void main() {
36
-
37
- vec3 direction = normalize( vWorldDirection );
38
-
39
- vec2 sampleUV = equirectUv( direction );
40
-
41
- gl_FragColor = texture2D( tEquirect, sampleUV );
42
-
43
- }
44
- `},s=new si(5,5,5),n=new $n({name:"CubemapFromEquirect",uniforms:Ae(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Xi,blending:Ws});n.uniforms.tEquirect.value=e;const r=new Yn(s,n),o=e.minFilter;return e.minFilter===Yi&&(e.minFilter=we),new Qn(1,10,this).update(t,r),e.minFilter=o,r.geometry.dispose(),r.material.dispose(),this}clear(t,e=!0,i=!0,s=!0){const n=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,i,s);t.setRenderTarget(n)}}class me extends k{constructor(){super(),this.isGroup=!0,this.type="Group"}}const ko={type:"move"};class Oo{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new me,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new me,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new m,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new m),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new me,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new m,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new m),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const i of t.hand.values())this._getHandJoint(e,i)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,e,i){let s=null,n=null,r=null;const o=this._targetRay,a=this._grip,h=this._hand;if(t&&e.session.visibilityState!=="visible-blurred"){if(h&&t.hand){r=!0;for(const y of t.hand.values()){const x=e.getJointPose(y,i),g=this._getHandJoint(h,y);x!==null&&(g.matrix.fromArray(x.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=x.radius),g.visible=x!==null}const l=h.joints["index-finger-tip"],u=h.joints["thumb-tip"],p=l.position.distanceTo(u.position),d=.02,f=.005;h.inputState.pinching&&p>d+f?(h.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!h.inputState.pinching&&p<=d-f&&(h.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else a!==null&&t.gripSpace&&(n=e.getPose(t.gripSpace,i),n!==null&&(a.matrix.fromArray(n.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,n.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(n.linearVelocity)):a.hasLinearVelocity=!1,n.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(n.angularVelocity)):a.hasAngularVelocity=!1));o!==null&&(s=e.getPose(t.targetRaySpace,i),s===null&&n!==null&&(s=n),s!==null&&(o.matrix.fromArray(s.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,s.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(s.linearVelocity)):o.hasLinearVelocity=!1,s.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(s.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(ko)))}return o!==null&&(o.visible=s!==null),a!==null&&(a.visible=n!==null),h!==null&&(h.visible=r!==null),this}_getHandJoint(t,e){if(t.joints[e.jointName]===void 0){const i=new me;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[e.jointName]=i,t.add(i)}return t.joints[e.jointName]}}class No extends k{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new ct,this.environmentIntensity=1,this.environmentRotation=new ct,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class tr{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Ze,this.updateRanges=[],this.version=0,this.uuid=vt()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,n=this.stride;s<n;s++)this.array[t+s]=e.array[i+s];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=vt()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=vt()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const X=new m;class ss{constructor(t,e,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)X.fromBufferAttribute(this,e),X.applyMatrix4(t),this.setXYZ(e,X.x,X.y,X.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)X.fromBufferAttribute(this,e),X.applyNormalMatrix(t),this.setXYZ(e,X.x,X.y,X.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)X.fromBufferAttribute(this,e),X.transformDirection(t),this.setXYZ(e,X.x,X.y,X.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=Y(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=T(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=T(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=Y(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=Y(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=Y(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=Y(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this}setXYZW(t,e,i,s,n){return t=t*this.data.stride+this.offset,this.normalized&&(e=T(e,this.array),i=T(i,this.array),s=T(s,this.array),n=T(n,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this.data.array[t+3]=n,this}clone(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return new mt(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new ss(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let n=0;n<this.itemSize;n++)e.push(this.data.array[s+n])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class Vo extends Z{constructor(t){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new I(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}class Uo extends j{constructor(t=null,e=1,i=1,s,n,r,o,a,h=lt,l=lt,u,p){super(null,r,o,a,h,l,s,n,u,p),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class Go extends mt{constructor(t,e,i,s=1){super(t,e,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const zi=new m,Wo=new m,qo=new yt;class Ut{constructor(t=new m(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,s){return this.normal.set(t,e,i),this.constant=s,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const s=zi.subVectors(i,e).cross(Wo.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(s,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(zi),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;const n=-(t.start.dot(this.normal)+this.constant)/s;return n<0||n>1?null:e.copy(t.start).addScaledVector(i,n)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||qo.getNormalMatrix(t),s=this.coplanarPoint(zi).applyMatrix4(t),n=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(n),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Nt=new _e,Jo=new z(.5,.5),We=new m;class ns{constructor(t=new Ut,e=new Ut,i=new Ut,s=new Ut,n=new Ut,r=new Ut){this.planes=[t,e,i,s,n,r]}set(t,e,i,s,n,r){const o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(i),o[3].copy(s),o[4].copy(n),o[5].copy(r),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=ft){const i=this.planes,s=t.elements,n=s[0],r=s[1],o=s[2],a=s[3],h=s[4],l=s[5],u=s[6],p=s[7],d=s[8],f=s[9],y=s[10],x=s[11],g=s[12],b=s[13],w=s[14],M=s[15];if(i[0].setComponents(a-n,p-h,x-d,M-g).normalize(),i[1].setComponents(a+n,p+h,x+d,M+g).normalize(),i[2].setComponents(a+r,p+l,x+f,M+b).normalize(),i[3].setComponents(a-r,p-l,x-f,M-b).normalize(),i[4].setComponents(a-o,p-u,x-y,M-w).normalize(),e===ft)i[5].setComponents(a+o,p+u,x+y,M+w).normalize();else if(e===be)i[5].setComponents(o,u,y,w).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),Nt.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),Nt.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Nt)}intersectsSprite(t){Nt.center.set(0,0,0);const e=Jo.distanceTo(t.center);return Nt.radius=.7071067811865476+e,Nt.applyMatrix4(t.matrixWorld),this.intersectsSphere(Nt)}intersectsSphere(t){const e=this.planes,i=t.center,s=-t.radius;for(let n=0;n<6;n++)if(e[n].distanceToPoint(i)<s)return!1;return!0}intersectsBox(t){const e=this.planes;for(let i=0;i<6;i++){const s=e[i];if(We.x=s.normal.x>0?t.max.x:t.min.x,We.y=s.normal.y>0?t.max.y:t.min.y,We.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(We)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const ut=new L,pt=new ns;class rs{constructor(){this.coordinateSystem=ft}intersectsObject(t,e){if(!e.isArrayCamera||e.cameras.length===0)return!1;for(let i=0;i<e.cameras.length;i++){const s=e.cameras[i];if(ut.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),pt.setFromProjectionMatrix(ut,this.coordinateSystem),pt.intersectsObject(t))return!0}return!1}intersectsSprite(t,e){if(!e||!e.cameras||e.cameras.length===0)return!1;for(let i=0;i<e.cameras.length;i++){const s=e.cameras[i];if(ut.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),pt.setFromProjectionMatrix(ut,this.coordinateSystem),pt.intersectsSprite(t))return!0}return!1}intersectsSphere(t,e){if(!e||!e.cameras||e.cameras.length===0)return!1;for(let i=0;i<e.cameras.length;i++){const s=e.cameras[i];if(ut.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),pt.setFromProjectionMatrix(ut,this.coordinateSystem),pt.intersectsSphere(t))return!0}return!1}intersectsBox(t,e){if(!e||!e.cameras||e.cameras.length===0)return!1;for(let i=0;i<e.cameras.length;i++){const s=e.cameras[i];if(ut.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),pt.setFromProjectionMatrix(ut,this.coordinateSystem),pt.intersectsBox(t))return!0}return!1}containsPoint(t,e){if(!e||!e.cameras||e.cameras.length===0)return!1;for(let i=0;i<e.cameras.length;i++){const s=e.cameras[i];if(ut.multiplyMatrices(s.projectionMatrix,s.matrixWorldInverse),pt.setFromProjectionMatrix(ut,this.coordinateSystem),pt.containsPoint(t))return!0}return!1}clone(){return new rs}}class as extends Z{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new I(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const $e=new m,Qe=new m,Ls=new L,de=new ii,qe=new _e,Ti=new m,Ds=new m;class jo extends k{constructor(t=new xt,e=new as){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[0];for(let s=1,n=e.count;s<n;s++)$e.fromBufferAttribute(e,s-1),Qe.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=$e.distanceTo(Qe);t.setAttribute("lineDistance",new V(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Line.threshold,r=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),qe.copy(i.boundingSphere),qe.applyMatrix4(s),qe.radius+=n,t.ray.intersectsSphere(qe)===!1)return;Ls.copy(s).invert(),de.copy(t.ray).applyMatrix4(Ls);const o=n/((this.scale.x+this.scale.y+this.scale.z)/3),a=o*o,h=this.isLineSegments?2:1,l=i.index,p=i.attributes.position;if(l!==null){const d=Math.max(0,r.start),f=Math.min(l.count,r.start+r.count);for(let y=d,x=f-1;y<x;y+=h){const g=l.getX(y),b=l.getX(y+1),w=Je(this,t,de,a,g,b,y);w&&e.push(w)}if(this.isLineLoop){const y=l.getX(f-1),x=l.getX(d),g=Je(this,t,de,a,y,x,f-1);g&&e.push(g)}}else{const d=Math.max(0,r.start),f=Math.min(p.count,r.start+r.count);for(let y=d,x=f-1;y<x;y+=h){const g=Je(this,t,de,a,y,y+1,y);g&&e.push(g)}if(this.isLineLoop){const y=Je(this,t,de,a,f-1,d,f-1);y&&e.push(y)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let n=0,r=s.length;n<r;n++){const o=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[o]=n}}}}}function Je(c,t,e,i,s,n,r){const o=c.geometry.attributes.position;if($e.fromBufferAttribute(o,s),Qe.fromBufferAttribute(o,n),e.distanceSqToSegment($e,Qe,Ti,Ds)>i)return;Ti.applyMatrix4(c.matrixWorld);const h=t.ray.origin.distanceTo(Ti);if(!(h<t.near||h>t.far))return{distance:h,point:Ds.clone().applyMatrix4(c.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:c}}class Xo extends Z{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new I(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}class Ho extends j{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=lt,this.minFilter=lt,this.generateMipmaps=!1,this.needsUpdate=!0}}class Yo extends j{constructor(t,e,i=Zi,s,n,r,o=lt,a=lt,h,l=Vi,u=1){if(l!==Vi&&l!==en)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const p={width:t,height:e,depth:u};super(p,s,n,r,o,a,l,i,h),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new ei(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return this.compareFunction!==null&&(e.compareFunction=this.compareFunction),e}}class ni extends xt{constructor(t=1,e=1,i=1,s=32,n=1,r=!1,o=0,a=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:s,heightSegments:n,openEnded:r,thetaStart:o,thetaLength:a};const h=this;s=Math.floor(s),n=Math.floor(n);const l=[],u=[],p=[],d=[];let f=0;const y=[],x=i/2;let g=0;b(),r===!1&&(t>0&&w(!0),e>0&&w(!1)),this.setIndex(l),this.setAttribute("position",new V(u,3)),this.setAttribute("normal",new V(p,3)),this.setAttribute("uv",new V(d,2));function b(){const M=new m,S=new m;let v=0;const A=(e-t)/i;for(let _=0;_<=n;_++){const F=[],R=_/n,P=R*(e-t)+t;for(let B=0;B<=s;B++){const E=B/s,D=E*a+o,G=Math.sin(D),it=Math.cos(D);S.x=P*G,S.y=-R*i+x,S.z=P*it,u.push(S.x,S.y,S.z),M.set(G,A,it).normalize(),p.push(M.x,M.y,M.z),d.push(E,1-R),F.push(f++)}y.push(F)}for(let _=0;_<s;_++)for(let F=0;F<n;F++){const R=y[F][_],P=y[F+1][_],B=y[F+1][_+1],E=y[F][_+1];(t>0||F!==0)&&(l.push(R,P,E),v+=3),(e>0||F!==n-1)&&(l.push(P,B,E),v+=3)}h.addGroup(g,v,0),g+=v}function w(M){const S=f,v=new z,A=new m;let _=0;const F=M===!0?t:e,R=M===!0?1:-1;for(let B=1;B<=s;B++)u.push(0,x*R,0),p.push(0,R,0),d.push(.5,.5),f++;const P=f;for(let B=0;B<=s;B++){const D=B/s*a+o,G=Math.cos(D),it=Math.sin(D);A.x=F*it,A.y=x*R,A.z=F*G,u.push(A.x,A.y,A.z),p.push(0,R,0),v.x=G*.5+.5,v.y=it*.5*R+.5,d.push(v.x,v.y),f++}for(let B=0;B<s;B++){const E=S+B,D=P+B;M===!0?l.push(D,D+1,E):l.push(D+1,D,E),_+=3}h.addGroup(g,_,M===!0?1:2),g+=_}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new ni(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class os extends ni{constructor(t=1,e=1,i=32,s=1,n=!1,r=0,o=Math.PI*2){super(0,t,e,i,s,n,r,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:s,openEnded:n,thetaStart:r,thetaLength:o}}static fromJSON(t){return new os(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class gt{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(t,e){const i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let i,s=this.getPoint(0),n=0;e.push(0);for(let r=1;r<=t;r++)i=this.getPoint(r/t),n+=i.distanceTo(s),e.push(n),s=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e=null){const i=this.getLengths();let s=0;const n=i.length;let r;e?r=e:r=t*i[n-1];let o=0,a=n-1,h;for(;o<=a;)if(s=Math.floor(o+(a-o)/2),h=i[s]-r,h<0)o=s+1;else if(h>0)a=s-1;else{a=s;break}if(s=a,i[s]===r)return s/(n-1);const l=i[s],p=i[s+1]-l,d=(r-l)/p;return(s+d)/(n-1)}getTangent(t,e){let s=t-1e-4,n=t+1e-4;s<0&&(s=0),n>1&&(n=1);const r=this.getPoint(s),o=this.getPoint(n),a=e||(r.isVector2?new z:new m);return a.copy(o).sub(r).normalize(),a}getTangentAt(t,e){const i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e=!1){const i=new m,s=[],n=[],r=[],o=new m,a=new L;for(let d=0;d<=t;d++){const f=d/t;s[d]=this.getTangentAt(f,new m)}n[0]=new m,r[0]=new m;let h=Number.MAX_VALUE;const l=Math.abs(s[0].x),u=Math.abs(s[0].y),p=Math.abs(s[0].z);l<=h&&(h=l,i.set(1,0,0)),u<=h&&(h=u,i.set(0,1,0)),p<=h&&i.set(0,0,1),o.crossVectors(s[0],i).normalize(),n[0].crossVectors(s[0],o),r[0].crossVectors(s[0],n[0]);for(let d=1;d<=t;d++){if(n[d]=n[d-1].clone(),r[d]=r[d-1].clone(),o.crossVectors(s[d-1],s[d]),o.length()>Number.EPSILON){o.normalize();const f=Math.acos(C(s[d-1].dot(s[d]),-1,1));n[d].applyMatrix4(a.makeRotationAxis(o,f))}r[d].crossVectors(s[d],n[d])}if(e===!0){let d=Math.acos(C(n[0].dot(n[t]),-1,1));d/=t,s[0].dot(o.crossVectors(n[0],n[t]))>0&&(d=-d);for(let f=1;f<=t;f++)n[f].applyMatrix4(a.makeRotationAxis(s[f],d*f)),r[f].crossVectors(s[f],n[f])}return{tangents:s,normals:n,binormals:r}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class hs extends gt{constructor(t=0,e=0,i=1,s=1,n=0,r=Math.PI*2,o=!1,a=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=s,this.aStartAngle=n,this.aEndAngle=r,this.aClockwise=o,this.aRotation=a}getPoint(t,e=new z){const i=e,s=Math.PI*2;let n=this.aEndAngle-this.aStartAngle;const r=Math.abs(n)<Number.EPSILON;for(;n<0;)n+=s;for(;n>s;)n-=s;n<Number.EPSILON&&(r?n=0:n=s),this.aClockwise===!0&&!r&&(n===s?n=-s:n=n-s);const o=this.aStartAngle+t*n;let a=this.aX+this.xRadius*Math.cos(o),h=this.aY+this.yRadius*Math.sin(o);if(this.aRotation!==0){const l=Math.cos(this.aRotation),u=Math.sin(this.aRotation),p=a-this.aX,d=h-this.aY;a=p*l-d*u+this.aX,h=p*u+d*l+this.aY}return i.set(a,h)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}class er extends hs{constructor(t,e,i,s,n,r){super(t,e,i,i,s,n,r),this.isArcCurve=!0,this.type="ArcCurve"}}function ls(){let c=0,t=0,e=0,i=0;function s(n,r,o,a){c=n,t=o,e=-3*n+3*r-2*o-a,i=2*n-2*r+o+a}return{initCatmullRom:function(n,r,o,a,h){s(r,o,h*(o-n),h*(a-r))},initNonuniformCatmullRom:function(n,r,o,a,h,l,u){let p=(r-n)/h-(o-n)/(h+l)+(o-r)/l,d=(o-r)/l-(a-r)/(l+u)+(a-o)/u;p*=l,d*=l,s(r,o,p,d)},calc:function(n){const r=n*n,o=r*n;return c+t*n+e*r+i*o}}}const je=new m,Ci=new ls,Fi=new ls,Ri=new ls;class ir extends gt{constructor(t=[],e=!1,i="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=i,this.tension=s}getPoint(t,e=new m){const i=e,s=this.points,n=s.length,r=(n-(this.closed?0:1))*t;let o=Math.floor(r),a=r-o;this.closed?o+=o>0?0:(Math.floor(Math.abs(o)/n)+1)*n:a===0&&o===n-1&&(o=n-2,a=1);let h,l;this.closed||o>0?h=s[(o-1)%n]:(je.subVectors(s[0],s[1]).add(s[0]),h=je);const u=s[o%n],p=s[(o+1)%n];if(this.closed||o+2<n?l=s[(o+2)%n]:(je.subVectors(s[n-1],s[n-2]).add(s[n-1]),l=je),this.curveType==="centripetal"||this.curveType==="chordal"){const d=this.curveType==="chordal"?.5:.25;let f=Math.pow(h.distanceToSquared(u),d),y=Math.pow(u.distanceToSquared(p),d),x=Math.pow(p.distanceToSquared(l),d);y<1e-4&&(y=1),f<1e-4&&(f=y),x<1e-4&&(x=y),Ci.initNonuniformCatmullRom(h.x,u.x,p.x,l.x,f,y,x),Fi.initNonuniformCatmullRom(h.y,u.y,p.y,l.y,f,y,x),Ri.initNonuniformCatmullRom(h.z,u.z,p.z,l.z,f,y,x)}else this.curveType==="catmullrom"&&(Ci.initCatmullRom(h.x,u.x,p.x,l.x,this.tension),Fi.initCatmullRom(h.y,u.y,p.y,l.y,this.tension),Ri.initCatmullRom(h.z,u.z,p.z,l.z,this.tension));return i.set(Ci.calc(a),Fi.calc(a),Ri.calc(a)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new m().fromArray(s))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function ks(c,t,e,i,s){const n=(i-t)*.5,r=(s-e)*.5,o=c*c,a=c*o;return(2*e-2*i+n+r)*a+(-3*e+3*i-2*n-r)*o+n*c+e}function Zo(c,t){const e=1-c;return e*e*t}function $o(c,t){return 2*(1-c)*c*t}function Qo(c,t){return c*c*t}function ge(c,t,e,i){return Zo(c,t)+$o(c,e)+Qo(c,i)}function Ko(c,t){const e=1-c;return e*e*e*t}function th(c,t){const e=1-c;return 3*e*e*c*t}function eh(c,t){return 3*(1-c)*c*c*t}function ih(c,t){return c*c*c*t}function Me(c,t,e,i,s){return Ko(c,t)+th(c,e)+eh(c,i)+ih(c,s)}class sr extends gt{constructor(t=new z,e=new z,i=new z,s=new z){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new z){const i=e,s=this.v0,n=this.v1,r=this.v2,o=this.v3;return i.set(Me(t,s.x,n.x,r.x,o.x),Me(t,s.y,n.y,r.y,o.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class nr extends gt{constructor(t=new m,e=new m,i=new m,s=new m){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new m){const i=e,s=this.v0,n=this.v1,r=this.v2,o=this.v3;return i.set(Me(t,s.x,n.x,r.x,o.x),Me(t,s.y,n.y,r.y,o.y),Me(t,s.z,n.z,r.z,o.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class rr extends gt{constructor(t=new z,e=new z){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new z){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new z){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class ar extends gt{constructor(t=new m,e=new m){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=t,this.v2=e}getPoint(t,e=new m){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new m){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class or extends gt{constructor(t=new z,e=new z,i=new z){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new z){const i=e,s=this.v0,n=this.v1,r=this.v2;return i.set(ge(t,s.x,n.x,r.x),ge(t,s.y,n.y,r.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class cs extends gt{constructor(t=new m,e=new m,i=new m){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new m){const i=e,s=this.v0,n=this.v1,r=this.v2;return i.set(ge(t,s.x,n.x,r.x),ge(t,s.y,n.y,r.y),ge(t,s.z,n.z,r.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class hr extends gt{constructor(t=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=t}getPoint(t,e=new z){const i=e,s=this.points,n=(s.length-1)*t,r=Math.floor(n),o=n-r,a=s[r===0?r:r-1],h=s[r],l=s[r>s.length-2?s.length-1:r+1],u=s[r>s.length-3?s.length-1:r+2];return i.set(ks(o,a.x,h.x,l.x,u.x),ks(o,a.y,h.y,l.y,u.y)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new z().fromArray(s))}return this}}var sh=Object.freeze({__proto__:null,ArcCurve:er,CatmullRomCurve3:ir,CubicBezierCurve:sr,CubicBezierCurve3:nr,EllipseCurve:hs,LineCurve:rr,LineCurve3:ar,QuadraticBezierCurve:or,QuadraticBezierCurve3:cs,SplineCurve:hr});class us extends xt{constructor(t=1,e=1,i=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:s};const n=t/2,r=e/2,o=Math.floor(i),a=Math.floor(s),h=o+1,l=a+1,u=t/o,p=e/a,d=[],f=[],y=[],x=[];for(let g=0;g<l;g++){const b=g*p-r;for(let w=0;w<h;w++){const M=w*u-n;f.push(M,-b,0),y.push(0,0,1),x.push(w/o),x.push(1-g/a)}}for(let g=0;g<a;g++)for(let b=0;b<o;b++){const w=b+h*g,M=b+h*(g+1),S=b+1+h*(g+1),v=b+1+h*g;d.push(w,M,v),d.push(M,S,v)}this.setIndex(d),this.setAttribute("position",new V(f,3)),this.setAttribute("normal",new V(y,3)),this.setAttribute("uv",new V(x,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new us(t.width,t.height,t.widthSegments,t.heightSegments)}}class ps extends xt{constructor(t=1,e=32,i=16,s=0,n=Math.PI*2,r=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:s,phiLength:n,thetaStart:r,thetaLength:o},e=Math.max(3,Math.floor(e)),i=Math.max(2,Math.floor(i));const a=Math.min(r+o,Math.PI);let h=0;const l=[],u=new m,p=new m,d=[],f=[],y=[],x=[];for(let g=0;g<=i;g++){const b=[],w=g/i;let M=0;g===0&&r===0?M=.5/e:g===i&&a===Math.PI&&(M=-.5/e);for(let S=0;S<=e;S++){const v=S/e;u.x=-t*Math.cos(s+v*n)*Math.sin(r+w*o),u.y=t*Math.cos(r+w*o),u.z=t*Math.sin(s+v*n)*Math.sin(r+w*o),f.push(u.x,u.y,u.z),p.copy(u).normalize(),y.push(p.x,p.y,p.z),x.push(v+M,1-w),b.push(h++)}l.push(b)}for(let g=0;g<i;g++)for(let b=0;b<e;b++){const w=l[g][b+1],M=l[g][b],S=l[g+1][b],v=l[g+1][b+1];(g!==0||r>0)&&d.push(w,M,v),(g!==i-1||a<Math.PI)&&d.push(M,S,v)}this.setIndex(d),this.setAttribute("position",new V(f,3)),this.setAttribute("normal",new V(y,3)),this.setAttribute("uv",new V(x,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new ps(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}class ds extends xt{constructor(t=new cs(new m(-1,-1,0),new m(-1,1,0),new m(1,1,0)),e=64,i=1,s=8,n=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:s,closed:n};const r=t.computeFrenetFrames(e,n);this.tangents=r.tangents,this.normals=r.normals,this.binormals=r.binormals;const o=new m,a=new m,h=new z;let l=new m;const u=[],p=[],d=[],f=[];y(),this.setIndex(f),this.setAttribute("position",new V(u,3)),this.setAttribute("normal",new V(p,3)),this.setAttribute("uv",new V(d,2));function y(){for(let w=0;w<e;w++)x(w);x(n===!1?e:0),b(),g()}function x(w){l=t.getPointAt(w/e,l);const M=r.normals[w],S=r.binormals[w];for(let v=0;v<=s;v++){const A=v/s*Math.PI*2,_=Math.sin(A),F=-Math.cos(A);a.x=F*M.x+_*S.x,a.y=F*M.y+_*S.y,a.z=F*M.z+_*S.z,a.normalize(),p.push(a.x,a.y,a.z),o.x=l.x+i*a.x,o.y=l.y+i*a.y,o.z=l.z+i*a.z,u.push(o.x,o.y,o.z)}}function g(){for(let w=1;w<=e;w++)for(let M=1;M<=s;M++){const S=(s+1)*(w-1)+(M-1),v=(s+1)*w+(M-1),A=(s+1)*w+M,_=(s+1)*(w-1)+M;f.push(S,v,_),f.push(v,A,_)}}function b(){for(let w=0;w<=e;w++)for(let M=0;M<=s;M++)h.x=w/e,h.y=M/s,d.push(h.x,h.y)}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new ds(new sh[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}}class nh extends Z{constructor(t){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new I(0),this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.fog=t.fog,this}}class lr extends Z{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new I(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new I(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ct,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class rh extends lr{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new z(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return C(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new I(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new I(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new I(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class ah extends Z{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new I(16777215),this.specular=new I(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new I(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ct,this.combine=Ke,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class oh extends Z{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new I(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new I(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class hh extends Z{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class lh extends Z{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new I(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new I(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new ct,this.combine=Ke,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ch extends Z{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Vn,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class uh extends Z{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}class ph extends Z{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new I(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Wt,this.normalScale=new z(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class dh extends as{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}const He={enabled:!1,files:{},add:function(c,t){this.enabled!==!1&&(this.files[c]=t)},get:function(c){if(this.enabled!==!1)return this.files[c]},remove:function(c){delete this.files[c]},clear:function(){this.files={}}};class cr{constructor(t,e,i){const s=this;let n=!1,r=0,o=0,a;const h=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(l){o++,n===!1&&s.onStart!==void 0&&s.onStart(l,r,o),n=!0},this.itemEnd=function(l){r++,s.onProgress!==void 0&&s.onProgress(l,r,o),r===o&&(n=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(l){s.onError!==void 0&&s.onError(l)},this.resolveURL=function(l){return a?a(l):l},this.setURLModifier=function(l){return a=l,this},this.addHandler=function(l,u){return h.push(l,u),this},this.removeHandler=function(l){const u=h.indexOf(l);return u!==-1&&h.splice(u,2),this},this.getHandler=function(l){for(let u=0,p=h.length;u<p;u+=2){const d=h[u],f=h[u+1];if(d.global&&(d.lastIndex=0),d.test(l))return f}return null}}}const ur=new cr;class ri{constructor(t){this.manager=t!==void 0?t:ur,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const i=this;return new Promise(function(s,n){i.load(t,s,e,n)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}ri.DEFAULT_MATERIAL_NAME="__DEFAULT";const ne=new WeakMap;class pr extends ri{constructor(t){super(t)}load(t,e,i,s){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,r=He.get(`image:${t}`);if(r!==void 0){if(r.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(r),n.manager.itemEnd(t)},0);else{let u=ne.get(r);u===void 0&&(u=[],ne.set(r,u)),u.push({onLoad:e,onError:s})}return r}const o=Se("img");function a(){l(),e&&e(this);const u=ne.get(this)||[];for(let p=0;p<u.length;p++){const d=u[p];d.onLoad&&d.onLoad(this)}ne.delete(this),n.manager.itemEnd(t)}function h(u){l(),s&&s(u),He.remove(`image:${t}`);const p=ne.get(this)||[];for(let d=0;d<p.length;d++){const f=p[d];f.onError&&f.onError(u)}ne.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function l(){o.removeEventListener("load",a,!1),o.removeEventListener("error",h,!1)}return o.addEventListener("load",a,!1),o.addEventListener("error",h,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(o.crossOrigin=this.crossOrigin),He.add(`image:${t}`,o),n.manager.itemStart(t),o.src=t,o}}class fh extends ri{constructor(t){super(t)}load(t,e,i,s){const n=new j,r=new pr(this.manager);return r.setCrossOrigin(this.crossOrigin),r.setPath(this.path),r.load(t,function(o){n.image=o,n.needsUpdate=!0,e!==void 0&&e(n)},i,s),n}}class It extends k{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new I(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(e.object.target=this.target.uuid),e}}class mh extends It{constructor(t,e,i){super(t,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(k.DEFAULT_UP),this.updateMatrix(),this.groundColor=new I(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}}const Bi=new L,Os=new m,Ns=new m;class fs{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new z(512,512),this.mapType=ti,this.map=null,this.mapPass=null,this.matrix=new L,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new ns,this._frameExtents=new z(1,1),this._viewportCount=1,this._viewports=[new H(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;Os.setFromMatrixPosition(t.matrixWorld),e.position.copy(Os),Ns.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Ns),e.updateMatrixWorld(),Bi.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Bi),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Bi)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.autoUpdate=t.autoUpdate,this.needsUpdate=t.needsUpdate,this.normalBias=t.normalBias,this.blurSamples=t.blurSamples,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class yh extends fs{constructor(){super(new dt(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,i=ae*2*t.angle*this.focus,s=this.mapSize.width/this.mapSize.height*this.aspect,n=t.distance||e.far;(i!==e.fov||s!==e.aspect||n!==e.far)&&(e.fov=i,e.aspect=s,e.far=n,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class xh extends It{constructor(t,e,i=0,s=Math.PI/3,n=0,r=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(k.DEFAULT_UP),this.updateMatrix(),this.target=new k,this.distance=i,this.angle=s,this.penumbra=n,this.decay=r,this.map=null,this.shadow=new yh}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const Vs=new L,fe=new m,Ei=new m;class gh extends fs{constructor(){super(new dt(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new z(4,2),this._viewportCount=6,this._viewports=[new H(2,1,1,1),new H(0,1,1,1),new H(3,1,1,1),new H(1,1,1,1),new H(3,0,1,1),new H(1,0,1,1)],this._cubeDirections=[new m(1,0,0),new m(-1,0,0),new m(0,0,1),new m(0,0,-1),new m(0,1,0),new m(0,-1,0)],this._cubeUps=[new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,1,0),new m(0,0,1),new m(0,0,-1)]}updateMatrices(t,e=0){const i=this.camera,s=this.matrix,n=t.distance||i.far;n!==i.far&&(i.far=n,i.updateProjectionMatrix()),fe.setFromMatrixPosition(t.matrixWorld),i.position.copy(fe),Ei.copy(i.position),Ei.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(Ei),i.updateMatrixWorld(),s.makeTranslation(-fe.x,-fe.y,-fe.z),Vs.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Vs)}}class Mh extends It{constructor(t,e,i=0,s=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new gh}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class dr extends is{constructor(t=-1,e=1,i=1,s=-1,n=.1,r=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=s,this.near=n,this.far=r,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,i,s,n,r){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=n,this.view.height=r,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let n=i-t,r=i+t,o=s+e,a=s-e;if(this.view!==null&&this.view.enabled){const h=(this.right-this.left)/this.view.fullWidth/this.zoom,l=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=h*this.view.offsetX,r=n+h*this.view.width,o-=l*this.view.offsetY,a=o-l*this.view.height}this.projectionMatrix.makeOrthographic(n,r,o,a,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class wh extends fs{constructor(){super(new dr(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class bh extends It{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(k.DEFAULT_UP),this.updateMatrix(),this.target=new k,this.shadow=new wh}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class Sh extends It{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class _h extends It{constructor(t,e,i=10,s=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=s}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}class fr{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new m)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const i=t.x,s=t.y,n=t.z,r=this.coefficients;return e.copy(r[0]).multiplyScalar(.282095),e.addScaledVector(r[1],.488603*s),e.addScaledVector(r[2],.488603*n),e.addScaledVector(r[3],.488603*i),e.addScaledVector(r[4],1.092548*(i*s)),e.addScaledVector(r[5],1.092548*(s*n)),e.addScaledVector(r[6],.315392*(3*n*n-1)),e.addScaledVector(r[7],1.092548*(i*n)),e.addScaledVector(r[8],.546274*(i*i-s*s)),e}getIrradianceAt(t,e){const i=t.x,s=t.y,n=t.z,r=this.coefficients;return e.copy(r[0]).multiplyScalar(.886227),e.addScaledVector(r[1],2*.511664*s),e.addScaledVector(r[2],2*.511664*n),e.addScaledVector(r[3],2*.511664*i),e.addScaledVector(r[4],2*.429043*i*s),e.addScaledVector(r[5],2*.429043*s*n),e.addScaledVector(r[6],.743125*n*n-.247708),e.addScaledVector(r[7],2*.429043*i*n),e.addScaledVector(r[8],.429043*(i*i-s*s)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(t,e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].fromArray(t,e+s*3);return this}toArray(t=[],e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].toArray(t,e+s*3);return t}static getBasisAt(t,e){const i=t.x,s=t.y,n=t.z;e[0]=.282095,e[1]=.488603*s,e[2]=.488603*n,e[3]=.488603*i,e[4]=1.092548*i*s,e[5]=1.092548*s*n,e[6]=.315392*(3*n*n-1),e[7]=1.092548*i*n,e[8]=.546274*(i*i-s*s)}}class Ah extends It{constructor(t=new fr,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class vh extends dt{constructor(t=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=t}}class zh{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=performance.now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}class Th extends tr{constructor(t,e,i=1){super(t,e),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}const Us=new L;class Ch{constructor(t,e,i=0,s=1/0){this.ray=new ii(t,e),this.near=i,this.far=s,this.camera=null,this.layers=new es,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)}setFromXRController(t){return Us.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(Us),this}intersectObject(t,e=!0,i=[]){return Ji(t,this,i,e),i.sort(Gs),i}intersectObjects(t,e=!0,i=[]){for(let s=0,n=t.length;s<n;s++)Ji(t[s],this,i,e);return i.sort(Gs),i}}function Gs(c,t){return c.distance-t.distance}function Ji(c,t,e,i){let s=!0;if(c.layers.test(t.layers)&&c.raycast(t,e)===!1&&(s=!1),s===!0&&i===!0){const n=c.children;for(let r=0,o=n.length;r<o;r++)Ji(n[r],t,e,!0)}}class Fh{constructor(t=1,e=0,i=0){this.radius=t,this.phi=e,this.theta=i}set(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=C(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,i),this.phi=Math.acos(C(e/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class ms{constructor(t,e,i,s){ms.prototype.isMatrix2=!0,this.elements=[1,0,0,1],t!==void 0&&this.set(t,e,i,s)}identity(){return this.set(1,0,0,1),this}fromArray(t,e=0){for(let i=0;i<4;i++)this.elements[i]=t[i+e];return this}set(t,e,i,s){const n=this.elements;return n[0]=t,n[2]=e,n[1]=i,n[3]=s,this}}class Rh extends qt{constructor(t,e=null){super(),this.object=t,this.domElement=e,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(t){if(t===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=t}disconnect(){}dispose(){}update(){}}function Bh(c,t,e,i){const s=Eh(i);switch(e){case Ks:return c*t;case sn:return c*t/s.components*s.byteLength;case nn:return c*t/s.components*s.byteLength;case rn:return c*t*2/s.components*s.byteLength;case an:return c*t*2/s.components*s.byteLength;case tn:return c*t*3/s.components*s.byteLength;case Qi:return c*t*4/s.components*s.byteLength;case on:return c*t*4/s.components*s.byteLength;case hn:case ln:return Math.floor((c+3)/4)*Math.floor((t+3)/4)*8;case cn:case un:return Math.floor((c+3)/4)*Math.floor((t+3)/4)*16;case dn:case mn:return Math.max(c,16)*Math.max(t,8)/4;case pn:case fn:return Math.max(c,8)*Math.max(t,8)/2;case yn:case xn:return Math.floor((c+3)/4)*Math.floor((t+3)/4)*8;case gn:return Math.floor((c+3)/4)*Math.floor((t+3)/4)*16;case Mn:return Math.floor((c+3)/4)*Math.floor((t+3)/4)*16;case wn:return Math.floor((c+4)/5)*Math.floor((t+3)/4)*16;case bn:return Math.floor((c+4)/5)*Math.floor((t+4)/5)*16;case Sn:return Math.floor((c+5)/6)*Math.floor((t+4)/5)*16;case _n:return Math.floor((c+5)/6)*Math.floor((t+5)/6)*16;case An:return Math.floor((c+7)/8)*Math.floor((t+4)/5)*16;case vn:return Math.floor((c+7)/8)*Math.floor((t+5)/6)*16;case zn:return Math.floor((c+7)/8)*Math.floor((t+7)/8)*16;case Tn:return Math.floor((c+9)/10)*Math.floor((t+4)/5)*16;case Cn:return Math.floor((c+9)/10)*Math.floor((t+5)/6)*16;case Fn:return Math.floor((c+9)/10)*Math.floor((t+7)/8)*16;case Rn:return Math.floor((c+9)/10)*Math.floor((t+9)/10)*16;case Bn:return Math.floor((c+11)/12)*Math.floor((t+9)/10)*16;case En:return Math.floor((c+11)/12)*Math.floor((t+11)/12)*16;case Pn:case In:case Ln:return Math.ceil(c/4)*Math.ceil(t/4)*16;case Dn:case kn:return Math.ceil(c/4)*Math.ceil(t/4)*8;case On:case Nn:return Math.ceil(c/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${e} format.`)}function Eh(c){switch(c){case ti:case Js:return{byteLength:1,components:1};case Xs:case js:case Ys:return{byteLength:2,components:1};case Zs:case $s:return{byteLength:2,components:4};case Zi:case Hs:case $i:return{byteLength:4,components:1};case Qs:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${c}.`)}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:ji}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=ji);exports.ACESFilmicToneMapping=aa;exports.AddEquation=Ii;exports.AddOperation=ea;exports.AdditiveBlending=zr;exports.AgXToneMapping=ha;exports.AlphaFormat=Ks;exports.AlwaysCompare=Ga;exports.AlwaysDepth=Hr;exports.AlwaysStencilFunc=Wi;exports.AmbientLight=Sh;exports.ArcCurve=er;exports.ArrayCamera=vh;exports.BackSide=Xi;exports.BasicDepthPacking=Vn;exports.BasicShadowMap=br;exports.Box3=he;exports.BoxGeometry=si;exports.BufferAttribute=mt;exports.BufferGeometry=xt;exports.ByteType=Js;exports.Cache=He;exports.Camera=is;exports.CatmullRomCurve3=ir;exports.CineonToneMapping=ra;exports.ClampToEdgeWrapping=Gt;exports.Clock=zh;exports.Color=I;exports.ColorManagement=et;exports.ConeGeometry=os;exports.ConstantAlphaFactor=Jr;exports.ConstantColorFactor=Wr;exports.Controls=Rh;exports.CubeCamera=Qn;exports.CubeReflectionMapping=qs;exports.CubeRefractionMapping=ca;exports.CubeTexture=Kn;exports.CubeUVReflectionMapping=da;exports.CubicBezierCurve=sr;exports.CubicBezierCurve3=nr;exports.CullFaceBack=Mr;exports.CullFaceFront=wr;exports.CullFaceNone=gr;exports.Curve=gt;exports.CustomBlending=Fr;exports.CustomToneMapping=oa;exports.CylinderGeometry=ni;exports.Data3DTexture=xo;exports.DataArrayTexture=yo;exports.DataTexture=Uo;exports.DecrementStencilOp=Aa;exports.DecrementWrapStencilOp=za;exports.DefaultLoadingManager=ur;exports.DepthFormat=Vi;exports.DepthStencilFormat=en;exports.DepthTexture=Yo;exports.DirectionalLight=bh;exports.DoubleSide=vr;exports.DstAlphaFactor=Or;exports.DstColorFactor=Vr;exports.DynamicDrawUsage=Wa;exports.EllipseCurve=hs;exports.EqualCompare=ka;exports.EqualDepth=Zr;exports.EqualStencilFunc=Ra;exports.EquirectangularReflectionMapping=ua;exports.EquirectangularRefractionMapping=pa;exports.Euler=ct;exports.EventDispatcher=qt;exports.Float16BufferAttribute=Co;exports.Float32BufferAttribute=V;exports.FloatType=$i;exports.FramebufferTexture=Ho;exports.FrontSide=Ye;exports.Frustum=ns;exports.FrustumArray=rs;exports.GLSL3=qa;exports.GreaterCompare=Na;exports.GreaterDepth=Qr;exports.GreaterEqualCompare=Ua;exports.GreaterEqualDepth=$r;exports.GreaterEqualStencilFunc=Ia;exports.GreaterStencilFunc=Ea;exports.Group=me;exports.HalfFloatType=Ys;exports.HemisphereLight=mh;exports.ImageLoader=pr;exports.ImageUtils=Gn;exports.IncrementStencilOp=_a;exports.IncrementWrapStencilOp=va;exports.InstancedBufferAttribute=Go;exports.InstancedInterleavedBuffer=Th;exports.IntType=Hs;exports.InterleavedBuffer=tr;exports.InterleavedBufferAttribute=ss;exports.InvertStencilOp=Ta;exports.KeepStencilOp=Vt;exports.Layers=es;exports.LessCompare=Da;exports.LessDepth=Yr;exports.LessEqualCompare=Oa;exports.LessEqualDepth=ki;exports.LessEqualStencilFunc=Ba;exports.LessStencilFunc=Fa;exports.Light=It;exports.LightProbe=Ah;exports.Line=jo;exports.LineBasicMaterial=as;exports.LineCurve=rr;exports.LineCurve3=ar;exports.LineDashedMaterial=dh;exports.LinearFilter=we;exports.LinearMipmapLinearFilter=Yi;exports.LinearMipmapNearestFilter=ya;exports.LinearSRGBColorSpace=Ui;exports.LinearToneMapping=sa;exports.LinearTransfer=Gi;exports.Loader=ri;exports.LoadingManager=cr;exports.MOUSE=yr;exports.Material=Z;exports.MathUtils=oo;exports.Matrix2=ms;exports.Matrix3=yt;exports.Matrix4=L;exports.MaxEquation=Pr;exports.Mesh=Yn;exports.MeshBasicMaterial=jn;exports.MeshDepthMaterial=ch;exports.MeshDistanceMaterial=uh;exports.MeshLambertMaterial=lh;exports.MeshMatcapMaterial=ph;exports.MeshNormalMaterial=hh;exports.MeshPhongMaterial=ah;exports.MeshPhysicalMaterial=rh;exports.MeshStandardMaterial=lr;exports.MeshToonMaterial=oh;exports.MinEquation=Er;exports.MirroredRepeatWrapping=Ni;exports.MixOperation=ta;exports.MultiplyBlending=Cr;exports.MultiplyOperation=Ke;exports.NearestFilter=lt;exports.NearestMipmapLinearFilter=ma;exports.NearestMipmapNearestFilter=fa;exports.NeutralToneMapping=la;exports.NeverCompare=La;exports.NeverDepth=Xr;exports.NeverStencilFunc=Ca;exports.NoBlending=Ws;exports.NoColorSpace=Ki;exports.NoToneMapping=ia;exports.NormalBlending=Pi;exports.NotEqualCompare=Va;exports.NotEqualDepth=Kr;exports.NotEqualStencilFunc=Pa;exports.Object3D=k;exports.ObjectSpaceNormalMap=wa;exports.OneFactor=Lr;exports.OneMinusConstantAlphaFactor=jr;exports.OneMinusConstantColorFactor=qr;exports.OneMinusDstAlphaFactor=Nr;exports.OneMinusDstColorFactor=Ur;exports.OneMinusSrcAlphaFactor=Di;exports.OneMinusSrcColorFactor=kr;exports.OrthographicCamera=dr;exports.PCFShadowMap=Sr;exports.PCFSoftShadowMap=_r;exports.PerspectiveCamera=dt;exports.Plane=Ut;exports.PlaneGeometry=us;exports.PointLight=Mh;exports.PointsMaterial=Xo;exports.QuadraticBezierCurve=or;exports.QuadraticBezierCurve3=cs;exports.Quaternion=oe;exports.RAD2DEG=ae;exports.RED_GREEN_RGTC2_Format=On;exports.RED_RGTC1_Format=Dn;exports.REVISION=ji;exports.RGBADepthPacking=Ma;exports.RGBAFormat=Qi;exports.RGBAIntegerFormat=on;exports.RGBA_ASTC_10x10_Format=Rn;exports.RGBA_ASTC_10x5_Format=Tn;exports.RGBA_ASTC_10x6_Format=Cn;exports.RGBA_ASTC_10x8_Format=Fn;exports.RGBA_ASTC_12x10_Format=Bn;exports.RGBA_ASTC_12x12_Format=En;exports.RGBA_ASTC_4x4_Format=Mn;exports.RGBA_ASTC_5x4_Format=wn;exports.RGBA_ASTC_5x5_Format=bn;exports.RGBA_ASTC_6x5_Format=Sn;exports.RGBA_ASTC_6x6_Format=_n;exports.RGBA_ASTC_8x5_Format=An;exports.RGBA_ASTC_8x6_Format=vn;exports.RGBA_ASTC_8x8_Format=zn;exports.RGBA_BPTC_Format=Pn;exports.RGBA_ETC2_EAC_Format=gn;exports.RGBA_PVRTC_2BPPV1_Format=mn;exports.RGBA_PVRTC_4BPPV1_Format=fn;exports.RGBA_S3TC_DXT1_Format=ln;exports.RGBA_S3TC_DXT3_Format=cn;exports.RGBA_S3TC_DXT5_Format=un;exports.RGBFormat=tn;exports.RGBIntegerFormat=ga;exports.RGB_BPTC_SIGNED_Format=In;exports.RGB_BPTC_UNSIGNED_Format=Ln;exports.RGB_ETC1_Format=yn;exports.RGB_ETC2_Format=xn;exports.RGB_PVRTC_2BPPV1_Format=dn;exports.RGB_PVRTC_4BPPV1_Format=pn;exports.RGB_S3TC_DXT1_Format=hn;exports.RGFormat=rn;exports.RGIntegerFormat=an;exports.Ray=ii;exports.Raycaster=Ch;exports.RectAreaLight=_h;exports.RedFormat=sn;exports.RedIntegerFormat=nn;exports.ReinhardToneMapping=na;exports.RenderTarget=Wn;exports.RepeatWrapping=Oi;exports.ReplaceStencilOp=Sa;exports.ReverseSubtractEquation=Br;exports.SIGNED_RED_GREEN_RGTC2_Format=Nn;exports.SIGNED_RED_RGTC1_Format=kn;exports.SRGBColorSpace=nt;exports.SRGBTransfer=Xe;exports.Scene=No;exports.ShaderMaterial=$n;exports.ShadowMaterial=nh;exports.ShortType=js;exports.Source=ei;exports.Sphere=_e;exports.SphereGeometry=ps;exports.Spherical=Fh;exports.SphericalHarmonics3=fr;exports.SplineCurve=hr;exports.SpotLight=xh;exports.SpriteMaterial=Vo;exports.SrcAlphaFactor=Li;exports.SrcAlphaSaturateFactor=Gr;exports.SrcColorFactor=Dr;exports.StaticDrawUsage=Ze;exports.SubtractEquation=Rr;exports.SubtractiveBlending=Tr;exports.TOUCH=xr;exports.TangentSpaceNormalMap=Wt;exports.Texture=j;exports.TextureLoader=fh;exports.Triangle=rt;exports.TubeGeometry=ds;exports.UVMapping=Hi;exports.Uint16BufferAttribute=Xn;exports.Uint32BufferAttribute=Hn;exports.UniformsUtils=Po;exports.UnsignedByteType=ti;exports.UnsignedInt248Type=xa;exports.UnsignedInt5999Type=Qs;exports.UnsignedIntType=Zi;exports.UnsignedShort4444Type=Zs;exports.UnsignedShort5551Type=$s;exports.UnsignedShortType=Xs;exports.VSMShadowMap=Ar;exports.Vector2=z;exports.Vector3=m;exports.Vector4=H;exports.WebGLCoordinateSystem=ft;exports.WebGLCubeRenderTarget=Do;exports.WebGLRenderTarget=qn;exports.WebGPUCoordinateSystem=be;exports.WebXRController=Oo;exports.ZeroFactor=Ir;exports.ZeroStencilOp=ba;exports.arrayNeedsUint32=Un;exports.cloneUniforms=Ae;exports.createCanvasElement=ho;exports.createElementNS=Se;exports.getByteLength=Bh;exports.getUnlitUniformColorSpace=Eo;exports.mergeUniforms=Zn;exports.probeAsync=lo;exports.toNormalizedProjectionMatrix=co;exports.toReversedProjectionMatrix=uo;exports.warnOnce=qi;