@needle-tools/engine 5.0.0 → 5.1.0-experimental.0
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.
- package/components.needle.json +1 -1
- package/dist/generateMeshBVH.worker-DT9A2Hrc.js +1 -0
- package/dist/gltf-progressive-3BwW4ETO.min.js +10 -0
- package/dist/gltf-progressive-ByD1UX0A.umd.cjs +10 -0
- package/dist/{gltf-progressive-Cl167Vjx.js → gltf-progressive-DwWaVr0o.js} +412 -394
- package/dist/gltf-progressive.worker-DpfUjn1n.js +3 -0
- package/dist/{materialx-qPScBWhj.min.js → materialx-9KHBidZa.min.js} +1 -1
- package/dist/{materialx-4ApD6Vz5.js → materialx-BBDu8W5P.js} +1 -1
- package/dist/{materialx-D0XUnhBY.umd.cjs → materialx-hLP3E8AA.umd.cjs} +2 -2
- package/dist/{needle-engine.bundle-BAYLGumK.umd.cjs → needle-engine.bundle-BOAJ6UPK.umd.cjs} +123 -123
- package/dist/{needle-engine.bundle-CoEvMwYM.min.js → needle-engine.bundle-CVsBkUR2.min.js} +110 -110
- package/dist/{needle-engine.bundle-BDIyvCV6.js → needle-engine.bundle-TgPY0fGG.js} +2143 -2088
- package/dist/needle-engine.d.ts +80 -22
- package/dist/needle-engine.js +480 -476
- package/dist/needle-engine.min.js +1 -1
- package/dist/needle-engine.umd.cjs +1 -1
- package/dist/{postprocessing-B_9sKVU7.min.js → postprocessing-BZfyAdCY.min.js} +1 -1
- package/dist/{postprocessing-WDc9WwI3.js → postprocessing-CXlA3QA6.js} +1 -1
- package/dist/{postprocessing-B2wb6pzI.umd.cjs → postprocessing-Dwy7Hz_T.umd.cjs} +38 -38
- package/dist/three-examples.js +4760 -3641
- package/dist/three-examples.min.js +17 -35
- package/dist/three-examples.umd.cjs +16 -34
- package/dist/three.js +48533 -28562
- package/dist/three.min.js +716 -502
- package/dist/three.umd.cjs +720 -506
- package/dist/{vendor-CntUvmJu.umd.cjs → vendor-BI4TX0aC.umd.cjs} +9 -9
- package/dist/{vendor-DPbfJJ4d.min.js → vendor-BgzAK9of.min.js} +1 -1
- package/dist/{vendor-vHLk8sXu.js → vendor-CwL-uvVy.js} +1 -1
- package/lib/engine/engine_animation.js +1 -1
- package/lib/engine/engine_animation.js.map +1 -1
- package/lib/engine/engine_audio.js.map +1 -1
- package/lib/engine/engine_context.js +3 -6
- package/lib/engine/engine_context.js.map +1 -1
- package/lib/engine/engine_create_objects.js +0 -1
- package/lib/engine/engine_create_objects.js.map +1 -1
- package/lib/engine/engine_element.d.ts +113 -0
- package/lib/engine/engine_element.js +833 -0
- package/lib/engine/engine_element.js.map +1 -0
- package/lib/engine/engine_element_attributes.d.ts +72 -0
- package/lib/engine/engine_element_attributes.js +2 -0
- package/lib/engine/engine_element_attributes.js.map +1 -0
- package/lib/engine/engine_element_extras.d.ts +6 -0
- package/lib/engine/engine_element_extras.js +14 -0
- package/lib/engine/engine_element_extras.js.map +1 -0
- package/lib/engine/engine_element_loading.d.ts +44 -0
- package/lib/engine/engine_element_loading.js +350 -0
- package/lib/engine/engine_element_loading.js.map +1 -0
- package/lib/engine/engine_element_overlay.d.ts +21 -0
- package/lib/engine/engine_element_overlay.js +167 -0
- package/lib/engine/engine_element_overlay.js.map +1 -0
- package/lib/engine/engine_license.js.map +1 -1
- package/lib/engine/engine_pmrem.js +2 -2
- package/lib/engine/engine_pmrem.js.map +1 -1
- package/lib/engine/engine_scenetools.d.ts +62 -0
- package/lib/engine/engine_scenetools.js +337 -0
- package/lib/engine/engine_scenetools.js.map +1 -0
- package/lib/engine/engine_serialization_builtin_serializer.d.ts +1 -1
- package/lib/engine/engine_test_utils.d.ts +39 -0
- package/lib/engine/engine_test_utils.js +84 -0
- package/lib/engine/engine_test_utils.js.map +1 -0
- package/lib/engine/engine_three_utils.js.map +1 -1
- package/lib/engine/engine_time.js +4 -3
- package/lib/engine/engine_time.js.map +1 -1
- package/lib/engine/engine_ui.d.ts +25 -0
- package/lib/engine/engine_ui.dummy_canvas.d.ts +2 -0
- package/lib/engine/engine_ui.dummy_canvas.js +55 -0
- package/lib/engine/engine_ui.dummy_canvas.js.map +1 -0
- package/lib/engine/engine_ui.js +168 -0
- package/lib/engine/engine_ui.js.map +1 -0
- package/lib/engine/extensions/NEEDLE_lightmaps.js +2 -2
- package/lib/engine/extensions/NEEDLE_lightmaps.js.map +1 -1
- package/lib/engine/extensions/NEEDLE_pmrem.d.ts +1 -1
- package/lib/engine/webcomponents/icons.js +3 -2
- package/lib/engine/webcomponents/icons.js.map +1 -1
- package/lib/engine/webcomponents/needle-engine.attributes.d.ts +69 -0
- package/lib/engine/webcomponents/needle-engine.attributes.js +2 -0
- package/lib/engine/webcomponents/needle-engine.attributes.js.map +1 -0
- package/lib/engine-components/AudioSource.js +1 -1
- package/lib/engine-components/AudioSource.js.map +1 -1
- package/lib/engine-components/Light.d.ts +3 -0
- package/lib/engine-components/Light.js +39 -31
- package/lib/engine-components/Light.js.map +1 -1
- package/lib/engine-components/OrbitControls.js +2 -1
- package/lib/engine-components/OrbitControls.js.map +1 -1
- package/lib/engine-components/SpriteRenderer.d.ts +1 -1
- package/lib/engine-components/VideoPlayer.d.ts +1 -1
- package/lib/engine-components/export/usdz/ThreeUSDZExporter.js.map +1 -1
- package/lib/engine-components/export/usdz/extensions/Animation.js +1 -0
- package/lib/engine-components/export/usdz/extensions/Animation.js.map +1 -1
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.d.ts +1 -1
- package/lib/engine-components/export/usdz/extensions/behavior/BehaviourComponents.js.map +1 -1
- package/lib/engine-components/particlesystem/ParticleSystem.d.ts +1 -1
- package/lib/engine-components/postprocessing/Effects/Tonemapping.utils.d.ts +1 -1
- package/lib/engine-components/postprocessing/PostProcessingHandler.js.map +1 -1
- package/lib/engine-components/timeline/TimelineTracks.js.map +1 -1
- package/lib/engine-components/ui/BaseUIComponent_Uikit.d.ts +54 -0
- package/lib/engine-components/ui/BaseUIComponent_Uikit.js +114 -0
- package/lib/engine-components/ui/BaseUIComponent_Uikit.js.map +1 -0
- package/lib/engine-components/ui/BaseUikitComponent.d.ts +54 -0
- package/lib/engine-components/ui/BaseUikitComponent.js +114 -0
- package/lib/engine-components/ui/BaseUikitComponent.js.map +1 -0
- package/lib/engine-components/ui/Button.legacy.d.ts +68 -0
- package/lib/engine-components/ui/Button.legacy.js +320 -0
- package/lib/engine-components/ui/Button.legacy.js.map +1 -0
- package/lib/engine-components/ui/ButtonUikit.d.ts +51 -0
- package/lib/engine-components/ui/ButtonUikit.js +187 -0
- package/lib/engine-components/ui/ButtonUikit.js.map +1 -0
- package/lib/engine-components/ui/Canvas.js +2 -2
- package/lib/engine-components/ui/Canvas.js.map +1 -1
- package/lib/engine-components/ui/Canvas.legacy.d.ts +76 -0
- package/lib/engine-components/ui/Canvas.legacy.js +409 -0
- package/lib/engine-components/ui/Canvas.legacy.js.map +1 -0
- package/lib/engine-components/ui/CanvasUikit.d.ts +68 -0
- package/lib/engine-components/ui/CanvasUikit.js +289 -0
- package/lib/engine-components/ui/CanvasUikit.js.map +1 -0
- package/lib/engine-components/ui/Graphic.d.ts +3 -3
- package/lib/engine-components/ui/Graphic.js +6 -2
- package/lib/engine-components/ui/Graphic.js.map +1 -1
- package/lib/engine-components/ui/Graphic.legacy.d.ts +55 -0
- package/lib/engine-components/ui/Graphic.legacy.js +268 -0
- package/lib/engine-components/ui/Graphic.legacy.js.map +1 -0
- package/lib/engine-components/ui/GraphicUikit.d.ts +21 -0
- package/lib/engine-components/ui/GraphicUikit.js +65 -0
- package/lib/engine-components/ui/GraphicUikit.js.map +1 -0
- package/lib/engine-components/ui/Image.js.map +1 -1
- package/lib/engine-components/ui/Image.legacy.d.ts +39 -0
- package/lib/engine-components/ui/Image.legacy.js +121 -0
- package/lib/engine-components/ui/Image.legacy.js.map +1 -0
- package/lib/engine-components/ui/ImageUikit.d.ts +22 -0
- package/lib/engine-components/ui/ImageUikit.js +97 -0
- package/lib/engine-components/ui/ImageUikit.js.map +1 -0
- package/lib/engine-components/ui/RenderMode.d.ts +14 -0
- package/lib/engine-components/ui/RenderMode.js +16 -0
- package/lib/engine-components/ui/RenderMode.js.map +1 -0
- package/lib/engine-components/ui/Text.d.ts +64 -11
- package/lib/engine-components/ui/Text.js +154 -45
- package/lib/engine-components/ui/Text.js.map +1 -1
- package/lib/engine-components/ui/Text.legacy.d.ts +81 -0
- package/lib/engine-components/ui/Text.legacy.js +548 -0
- package/lib/engine-components/ui/Text.legacy.js.map +1 -0
- package/lib/engine-components/ui/TextUikit.d.ts +42 -0
- package/lib/engine-components/ui/TextUikit.js +164 -0
- package/lib/engine-components/ui/TextUikit.js.map +1 -0
- package/lib/engine-components/ui/index.d.ts +1 -0
- package/lib/engine-components/ui/index.js +1 -0
- package/lib/engine-components/ui/index.js.map +1 -1
- package/lib/engine-components/webxr/WebARCameraBackground.d.ts +1 -1
- package/lib/include/three/EXT_mesh_gpu_instancing_exporter.d.ts +6 -0
- package/lib/include/three/EXT_mesh_gpu_instancing_exporter.js +46 -0
- package/lib/include/three/EXT_mesh_gpu_instancing_exporter.js.map +1 -0
- package/package.json +4 -4
- package/plugins/common/buildinfo.d.ts +6 -0
- package/plugins/vite/ai.d.ts +7 -8
- package/plugins/vite/ai.js +95 -20
- package/plugins/vite/alias.js +6 -0
- package/plugins/vite/dependencies.js +7 -0
- package/src/engine/engine_animation.ts +1 -1
- package/src/engine/engine_audio.ts +1 -1
- package/src/engine/engine_context.ts +3 -6
- package/src/engine/engine_create_objects.ts +0 -1
- package/src/engine/engine_license.ts +0 -2
- package/src/engine/engine_pmrem.ts +3 -3
- package/src/engine/engine_three_utils.ts +2 -2
- package/src/engine/engine_time.ts +4 -3
- package/src/engine/extensions/NEEDLE_lightmaps.ts +3 -3
- package/src/engine/webcomponents/icons.ts +3 -2
- package/src/engine-components/AudioSource.ts +1 -1
- package/src/engine-components/Light.ts +39 -31
- package/src/engine-components/OrbitControls.ts +2 -2
- package/src/engine-components/export/usdz/ThreeUSDZExporter.ts +2 -2
- package/src/engine-components/export/usdz/extensions/Animation.ts +6 -5
- package/src/engine-components/export/usdz/extensions/behavior/BehaviourComponents.ts +1 -1
- package/src/engine-components/postprocessing/PostProcessingHandler.ts +3 -3
- package/src/engine-components/timeline/TimelineTracks.ts +2 -2
- package/src/engine-components/ui/Canvas.ts +2 -2
- package/src/engine-components/ui/Graphic.ts +7 -3
- package/src/engine-components/ui/Image.ts +1 -1
- package/src/engine-components/ui/Text.ts +170 -52
- package/src/engine-components/ui/index.ts +2 -1
- package/dist/generateMeshBVH.worker-DiCnZlf3.js +0 -21
- package/dist/gltf-progressive-BryRjllq.min.js +0 -10
- package/dist/gltf-progressive-DJBMx-zB.umd.cjs +0 -10
- package/dist/gltf-progressive.worker-BqODMeeW.js +0 -23
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(function(){"use strict";var pr=(function(){var l="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuixkbeeeddddillviebeoweuec:W:Odkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WboY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbrl79IV9Rbwq;lZkdbk;jYi5ud9:du8Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxcj;abad9Uc;WFbGcjdadca0EhmaialfgPar9Rgoadfhsavaoadz:jjjjbgzceVhHcbhOdndninaeaO9nmeaPax9RaD6mdamaeaO9RaOamfgoae6EgAcsfglc9WGhCabaOad2fhXaAcethQaxaDfhiaOaeaoaeao6E9RhLalcl4cifcd4hKazcj;cbfaAfhYcbh8AazcjdfhEaHh3incbhodnawTmbaxa8Acd4fRbbhokaocFeGh5cbh8Eazcj;cbfhqinaih8Fdndndndna5a8Ecet4ciGgoc9:fPdebdkaPa8F9RaA6mrazcj;cbfa8EaA2fa8FaAz:jjjjb8Aa8FaAfhixdkazcj;cbfa8EaA2fcbaAz:kjjjb8Aa8FhixekaPa8F9RaK6mva8FaKfhidnaCTmbaPai9RcK6mbaocdtc:q1jjbfcj1jjbawEhaczhrcbhlinargoc9Wfghaqfhrdndndndndndnaaa8Fahco4fRbbalcoG4ciGcdtfydbPDbedvivvvlvkar9cb83bbarcwf9cb83bbxlkarcbaiRbdai8Xbb9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbaqaofgrcGfag9c8F1:NghcKtc8F91aicdfa8J9c8N1:Nfg8KRbbG86bbarcVfcba8KahcjeGcr4fghRbbag9cjjjjjl:dg8J9qE86bbarc7fcbaha8J9c8L1:NfghRbbag9cjjjjjd:dg8J9qE86bbarctfcbaha8J9c8K1:NfghRbbag9cjjjjje:dg8J9qE86bbarc91fcbaha8J9c8J1:NfghRbbag9cjjjj;ab:dg8J9qE86bbarc4fcbaha8J9cg1:NfghRbbag9cjjjja:dg8J9qE86bbarc93fcbaha8J9ch1:NfghRbbag9cjjjjz:dgg9qE86bbarc94fcbahag9ca1:NfghRbbai8Xbe9c:c:qj:bw9:9c:q;c1:I1e:d9c:b:c:e1z9:gg9cjjjjjz:dg8J9qE86bbarc95fag9c8F1:NgicKtc8F91aha8J9c8N1:NfghRbbG86bbarc96fcbahaicjeGcr4fgiRbbag9cjjjjjl:dg8J9qE86bbarc97fcbaia8J9c8L1:NfgiRbbag9cjjjjjd:dg8J9qE86bbarc98fcbaia8J9c8K1:NfgiRbbag9cjjjjje:dg8J9qE86bbarc99fcbaia8J9c8J1:NfgiRbbag9cjjjj;ab:dg8J9qE86bbarc9:fcbaia8J9cg1:NfgiRbbag9cjjjja:dg8J9qE86bbarcufcbaia8J9ch1:NfgiRbbag9cjjjjz:dgg9qE86bbaiag9ca1:NfhixikaraiRblaiRbbghco4g8Ka8KciSg8KE86bbaqaofgrcGfaiclfa8Kfg8KRbbahcl4ciGg8La8LciSg8LE86bbarcVfa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc7fa8Ka8Lfg8KRbbahciGghahciSghE86bbarctfa8Kahfg8KRbbaiRbeghco4g8La8LciSg8LE86bbarc91fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc4fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc93fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc94fa8Kahfg8KRbbaiRbdghco4g8La8LciSg8LE86bbarc95fa8Ka8Lfg8KRbbahcl4ciGg8La8LciSg8LE86bbarc96fa8Ka8Lfg8KRbbahcd4ciGg8La8LciSg8LE86bbarc97fa8Ka8Lfg8KRbbahciGghahciSghE86bbarc98fa8KahfghRbbaiRbigico4g8Ka8KciSg8KE86bbarc99faha8KfghRbbaicl4ciGg8Ka8KciSg8KE86bbarc9:faha8KfghRbbaicd4ciGg8Ka8KciSg8KE86bbarcufaha8KfgrRbbaiciGgiaiciSgiE86bbaraifhixdkaraiRbwaiRbbghcl4g8Ka8KcsSg8KE86bbaqaofgrcGfaicwfa8Kfg8KRbbahcsGghahcsSghE86bbarcVfa8KahfghRbbaiRbeg8Kcl4g8La8LcsSg8LE86bbarc7faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarctfaha8KfghRbbaiRbdg8Kcl4g8La8LcsSg8LE86bbarc91faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc4faha8KfghRbbaiRbig8Kcl4g8La8LcsSg8LE86bbarc93faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc94faha8KfghRbbaiRblg8Kcl4g8La8LcsSg8LE86bbarc95faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc96faha8KfghRbbaiRbvg8Kcl4g8La8LcsSg8LE86bbarc97faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc98faha8KfghRbbaiRbog8Kcl4g8La8LcsSg8LE86bbarc99faha8LfghRbba8KcsGg8Ka8KcsSg8KE86bbarc9:faha8KfghRbbaiRbrgicl4g8Ka8KcsSg8KE86bbarcufaha8KfgrRbbaicsGgiaicsSgiE86bbaraifhixekarai8Pbb83bbarcwfaicwf8Pbb83bbaiczfhikdnaoaC9pmbalcdfhlaoczfhraPai9RcL0mekkaoaC6moaimexokaCmva8FTmvkaqaAfhqa8Ecefg8Ecl9hmbkdndndndnawTmbasa8Acd4fRbbgociGPlbedrbkaATmdaza8Afh8Fazcj;cbfhhcbh8EaEhaina8FRbbhraahocbhlinaoahalfRbbgqce4cbaqceG9R7arfgr86bbaoadfhoaAalcefgl9hmbkaacefhaa8Fcefh8FahaAfhha8Ecefg8Ecl9hmbxikkaATmeaza8Afhaazcj;cbfhhcbhoceh8EaYh8FinaEaofhlaa8Vbbhrcbhoinala8FaofRbbcwtahaofRbbgqVc;:FiGce4cbaqceG9R7arfgr87bbaladfhlaLaocefgofmbka8FaQfh8FcdhoaacdfhaahaQfhha8EceGhlcbh8EalmbxdkkaATmbcbaocl49Rh8Eaza8AfRbbhqcwhoa3hlinalRbbaotaqVhqalcefhlaocwfgoca9hmbkcbhhaEh8FaYhainazcj;cbfahfRbbhrcwhoaahlinalRbbaotarVhralaAfhlaocwfgoca9hmbkara8E93aq7hqcbhoa8Fhlinalaqao486bbalcefhlaocwfgoca9hmbka8Fadfh8FaacefhaahcefghaA9hmbkkaEclfhEa3clfh3a8Aclfg8Aad6mbkaXazcjdfaAad2z:jjjjb8AazazcjdfaAcufad2fadz:jjjjb8AaAaOfhOaihxaimbkc9:hoxdkcbc99aPax9RakSEhoxekc9:hokavcj;kbf8Kjjjjbaok:XseHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:kjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk::ioiue99dud99dud99dnaeTmbcbhiabhlindndnal8Uebgv:YgoJ:ji:1Salcof8UebgrciVgw:Y:vgDNJbbbZJbbb:;avcu9kEMgq:lJbbb9p9DTmbaq:Ohkxekcjjjj94hkkalclf8Uebhvalcdf8UebhxabaiarcefciGfcetfak87ebdndnax:YgqaDNJbbbZJbbb:;axcu9kEMgm:lJbbb9p9DTmbam:Ohxxekcjjjj94hxkabaiarciGfgkcd7cetfax87ebdndnav:YgmaDNJbbbZJbbb:;avcu9kEMgP:lJbbb9p9DTmbaP:Ohvxekcjjjj94hvkabaiarcufciGfcetfav87ebdndnawaw2:ZgPaPMaoaoN:taqaqN:tamamN:tgoJbbbbaoJbbbb9GE:raDNJbbbZMgD:lJbbb9p9DTmbaD:Ohrxekcjjjj94hrkabakcetfar87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2gdTmbinababydbgecwtcw91:Yaece91cjjj98Gcjjj;8if::NUdbabclfhbadcufgdmbkkk:Tvirud99eudndnadcl9hmbaeTmeindndnabRbbgiabcefgl8Sbbgvabcdfgo8Sbbgrf9R:YJbbuJabcifgwRbbgdce4adVgDcd4aDVgDcl4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax86bbdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao86bbdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai86bbdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad86bbabclfhbaecufgembxdkkaeTmbindndnab8Vebgiabcdfgl8Uebgvabclfgo8Uebgrf9R:YJbFu9habcofgw8Vebgdce4adVgDcd4aDVgDcl4aDVgDcw4aDVgD:Z:vgqNJbbbZMgk:lJbbb9p9DTmbak:Ohxxekcjjjj94hxkaoax87ebdndnaraif:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohoxekcjjjj94hokalao87ebdndnavaifar9R:YaqNJbbbZMgk:lJbbb9p9DTmbak:Ohixekcjjjj94hikabai87ebdndnaDadcetGadceGV:ZaqNJbbbZMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkawad87ebabcwfhbaecufgembkkk9teiucbcbyd:K1jjbgeabcifc98GfgbBd:K1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;teeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiaeydlBdlaiaeydwBdwaiaeydxBdxaeczfheaiczfhiadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk:3eedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdxaialBdwaialBdlaialBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkk81dbcjwk8Kbbbbdbbblbbbwbbbbbbbebbbdbbblbbbwbbbbc:Kwkl8WNbb",t="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuixkbbebeeddddilve9Weeeviebeoweuec:q:6dkr;Neqo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949WbwY9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVJ9V29VVbDl79IV9Rbqq:Ctklbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk:183lYud97dur978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnalTmbcuhoaiRbbgrc;WeGc:Ge9hmbarcsGgwce0mbc9:hoalcufadcd4cbawEgDadfgrcKcaawEgqaraq0Egk6mbaicefhxavaialfgmar9Rgoad;8qbbcj;abad9Uc;WFbGcjdadca0EhPdndndnadTmbaoadfhscbhzinaeaz9nmdamax9RaD6miabazad2fhHaxaDfhOaPaeaz9RazaPfae6EgAcsfgocl4cifcd4hCavcj;cbfaoc9WGgXcetfhQavcj;cbfaXci2fhLavcj;cbfaXfhKcbhYaoc;ab6h8AincbhodnawTmbaxaYcd4fRbbhokaocFeGhEcbh3avcj;cbfh5indndndndnaEa3cet4ciGgoc9:fPdebdkamaO9RaX6mwavcj;cbfa3aX2faOaX;8qbbaOaAfhOxdkavcj;cbfa3aX2fcbaX;8kbxekamaO9RaC6moaoclVcbawEhraOaCfhocbhidna8Ambamao9Rc;Gb6mbcbhlina5alfhidndndndndndnaOalco4fRbbgqciGarfPDbedibledibkaipxbbbbbbbbbbbbbbbbpklbxlkaiaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiaopbbbpklbaoczfhoxekaiaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcd4ciGarfPDbedibledibkaiczfpxbbbbbbbbbbbbbbbbpklbxlkaiczfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaiczfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaiczfaopbbbpklbaoczfhoxekaiczfaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqcl4ciGarfPDbedibledibkaicafpxbbbbbbbbbbbbbbbbpklbxlkaicafaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaoclffahc:q:yjjbfRbbfhoxikaicafaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaaaocwffahc:q:yjjbfRbbfhoxdkaicafaopbbbpklbaoczfhoxekaicafaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaaaocdffahc:q:yjjbfRbbfhokdndndndndndnaqco4arfPDbedibledibkaic8Wfpxbbbbbbbbbbbbbbbbpklbxlkaic8Wfaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaoclffaqc:q:yjjbfRbbfhoxikaic8Wfaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngicitc:q1jjbfpbibaic:q:yjjbfRbbgipsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Ngqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spklbaiaocwffaqc:q:yjjbfRbbfhoxdkaic8Wfaopbbbpklbaoczfhoxekaic8WfaopbbdaoRbbgicitc:q1jjbfpbibaic:q:yjjbfRbbgipsaoRbegqcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpklbaiaocdffaqc:q:yjjbfRbbfhokalc;abfhialcjefaX0meaihlamao9Rc;Fb0mbkkdnaiaX9pmbaici4hlinamao9RcK6mwa5aifhqdndndndndndnaOaico4fRbbalcoG4ciGarfPDbedibledibkaqpxbbbbbbbbbbbbbbbbpkbbxlkaqaopbblaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLg8Ecdp:mea8EpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9og8Fpxiiiiiiiiiiiiiiiip8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaoclffahc:q:yjjbfRbbfhoxikaqaopbbwaopbbbg8Eclp:mea8EpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9og8Fpxssssssssssssssssp8Jg8Ep5b9cjF;8;4;W;G;ab9:9cU1:Ngacitc:q1jjbfpbibaac:q:yjjbfRbbgapsa8Ep5e9cjF;8;4;W;G;ab9:9cU1:Nghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPa8Fa8Ep9spkbbaaaocwffahc:q:yjjbfRbbfhoxdkaqaopbbbpkbbaoczfhoxekaqaopbbdaoRbbgacitc:q1jjbfpbibaac:q:yjjbfRbbgapsaoRbeghcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPpkbbaaaocdffahc:q:yjjbfRbbfhokalcdfhlaiczfgiaX6mbkkaohOaoTmoka5aXfh5a3cefg3cl9hmbkdndndndnawTmbasaYcd4fRbbglciGPlbedwbkaXTmdavcjdfaYfhlavaYfpbdbhgcbhoinalavcj;cbfaofpblbg8JaKaofpblbg8KpmbzeHdOiAlCvXoQrLg8LaQaof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c9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhldnaeTmbcmcsaDceSEhkcbhxcbhmcbhrcbhicbhoindnalaq9nmbc9:hoxikdndnawRbbgDc;Ve0mbavc;abfaoaDcu7gPcl4fcsGcitfgsydlhzasydbhHdndnaDcsGgsak9pmbavaiaPfcsGcdtfydbaxasEhDaxasTgOfhxxekdndnascsSmbcehOasc987asamffcefhDxekalcefhDal8SbbgscFeGhPdndnascu9mmbaDhlxekalcvfhlaPcFbGhPcrhsdninaD8SbbgOcFbGastaPVhPaOcu9kmeaDcefhDascrfgsc8J9hmbxdkkaDcefhlkcehOaPce4cbaPceG9R7amfhDkaDhmkavc;abfaocitfgsaDBdbasazBdlavaicdtfaDBdbavc;abfaocefcsGcitfgsaHBdbasaDBdlaocdfhoaOaifhidnadcd9hmbabarcetfgsaH87ebasclfaD87ebascdfaz87ebxdkabarcdtfgsaHBdbascwfaDBdbasclfazBdbxekdnaDcpe0mbaxcefgOavaiaqaDcsGfRbbgscl49RcsGcdtfydbascz6gPEhDavaias9RcsGcdtfydbaOaPfgzascsGgOEhsaOThOdndnadcd9hmbabarcetfgHax87ebaHclfas87ebaHcdfaD87ebxekabarcdtfgHaxBdbaHcwfasBdbaHclfaDBdbkavaicdtfaxBdbavc;abfaocitfgHaDBdbaHaxBdlavaicefgicsGcdtfaDBdbavc;abfaocefcsGcitfgHasBdbaHaDBdlavaiaPfgicsGcdtfasBdbavc;abfaocdfcsGcitfgDaxBdbaDasBdlaocifhoaiaOfhiazaOfhxxekaxcbalRbbgHEgAaDc;:eSgDfhzaHcsGhCaHcl4hXdndnaHcs0mbazcefhOxekazhOavaiaX9RcsGcdtfydbhzkdndnaCmbaOcefhxxekaOhxavaiaH9RcsGcdtfydbhOkdndnaDTmbalcefhDxekalcdfhDal8SbegPcFeGhsdnaPcu9kmbalcofhAascFbGhscrhldninaD8SbbgPcFbGaltasVhsaPcu9kmeaDcefhDalcrfglc8J9hmbkaAhDxekaDcefhDkasce4cbasceG9R7amfgmhAkdndnaXcsSmbaDhsxekaDcefhsaD8SbbglcFeGhPdnalcu9kmbaDcvfhzaPcFbGhPcrhldninas8SbbgDcFbGaltaPVhPaDcu9kmeascefhsalcrfglc8J9hmbkazhsxekascefhskaPce4cbaPceG9R7amfgmhzkdndnaCcsSmbashlxekascefhlas8SbbgDcFeGhPdnaDcu9kmbascvfhOaPcFbGhPcrhDdninal8SbbgscFbGaDtaPVhPascu9kmealcefhlaDcrfgDc8J9hmbkaOhlxekalcefhlkaPce4cbaPceG9R7amfgmhOkdndnadcd9hmbabarcetfgDaA87ebaDclfaO87ebaDcdfaz87ebxekabarcdtfgDaABdbaDcwfaOBdbaDclfazBdbkavc;abfaocitfgDazBdbaDaABdlavaicdtfaABdbavc;abfaocefcsGcitfgDaOBdbaDazBdlavaicefgicsGcdtfazBdbavc;abfaocdfcsGcitfgDaABdbaDaOBdlavaiaHcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhiaocifhokawcefhwaocsGhoaicsGhiarcifgrae6mbkkcbc99alaqSEhokavc;aef8Kjjjjbaok:clevu8Jjjjjbcz9Rhvdnaecvfal9nmbc9:skdnaiRbbc;:eGc;qeSmbcuskav9cb83iwaicefhoaialfc98fhrdnaeTmbdnadcdSmbcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcdtfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgiBdbalaiBdbawcefgwae9hmbxdkkcbhwindnaoar6mbc9:skaocefhlao8SbbgicFeGhddndnaicu9mmbalhoxekaocvfhoadcFbGhdcrhidninal8SbbgDcFbGaitadVhdaDcu9kmealcefhlaicrfgic8J9hmbxdkkalcefhokabawcetfadc8Etc8F91adcd47avcwfadceGcdtVglydbfgi87ebalaiBdbawcefgwae9hmbkkcbc99aoarSEk:2Pliur97eue978Jjjjjbc8W9Rhiaec98Ghldndnadcl9hmbdnalTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalaeSmeaipxbbbbbbbbbbbbbbbbgqpklbaiabalcdtfgdaeciGglcdtgv;8qbbdnalTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDaqp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkadaiav;8qbbskaipxFubbFubbFubbFubbgxpklbdnalTmbcbhvabhdinadczfgmampbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraipblbaDaopmlvorxmPsCXQL358E8Fp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgPp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;MeawaqawaPp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oaoarpmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgval6mbkkalaeSmbaiczfpxbbbbbbbbbbbbbbbbgopklbaiaopklbaiabalcitfgdaeciGglcitgv;8qbbaiaxpkladnalTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmbediwDqkzHOAKY8AEgwczp:Reczp:Sep;6egraipblaaDaopmlvorxmPsCXQL358E8Fp9op;6eawczp:Sep;6egwp;Gearp;Gep;Kep;Legopxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgPp9op9rp;Kegrpxb;:FSb;:FSb;:FSb;:FSararp;Meaoaop;MeawaqawaPp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFFbbFFbbFFbbFFbbp9oaoawp;Meaqp;Keczp:Rep9qgoarawp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogrpmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oaoarpmbezHdiOAlvCXorQLp9qpklbkadaiav;8qbbkk:Iwllue97euo978Jjjjjbca9Rhidnaec98GglTmbcbhvabhoinaocKfpx:ji:1S:ji:1S:ji:1S:ji:1SaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkpxibbbibbbibbbibbbp9qgxp;6ep;Negmaxaxp:1ep;7egxaxp;KearaDpmbediwDqkzHOAKY8AEgxczp:Reczp:Sep;6egrarp;Meaxczp:Sep;6egDaDp;Meaqczp:Reczp:Sep;6egqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gxp;KepxFFbbFFbbFFbbFFbbgPp9oamaDp;Meaxp;Keczp:Rep9qgDamarp;Meaxp;KeaPp9oamaqp;Meaxp;Keczp:Rep9qgxpmwDKYqk8AExm35Ps8E8Fgrp5eakclp:RegmpEi:T:j83ibawarp5bampEd:T:j83ibaocwfaDaxpmbezHdiOAlvCXorQLgxp5eampEe:T:j83ibaoaxp5bampEb:T:j83ibaocafhoavclfgval6mbkkdnalaeSmbaiczfpxbbbbbbbbbbbbbbbbgmpklbaiampklbaiabalcitfgoaeciGgvcitgw;8qbbdnavTmbaipx:ji:1S:ji:1S:ji:1S:ji:1SaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkpxibbbibbbibbbibbbp9qgxp;6ep;Negmaxaxp:1ep;7egxaxp;KearaDpmbediwDqkzHOAKY8AEgxczp:Reczp:Sep;6egrarp;Meaxczp:Sep;6egDaDp;Meaqczp:Reczp:Sep;6egqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jep;Mepxbbn0bbn0bbn0bbn0gxp;KepxFFbbFFbbFFbbFFbbgPp9oamaDp;Meaxp;Keczp:Rep9qgDamarp;Meaxp;KeaPp9oamaqp;Meaxp;Keczp:Rep9qgxpmwDKYqk8AExm35Ps8E8Fgrp5eakclp:RegmpEi:T:j83iKaiarp5bampEd:T:j83izaiaDaxpmbezHdiOAlvCXorQLgxp5eampEe:T:j83iwaiaxp5bampEb:T:j83ibkaoaiaw;8qbbkk;uddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbheabhdinadadpbbbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepkbbadczfhdaeclfgeav6mbkkdnavalSmbaic8WfpxbbbbbbbbbbbbbbbbgopklbaicafaopklbaiczfaopklbaiaopklbaiabavcdtfgdalciGgecdtgv;8qbbdnaeTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjFbbjFbbjFbbjFp9opxbbjZbbjZbbjZbbjZp:Uep;Mepklbkadaiav;8qbbkk:CPvdue97euw97eu8Jjjjjbc8W9Rhiaec98Ghldndnadcl9hmbaipxbbbbbbbbbbbbbbbbgvpklbdnalTmbcbhoabhdinadpbbbhradpxbbuJbbuJbbuJbbuJaipblbarcKp:Tep9qgwcep:Seawp9qgDcdp:SeaDp9qgDclp:SeaDp9qgqp;6ep;NegDarcwp:RecKp:SegkarpxFbbbFbbbFbbbFbbbgxp9ogmp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gPp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oaDamakp:Xearczp:RecKp:Segrp:Uep;6ep;MeaPp;Keaxp9op9qaDamakarp:Uep:Xep;6ep;MeaPp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qaDaqawcep:Rep9oawpxebbbebbbebbbebbbp9op9qp;6ep;MeaPp;KecKp:Rep9qpkbbadczfhdaoclfgoal6mbkkalaeSmeaiavpklaaicafabalcdtfgdaeciGglcdtgo;8qbbaiavpklbdnalTmbaipblahraipxbbuJbbuJbbuJbbuJaipblbarcKp:Tep9qgwcep:Seawp9qgDcdp:SeaDp9qgDclp:SeaDp9qgqp;6ep;NegDarcwp:RecKp:SegkarpxFbbbFbbbFbbbFbbbgxp9ogmp:Uep;6ep;Mepxbbn0bbn0bbn0bbn0gPp;Kecwp:RepxbFbbbFbbbFbbbFbbp9oaDamakp:Xearczp:RecKp:Segrp:Uep;6ep;MeaPp;Keaxp9op9qaDamakarp:Uep:Xep;6ep;MeaPp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qaDaqawcep:Rep9oawpxebbbebbbebbbebbbp9op9qp;6ep;MeaPp;KecKp:Rep9qpklakadaicafao;8qbbskaipxbbbbbbbbbbbbbbbbgvpklbdnalTmbcbhoabhdinadczfgspxbFu9hbFu9hbFu9hbFu9hadpbbbgDaspbbbgPpmlvorxmPsCXQL358E8Fgmczp:Teaipblbp9qgrcep:Searp9qgwcdp:Seawp9qgwclp:Seawp9qgwcwp:Seawp9qgqp;6ep;NegwaDaPpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbgPp9ogkaDczp:Segxp:Ueamczp:Reczp:Segmp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gDp;KeaPp9oawakaxamp:Uep:Xep;6ep;MeaDp;Keczp:Rep9qgxawaqarcep:Rep9oarpxebbbebbbebbbebbbp9op9qp;6ep;MeaDp;Keczp:Reawamakp:Uep;6ep;MeaDp;KeaPp9op9qgrpmwDKYqk8AExm35Ps8E8FpkbbadaxarpmbezHdiOAlvCXorQLpkbbadcafhdaoclfgoal6mbkkalaeSmbaiczfpxbbbbbbbbbbbbbbbbgrpklbaiarpklbaiabalcitfgdaeciGglcitgo;8qbbaiavpkladnalTmbaipxbFu9hbFu9hbFu9hbFu9haipblbgDaipblzgPpmlvorxmPsCXQL358E8Fgmczp:Teaipblap9qgrcep:Searp9qgwcdp:Seawp9qgwclp:Seawp9qgwcwp:Seawp9qgqp;6ep;NegwaDaPpmbediwDqkzHOAKY8AEgDpxFFbbFFbbFFbbFFbbgPp9ogkaDczp:Segxp:Ueamczp:Reczp:Segmp:Xep;6ep;Mepxbbn0bbn0bbn0bbn0gDp;KeaPp9oawakaxamp:Uep:Xep;6ep;MeaDp;Keczp:Rep9qgxawaqarcep:Rep9oarpxebbbebbbebbbebbbp9op9qp;6ep;MeaDp;Keczp:Reawamakp:Uep;6ep;MeaDp;KeaPp9op9qgrpmwDKYqk8AExm35Ps8E8FpklzaiaxarpmbezHdiOAlvCXorQLpklbkadaiao;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz:Dbb",e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var s=WebAssembly.validate(e)?r(t):r(l),n,a=WebAssembly.instantiate(s,{}).then(function(f){n=f.instance,n.exports.__wasm_call_ctors()});function r(f){for(var m=new Uint8Array(f.length),E=0;E<f.length;++E){var I=f.charCodeAt(E);m[E]=I>96?I-97:I>64?I-39:I+4}for(var C=0,E=0;E<f.length;++E)m[C++]=m[E]<60?i[m[E]]:(m[E]-60)*64+m[++E];return m.buffer.slice(0,C)}function A(f,m,E,I,C,x,Q){var y=f.exports.sbrk,M=I+3&-4,w=y(M*C),S=y(x.length),G=new Uint8Array(f.exports.memory.buffer);G.set(x,S);var k=m(w,I,C,S,x.length);if(k==0&&Q&&Q(w,M,C),E.set(G.subarray(w,w+I*C)),y(w-y(0)),k!=0)throw new Error("Malformed buffer data: "+k)}var o={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp",COLOR:"meshopt_decodeFilterColor"},h={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},c=[],g=0;function d(f){var m={object:new Worker(f),pending:0,requests:{}};return m.object.onmessage=function(E){var I=E.data;m.pending-=I.count,m.requests[I.id][I.action](I.value),delete m.requests[I.id]},m}function u(f){for(var m="self.ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(s)+"]), {}).then(function(result) { result.instance.exports.__wasm_call_ctors(); return result.instance; });self.onmessage = "+b.name+";"+A.toString()+b.toString(),E=new Blob([m],{type:"text/javascript"}),I=URL.createObjectURL(E),C=c.length;C<f;++C)c[C]=d(I);for(var C=f;C<c.length;++C)c[C].object.postMessage({});c.length=f,URL.revokeObjectURL(I)}function p(f,m,E,I,C){for(var x=c[0],Q=1;Q<c.length;++Q)c[Q].pending<x.pending&&(x=c[Q]);return new Promise(function(y,M){var w=new Uint8Array(E),S=++g;x.pending+=f,x.requests[S]={resolve:y,reject:M},x.object.postMessage({id:S,count:f,size:m,source:w,mode:I,filter:C},[w.buffer])})}function b(f){var m=f.data;if(!m.id)return self.close();self.ready.then(function(E){try{var I=new Uint8Array(m.count*m.size);A(E,E.exports[m.mode],I,m.count,m.size,m.source,E.exports[m.filter]),self.postMessage({id:m.id,count:m.count,action:"resolve",value:I},[I.buffer])}catch(C){self.postMessage({id:m.id,count:m.count,action:"reject",value:C})}})}return{ready:a,supported:!0,useWorkers:function(f){u(f)},decodeVertexBuffer:function(f,m,E,I,C){A(n,n.exports.meshopt_decodeVertexBuffer,f,m,E,I,n.exports[o[C]])},decodeIndexBuffer:function(f,m,E,I){A(n,n.exports.meshopt_decodeIndexBuffer,f,m,E,I)},decodeIndexSequence:function(f,m,E,I){A(n,n.exports.meshopt_decodeIndexSequence,f,m,E,I)},decodeGltfBuffer:function(f,m,E,I,C,x){A(n,n.exports[h[C]],f,m,E,I,n.exports[o[x]])},decodeGltfBufferAsync:function(f,m,E,I,C){return c.length>0?p(f,m,E,h[I],o[C]):a.then(function(){var x=new Uint8Array(f*m);return A(n,n.exports[h[I]],x,f,m,E,n.exports[o[C]]),x})}}})();const $e="183.2",ti=0,fr=1,br=2,Zs=1,$s=100,tn=204,en=205,sn=3,mr=0,nn="attached",Ir="detached",an=300,Er=301,_e=1e3,Xt=1001,qi=1002,Ut=1003,rn=1004,Br=1005,qt=1006,Cr=1007,Le=1008,R=1009,zt=1015,Zt=1016,An=35902,on=35899,zi=1022,Pt=1023,oe=1028,Ge=1030,hn=33776,Pi=33777,Oi=33779,yr=35840,ji=35842,cn=35843,xr=36196,ln=37492,gn=37496,Qr=37488,wr=37489,Mr=37490,Sr=37491,ei=37808,Hi=37812,Ji=36492,Fr=36495,Dr=36283,kr=36284,Rr=36285,Tr=36286,Ne=2300,ve=2301,Ki=2302,dn=2303,un=2400,pn=2401,fn=2402,_r=2500,Lr=0,bn=1,Vi=2,Gr=0,ii="",P="srgb",it="srgb-linear",mn="linear",Wi="srgb",he=7680,In=519,Yi=35044,$t=2e3,si=2001;function Nr(l){for(let t=l.length-1;t>=0;--t)if(l[t]>=65535)return!0;return!1}function vr(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function Xi(l){return document.createElementNS("http://www.w3.org/1999/xhtml",l)}const En={};function Bn(...l){const t="THREE."+l.shift();console.log(t,...l)}function Cn(l){const t=l[0];if(typeof t=="string"&&t.startsWith("TSL:")){const e=l[1];e&&e.isStackTrace?l[0]+=" "+e.getLocation():l[1]='Stack trace not available. Enable "THREE.Node.captureStackTrace" to capture stack traces.'}return l}function N(...l){l=Cn(l);const t="THREE."+l.shift();{const e=l[0];e&&e.isStackTrace?console.warn(e.getError(t)):console.warn(t,...l)}}function q(...l){l=Cn(l);const t="THREE."+l.shift();{const e=l[0];e&&e.isStackTrace?console.error(e.getError(t)):console.error(t,...l)}}function yn(...l){const t=l.join(" ");t in En||(En[t]=!0,N(...l))}class ni{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,a=s.length;n<a;n++)s[n].call(this,t);t.target=null}}}const Y=["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 xn=1234567;const Ue=Math.PI/180,qe=180/Math.PI;function lt(){const l=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(Y[l&255]+Y[l>>8&255]+Y[l>>16&255]+Y[l>>24&255]+"-"+Y[t&255]+Y[t>>8&255]+"-"+Y[t>>16&15|64]+Y[t>>24&255]+"-"+Y[e&63|128]+Y[e>>8&255]+"-"+Y[e>>16&255]+Y[e>>24&255]+Y[i&255]+Y[i>>8&255]+Y[i>>16&255]+Y[i>>24&255]).toLowerCase()}function D(l,t,e){return Math.max(t,Math.min(e,l))}function Zi(l,t){return(l%t+t)%t}function Ur(l,t,e,i,s){return i+(l-t)*(s-i)/(e-t)}function qr(l,t,e){return l!==t?(e-l)/(t-l):0}function ze(l,t,e){return(1-e)*l+e*t}function zr(l,t,e,i){return ze(l,t,1-Math.exp(-e*i))}function Pr(l,t=1){return t-Math.abs(Zi(l,t*2)-t)}function Or(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*(3-2*l))}function jr(l,t,e){return l<=t?0:l>=e?1:(l=(l-t)/(e-t),l*l*l*(l*(l*6-15)+10))}function Hr(l,t){return l+Math.floor(Math.random()*(t-l+1))}function Jr(l,t){return l+Math.random()*(t-l)}function Kr(l){return l*(.5-Math.random())}function Vr(l){l!==void 0&&(xn=l);let t=xn+=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 Wr(l){return l*Ue}function Yr(l){return l*qe}function Xr(l){return(l&l-1)===0&&l!==0}function Zr(l){return Math.pow(2,Math.ceil(Math.log(l)/Math.LN2))}function $r(l){return Math.pow(2,Math.floor(Math.log(l)/Math.LN2))}function tA(l,t,e,i,s){const n=Math.cos,a=Math.sin,r=n(e/2),A=a(e/2),o=n((t+i)/2),h=a((t+i)/2),c=n((t-i)/2),g=a((t-i)/2),d=n((i-t)/2),u=a((i-t)/2);switch(s){case"XYX":l.set(r*h,A*c,A*g,r*o);break;case"YZY":l.set(A*g,r*h,A*c,r*o);break;case"ZXZ":l.set(A*c,A*g,r*h,r*o);break;case"XZX":l.set(r*h,A*u,A*d,r*o);break;case"YXY":l.set(A*d,r*h,A*u,r*o);break;case"ZYZ":l.set(A*u,A*d,r*h,r*o);break;default:N("MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function gt(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return l/4294967295;case Uint16Array:return l/65535;case Uint8Array:return l/255;case Int32Array:return Math.max(l/2147483647,-1);case Int16Array:return Math.max(l/32767,-1);case Int8Array:return Math.max(l/127,-1);default:throw new Error("Invalid component type.")}}function _(l,t){switch(t.constructor){case Float32Array:return l;case Uint32Array:return Math.round(l*4294967295);case Uint16Array:return Math.round(l*65535);case Uint8Array:return Math.round(l*255);case Int32Array:return Math.round(l*2147483647);case Int16Array:return Math.round(l*32767);case Int8Array:return Math.round(l*127);default:throw new Error("Invalid component type.")}}const eA={DEG2RAD:Ue,RAD2DEG:qe,generateUUID:lt,clamp:D,euclideanModulo:Zi,mapLinear:Ur,inverseLerp:qr,lerp:ze,damp:zr,pingpong:Pr,smoothstep:Or,smootherstep:jr,randInt:Hr,randFloat:Jr,randFloatSpread:Kr,seededRandom:Vr,degToRad:Wr,radToDeg:Yr,isPowerOfTwo:Xr,ceilPowerOfTwo:Zr,floorPowerOfTwo:$r,setQuaternionFromProperEuler:tA,normalize:_,denormalize:gt};class H{constructor(t=0,e=0){H.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=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(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(D(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,a=this.y-t.y;return this.x=n*i-a*s+t.x,this.y=n*s+a*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qt{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,a,r){let A=i[s+0],o=i[s+1],h=i[s+2],c=i[s+3],g=n[a+0],d=n[a+1],u=n[a+2],p=n[a+3];if(c!==p||A!==g||o!==d||h!==u){let b=A*g+o*d+h*u+c*p;b<0&&(g=-g,d=-d,u=-u,p=-p,b=-b);let f=1-r;if(b<.9995){const m=Math.acos(b),E=Math.sin(m);f=Math.sin(f*m)/E,r=Math.sin(r*m)/E,A=A*f+g*r,o=o*f+d*r,h=h*f+u*r,c=c*f+p*r}else{A=A*f+g*r,o=o*f+d*r,h=h*f+u*r,c=c*f+p*r;const m=1/Math.sqrt(A*A+o*o+h*h+c*c);A*=m,o*=m,h*=m,c*=m}}t[e]=A,t[e+1]=o,t[e+2]=h,t[e+3]=c}static multiplyQuaternionsFlat(t,e,i,s,n,a){const r=i[s],A=i[s+1],o=i[s+2],h=i[s+3],c=n[a],g=n[a+1],d=n[a+2],u=n[a+3];return t[e]=r*u+h*c+A*d-o*g,t[e+1]=A*u+h*g+o*c-r*d,t[e+2]=o*u+h*d+r*g-A*c,t[e+3]=h*u-r*c-A*g-o*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,a=t._order,r=Math.cos,A=Math.sin,o=r(i/2),h=r(s/2),c=r(n/2),g=A(i/2),d=A(s/2),u=A(n/2);switch(a){case"XYZ":this._x=g*h*c+o*d*u,this._y=o*d*c-g*h*u,this._z=o*h*u+g*d*c,this._w=o*h*c-g*d*u;break;case"YXZ":this._x=g*h*c+o*d*u,this._y=o*d*c-g*h*u,this._z=o*h*u-g*d*c,this._w=o*h*c+g*d*u;break;case"ZXY":this._x=g*h*c-o*d*u,this._y=o*d*c+g*h*u,this._z=o*h*u+g*d*c,this._w=o*h*c-g*d*u;break;case"ZYX":this._x=g*h*c-o*d*u,this._y=o*d*c+g*h*u,this._z=o*h*u-g*d*c,this._w=o*h*c+g*d*u;break;case"YZX":this._x=g*h*c+o*d*u,this._y=o*d*c+g*h*u,this._z=o*h*u-g*d*c,this._w=o*h*c-g*d*u;break;case"XZY":this._x=g*h*c-o*d*u,this._y=o*d*c-g*h*u,this._z=o*h*u+g*d*c,this._w=o*h*c+g*d*u;break;default:N("Quaternion: .setFromEuler() encountered an unknown order: "+a)}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],a=e[1],r=e[5],A=e[9],o=e[2],h=e[6],c=e[10],g=i+r+c;if(g>0){const d=.5/Math.sqrt(g+1);this._w=.25/d,this._x=(h-A)*d,this._y=(n-o)*d,this._z=(a-s)*d}else if(i>r&&i>c){const d=2*Math.sqrt(1+i-r-c);this._w=(h-A)/d,this._x=.25*d,this._y=(s+a)/d,this._z=(n+o)/d}else if(r>c){const d=2*Math.sqrt(1+r-i-c);this._w=(n-o)/d,this._x=(s+a)/d,this._y=.25*d,this._z=(A+h)/d}else{const d=2*Math.sqrt(1+c-i-r);this._w=(a-s)/d,this._x=(n+o)/d,this._y=(A+h)/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(D(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,a=t._w,r=e._x,A=e._y,o=e._z,h=e._w;return this._x=i*h+a*r+s*o-n*A,this._y=s*h+a*A+n*r-i*o,this._z=n*h+a*o+i*A-s*r,this._w=a*h-i*r-s*A-n*o,this._onChangeCallback(),this}slerp(t,e){let i=t._x,s=t._y,n=t._z,a=t._w,r=this.dot(t);r<0&&(i=-i,s=-s,n=-n,a=-a,r=-r);let A=1-e;if(r<.9995){const o=Math.acos(r),h=Math.sin(o);A=Math.sin(A*o)/h,e=Math.sin(e*o)/h,this._x=this._x*A+i*e,this._y=this._y*A+s*e,this._z=this._z*A+n*e,this._w=this._w*A+a*e,this._onChangeCallback()}else this._x=this._x*A+i*e,this._y=this._y*A+s*e,this._z=this._z*A+n*e,this._w=this._w*A+a*e,this.normalize();return 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 B{constructor(t=0,e=0,i=0){B.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(Qn.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(Qn.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,a=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])*a,this.y=(n[1]*e+n[5]*i+n[9]*s+n[13])*a,this.z=(n[2]*e+n[6]*i+n[10]*s+n[14])*a,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,n=t.x,a=t.y,r=t.z,A=t.w,o=2*(a*s-r*i),h=2*(r*e-n*s),c=2*(n*i-a*e);return this.x=e+A*o+a*c-r*h,this.y=i+A*h+r*o-n*c,this.z=s+A*c+n*h-a*o,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=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this.z=D(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this.z=D(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(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,a=e.x,r=e.y,A=e.z;return this.x=s*A-n*r,this.y=n*a-i*A,this.z=i*r-s*a,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 $i.copy(this).projectOnVector(t),this.sub($i)}reflect(t){return this.sub($i.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(D(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 $i=new B,Qn=new Qt;class wt{constructor(t,e,i,s,n,a,r,A,o){wt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,n,a,r,A,o)}set(t,e,i,s,n,a,r,A,o){const h=this.elements;return h[0]=t,h[1]=s,h[2]=r,h[3]=e,h[4]=n,h[5]=A,h[6]=i,h[7]=a,h[8]=o,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,a=i[0],r=i[3],A=i[6],o=i[1],h=i[4],c=i[7],g=i[2],d=i[5],u=i[8],p=s[0],b=s[3],f=s[6],m=s[1],E=s[4],I=s[7],C=s[2],x=s[5],Q=s[8];return n[0]=a*p+r*m+A*C,n[3]=a*b+r*E+A*x,n[6]=a*f+r*I+A*Q,n[1]=o*p+h*m+c*C,n[4]=o*b+h*E+c*x,n[7]=o*f+h*I+c*Q,n[2]=g*p+d*m+u*C,n[5]=g*b+d*E+u*x,n[8]=g*f+d*I+u*Q,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],a=t[4],r=t[5],A=t[6],o=t[7],h=t[8];return e*a*h-e*r*o-i*n*h+i*r*A+s*n*o-s*a*A}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],n=t[3],a=t[4],r=t[5],A=t[6],o=t[7],h=t[8],c=h*a-r*o,g=r*A-h*n,d=o*n-a*A,u=e*c+i*g+s*d;if(u===0)return this.set(0,0,0,0,0,0,0,0,0);const p=1/u;return t[0]=c*p,t[1]=(s*o-h*i)*p,t[2]=(r*i-s*a)*p,t[3]=g*p,t[4]=(h*e-s*A)*p,t[5]=(s*n-r*e)*p,t[6]=d*p,t[7]=(i*A-o*e)*p,t[8]=(a*e-i*n)*p,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,a,r){const A=Math.cos(n),o=Math.sin(n);return this.set(i*A,i*o,-i*(A*a+o*r)+a+t,-s*o,s*A,-s*(-o*a+A*r)+r+e,0,0,1),this}scale(t,e){return this.premultiply(ts.makeScale(t,e)),this}rotate(t){return this.premultiply(ts.makeRotation(-t)),this}translate(t,e){return this.premultiply(ts.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 ts=new wt,wn=new wt().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),Mn=new wt().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function iA(){const l={enabled:!0,workingColorSpace:it,spaces:{},convert:function(s,n,a){return this.enabled===!1||n===a||!n||!a||(this.spaces[n].transfer===Wi&&(s.r=Mt(s.r),s.g=Mt(s.g),s.b=Mt(s.b)),this.spaces[n].primaries!==this.spaces[a].primaries&&(s.applyMatrix3(this.spaces[n].toXYZ),s.applyMatrix3(this.spaces[a].fromXYZ)),this.spaces[a].transfer===Wi&&(s.r=ce(s.r),s.g=ce(s.g),s.b=ce(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===ii?mn:this.spaces[s].transfer},getToneMappingMode:function(s){return this.spaces[s].outputColorSpaceConfig.toneMappingMode||"standard"},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,a){return s.copy(this.spaces[n].toXYZ).multiply(this.spaces[a].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 yn("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),l.workingToColorSpace(s,n)},toWorkingColorSpace:function(s,n){return yn("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),l.colorSpaceToWorking(s,n)}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return l.define({[it]:{primaries:t,whitePoint:i,transfer:mn,toXYZ:wn,fromXYZ:Mn,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:P},outputColorSpaceConfig:{drawingBufferColorSpace:P}},[P]:{primaries:t,whitePoint:i,transfer:Wi,toXYZ:wn,fromXYZ:Mn,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:P}}}),l}const $=iA();function Mt(l){return l<.04045?l*.0773993808:Math.pow(l*.9478672986+.0521327014,2.4)}function ce(l){return l<.0031308?l*12.92:1.055*Math.pow(l,.41666)-.055}let le;class sA{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{le===void 0&&(le=Xi("canvas")),le.width=t.width,le.height=t.height;const s=le.getContext("2d");t instanceof ImageData?s.putImageData(t,0,0):s.drawImage(t,0,0,t.width,t.height),i=le}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=Xi("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 a=0;a<n.length;a++)n[a]=Mt(n[a]/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(Mt(e[i]/255)*255):e[i]=Mt(e[i]);return{data:e,width:t.width,height:t.height}}else return N("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let nA=0;class aA{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:nA++}),this.uuid=lt(),this.data=t,this.dataReady=!0,this.version=0}getSize(t){const e=this.data;return typeof HTMLVideoElement<"u"&&e instanceof HTMLVideoElement?t.set(e.videoWidth,e.videoHeight,0):typeof VideoFrame<"u"&&e instanceof VideoFrame?t.set(e.displayHeight,e.displayWidth,0):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 a=0,r=s.length;a<r;a++)s[a].isDataTexture?n.push(es(s[a].image)):n.push(es(s[a]))}else n=es(s);i.url=n}return e||(t.images[this.uuid]=i),i}}function es(l){return typeof HTMLImageElement<"u"&&l instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&l instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&l instanceof ImageBitmap?sA.getDataURL(l):l.data?{data:Array.from(l.data),width:l.width,height:l.height,type:l.data.constructor.name}:(N("Texture: Unable to serialize Texture."),{})}let rA=0;const is=new B;class st extends ni{constructor(t=st.DEFAULT_IMAGE,e=st.DEFAULT_MAPPING,i=Xt,s=Xt,n=qt,a=Le,r=Pt,A=R,o=st.DEFAULT_ANISOTROPY,h=ii){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rA++}),this.uuid=lt(),this.name="",this.source=new aA(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=n,this.minFilter=a,this.anisotropy=o,this.format=r,this.internalFormat=null,this.type=A,this.offset=new H(0,0),this.repeat=new H(1,1),this.center=new H(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new wt,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,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(is).x}get height(){return this.source.getSize(is).y}get depth(){return this.source.getSize(is).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){N(`Texture.setValues(): parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){N(`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!==an)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case _e:t.x=t.x-Math.floor(t.x);break;case Xt:t.x=t.x<0?0:1;break;case qi: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 _e:t.y=t.y-Math.floor(t.y);break;case Xt:t.y=t.y<0?0:1;break;case qi: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++}}st.DEFAULT_IMAGE=null,st.DEFAULT_MAPPING=an,st.DEFAULT_ANISOTROPY=4;class St{constructor(t=0,e=0,i=0,s=1){St.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,a=t.elements;return this.x=a[0]*e+a[4]*i+a[8]*s+a[12]*n,this.y=a[1]*e+a[5]*i+a[9]*s+a[13]*n,this.z=a[2]*e+a[6]*i+a[10]*s+a[14]*n,this.w=a[3]*e+a[7]*i+a[11]*s+a[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,o=A[0],h=A[4],c=A[8],g=A[1],d=A[5],u=A[9],p=A[2],b=A[6],f=A[10];if(Math.abs(h-g)<.01&&Math.abs(c-p)<.01&&Math.abs(u-b)<.01){if(Math.abs(h+g)<.1&&Math.abs(c+p)<.1&&Math.abs(u+b)<.1&&Math.abs(o+d+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const E=(o+1)/2,I=(d+1)/2,C=(f+1)/2,x=(h+g)/4,Q=(c+p)/4,y=(u+b)/4;return E>I&&E>C?E<.01?(i=0,s=.707106781,n=.707106781):(i=Math.sqrt(E),s=x/i,n=Q/i):I>C?I<.01?(i=.707106781,s=0,n=.707106781):(s=Math.sqrt(I),i=x/s,n=y/s):C<.01?(i=.707106781,s=.707106781,n=0):(n=Math.sqrt(C),i=Q/n,s=y/n),this.set(i,s,n,e),this}let m=Math.sqrt((b-u)*(b-u)+(c-p)*(c-p)+(g-h)*(g-h));return Math.abs(m)<.001&&(m=1),this.x=(b-u)/m,this.y=(c-p)/m,this.z=(g-h)/m,this.w=Math.acos((o+d+f-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=D(this.x,t.x,e.x),this.y=D(this.y,t.y,e.y),this.z=D(this.z,t.z,e.z),this.w=D(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=D(this.x,t,e),this.y=D(this.y,t,e),this.z=D(this.z,t,e),this.w=D(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(D(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 AA extends st{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=Ut,this.minFilter=Ut,this.wrapR=Xt,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class T{constructor(t,e,i,s,n,a,r,A,o,h,c,g,d,u,p,b){T.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,a,r,A,o,h,c,g,d,u,p,b)}set(t,e,i,s,n,a,r,A,o,h,c,g,d,u,p,b){const f=this.elements;return f[0]=t,f[4]=e,f[8]=i,f[12]=s,f[1]=n,f[5]=a,f[9]=r,f[13]=A,f[2]=o,f[6]=h,f[10]=c,f[14]=g,f[3]=d,f[7]=u,f[11]=p,f[15]=b,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 T().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 this.determinant()===0?(t.set(1,0,0),e.set(0,1,0),i.set(0,0,1),this):(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){if(t.determinant()===0)return this.identity();const e=this.elements,i=t.elements,s=1/ge.setFromMatrixColumn(t,0).length(),n=1/ge.setFromMatrixColumn(t,1).length(),a=1/ge.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]*a,e[9]=i[9]*a,e[10]=i[10]*a,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,a=Math.cos(i),r=Math.sin(i),A=Math.cos(s),o=Math.sin(s),h=Math.cos(n),c=Math.sin(n);if(t.order==="XYZ"){const g=a*h,d=a*c,u=r*h,p=r*c;e[0]=A*h,e[4]=-A*c,e[8]=o,e[1]=d+u*o,e[5]=g-p*o,e[9]=-r*A,e[2]=p-g*o,e[6]=u+d*o,e[10]=a*A}else if(t.order==="YXZ"){const g=A*h,d=A*c,u=o*h,p=o*c;e[0]=g+p*r,e[4]=u*r-d,e[8]=a*o,e[1]=a*c,e[5]=a*h,e[9]=-r,e[2]=d*r-u,e[6]=p+g*r,e[10]=a*A}else if(t.order==="ZXY"){const g=A*h,d=A*c,u=o*h,p=o*c;e[0]=g-p*r,e[4]=-a*c,e[8]=u+d*r,e[1]=d+u*r,e[5]=a*h,e[9]=p-g*r,e[2]=-a*o,e[6]=r,e[10]=a*A}else if(t.order==="ZYX"){const g=a*h,d=a*c,u=r*h,p=r*c;e[0]=A*h,e[4]=u*o-d,e[8]=g*o+p,e[1]=A*c,e[5]=p*o+g,e[9]=d*o-u,e[2]=-o,e[6]=r*A,e[10]=a*A}else if(t.order==="YZX"){const g=a*A,d=a*o,u=r*A,p=r*o;e[0]=A*h,e[4]=p-g*c,e[8]=u*c+d,e[1]=c,e[5]=a*h,e[9]=-r*h,e[2]=-o*h,e[6]=d*c+u,e[10]=g-p*c}else if(t.order==="XZY"){const g=a*A,d=a*o,u=r*A,p=r*o;e[0]=A*h,e[4]=-c,e[8]=o*h,e[1]=g*c+p,e[5]=a*h,e[9]=d*c-u,e[2]=u*c-d,e[6]=r*h,e[10]=p*c+g}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(oA,t,hA)}lookAt(t,e,i){const s=this.elements;return nt.subVectors(t,e),nt.lengthSq()===0&&(nt.z=1),nt.normalize(),Ot.crossVectors(i,nt),Ot.lengthSq()===0&&(Math.abs(i.z)===1?nt.x+=1e-4:nt.z+=1e-4,nt.normalize(),Ot.crossVectors(i,nt)),Ot.normalize(),ai.crossVectors(nt,Ot),s[0]=Ot.x,s[4]=ai.x,s[8]=nt.x,s[1]=Ot.y,s[5]=ai.y,s[9]=nt.y,s[2]=Ot.z,s[6]=ai.z,s[10]=nt.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,a=i[0],r=i[4],A=i[8],o=i[12],h=i[1],c=i[5],g=i[9],d=i[13],u=i[2],p=i[6],b=i[10],f=i[14],m=i[3],E=i[7],I=i[11],C=i[15],x=s[0],Q=s[4],y=s[8],M=s[12],w=s[1],S=s[5],G=s[9],k=s[13],z=s[2],v=s[6],Z=s[10],ct=s[14],yt=s[3],xt=s[7],vt=s[11],U=s[15];return n[0]=a*x+r*w+A*z+o*yt,n[4]=a*Q+r*S+A*v+o*xt,n[8]=a*y+r*G+A*Z+o*vt,n[12]=a*M+r*k+A*ct+o*U,n[1]=h*x+c*w+g*z+d*yt,n[5]=h*Q+c*S+g*v+d*xt,n[9]=h*y+c*G+g*Z+d*vt,n[13]=h*M+c*k+g*ct+d*U,n[2]=u*x+p*w+b*z+f*yt,n[6]=u*Q+p*S+b*v+f*xt,n[10]=u*y+p*G+b*Z+f*vt,n[14]=u*M+p*k+b*ct+f*U,n[3]=m*x+E*w+I*z+C*yt,n[7]=m*Q+E*S+I*v+C*xt,n[11]=m*y+E*G+I*Z+C*vt,n[15]=m*M+E*k+I*ct+C*U,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],a=t[1],r=t[5],A=t[9],o=t[13],h=t[2],c=t[6],g=t[10],d=t[14],u=t[3],p=t[7],b=t[11],f=t[15],m=A*d-o*g,E=r*d-o*c,I=r*g-A*c,C=a*d-o*h,x=a*g-A*h,Q=a*c-r*h;return e*(p*m-b*E+f*I)-i*(u*m-b*C+f*x)+s*(u*E-p*C+f*Q)-n*(u*I-p*x+b*Q)}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],a=t[4],r=t[5],A=t[6],o=t[7],h=t[8],c=t[9],g=t[10],d=t[11],u=t[12],p=t[13],b=t[14],f=t[15],m=e*r-i*a,E=e*A-s*a,I=e*o-n*a,C=i*A-s*r,x=i*o-n*r,Q=s*o-n*A,y=h*p-c*u,M=h*b-g*u,w=h*f-d*u,S=c*b-g*p,G=c*f-d*p,k=g*f-d*b,z=m*k-E*G+I*S+C*w-x*M+Q*y;if(z===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const v=1/z;return t[0]=(r*k-A*G+o*S)*v,t[1]=(s*G-i*k-n*S)*v,t[2]=(p*Q-b*x+f*C)*v,t[3]=(g*x-c*Q-d*C)*v,t[4]=(A*w-a*k-o*M)*v,t[5]=(e*k-s*w+n*M)*v,t[6]=(b*I-u*Q-f*E)*v,t[7]=(h*Q-g*I+d*E)*v,t[8]=(a*G-r*w+o*y)*v,t[9]=(i*w-e*G-n*y)*v,t[10]=(u*x-p*I+f*m)*v,t[11]=(c*I-h*x-d*m)*v,t[12]=(r*M-a*S-A*y)*v,t[13]=(e*S-i*M+s*y)*v,t[14]=(p*E-u*C-b*m)*v,t[15]=(h*C-c*E+g*m)*v,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,a=t.x,r=t.y,A=t.z,o=n*a,h=n*r;return this.set(o*a+i,o*r-s*A,o*A+s*r,0,o*r+s*A,h*r+i,h*A-s*a,0,o*A-s*r,h*A+s*a,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,a){return this.set(1,i,n,0,t,1,a,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,n=e._x,a=e._y,r=e._z,A=e._w,o=n+n,h=a+a,c=r+r,g=n*o,d=n*h,u=n*c,p=a*h,b=a*c,f=r*c,m=A*o,E=A*h,I=A*c,C=i.x,x=i.y,Q=i.z;return s[0]=(1-(p+f))*C,s[1]=(d+I)*C,s[2]=(u-E)*C,s[3]=0,s[4]=(d-I)*x,s[5]=(1-(g+f))*x,s[6]=(b+m)*x,s[7]=0,s[8]=(u+E)*Q,s[9]=(b-m)*Q,s[10]=(1-(g+p))*Q,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;t.x=s[12],t.y=s[13],t.z=s[14];const n=this.determinant();if(n===0)return i.set(1,1,1),e.identity(),this;let a=ge.set(s[0],s[1],s[2]).length();const r=ge.set(s[4],s[5],s[6]).length(),A=ge.set(s[8],s[9],s[10]).length();n<0&&(a=-a),dt.copy(this);const o=1/a,h=1/r,c=1/A;return dt.elements[0]*=o,dt.elements[1]*=o,dt.elements[2]*=o,dt.elements[4]*=h,dt.elements[5]*=h,dt.elements[6]*=h,dt.elements[8]*=c,dt.elements[9]*=c,dt.elements[10]*=c,e.setFromRotationMatrix(dt),i.x=a,i.y=r,i.z=A,this}makePerspective(t,e,i,s,n,a,r=$t,A=!1){const o=this.elements,h=2*n/(e-t),c=2*n/(i-s),g=(e+t)/(e-t),d=(i+s)/(i-s);let u,p;if(A)u=n/(a-n),p=a*n/(a-n);else if(r===$t)u=-(a+n)/(a-n),p=-2*a*n/(a-n);else if(r===si)u=-a/(a-n),p=-a*n/(a-n);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+r);return o[0]=h,o[4]=0,o[8]=g,o[12]=0,o[1]=0,o[5]=c,o[9]=d,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(t,e,i,s,n,a,r=$t,A=!1){const o=this.elements,h=2/(e-t),c=2/(i-s),g=-(e+t)/(e-t),d=-(i+s)/(i-s);let u,p;if(A)u=1/(a-n),p=a/(a-n);else if(r===$t)u=-2/(a-n),p=-(a+n)/(a-n);else if(r===si)u=-1/(a-n),p=-n/(a-n);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+r);return o[0]=h,o[4]=0,o[8]=0,o[12]=g,o[1]=0,o[5]=c,o[9]=0,o[13]=d,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=0,o[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 ge=new B,dt=new T,oA=new B(0,0,0),hA=new B(1,1,1),Ot=new B,ai=new B,nt=new B,Sn=new T,Fn=new Qt;class de{constructor(t=0,e=0,i=0,s=de.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],a=s[4],r=s[8],A=s[1],o=s[5],h=s[9],c=s[2],g=s[6],d=s[10];switch(e){case"XYZ":this._y=Math.asin(D(r,-1,1)),Math.abs(r)<.9999999?(this._x=Math.atan2(-h,d),this._z=Math.atan2(-a,n)):(this._x=Math.atan2(g,o),this._z=0);break;case"YXZ":this._x=Math.asin(-D(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(r,d),this._z=Math.atan2(A,o)):(this._y=Math.atan2(-c,n),this._z=0);break;case"ZXY":this._x=Math.asin(D(g,-1,1)),Math.abs(g)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,o)):(this._y=0,this._z=Math.atan2(A,n));break;case"ZYX":this._y=Math.asin(-D(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(g,d),this._z=Math.atan2(A,n)):(this._x=0,this._z=Math.atan2(-a,o));break;case"YZX":this._z=Math.asin(D(A,-1,1)),Math.abs(A)<.9999999?(this._x=Math.atan2(-h,o),this._y=Math.atan2(-c,n)):(this._x=0,this._y=Math.atan2(r,d));break;case"XZY":this._z=Math.asin(-D(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(g,o),this._y=Math.atan2(r,n)):(this._x=Math.atan2(-h,d),this._y=0);break;default:N("Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return Sn.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Sn,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Fn.setFromEuler(this),this.setFromQuaternion(Fn,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}}de.DEFAULT_ORDER="XYZ";class cA{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 lA=0;const Dn=new B,ue=new Qt,Ft=new T,ri=new B,Pe=new B,gA=new B,dA=new Qt,kn=new B(1,0,0),Rn=new B(0,1,0),Tn=new B(0,0,1),_n={type:"added"},uA={type:"removed"},pe={type:"childadded",child:null},ss={type:"childremoved",child:null};class O extends ni{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:lA++}),this.uuid=lt(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=O.DEFAULT_UP.clone();const t=new B,e=new de,i=new Qt,s=new B(1,1,1);function n(){i.setFromEuler(e,!1)}function a(){e.setFromQuaternion(i,void 0,!1)}e._onChange(n),i._onChange(a),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 T},normalMatrix:{value:new wt}}),this.matrix=new T,this.matrixWorld=new T,this.matrixAutoUpdate=O.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=O.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new cA,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.static=!1,this.userData={},this.pivot=null}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 ue.setFromAxisAngle(t,e),this.quaternion.multiply(ue),this}rotateOnWorldAxis(t,e){return ue.setFromAxisAngle(t,e),this.quaternion.premultiply(ue),this}rotateX(t){return this.rotateOnAxis(kn,t)}rotateY(t){return this.rotateOnAxis(Rn,t)}rotateZ(t){return this.rotateOnAxis(Tn,t)}translateOnAxis(t,e){return Dn.copy(t).applyQuaternion(this.quaternion),this.position.add(Dn.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(kn,t)}translateY(t){return this.translateOnAxis(Rn,t)}translateZ(t){return this.translateOnAxis(Tn,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Ft.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?ri.copy(t):ri.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),Pe.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Ft.lookAt(Pe,ri,this.up):Ft.lookAt(ri,Pe,this.up),this.quaternion.setFromRotationMatrix(Ft),s&&(Ft.extractRotation(s.matrixWorld),ue.setFromRotationMatrix(Ft),this.quaternion.premultiply(ue.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(q("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(_n),pe.child=t,this.dispatchEvent(pe),pe.child=null):q("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(uA),ss.child=t,this.dispatchEvent(ss),ss.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),Ft.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Ft.multiply(t.parent.matrixWorld)),t.applyMatrix4(Ft),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(_n),pe.child=t,this.dispatchEvent(pe),pe.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 a=this.children[i].getObjectByProperty(t,e);if(a!==void 0)return a}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let n=0,a=s.length;n<a;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(Pe,t,gA),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Pe,dA,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);const t=this.pivot;if(t!==null){const e=t.x,i=t.y,s=t.z,n=this.matrix.elements;n[12]+=e-n[0]*e-n[4]*i-n[8]*s,n[13]+=i-n[1]*e-n[5]*i-n[9]*s,n[14]+=s-n[2]*e-n[6]*i-n[10]*s}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,a=s.length;n<a;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),this.static!==!1&&(s.static=this.static),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.pivot!==null&&(s.pivot=this.pivot.toArray()),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.morphTargetDictionary!==void 0&&(s.morphTargetDictionary=Object.assign({},this.morphTargetDictionary)),this.morphTargetInfluences!==void 0&&(s.morphTargetInfluences=this.morphTargetInfluences.slice()),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(r=>({...r,boundingBox:r.boundingBox?r.boundingBox.toJSON():void 0,boundingSphere:r.boundingSphere?r.boundingSphere.toJSON():void 0})),s.instanceInfo=this._instanceInfo.map(r=>({...r})),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(r,A){return r[A.uuid]===void 0&&(r[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 r=this.geometry.parameters;if(r!==void 0&&r.shapes!==void 0){const A=r.shapes;if(Array.isArray(A))for(let o=0,h=A.length;o<h;o++){const c=A[o];n(t.shapes,c)}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 r=[];for(let A=0,o=this.material.length;A<o;A++)r.push(n(t.materials,this.material[A]));s.material=r}else s.material=n(t.materials,this.material);if(this.children.length>0){s.children=[];for(let r=0;r<this.children.length;r++)s.children.push(this.children[r].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let r=0;r<this.animations.length;r++){const A=this.animations[r];s.animations.push(n(t.animations,A))}}if(e){const r=a(t.geometries),A=a(t.materials),o=a(t.textures),h=a(t.images),c=a(t.shapes),g=a(t.skeletons),d=a(t.animations),u=a(t.nodes);r.length>0&&(i.geometries=r),A.length>0&&(i.materials=A),o.length>0&&(i.textures=o),h.length>0&&(i.images=h),c.length>0&&(i.shapes=c),g.length>0&&(i.skeletons=g),d.length>0&&(i.animations=d),u.length>0&&(i.nodes=u)}return i.object=s,i;function a(r){const A=[];for(const o in r){const h=r[o];delete h.metadata,A.push(h)}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),t.pivot!==null&&(this.pivot=t.pivot.clone()),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.static=t.static,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}}O.DEFAULT_UP=new B(0,1,0),O.DEFAULT_MATRIX_AUTO_UPDATE=!0,O.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;class ns extends O{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Ln={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},jt={h:0,s:0,l:0},Ai={h:0,s:0,l:0};function as(l,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?l+(t-l)*6*e:e<1/2?t:e<2/3?l+(t-l)*6*(2/3-e):l}class J{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=P){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,$.colorSpaceToWorking(this,e),this}setRGB(t,e,i,s=$.workingColorSpace){return this.r=t,this.g=e,this.b=i,$.colorSpaceToWorking(this,s),this}setHSL(t,e,i,s=$.workingColorSpace){if(t=Zi(t,1),e=D(e,0,1),i=D(i,0,1),e===0)this.r=this.g=this.b=i;else{const n=i<=.5?i*(1+e):i+e-i*e,a=2*i-n;this.r=as(a,n,t+1/3),this.g=as(a,n,t),this.b=as(a,n,t-1/3)}return $.colorSpaceToWorking(this,s),this}setStyle(t,e=P){function i(n){n!==void 0&&parseFloat(n)<1&&N("Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let n;const a=s[1],r=s[2];switch(a){case"rgb":case"rgba":if(n=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(r))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(r))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(r))return i(n[4]),this.setHSL(parseFloat(n[1])/360,parseFloat(n[2])/100,parseFloat(n[3])/100,e);break;default:N("Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=s[1],a=n.length;if(a===3)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(a===6)return this.setHex(parseInt(n,16),e);N("Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=P){const i=Ln[t.toLowerCase()];return i!==void 0?this.setHex(i,e):N("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=Mt(t.r),this.g=Mt(t.g),this.b=Mt(t.b),this}copyLinearToSRGB(t){return this.r=ce(t.r),this.g=ce(t.g),this.b=ce(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=P){return $.workingToColorSpace(X.copy(this),t),Math.round(D(X.r*255,0,255))*65536+Math.round(D(X.g*255,0,255))*256+Math.round(D(X.b*255,0,255))}getHexString(t=P){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=$.workingColorSpace){$.workingToColorSpace(X.copy(this),e);const i=X.r,s=X.g,n=X.b,a=Math.max(i,s,n),r=Math.min(i,s,n);let A,o;const h=(r+a)/2;if(r===a)A=0,o=0;else{const c=a-r;switch(o=h<=.5?c/(a+r):c/(2-a-r),a){case i:A=(s-n)/c+(s<n?6:0);break;case s:A=(n-i)/c+2;break;case n:A=(i-s)/c+4;break}A/=6}return t.h=A,t.s=o,t.l=h,t}getRGB(t,e=$.workingColorSpace){return $.workingToColorSpace(X.copy(this),e),t.r=X.r,t.g=X.g,t.b=X.b,t}getStyle(t=P){$.workingToColorSpace(X.copy(this),t);const e=X.r,i=X.g,s=X.b;return t!==P?`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(jt),this.setHSL(jt.h+t,jt.s+e,jt.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(jt),t.getHSL(Ai);const i=ze(jt.h,Ai.h,e),s=ze(jt.s,Ai.s,e),n=ze(jt.l,Ai.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 X=new J;J.NAMES=Ln;const ut=new B,Dt=new B,rs=new B,kt=new B,fe=new B,be=new B,Gn=new B,As=new B,os=new B,hs=new B,cs=new St,ls=new St,gs=new St;class pt{constructor(t=new B,e=new B,i=new B){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),ut.subVectors(t,e),s.cross(ut);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){ut.subVectors(s,e),Dt.subVectors(i,e),rs.subVectors(t,e);const a=ut.dot(ut),r=ut.dot(Dt),A=ut.dot(rs),o=Dt.dot(Dt),h=Dt.dot(rs),c=a*o-r*r;if(c===0)return n.set(0,0,0),null;const g=1/c,d=(o*A-r*h)*g,u=(a*h-r*A)*g;return n.set(1-d-u,u,d)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,kt)===null?!1:kt.x>=0&&kt.y>=0&&kt.x+kt.y<=1}static getInterpolation(t,e,i,s,n,a,r,A){return this.getBarycoord(t,e,i,s,kt)===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,kt.x),A.addScaledVector(a,kt.y),A.addScaledVector(r,kt.z),A)}static getInterpolatedAttribute(t,e,i,s,n,a){return cs.setScalar(0),ls.setScalar(0),gs.setScalar(0),cs.fromBufferAttribute(t,e),ls.fromBufferAttribute(t,i),gs.fromBufferAttribute(t,s),a.setScalar(0),a.addScaledVector(cs,n.x),a.addScaledVector(ls,n.y),a.addScaledVector(gs,n.z),a}static isFrontFacing(t,e,i,s){return ut.subVectors(i,e),Dt.subVectors(t,e),ut.cross(Dt).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 ut.subVectors(this.c,this.b),Dt.subVectors(this.a,this.b),ut.cross(Dt).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return pt.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return pt.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,n){return pt.getInterpolation(t,this.a,this.b,this.c,e,i,s,n)}containsPoint(t){return pt.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return pt.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 a,r;fe.subVectors(s,i),be.subVectors(n,i),As.subVectors(t,i);const A=fe.dot(As),o=be.dot(As);if(A<=0&&o<=0)return e.copy(i);os.subVectors(t,s);const h=fe.dot(os),c=be.dot(os);if(h>=0&&c<=h)return e.copy(s);const g=A*c-h*o;if(g<=0&&A>=0&&h<=0)return a=A/(A-h),e.copy(i).addScaledVector(fe,a);hs.subVectors(t,n);const d=fe.dot(hs),u=be.dot(hs);if(u>=0&&d<=u)return e.copy(n);const p=d*o-A*u;if(p<=0&&o>=0&&u<=0)return r=o/(o-u),e.copy(i).addScaledVector(be,r);const b=h*u-d*c;if(b<=0&&c-h>=0&&d-u>=0)return Gn.subVectors(n,s),r=(c-h)/(c-h+(d-u)),e.copy(s).addScaledVector(Gn,r);const f=1/(b+p+g);return a=p*f,r=g*f,e.copy(i).addScaledVector(fe,a).addScaledVector(be,r)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}class Rt{constructor(t=new B(1/0,1/0,1/0),e=new B(-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(ft.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(ft.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=ft.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 a=0,r=n.count;a<r;a++)t.isMesh===!0?t.getVertexPosition(a,ft):ft.fromBufferAttribute(n,a),ft.applyMatrix4(t.matrixWorld),this.expandByPoint(ft);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),oi.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),oi.copy(i.boundingBox)),oi.applyMatrix4(t.matrixWorld),this.union(oi)}const s=t.children;for(let n=0,a=s.length;n<a;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,ft),ft.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(Oe),hi.subVectors(this.max,Oe),me.subVectors(t.a,Oe),Ie.subVectors(t.b,Oe),Ee.subVectors(t.c,Oe),Ht.subVectors(Ie,me),Jt.subVectors(Ee,Ie),te.subVectors(me,Ee);let e=[0,-Ht.z,Ht.y,0,-Jt.z,Jt.y,0,-te.z,te.y,Ht.z,0,-Ht.x,Jt.z,0,-Jt.x,te.z,0,-te.x,-Ht.y,Ht.x,0,-Jt.y,Jt.x,0,-te.y,te.x,0];return!ds(e,me,Ie,Ee,hi)||(e=[1,0,0,0,1,0,0,0,1],!ds(e,me,Ie,Ee,hi))?!1:(ci.crossVectors(Ht,Jt),e=[ci.x,ci.y,ci.z],ds(e,me,Ie,Ee,hi))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ft).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ft).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:(Tt[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Tt[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Tt[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Tt[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Tt[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Tt[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Tt[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Tt[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Tt),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 Tt=[new B,new B,new B,new B,new B,new B,new B,new B],ft=new B,oi=new Rt,me=new B,Ie=new B,Ee=new B,Ht=new B,Jt=new B,te=new B,Oe=new B,hi=new B,ci=new B,ee=new B;function ds(l,t,e,i,s){for(let n=0,a=l.length-3;n<=a;n+=3){ee.fromArray(l,n);const r=s.x*Math.abs(ee.x)+s.y*Math.abs(ee.y)+s.z*Math.abs(ee.z),A=t.dot(ee),o=e.dot(ee),h=i.dot(ee);if(Math.max(-Math.max(A,o,h),Math.min(A,o,h))>r)return!1}return!0}const K=new B,li=new H;let pA=0;class at{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:pA++}),this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=Yi,this.updateRanges=[],this.gpuType=zt,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++)li.fromBufferAttribute(this,e),li.applyMatrix3(t),this.setXY(e,li.x,li.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)K.fromBufferAttribute(this,e),K.applyMatrix3(t),this.setXYZ(e,K.x,K.y,K.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)K.fromBufferAttribute(this,e),K.applyMatrix4(t),this.setXYZ(e,K.x,K.y,K.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)K.fromBufferAttribute(this,e),K.applyNormalMatrix(t),this.setXYZ(e,K.x,K.y,K.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)K.fromBufferAttribute(this,e),K.transformDirection(t),this.setXYZ(e,K.x,K.y,K.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=gt(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=_(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=gt(e,this.array)),e}setX(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=gt(e,this.array)),e}setY(t,e){return this.normalized&&(e=_(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=gt(e,this.array)),e}setZ(t,e){return this.normalized&&(e=_(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=gt(e,this.array)),e}setW(t,e){return this.normalized&&(e=_(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=_(e,this.array),i=_(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=_(e,this.array),i=_(i,this.array),s=_(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=_(e,this.array),i=_(i,this.array),s=_(s,this.array),n=_(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!==Yi&&(t.usage=this.usage),t}}class fA extends at{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class bA extends at{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class us extends at{constructor(t,e,i){super(new Float32Array(t),e,i)}}const mA=new Rt,je=new B,ps=new B;class It{constructor(t=new B,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):mA.setFromPoints(t).getCenter(i);let s=0;for(let n=0,a=t.length;n<a;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;je.subVectors(t,this.center);const e=je.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(je,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):(ps.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(je.copy(t.center).add(ps)),this.expandByPoint(je.copy(t.center).sub(ps))),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}}let IA=0;const At=new T,fs=new O,Be=new B,rt=new Rt,He=new Rt,W=new B;class ie extends ni{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:IA++}),this.uuid=lt(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.indirectOffset=0,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(Nr(t)?bA:fA)(t,1):this.index=t,this}setIndirect(t,e=0){return this.indirect=t,this.indirectOffset=e,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 wt().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 At.makeRotationFromQuaternion(t),this.applyMatrix4(At),this}rotateX(t){return At.makeRotationX(t),this.applyMatrix4(At),this}rotateY(t){return At.makeRotationY(t),this.applyMatrix4(At),this}rotateZ(t){return At.makeRotationZ(t),this.applyMatrix4(At),this}translate(t,e,i){return At.makeTranslation(t,e,i),this.applyMatrix4(At),this}scale(t,e,i){return At.makeScale(t,e,i),this.applyMatrix4(At),this}lookAt(t){return fs.lookAt(t),fs.updateMatrix(),this.applyMatrix4(fs.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Be).negate(),this.translate(Be.x,Be.y,Be.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 a=t[s];i.push(a.x,a.y,a.z||0)}this.setAttribute("position",new us(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&&N("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 Rt);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){q("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new B(-1/0,-1/0,-1/0),new B(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];rt.setFromBufferAttribute(n),this.morphTargetsRelative?(W.addVectors(this.boundingBox.min,rt.min),this.boundingBox.expandByPoint(W),W.addVectors(this.boundingBox.max,rt.max),this.boundingBox.expandByPoint(W)):(this.boundingBox.expandByPoint(rt.min),this.boundingBox.expandByPoint(rt.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&q('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 It);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){q("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new B,1/0);return}if(t){const i=this.boundingSphere.center;if(rt.setFromBufferAttribute(t),e)for(let n=0,a=e.length;n<a;n++){const r=e[n];He.setFromBufferAttribute(r),this.morphTargetsRelative?(W.addVectors(rt.min,He.min),rt.expandByPoint(W),W.addVectors(rt.max,He.max),rt.expandByPoint(W)):(rt.expandByPoint(He.min),rt.expandByPoint(He.max))}rt.getCenter(i);let s=0;for(let n=0,a=t.count;n<a;n++)W.fromBufferAttribute(t,n),s=Math.max(s,i.distanceToSquared(W));if(e)for(let n=0,a=e.length;n<a;n++){const r=e[n],A=this.morphTargetsRelative;for(let o=0,h=r.count;o<h;o++)W.fromBufferAttribute(r,o),A&&(Be.fromBufferAttribute(t,o),W.add(Be)),s=Math.max(s,i.distanceToSquared(W))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&q('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){q("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 at(new Float32Array(4*i.count),4));const a=this.getAttribute("tangent"),r=[],A=[];for(let y=0;y<i.count;y++)r[y]=new B,A[y]=new B;const o=new B,h=new B,c=new B,g=new H,d=new H,u=new H,p=new B,b=new B;function f(y,M,w){o.fromBufferAttribute(i,y),h.fromBufferAttribute(i,M),c.fromBufferAttribute(i,w),g.fromBufferAttribute(n,y),d.fromBufferAttribute(n,M),u.fromBufferAttribute(n,w),h.sub(o),c.sub(o),d.sub(g),u.sub(g);const S=1/(d.x*u.y-u.x*d.y);isFinite(S)&&(p.copy(h).multiplyScalar(u.y).addScaledVector(c,-d.y).multiplyScalar(S),b.copy(c).multiplyScalar(d.x).addScaledVector(h,-u.x).multiplyScalar(S),r[y].add(p),r[M].add(p),r[w].add(p),A[y].add(b),A[M].add(b),A[w].add(b))}let m=this.groups;m.length===0&&(m=[{start:0,count:t.count}]);for(let y=0,M=m.length;y<M;++y){const w=m[y],S=w.start,G=w.count;for(let k=S,z=S+G;k<z;k+=3)f(t.getX(k+0),t.getX(k+1),t.getX(k+2))}const E=new B,I=new B,C=new B,x=new B;function Q(y){C.fromBufferAttribute(s,y),x.copy(C);const M=r[y];E.copy(M),E.sub(C.multiplyScalar(C.dot(M))).normalize(),I.crossVectors(x,M);const S=I.dot(A[y])<0?-1:1;a.setXYZW(y,E.x,E.y,E.z,S)}for(let y=0,M=m.length;y<M;++y){const w=m[y],S=w.start,G=w.count;for(let k=S,z=S+G;k<z;k+=3)Q(t.getX(k+0)),Q(t.getX(k+1)),Q(t.getX(k+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 at(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let g=0,d=i.count;g<d;g++)i.setXYZ(g,0,0,0);const s=new B,n=new B,a=new B,r=new B,A=new B,o=new B,h=new B,c=new B;if(t)for(let g=0,d=t.count;g<d;g+=3){const u=t.getX(g+0),p=t.getX(g+1),b=t.getX(g+2);s.fromBufferAttribute(e,u),n.fromBufferAttribute(e,p),a.fromBufferAttribute(e,b),h.subVectors(a,n),c.subVectors(s,n),h.cross(c),r.fromBufferAttribute(i,u),A.fromBufferAttribute(i,p),o.fromBufferAttribute(i,b),r.add(h),A.add(h),o.add(h),i.setXYZ(u,r.x,r.y,r.z),i.setXYZ(p,A.x,A.y,A.z),i.setXYZ(b,o.x,o.y,o.z)}else for(let g=0,d=e.count;g<d;g+=3)s.fromBufferAttribute(e,g+0),n.fromBufferAttribute(e,g+1),a.fromBufferAttribute(e,g+2),h.subVectors(a,n),c.subVectors(s,n),h.cross(c),i.setXYZ(g+0,h.x,h.y,h.z),i.setXYZ(g+1,h.x,h.y,h.z),i.setXYZ(g+2,h.x,h.y,h.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)W.fromBufferAttribute(t,e),W.normalize(),t.setXYZ(e,W.x,W.y,W.z)}toNonIndexed(){function t(r,A){const o=r.array,h=r.itemSize,c=r.normalized,g=new o.constructor(A.length*h);let d=0,u=0;for(let p=0,b=A.length;p<b;p++){r.isInterleavedBufferAttribute?d=A[p]*r.data.stride+r.offset:d=A[p]*h;for(let f=0;f<h;f++)g[u++]=o[d++]}return new at(g,h,c)}if(this.index===null)return N("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new ie,i=this.index.array,s=this.attributes;for(const r in s){const A=s[r],o=t(A,i);e.setAttribute(r,o)}const n=this.morphAttributes;for(const r in n){const A=[],o=n[r];for(let h=0,c=o.length;h<c;h++){const g=o[h],d=t(g,i);A.push(d)}e.morphAttributes[r]=A}e.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let r=0,A=a.length;r<A;r++){const o=a[r];e.addGroup(o.start,o.count,o.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 o in A)A[o]!==void 0&&(t[o]=A[o]);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 o=i[A];t.data.attributes[A]=o.toJSON(t.data)}const s={};let n=!1;for(const A in this.morphAttributes){const o=this.morphAttributes[A],h=[];for(let c=0,g=o.length;c<g;c++){const d=o[c];h.push(d.toJSON(t.data))}h.length>0&&(s[A]=h,n=!0)}n&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));const r=this.boundingSphere;return r!==null&&(t.data.boundingSphere=r.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 o in s){const h=s[o];this.setAttribute(o,h.clone(e))}const n=t.morphAttributes;for(const o in n){const h=[],c=n[o];for(let g=0,d=c.length;g<d;g++)h.push(c[g].clone(e));this.morphAttributes[o]=h}this.morphTargetsRelative=t.morphTargetsRelative;const a=t.groups;for(let o=0,h=a.length;o<h;o++){const c=a[o];this.addGroup(c.start,c.count,c.materialIndex)}const r=t.boundingBox;r!==null&&(this.boundingBox=r.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"})}}class Nn{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Yi,this.updateRanges=[],this.version=0,this.uuid=lt()}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=lt()),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=lt()),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 tt=new B;class gi{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++)tt.fromBufferAttribute(this,e),tt.applyMatrix4(t),this.setXYZ(e,tt.x,tt.y,tt.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)tt.fromBufferAttribute(this,e),tt.applyNormalMatrix(t),this.setXYZ(e,tt.x,tt.y,tt.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)tt.fromBufferAttribute(this,e),tt.transformDirection(t),this.setXYZ(e,tt.x,tt.y,tt.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=gt(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=_(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=_(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=_(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=gt(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=gt(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=gt(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=gt(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=_(e,this.array),i=_(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=_(e,this.array),i=_(i,this.array),s=_(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=_(e,this.array),i=_(i,this.array),s=_(s,this.array),n=_(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){Bn("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 at(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 gi(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){Bn("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}}}let EA=0;class se extends ni{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:EA++}),this.uuid=lt(),this.name="",this.type="Material",this.blending=Zs,this.side=ti,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=tn,this.blendDst=en,this.blendEquation=$s,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new J(0,0,0),this.blendAlpha=0,this.depthFunc=sn,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=In,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=he,this.stencilZFail=he,this.stencilZPass=he,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}onBuild(){}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){N(`Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){N(`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.sheenColorMap&&this.sheenColorMap.isTexture&&(i.sheenColorMap=this.sheenColorMap.toJSON(t).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(i.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(t).uuid),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!==Zs&&(i.blending=this.blending),this.side!==ti&&(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!==tn&&(i.blendSrc=this.blendSrc),this.blendDst!==en&&(i.blendDst=this.blendDst),this.blendEquation!==$s&&(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!==sn&&(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!==In&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==he&&(i.stencilFail=this.stencilFail),this.stencilZFail!==he&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==he&&(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.allowOverride===!1&&(i.allowOverride=!1),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 a=[];for(const r in n){const A=n[r];delete A.metadata,a.push(A)}return a}if(e){const n=s(t.textures),a=s(t.images);n.length>0&&(i.textures=n),a.length>0&&(i.images=a)}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.allowOverride=t.allowOverride,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++}}const _t=new B,bs=new B,di=new B,Kt=new B,ms=new B,ui=new B,Is=new B;class pi{constructor(t=new B,e=new B(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,_t)),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=_t.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(_t.copy(this.origin).addScaledVector(this.direction,e),_t.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){bs.copy(t).add(e).multiplyScalar(.5),di.copy(e).sub(t).normalize(),Kt.copy(this.origin).sub(bs);const n=t.distanceTo(e)*.5,a=-this.direction.dot(di),r=Kt.dot(this.direction),A=-Kt.dot(di),o=Kt.lengthSq(),h=Math.abs(1-a*a);let c,g,d,u;if(h>0)if(c=a*A-r,g=a*r-A,u=n*h,c>=0)if(g>=-u)if(g<=u){const p=1/h;c*=p,g*=p,d=c*(c+a*g+2*r)+g*(a*c+g+2*A)+o}else g=n,c=Math.max(0,-(a*g+r)),d=-c*c+g*(g+2*A)+o;else g=-n,c=Math.max(0,-(a*g+r)),d=-c*c+g*(g+2*A)+o;else g<=-u?(c=Math.max(0,-(-a*n+r)),g=c>0?-n:Math.min(Math.max(-n,-A),n),d=-c*c+g*(g+2*A)+o):g<=u?(c=0,g=Math.min(Math.max(-n,-A),n),d=g*(g+2*A)+o):(c=Math.max(0,-(a*n+r)),g=c>0?n:Math.min(Math.max(-n,-A),n),d=-c*c+g*(g+2*A)+o);else g=a>0?-n:n,c=Math.max(0,-(a*g+r)),d=-c*c+g*(g+2*A)+o;return i&&i.copy(this.origin).addScaledVector(this.direction,c),s&&s.copy(bs).addScaledVector(di,g),d}intersectSphere(t,e){_t.subVectors(t.center,this.origin);const i=_t.dot(this.direction),s=_t.dot(_t)-i*i,n=t.radius*t.radius;if(s>n)return null;const a=Math.sqrt(n-s),r=i-a,A=i+a;return A<0?null:r<0?this.at(A,e):this.at(r,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,a,r,A;const o=1/this.direction.x,h=1/this.direction.y,c=1/this.direction.z,g=this.origin;return o>=0?(i=(t.min.x-g.x)*o,s=(t.max.x-g.x)*o):(i=(t.max.x-g.x)*o,s=(t.min.x-g.x)*o),h>=0?(n=(t.min.y-g.y)*h,a=(t.max.y-g.y)*h):(n=(t.max.y-g.y)*h,a=(t.min.y-g.y)*h),i>a||n>s||((n>i||isNaN(i))&&(i=n),(a<s||isNaN(s))&&(s=a),c>=0?(r=(t.min.z-g.z)*c,A=(t.max.z-g.z)*c):(r=(t.max.z-g.z)*c,A=(t.min.z-g.z)*c),i>A||r>s)||((r>i||i!==i)&&(i=r),(A<s||s!==s)&&(s=A),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,_t)!==null}intersectTriangle(t,e,i,s,n){ms.subVectors(e,t),ui.subVectors(i,t),Is.crossVectors(ms,ui);let a=this.direction.dot(Is),r;if(a>0){if(s)return null;r=1}else if(a<0)r=-1,a=-a;else return null;Kt.subVectors(this.origin,t);const A=r*this.direction.dot(ui.crossVectors(Kt,ui));if(A<0)return null;const o=r*this.direction.dot(ms.cross(Kt));if(o<0||A+o>a)return null;const h=-r*Kt.dot(Is);return h<0?null:this.at(h/a,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 Ce extends se{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new J(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 de,this.combine=mr,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 vn=new T,ne=new pi,fi=new It,Un=new B,bi=new B,mi=new B,Ii=new B,Es=new B,Ei=new B,qn=new B,Bi=new B;class Ci extends O{constructor(t=new ie,e=new Ce){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,a=s.length;n<a;n++){const r=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=n}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,n=i.morphAttributes.position,a=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const r=this.morphTargetInfluences;if(n&&r){Ei.set(0,0,0);for(let A=0,o=n.length;A<o;A++){const h=r[A],c=n[A];h!==0&&(Es.fromBufferAttribute(c,t),a?Ei.addScaledVector(Es,h):Ei.addScaledVector(Es.sub(e),h))}e.add(Ei)}return e}raycast(t,e){const i=this.geometry,s=this.material,n=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),fi.copy(i.boundingSphere),fi.applyMatrix4(n),ne.copy(t.ray).recast(t.near),!(fi.containsPoint(ne.origin)===!1&&(ne.intersectSphere(fi,Un)===null||ne.origin.distanceToSquared(Un)>(t.far-t.near)**2))&&(vn.copy(n).invert(),ne.copy(t.ray).applyMatrix4(vn),!(i.boundingBox!==null&&ne.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,ne)))}_computeIntersections(t,e,i){let s;const n=this.geometry,a=this.material,r=n.index,A=n.attributes.position,o=n.attributes.uv,h=n.attributes.uv1,c=n.attributes.normal,g=n.groups,d=n.drawRange;if(r!==null)if(Array.isArray(a))for(let u=0,p=g.length;u<p;u++){const b=g[u],f=a[b.materialIndex],m=Math.max(b.start,d.start),E=Math.min(r.count,Math.min(b.start+b.count,d.start+d.count));for(let I=m,C=E;I<C;I+=3){const x=r.getX(I),Q=r.getX(I+1),y=r.getX(I+2);s=yi(this,f,t,i,o,h,c,x,Q,y),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const u=Math.max(0,d.start),p=Math.min(r.count,d.start+d.count);for(let b=u,f=p;b<f;b+=3){const m=r.getX(b),E=r.getX(b+1),I=r.getX(b+2);s=yi(this,a,t,i,o,h,c,m,E,I),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}else if(A!==void 0)if(Array.isArray(a))for(let u=0,p=g.length;u<p;u++){const b=g[u],f=a[b.materialIndex],m=Math.max(b.start,d.start),E=Math.min(A.count,Math.min(b.start+b.count,d.start+d.count));for(let I=m,C=E;I<C;I+=3){const x=I,Q=I+1,y=I+2;s=yi(this,f,t,i,o,h,c,x,Q,y),s&&(s.faceIndex=Math.floor(I/3),s.face.materialIndex=b.materialIndex,e.push(s))}}else{const u=Math.max(0,d.start),p=Math.min(A.count,d.start+d.count);for(let b=u,f=p;b<f;b+=3){const m=b,E=b+1,I=b+2;s=yi(this,a,t,i,o,h,c,m,E,I),s&&(s.faceIndex=Math.floor(b/3),e.push(s))}}}}function BA(l,t,e,i,s,n,a,r){let A;if(t.side===fr?A=i.intersectTriangle(a,n,s,!0,r):A=i.intersectTriangle(s,n,a,t.side===ti,r),A===null)return null;Bi.copy(r),Bi.applyMatrix4(l.matrixWorld);const o=e.ray.origin.distanceTo(Bi);return o<e.near||o>e.far?null:{distance:o,point:Bi.clone(),object:l}}function yi(l,t,e,i,s,n,a,r,A,o){l.getVertexPosition(r,bi),l.getVertexPosition(A,mi),l.getVertexPosition(o,Ii);const h=BA(l,t,e,i,bi,mi,Ii,qn);if(h){const c=new B;pt.getBarycoord(qn,bi,mi,Ii,c),s&&(h.uv=pt.getInterpolatedAttribute(s,r,A,o,c,new H)),n&&(h.uv1=pt.getInterpolatedAttribute(n,r,A,o,c,new H)),a&&(h.normal=pt.getInterpolatedAttribute(a,r,A,o,c,new B),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const g={a:r,b:A,c:o,normal:new B,materialIndex:0};pt.getNormal(bi,mi,Ii,g.normal),h.face=g,h.barycoord=c}return h}const zn=new B,Pn=new St,On=new St,CA=new B,jn=new T,xi=new B,Bs=new It,Hn=new T,Cs=new pi;class yA extends Ci{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=nn,this.bindMatrix=new T,this.bindMatrixInverse=new T,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;this.boundingBox===null&&(this.boundingBox=new Rt),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,xi),this.boundingBox.expandByPoint(xi)}computeBoundingSphere(){const t=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new It),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,xi),this.boundingSphere.expandByPoint(xi)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Bs.copy(this.boundingSphere),Bs.applyMatrix4(s),t.ray.intersectsSphere(Bs)!==!1&&(Hn.copy(s).invert(),Cs.copy(t.ray).applyMatrix4(Hn),!(this.boundingBox!==null&&Cs.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(t,e,Cs)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new St,e=this.geometry.attributes.skinWeight;for(let i=0,s=e.count;i<s;i++){t.fromBufferAttribute(e,i);const n=1/t.manhattanLength();n!==1/0?t.multiplyScalar(n):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===nn?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===Ir?this.bindMatrixInverse.copy(this.bindMatrix).invert():N("SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(t,e){const i=this.skeleton,s=this.geometry;Pn.fromBufferAttribute(s.attributes.skinIndex,t),On.fromBufferAttribute(s.attributes.skinWeight,t),zn.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let n=0;n<4;n++){const a=On.getComponent(n);if(a!==0){const r=Pn.getComponent(n);jn.multiplyMatrices(i.bones[r].matrixWorld,i.boneInverses[r]),e.addScaledVector(CA.copy(zn).applyMatrix4(jn),a)}}return e.applyMatrix4(this.bindMatrixInverse)}}class Jn extends O{constructor(){super(),this.isBone=!0,this.type="Bone"}}class ys extends st{constructor(t=null,e=1,i=1,s,n,a,r,A,o=Ut,h=Ut,c,g){super(null,a,r,A,o,h,s,n,c,g),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Kn=new T,xA=new T;class xs{constructor(t=[],e=[]){this.uuid=lt(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.previousBoneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),e.length===0)this.calculateInverses();else if(t.length!==e.length){N("Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new T)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const i=new T;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,e=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let n=0,a=t.length;n<a;n++){const r=t[n]?t[n].matrixWorld:xA;Kn.multiplyMatrices(r,e[n]),Kn.toArray(i,n*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new xs(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const i=new ys(e,t,t,Pt,zt);return i.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=i,this}getBoneByName(t){for(let e=0,i=this.bones.length;e<i;e++){const s=this.bones[e];if(s.name===t)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let i=0,s=t.bones.length;i<s;i++){const n=t.bones[i];let a=e[n];a===void 0&&(N("Skeleton: No bone found with UUID:",n),a=new Jn),this.bones.push(a),this.boneInverses.push(new T().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,i=this.boneInverses;for(let s=0,n=e.length;s<n;s++){const a=e[s];t.bones.push(a.uuid);const r=i[s];t.boneInverses.push(r.toArray())}return t}}class Qs extends at{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 ye=new T,Vn=new T,Qi=[],Wn=new Rt,QA=new T,Je=new Ci,Ke=new It;class wA extends Ci{constructor(t,e,i){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new Qs(new Float32Array(i*16),16),this.previousInstanceMatrix=null,this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,QA)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new Rt),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,ye),Wn.copy(t.boundingBox).applyMatrix4(ye),this.boundingBox.union(Wn)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new It),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,ye),Ke.copy(t.boundingSphere).applyMatrix4(ye),this.boundingSphere.union(Ke)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.previousInstanceMatrix!==null&&(this.previousInstanceMatrix=t.previousInstanceMatrix.clone()),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const i=e.morphTargetInfluences,s=this.morphTexture.source.data.data,n=i.length+1,a=t*n+1;for(let r=0;r<i.length;r++)i[r]=s[a+r]}raycast(t,e){const i=this.matrixWorld,s=this.count;if(Je.geometry=this.geometry,Je.material=this.material,Je.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Ke.copy(this.boundingSphere),Ke.applyMatrix4(i),t.ray.intersectsSphere(Ke)!==!1))for(let n=0;n<s;n++){this.getMatrixAt(n,ye),Vn.multiplyMatrices(i,ye),Je.matrixWorld=Vn,Je.raycast(t,Qi);for(let a=0,r=Qi.length;a<r;a++){const A=Qi[a];A.instanceId=n,A.object=this,e.push(A)}Qi.length=0}}setColorAt(t,e){this.instanceColor===null&&(this.instanceColor=new Qs(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,t*16)}setMorphAt(t,e){const i=e.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new ys(new Float32Array(s*this.count),s,this.count,oe,zt));const n=this.morphTexture.source.data.data;let a=0;for(let o=0;o<i.length;o++)a+=i[o];const r=this.geometry.morphTargetsRelative?1:1-a,A=s*t;n[A]=r,n.set(i,A+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const ws=new B,MA=new B,SA=new wt;class xe{constructor(t=new B(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=ws.subVectors(i,e).cross(MA.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(ws),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||SA.getNormalMatrix(t),s=this.coplanarPoint(ws).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 ae=new It,FA=new H(.5,.5),wi=new B;class DA{constructor(t=new xe,e=new xe,i=new xe,s=new xe,n=new xe,a=new xe){this.planes=[t,e,i,s,n,a]}set(t,e,i,s,n,a){const r=this.planes;return r[0].copy(t),r[1].copy(e),r[2].copy(i),r[3].copy(s),r[4].copy(n),r[5].copy(a),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=$t,i=!1){const s=this.planes,n=t.elements,a=n[0],r=n[1],A=n[2],o=n[3],h=n[4],c=n[5],g=n[6],d=n[7],u=n[8],p=n[9],b=n[10],f=n[11],m=n[12],E=n[13],I=n[14],C=n[15];if(s[0].setComponents(o-a,d-h,f-u,C-m).normalize(),s[1].setComponents(o+a,d+h,f+u,C+m).normalize(),s[2].setComponents(o+r,d+c,f+p,C+E).normalize(),s[3].setComponents(o-r,d-c,f-p,C-E).normalize(),i)s[4].setComponents(A,g,b,I).normalize(),s[5].setComponents(o-A,d-g,f-b,C-I).normalize();else if(s[4].setComponents(o-A,d-g,f-b,C-I).normalize(),e===$t)s[5].setComponents(o+A,d+g,f+b,C+I).normalize();else if(e===si)s[5].setComponents(A,g,b,I).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(),ae.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;e.boundingSphere===null&&e.computeBoundingSphere(),ae.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(ae)}intersectsSprite(t){ae.center.set(0,0,0);const e=FA.distanceTo(t.center);return ae.radius=.7071067811865476+e,ae.applyMatrix4(t.matrixWorld),this.intersectsSphere(ae)}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(wi.x=s.normal.x>0?t.max.x:t.min.x,wi.y=s.normal.y>0?t.max.y:t.min.y,wi.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(wi)<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)}}class Yn extends se{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new J(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 Mi=new B,Si=new B,Xn=new T,Ve=new pi,Fi=new It,Ms=new B,Zn=new B;class Ss extends O{constructor(t=new ie,e=new Yn){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++)Mi.fromBufferAttribute(e,s-1),Si.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=Mi.distanceTo(Si);t.setAttribute("lineDistance",new us(i,1))}else N("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,a=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),Fi.copy(i.boundingSphere),Fi.applyMatrix4(s),Fi.radius+=n,t.ray.intersectsSphere(Fi)===!1)return;Xn.copy(s).invert(),Ve.copy(t.ray).applyMatrix4(Xn);const r=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=r*r,o=this.isLineSegments?2:1,h=i.index,g=i.attributes.position;if(h!==null){const d=Math.max(0,a.start),u=Math.min(h.count,a.start+a.count);for(let p=d,b=u-1;p<b;p+=o){const f=h.getX(p),m=h.getX(p+1),E=Di(this,t,Ve,A,f,m,p);E&&e.push(E)}if(this.isLineLoop){const p=h.getX(u-1),b=h.getX(d),f=Di(this,t,Ve,A,p,b,u-1);f&&e.push(f)}}else{const d=Math.max(0,a.start),u=Math.min(g.count,a.start+a.count);for(let p=d,b=u-1;p<b;p+=o){const f=Di(this,t,Ve,A,p,p+1,p);f&&e.push(f)}if(this.isLineLoop){const p=Di(this,t,Ve,A,u-1,d,u-1);p&&e.push(p)}}}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,a=s.length;n<a;n++){const r=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=n}}}}}function Di(l,t,e,i,s,n,a){const r=l.geometry.attributes.position;if(Mi.fromBufferAttribute(r,s),Si.fromBufferAttribute(r,n),e.distanceSqToSegment(Mi,Si,Ms,Zn)>i)return;Ms.applyMatrix4(l.matrixWorld);const o=t.ray.origin.distanceTo(Ms);if(!(o<t.near||o>t.far))return{distance:o,point:Zn.clone().applyMatrix4(l.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:l}}const $n=new B,ta=new B;class kA extends Ss{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[];for(let s=0,n=e.count;s<n;s+=2)$n.fromBufferAttribute(e,s),ta.fromBufferAttribute(e,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+$n.distanceTo(ta);t.setAttribute("lineDistance",new us(i,1))}else N("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class RA extends Ss{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class ea extends se{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new J(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}}const ia=new T,Fs=new pi,ki=new It,Ri=new B;class TA extends O{constructor(t=new ie,e=new ea){super(),this.isPoints=!0,this.type="Points",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}raycast(t,e){const i=this.geometry,s=this.matrixWorld,n=t.params.Points.threshold,a=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),ki.copy(i.boundingSphere),ki.applyMatrix4(s),ki.radius+=n,t.ray.intersectsSphere(ki)===!1)return;ia.copy(s).invert(),Fs.copy(t.ray).applyMatrix4(ia);const r=n/((this.scale.x+this.scale.y+this.scale.z)/3),A=r*r,o=i.index,c=i.attributes.position;if(o!==null){const g=Math.max(0,a.start),d=Math.min(o.count,a.start+a.count);for(let u=g,p=d;u<p;u++){const b=o.getX(u);Ri.fromBufferAttribute(c,b),sa(Ri,b,A,s,t,e,this)}}else{const g=Math.max(0,a.start),d=Math.min(c.count,a.start+a.count);for(let u=g,p=d;u<p;u++)Ri.fromBufferAttribute(c,u),sa(Ri,u,A,s,t,e,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,a=s.length;n<a;n++){const r=s[n].name||String(n);this.morphTargetInfluences.push(0),this.morphTargetDictionary[r]=n}}}}}function sa(l,t,e,i,s,n,a){const r=Fs.distanceSqToPoint(l);if(r<e){const A=new B;Fs.closestPointToPoint(l,A),A.applyMatrix4(i);const o=s.ray.origin.distanceTo(A);if(o<s.near||o>s.far)return;n.push({distance:o,distanceToRay:Math.sqrt(r),point:A,index:t,face:null,faceIndex:null,barycoord:null,object:a})}}class Ti extends st{constructor(t,e,i,s,n,a,r,A,o,h,c,g){super(null,a,r,A,o,h,s,n,c,g),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class _A extends Ti{constructor(t,e,i,s,n,a){super(t,e,i,n,a),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=Xt,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class LA extends Ti{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,Er),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class Ds extends se{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new J(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 J(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Gr,this.normalScale=new H(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 de,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 Et extends Ds{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 H(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return D(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 J(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 J(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new J(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}}function _i(l,t){return!l||l.constructor===t?l:typeof t.BYTES_PER_ELEMENT=="number"?new t(l):Array.prototype.slice.call(l)}function GA(l){function t(s,n){return l[s]-l[n]}const e=l.length,i=new Array(e);for(let s=0;s!==e;++s)i[s]=s;return i.sort(t),i}function na(l,t,e){const i=l.length,s=new l.constructor(i);for(let n=0,a=0;a!==i;++n){const r=e[n]*t;for(let A=0;A!==t;++A)s[a++]=l[r+A]}return s}function aa(l,t,e,i){let s=1,n=l[0];for(;n!==void 0&&n[i]===void 0;)n=l[s++];if(n===void 0)return;let a=n[i];if(a!==void 0)if(Array.isArray(a))do a=n[i],a!==void 0&&(t.push(n.time),e.push(...a)),n=l[s++];while(n!==void 0);else if(a.toArray!==void 0)do a=n[i],a!==void 0&&(t.push(n.time),a.toArray(e,e.length)),n=l[s++];while(n!==void 0);else do a=n[i],a!==void 0&&(t.push(n.time),e.push(a)),n=l[s++];while(n!==void 0)}class Qe{constructor(t,e,i,s){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,s=e[i],n=e[i-1];i:{t:{let a;e:{s:if(!(t<s)){for(let r=i+2;;){if(s===void 0){if(t<n)break s;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===r)break;if(n=s,s=e[++i],t<s)break t}a=e.length;break e}if(!(t>=n)){const r=e[1];t<r&&(i=2,n=r);for(let A=i-2;;){if(n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===A)break;if(s=n,n=e[--i-1],t>=n)break t}a=i,i=0;break e}break i}for(;i<a;){const r=i+a>>>1;t<e[r]?a=r:i=r+1}if(s=e[i],n=e[i-1],n===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,n,s)}return this.interpolate_(i,n,t,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s;for(let a=0;a!==s;++a)e[a]=i[n+a];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class NA extends Qe{constructor(t,e,i,s){super(t,e,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:un,endingEnd:un}}intervalChanged_(t,e,i){const s=this.parameterPositions;let n=t-2,a=t+1,r=s[n],A=s[a];if(r===void 0)switch(this.getSettings_().endingStart){case pn:n=t,r=2*e-i;break;case fn:n=s.length-2,r=e+s[n]-s[n+1];break;default:n=t,r=i}if(A===void 0)switch(this.getSettings_().endingEnd){case pn:a=t,A=2*i-e;break;case fn:a=1,A=i+s[1]-s[0];break;default:a=t-1,A=e}const o=(i-e)*.5,h=this.valueSize;this._weightPrev=o/(e-r),this._weightNext=o/(A-i),this._offsetPrev=n*h,this._offsetNext=a*h}interpolate_(t,e,i,s){const n=this.resultBuffer,a=this.sampleValues,r=this.valueSize,A=t*r,o=A-r,h=this._offsetPrev,c=this._offsetNext,g=this._weightPrev,d=this._weightNext,u=(i-e)/(s-e),p=u*u,b=p*u,f=-g*b+2*g*p-g*u,m=(1+g)*b+(-1.5-2*g)*p+(-.5+g)*u+1,E=(-1-d)*b+(1.5+d)*p+.5*u,I=d*b-d*p;for(let C=0;C!==r;++C)n[C]=f*a[h+C]+m*a[o+C]+E*a[A+C]+I*a[c+C];return n}}class vA extends Qe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,a=this.sampleValues,r=this.valueSize,A=t*r,o=A-r,h=(i-e)/(s-e),c=1-h;for(let g=0;g!==r;++g)n[g]=a[o+g]*c+a[A+g]*h;return n}}class UA extends Qe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t){return this.copySampleValue_(t-1)}}class qA extends Qe{interpolate_(t,e,i,s){const n=this.resultBuffer,a=this.sampleValues,r=this.valueSize,A=t*r,o=A-r,h=this.settings||this.DefaultSettings_,c=h.inTangents,g=h.outTangents;if(!c||!g){const p=(i-e)/(s-e),b=1-p;for(let f=0;f!==r;++f)n[f]=a[o+f]*b+a[A+f]*p;return n}const d=r*2,u=t-1;for(let p=0;p!==r;++p){const b=a[o+p],f=a[A+p],m=u*d+p*2,E=g[m],I=g[m+1],C=t*d+p*2,x=c[C],Q=c[C+1];let y=(i-e)/(s-e),M,w,S,G,k;for(let z=0;z<8;z++){M=y*y,w=M*y,S=1-y,G=S*S,k=G*S;const Z=k*e+3*G*y*E+3*S*M*x+w*s-i;if(Math.abs(Z)<1e-10)break;const ct=3*G*(E-e)+6*S*y*(x-E)+3*M*(s-x);if(Math.abs(ct)<1e-10)break;y=y-Z/ct,y=Math.max(0,Math.min(1,y))}n[p]=k*b+3*G*y*I+3*S*M*Q+w*f}return n}}class bt{constructor(t,e,i,s){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=_i(e,this.TimeBufferType),this.values=_i(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let i;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:_i(t.times,Array),values:_i(t.values,Array)};const s=t.getInterpolation();s!==t.DefaultInterpolation&&(i.interpolation=s)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new UA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new vA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new NA(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodBezier(t){const e=new qA(this.times,this.values,this.getValueSize(),t);return this.settings&&(e.settings=this.settings),e}setInterpolation(t){let e;switch(t){case Ne:e=this.InterpolantFactoryMethodDiscrete;break;case ve:e=this.InterpolantFactoryMethodLinear;break;case Ki:e=this.InterpolantFactoryMethodSmooth;break;case dn:e=this.InterpolantFactoryMethodBezier;break}if(e===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return N("KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return Ne;case this.InterpolantFactoryMethodLinear:return ve;case this.InterpolantFactoryMethodSmooth:return Ki;case this.InterpolantFactoryMethodBezier:return dn}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]+=t}return this}scale(t){if(t!==1){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]*=t}return this}trim(t,e){const i=this.times,s=i.length;let n=0,a=s-1;for(;n!==s&&i[n]<t;)++n;for(;a!==-1&&i[a]>e;)--a;if(++a,n!==0||a!==s){n>=a&&(a=Math.max(a,1),n=a-1);const r=this.getValueSize();this.times=i.slice(n,a),this.values=this.values.slice(n*r,a*r)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(q("KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,s=this.values,n=i.length;n===0&&(q("KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let r=0;r!==n;r++){const A=i[r];if(typeof A=="number"&&isNaN(A)){q("KeyframeTrack: Time is not a valid number.",this,r,A),t=!1;break}if(a!==null&&a>A){q("KeyframeTrack: Out of order keys.",this,r,A,a),t=!1;break}a=A}if(s!==void 0&&vr(s))for(let r=0,A=s.length;r!==A;++r){const o=s[r];if(isNaN(o)){q("KeyframeTrack: Value is not a valid number.",this,r,o),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Ki,n=t.length-1;let a=1;for(let r=1;r<n;++r){let A=!1;const o=t[r],h=t[r+1];if(o!==h&&(r!==1||o!==t[0]))if(s)A=!0;else{const c=r*i,g=c-i,d=c+i;for(let u=0;u!==i;++u){const p=e[c+u];if(p!==e[g+u]||p!==e[d+u]){A=!0;break}}}if(A){if(r!==a){t[a]=t[r];const c=r*i,g=a*i;for(let d=0;d!==i;++d)e[g+d]=e[c+d]}++a}}if(n>0){t[a]=t[n];for(let r=n*i,A=a*i,o=0;o!==i;++o)e[A+o]=e[r+o];++a}return a!==t.length?(this.times=t.slice(0,a),this.values=e.slice(0,a*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=this.constructor,s=new i(this.name,t,e);return s.createInterpolant=this.createInterpolant,s}}bt.prototype.ValueTypeName="",bt.prototype.TimeBufferType=Float32Array,bt.prototype.ValueBufferType=Float32Array,bt.prototype.DefaultInterpolation=ve;class we extends bt{constructor(t,e,i){super(t,e,i)}}we.prototype.ValueTypeName="bool",we.prototype.ValueBufferType=Array,we.prototype.DefaultInterpolation=Ne,we.prototype.InterpolantFactoryMethodLinear=void 0,we.prototype.InterpolantFactoryMethodSmooth=void 0;class ra extends bt{constructor(t,e,i,s){super(t,e,i,s)}}ra.prototype.ValueTypeName="color";class Me extends bt{constructor(t,e,i,s){super(t,e,i,s)}}Me.prototype.ValueTypeName="number";class zA extends Qe{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const n=this.resultBuffer,a=this.sampleValues,r=this.valueSize,A=(i-e)/(s-e);let o=t*r;for(let h=o+r;o!==h;o+=4)Qt.slerpFlat(n,0,a,o-r,a,o,A);return n}}class Se extends bt{constructor(t,e,i,s){super(t,e,i,s)}InterpolantFactoryMethodLinear(t){return new zA(this.times,this.values,this.getValueSize(),t)}}Se.prototype.ValueTypeName="quaternion",Se.prototype.InterpolantFactoryMethodSmooth=void 0;class Fe extends bt{constructor(t,e,i){super(t,e,i)}}Fe.prototype.ValueTypeName="string",Fe.prototype.ValueBufferType=Array,Fe.prototype.DefaultInterpolation=Ne,Fe.prototype.InterpolantFactoryMethodLinear=void 0,Fe.prototype.InterpolantFactoryMethodSmooth=void 0;class De extends bt{constructor(t,e,i,s){super(t,e,i,s)}}De.prototype.ValueTypeName="vector";class PA{constructor(t="",e=-1,i=[],s=_r){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=lt(),this.userData={},this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,s=1/(t.fps||1);for(let a=0,r=i.length;a!==r;++a)e.push(jA(i[a]).scale(s));const n=new this(t.name,t.duration,e,t.blendMode);return n.uuid=t.uuid,n.userData=JSON.parse(t.userData||"{}"),n}static toJSON(t){const e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode,userData:JSON.stringify(t.userData)};for(let n=0,a=i.length;n!==a;++n)e.push(bt.toJSON(i[n]));return s}static CreateFromMorphTargetSequence(t,e,i,s){const n=e.length,a=[];for(let r=0;r<n;r++){let A=[],o=[];A.push((r+n-1)%n,r,(r+1)%n),o.push(0,1,0);const h=GA(A);A=na(A,1,h),o=na(o,1,h),!s&&A[0]===0&&(A.push(n),o.push(o[0])),a.push(new Me(".morphTargetInfluences["+e[r].name+"]",A,o).scale(1/i))}return new this(t,-1,a)}static findByName(t,e){let i=t;if(!Array.isArray(t)){const s=t;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===e)return i[s];return null}static CreateClipsFromMorphTargetSequences(t,e,i){const s={},n=/^([\w-]*?)([\d]+)$/;for(let r=0,A=t.length;r<A;r++){const o=t[r],h=o.name.match(n);if(h&&h.length>1){const c=h[1];let g=s[c];g||(s[c]=g=[]),g.push(o)}}const a=[];for(const r in s)a.push(this.CreateFromMorphTargetSequence(r,s[r],e,i));return a}static parseAnimation(t,e){if(N("AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!t)return q("AnimationClip: No animation in JSONLoader data."),null;const i=function(c,g,d,u,p){if(d.length!==0){const b=[],f=[];aa(d,b,f,u),b.length!==0&&p.push(new c(g,b,f))}},s=[],n=t.name||"default",a=t.fps||30,r=t.blendMode;let A=t.length||-1;const o=t.hierarchy||[];for(let c=0;c<o.length;c++){const g=o[c].keys;if(!(!g||g.length===0))if(g[0].morphTargets){const d={};let u;for(u=0;u<g.length;u++)if(g[u].morphTargets)for(let p=0;p<g[u].morphTargets.length;p++)d[g[u].morphTargets[p]]=-1;for(const p in d){const b=[],f=[];for(let m=0;m!==g[u].morphTargets.length;++m){const E=g[u];b.push(E.time),f.push(E.morphTarget===p?1:0)}s.push(new Me(".morphTargetInfluence["+p+"]",b,f))}A=d.length*a}else{const d=".bones["+e[c].name+"]";i(De,d+".position",g,"pos",s),i(Se,d+".quaternion",g,"rot",s),i(De,d+".scale",g,"scl",s)}}return s.length===0?null:new this(n,A,s,r)}resetDuration(){const t=this.tracks;let e=0;for(let i=0,s=t.length;i!==s;++i){const n=this.tracks[i];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let i=0;i<this.tracks.length;i++)t.push(this.tracks[i].clone());const e=new this.constructor(this.name,this.duration,t,this.blendMode);return e.userData=JSON.parse(JSON.stringify(this.userData)),e}toJSON(){return this.constructor.toJSON(this)}}function OA(l){switch(l.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Me;case"vector":case"vector2":case"vector3":case"vector4":return De;case"color":return ra;case"quaternion":return Se;case"bool":case"boolean":return we;case"string":return Fe}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+l)}function jA(l){if(l.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=OA(l.type);if(l.times===void 0){const e=[],i=[];aa(l.keys,e,i,"value"),l.times=e,l.values=i}return t.parse!==void 0?t.parse(l):new t(l.name,l.times,l.values,l.interpolation)}const Lt={enabled:!1,files:{},add:function(l,t){this.enabled!==!1&&(Aa(l)||(this.files[l]=t))},get:function(l){if(this.enabled!==!1&&!Aa(l))return this.files[l]},remove:function(l){delete this.files[l]},clear:function(){this.files={}}};function Aa(l){try{const t=l.slice(l.indexOf(":")+1);return new URL(t).protocol==="blob:"}catch{return!1}}class HA{constructor(t,e,i){const s=this;let n=!1,a=0,r=0,A;const o=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this._abortController=null,this.itemStart=function(h){r++,n===!1&&s.onStart!==void 0&&s.onStart(h,a,r),n=!0},this.itemEnd=function(h){a++,s.onProgress!==void 0&&s.onProgress(h,a,r),a===r&&(n=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(h){s.onError!==void 0&&s.onError(h)},this.resolveURL=function(h){return A?A(h):h},this.setURLModifier=function(h){return A=h,this},this.addHandler=function(h,c){return o.push(h,c),this},this.removeHandler=function(h){const c=o.indexOf(h);return c!==-1&&o.splice(c,2),this},this.getHandler=function(h){for(let c=0,g=o.length;c<g;c+=2){const d=o[c],u=o[c+1];if(d.global&&(d.lastIndex=0),d.test(h))return u}return null},this.abort=function(){return this.abortController.abort(),this._abortController=null,this}}get abortController(){return this._abortController||(this._abortController=new AbortController),this._abortController}}const JA=new HA;class Vt{constructor(t){this.manager=t!==void 0?t:JA,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}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}abort(){return this}}Vt.DEFAULT_MATERIAL_NAME="__DEFAULT";const Gt={};class KA extends Error{constructor(t,e){super(t),this.response=e}}class re extends Vt{constructor(t){super(t),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=Lt.get(`file:${t}`);if(n!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(n),this.manager.itemEnd(t)},0),n;if(Gt[t]!==void 0){Gt[t].push({onLoad:e,onProgress:i,onError:s});return}Gt[t]=[],Gt[t].push({onLoad:e,onProgress:i,onError:s});const a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),r=this.mimeType,A=this.responseType;fetch(a).then(o=>{if(o.status===200||o.status===0){if(o.status===0&&N("FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||o.body===void 0||o.body.getReader===void 0)return o;const h=Gt[t],c=o.body.getReader(),g=o.headers.get("X-File-Size")||o.headers.get("Content-Length"),d=g?parseInt(g):0,u=d!==0;let p=0;const b=new ReadableStream({start(f){m();function m(){c.read().then(({done:E,value:I})=>{if(E)f.close();else{p+=I.byteLength;const C=new ProgressEvent("progress",{lengthComputable:u,loaded:p,total:d});for(let x=0,Q=h.length;x<Q;x++){const y=h[x];y.onProgress&&y.onProgress(C)}f.enqueue(I),m()}},E=>{f.error(E)})}}});return new Response(b)}else throw new KA(`fetch for "${o.url}" responded with ${o.status}: ${o.statusText}`,o)}).then(o=>{switch(A){case"arraybuffer":return o.arrayBuffer();case"blob":return o.blob();case"document":return o.text().then(h=>new DOMParser().parseFromString(h,r));case"json":return o.json();default:if(r==="")return o.text();{const c=/charset="?([^;"\s]*)"?/i.exec(r),g=c&&c[1]?c[1].toLowerCase():void 0,d=new TextDecoder(g);return o.arrayBuffer().then(u=>d.decode(u))}}}).then(o=>{Lt.add(`file:${t}`,o);const h=Gt[t];delete Gt[t];for(let c=0,g=h.length;c<g;c++){const d=h[c];d.onLoad&&d.onLoad(o)}}).catch(o=>{const h=Gt[t];if(h===void 0)throw this.manager.itemError(t),o;delete Gt[t];for(let c=0,g=h.length;c<g;c++){const d=h[c];d.onError&&d.onError(o)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const ke=new WeakMap;class VA extends Vt{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,a=Lt.get(`image:${t}`);if(a!==void 0){if(a.complete===!0)n.manager.itemStart(t),setTimeout(function(){e&&e(a),n.manager.itemEnd(t)},0);else{let c=ke.get(a);c===void 0&&(c=[],ke.set(a,c)),c.push({onLoad:e,onError:s})}return a}const r=Xi("img");function A(){h(),e&&e(this);const c=ke.get(this)||[];for(let g=0;g<c.length;g++){const d=c[g];d.onLoad&&d.onLoad(this)}ke.delete(this),n.manager.itemEnd(t)}function o(c){h(),s&&s(c),Lt.remove(`image:${t}`);const g=ke.get(this)||[];for(let d=0;d<g.length;d++){const u=g[d];u.onError&&u.onError(c)}ke.delete(this),n.manager.itemError(t),n.manager.itemEnd(t)}function h(){r.removeEventListener("load",A,!1),r.removeEventListener("error",o,!1)}return r.addEventListener("load",A,!1),r.addEventListener("error",o,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(r.crossOrigin=this.crossOrigin),Lt.add(`image:${t}`,r),n.manager.itemStart(t),r.src=t,r}}class WA extends Vt{constructor(t){super(t)}load(t,e,i,s){const n=new st,a=new VA(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(r){n.image=r,n.needsUpdate=!0,e!==void 0&&e(n)},i,s),n}}class ks extends O{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new J(t),this.intensity=e}dispose(){this.dispatchEvent({type:"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,e}}const Rs=new T,oa=new B,ha=new B;class Ts{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.biasNode=null,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new H(512,512),this.mapType=R,this.map=null,this.mapPass=null,this.matrix=new T,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new DA,this._frameExtents=new H(1,1),this._viewportCount=1,this._viewports=[new St(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;oa.setFromMatrixPosition(t.matrixWorld),e.position.copy(oa),ha.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(ha),e.updateMatrixWorld(),Rs.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Rs,e.coordinateSystem,e.reversedDepth),e.coordinateSystem===si||e.reversedDepth?i.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(Rs)}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.biasNode=t.biasNode,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}}const Li=new B,Gi=new Qt,Bt=new B;class ca extends O{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new T,this.projectionMatrix=new T,this.projectionMatrixInverse=new T,this.coordinateSystem=$t,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}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.matrixWorld.decompose(Li,Gi,Bt),Bt.x===1&&Bt.y===1&&Bt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Li,Gi,Bt.set(1,1,1)).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorld.decompose(Li,Gi,Bt),Bt.x===1&&Bt.y===1&&Bt.z===1?this.matrixWorldInverse.copy(this.matrixWorld).invert():this.matrixWorldInverse.compose(Li,Gi,Bt.set(1,1,1)).invert()}clone(){return new this.constructor().copy(this)}}const Wt=new B,la=new H,ga=new H;class _s extends ca{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=qe*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Ue*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return qe*2*Math.atan(Math.tan(Ue*.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){Wt.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Wt.x,Wt.y).multiplyScalar(-t/Wt.z),Wt.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Wt.x,Wt.y).multiplyScalar(-t/Wt.z)}getViewSize(t,e){return this.getViewBounds(t,la,ga),e.subVectors(ga,la)}setViewOffset(t,e,i,s,n,a){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=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(Ue*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,n=-.5*s;const a=this.view;if(this.view!==null&&this.view.enabled){const A=a.fullWidth,o=a.fullHeight;n+=a.offsetX*s/A,e-=a.offsetY*i/o,s*=a.width/A,i*=a.height/o}const r=this.filmOffset;r!==0&&(n+=t*r/this.getFilmWidth()),this.projectionMatrix.makePerspective(n,n+s,e,e-i,t,this.far,this.coordinateSystem,this.reversedDepth),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}}class YA extends Ts{constructor(){super(new _s(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(t){const e=this.camera,i=qe*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 XA extends ks{constructor(t,e,i=0,s=Math.PI/3,n=0,a=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(O.DEFAULT_UP),this.updateMatrix(),this.target=new O,this.distance=i,this.angle=s,this.penumbra=n,this.decay=a,this.map=null,this.shadow=new YA}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){super.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.map=t.map,this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.angle=this.angle,e.object.decay=this.decay,e.object.penumbra=this.penumbra,e.object.target=this.target.uuid,this.map&&this.map.isTexture&&(e.object.map=this.map.toJSON(t).uuid),e.object.shadow=this.shadow.toJSON(),e}}class ZA extends Ts{constructor(){super(new _s(90,1,.5,500)),this.isPointLightShadow=!0}}class $A extends ks{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 ZA}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){super.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}toJSON(t){const e=super.toJSON(t);return e.object.distance=this.distance,e.object.decay=this.decay,e.object.shadow=this.shadow.toJSON(),e}}class da extends ca{constructor(t=-1,e=1,i=1,s=-1,n=.1,a=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=a,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,a){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=a,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,a=i+t,r=s+e,A=s-e;if(this.view!==null&&this.view.enabled){const o=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;n+=o*this.view.offsetX,a=n+o*this.view.width,r-=h*this.view.offsetY,A=r-h*this.view.height}this.projectionMatrix.makeOrthographic(n,a,r,A,this.near,this.far,this.coordinateSystem,this.reversedDepth),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 to extends Ts{constructor(){super(new da(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class eo extends ks{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(O.DEFAULT_UP),this.updateMatrix(),this.target=new O,this.shadow=new to}dispose(){super.dispose(),this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}toJSON(t){const e=super.toJSON(t);return e.object.shadow=this.shadow.toJSON(),e.object.target=this.target.uuid,e}}class We{static extractUrlBase(t){const e=t.lastIndexOf("/");return e===-1?"./":t.slice(0,e+1)}static resolveURL(t,e){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}const Ls=new WeakMap;class io extends Vt{constructor(t){super(t),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&N("ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&N("ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"},this._abortController=new AbortController}setOptions(t){return this.options=t,this}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const n=this,a=Lt.get(`image-bitmap:${t}`);if(a!==void 0){if(n.manager.itemStart(t),a.then){a.then(o=>{if(Ls.has(a)===!0)s&&s(Ls.get(a)),n.manager.itemError(t),n.manager.itemEnd(t);else return e&&e(o),n.manager.itemEnd(t),o});return}return setTimeout(function(){e&&e(a),n.manager.itemEnd(t)},0),a}const r={};r.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",r.headers=this.requestHeader,r.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const A=fetch(t,r).then(function(o){return o.blob()}).then(function(o){return createImageBitmap(o,Object.assign(n.options,{colorSpaceConversion:"none"}))}).then(function(o){return Lt.add(`image-bitmap:${t}`,o),e&&e(o),n.manager.itemEnd(t),o}).catch(function(o){s&&s(o),Ls.set(A,o),Lt.remove(`image-bitmap:${t}`),n.manager.itemError(t),n.manager.itemEnd(t)});Lt.add(`image-bitmap:${t}`,A),n.manager.itemStart(t)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}const Gs="\\[\\]\\.:\\/",so=new RegExp("["+Gs+"]","g"),Ns="[^"+Gs+"]",no="[^"+Gs.replace("\\.","")+"]",ao=/((?:WC+[\/:])*)/.source.replace("WC",Ns),ro=/(WCOD+)?/.source.replace("WCOD",no),Ao=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ns),oo=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ns),ho=new RegExp("^"+ao+ro+Ao+oo+"$"),co=["material","materials","bones","map"];class lo{constructor(t,e,i){const s=i||L.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(t,e)}setValue(t,e){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,n=i.length;s!==n;++s)i[s].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class L{constructor(t,e,i){this.path=e,this.parsedPath=i||L.parseTrackName(e),this.node=L.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new L.Composite(t,e,i):new L(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(so,"")}static parseTrackName(t){const e=ho.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const n=i.nodeName.substring(s+1);co.indexOf(n)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=n)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){const i=function(n,a){for(let r=0;r<n.length;r++){const A=n[r];if(!a&&(A.name===e||A.uuid===e))return A;if(a&&A.userData&&A.userData.name===e)return A;const o=i(A.children,a);if(o)return o}return null},s=i(t.children);if(s)return s;{const n=i(t.children,!0);if(n)return n}}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)t[e++]=i[s]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,n=i.length;s!==n;++s)i[s]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,i=e.objectName,s=e.propertyName;let n=e.propertyIndex;if(t||(t=L.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){N("PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let o=e.objectIndex;switch(i){case"materials":if(!t.material){q("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){q("PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){q("PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let h=0;h<t.length;h++)if(t[h].name===o){o=h;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){q("PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){q("PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){q("PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(o!==void 0){if(t[o]===void 0){q("PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[o]}}const a=t[s];if(a===void 0){const o=e.nodeName;q("PropertyBinding: Trying to update property for track: "+o+"."+s+" but it wasn't found.",t);return}let r=this.Versioning.None;this.targetObject=t,t.isMaterial===!0?r=this.Versioning.NeedsUpdate:t.isObject3D===!0&&(r=this.Versioning.MatrixWorldNeedsUpdate);let A=this.BindingType.Direct;if(n!==void 0){if(s==="morphTargetInfluences"){if(!t.geometry){q("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){q("PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[n]!==void 0&&(n=t.morphTargetDictionary[n])}A=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=n}else a.fromArray!==void 0&&a.toArray!==void 0?(A=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(A=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=s;this.getValue=this.GetterByBindingType[A],this.setValue=this.SetterByBindingTypeAndVersioning[A][r]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}if(L.Composite=lo,L.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},L.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},L.prototype.GetterByBindingType=[L.prototype._getValue_direct,L.prototype._getValue_array,L.prototype._getValue_arrayElement,L.prototype._getValue_toArray],L.prototype.SetterByBindingTypeAndVersioning=[[L.prototype._setValue_direct,L.prototype._setValue_direct_setNeedsUpdate,L.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[L.prototype._setValue_array,L.prototype._setValue_array_setNeedsUpdate,L.prototype._setValue_array_setMatrixWorldNeedsUpdate],[L.prototype._setValue_arrayElement,L.prototype._setValue_arrayElement_setNeedsUpdate,L.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[L.prototype._setValue_fromArray,L.prototype._setValue_fromArray_setNeedsUpdate,L.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:$e}})),typeof window<"u"){try{self.location.href,window.__THREE__IMPORTS__||(window.__THREE__IMPORTS__=[]),window.__THREE__IMPORTS__.push({url:self.location.href,revision:$e})}catch{}window.__THREE__?(N("WARNING: Multiple instances of Three.js being imported. Existing: "+window.__THREE__+", new: "+$e),console.warn("THREE imports:",window.__THREE__IMPORTS__)):window.__THREE__=$e}const vs=new WeakMap;class go extends Vt{constructor(t){super(t),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(t){return this.decoderPath=t,this}setDecoderConfig(t){return this.decoderConfig=t,this}setWorkerLimit(t){return this.workerLimit=t,this}load(t,e,i,s){const n=new re(this.manager);n.setPath(this.path),n.setResponseType("arraybuffer"),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(t,a=>{this.parse(a,e,s)},i,s)}parse(t,e,i=()=>{}){this.decodeDracoFile(t,e,null,null,P,i).catch(i)}decodeDracoFile(t,e,i,s,n=it,a=()=>{}){const r={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:s||this.defaultAttributeTypes,useUniqueIDs:!!i,vertexColorSpace:n};return this.decodeGeometry(t,r).then(e).catch(a)}decodeGeometry(t,e){const i=JSON.stringify(e);if(vs.has(t)){const A=vs.get(t);if(A.key===i)return A.promise;if(t.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let s;const n=this.workerNextTaskID++,a=t.byteLength,r=this._getWorker(n,a).then(A=>(s=A,new Promise((o,h)=>{s._callbacks[n]={resolve:o,reject:h},s.postMessage({type:"decode",id:n,taskConfig:e,buffer:t},[t])}))).then(A=>this._createGeometry(A.geometry));return r.catch(()=>!0).then(()=>{s&&n&&this._releaseTask(s,n)}),vs.set(t,{key:i,promise:r}),r}_createGeometry(t){const e=new ie;t.index&&e.setIndex(new at(t.index.array,1));for(let i=0;i<t.attributes.length;i++){const{name:s,array:n,itemSize:a,stride:r,vertexColorSpace:A}=t.attributes[i];let o;if(a===r)o=new at(n,a);else{const h=new Nn(n,r);o=new gi(h,a,0)}s==="color"&&(this._assignVertexColorSpace(o,A),o.normalized=!(n instanceof Float32Array)),e.setAttribute(s,o)}return e}_assignVertexColorSpace(t,e){if(e!==P)return;const i=new J;for(let s=0,n=t.count;s<n;s++)i.fromBufferAttribute(t,s),$.colorSpaceToWorking(i,P),t.setXYZ(s,i.r,i.g,i.b)}_loadLibrary(t,e){const i=new re(this.manager);return i.setPath(this.decoderPath),i.setResponseType(e),i.setWithCredentials(this.withCredentials),new Promise((s,n)=>{i.load(t,s,void 0,n)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const t=typeof WebAssembly!="object"||this.decoderConfig.type==="js",e=[];return t?e.push(this._loadLibrary("draco_decoder.js","text")):(e.push(this._loadLibrary("draco_wasm_wrapper.js","text")),e.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(e).then(i=>{const s=i[0];t||(this.decoderConfig.wasmBinary=i[1]);const n=uo.toString(),a=["/* draco decoder */",s,"","/* worker */",n.substring(n.indexOf("{")+1,n.lastIndexOf("}"))].join(`
|
|
2
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([a]))}),this.decoderPending}_getWorker(t,e){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const s=new Worker(this.workerSourceURL);s._callbacks={},s._taskCosts={},s._taskLoad=0,s.postMessage({type:"init",decoderConfig:this.decoderConfig}),s.onmessage=function(n){const a=n.data;switch(a.type){case"decode":s._callbacks[a.id].resolve(a);break;case"error":s._callbacks[a.id].reject(a);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+a.type+'"')}},this.workerPool.push(s)}else this.workerPool.sort(function(s,n){return s._taskLoad>n._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[t]=e,i._taskLoad+=e,i})}_releaseTask(t,e){t._taskLoad-=t._taskCosts[e],delete t._callbacks[e],delete t._taskCosts[e]}debug(){console.log("Task load: ",this.workerPool.map(t=>t._taskLoad))}dispose(){for(let t=0;t<this.workerPool.length;++t)this.workerPool[t].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function uo(){let l,t;onmessage=function(a){const r=a.data;switch(r.type){case"init":l=r.decoderConfig,t=new Promise(function(h){l.onModuleLoaded=function(c){h({draco:c})},DracoDecoderModule(l)});break;case"decode":const A=r.buffer,o=r.taskConfig;t.then(h=>{const c=h.draco,g=new c.Decoder;try{const d=e(c,g,new Int8Array(A),o),u=d.attributes.map(p=>p.array.buffer);d.index&&u.push(d.index.array.buffer),self.postMessage({type:"decode",id:r.id,geometry:d},u)}catch(d){console.error(d),self.postMessage({type:"error",id:r.id,error:d.message})}finally{c.destroy(g)}});break}};function e(a,r,A,o){const h=o.attributeIDs,c=o.attributeTypes;let g,d;const u=r.GetEncodedGeometryType(A);if(u===a.TRIANGULAR_MESH)g=new a.Mesh,d=r.DecodeArrayToMesh(A,A.byteLength,g);else if(u===a.POINT_CLOUD)g=new a.PointCloud,d=r.DecodeArrayToPointCloud(A,A.byteLength,g);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||g.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());const p={index:null,attributes:[]};for(const b in h){const f=self[c[b]];let m,E;if(o.useUniqueIDs)E=h[b],m=r.GetAttributeByUniqueId(g,E);else{if(E=r.GetAttributeId(g,a[h[b]]),E===-1)continue;m=r.GetAttribute(g,E)}const I=s(a,r,g,b,f,m);b==="color"&&(I.vertexColorSpace=o.vertexColorSpace),p.attributes.push(I)}return u===a.TRIANGULAR_MESH&&(p.index=i(a,r,g)),a.destroy(g),p}function i(a,r,A){const h=A.num_faces()*3,c=h*4,g=a._malloc(c);r.GetTrianglesUInt32Array(A,c,g);const d=new Uint32Array(a.HEAPF32.buffer,g,h).slice();return a._free(g),{array:d,itemSize:1}}function s(a,r,A,o,h,c){const g=A.num_points(),d=c.num_components(),u=n(a,h),p=d*h.BYTES_PER_ELEMENT,b=Math.ceil(p/4)*4,f=b/h.BYTES_PER_ELEMENT,m=g*p,E=g*b,I=a._malloc(m);r.GetAttributeDataArrayForAllPoints(A,c,u,m,I);const C=new h(a.HEAPF32.buffer,I,m/h.BYTES_PER_ELEMENT);let x;if(p===b)x=C.slice();else{x=new h(E/h.BYTES_PER_ELEMENT);let Q=0;for(let y=0,M=C.length;y<M;y++){for(let w=0;w<d;w++)x[Q+w]=C[y*d+w];Q+=f}}return a._free(I),{name:o,count:g,itemSize:d,array:x,stride:f}}function n(a,r){switch(r){case Float32Array:return a.DT_FLOAT32;case Int8Array:return a.DT_INT8;case Int16Array:return a.DT_INT16;case Int32Array:return a.DT_INT32;case Uint8Array:return a.DT_UINT8;case Uint16Array:return a.DT_UINT16;case Uint32Array:return a.DT_UINT32}}}function ua(l,t){if(t===Lr)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),l;if(t===Vi||t===bn){let e=l.getIndex();if(e===null){const a=[],r=l.getAttribute("position");if(r!==void 0){for(let A=0;A<r.count;A++)a.push(A);l.setIndex(a),e=l.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),l}const i=e.count-2,s=[];if(t===Vi)for(let a=1;a<=i;a++)s.push(e.getX(0)),s.push(e.getX(a)),s.push(e.getX(a+1));else for(let a=0;a<i;a++)a%2===0?(s.push(e.getX(a)),s.push(e.getX(a+1)),s.push(e.getX(a+2))):(s.push(e.getX(a+2)),s.push(e.getX(a+1)),s.push(e.getX(a)));s.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const n=l.clone();return n.setIndex(s),n.clearGroups(),n}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),l}function po(l){const t=new Map,e=new Map,i=l.clone();return pa(l,i,function(s,n){t.set(n,s),e.set(s,n)}),i.traverse(function(s){if(!s.isSkinnedMesh)return;const n=s,a=t.get(s),r=a.skeleton.bones;n.skeleton=a.skeleton.clone(),n.bindMatrix.copy(a.bindMatrix),n.skeleton.bones=r.map(function(A){return e.get(A)}),n.bind(n.skeleton,n.bindMatrix)}),i}function pa(l,t,e){e(l,t);for(let i=0;i<l.children.length;i++)pa(l.children[i],t.children[i],e)}class fo extends Vt{constructor(t){super(t),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new Bo(e)}),this.register(function(e){return new Co(e)}),this.register(function(e){return new ko(e)}),this.register(function(e){return new Ro(e)}),this.register(function(e){return new To(e)}),this.register(function(e){return new xo(e)}),this.register(function(e){return new Qo(e)}),this.register(function(e){return new wo(e)}),this.register(function(e){return new Mo(e)}),this.register(function(e){return new Eo(e)}),this.register(function(e){return new So(e)}),this.register(function(e){return new yo(e)}),this.register(function(e){return new Do(e)}),this.register(function(e){return new Fo(e)}),this.register(function(e){return new mo(e)}),this.register(function(e){return new fa(e,F.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new fa(e,F.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new _o(e)})}load(t,e,i,s){const n=this;let a;if(this.resourcePath!=="")a=this.resourcePath;else if(this.path!==""){const o=We.extractUrlBase(t);a=We.resolveURL(o,this.path)}else a=We.extractUrlBase(t);this.manager.itemStart(t);const r=function(o){s?s(o):console.error(o),n.manager.itemError(t),n.manager.itemEnd(t)},A=new re(this.manager);A.setPath(this.path),A.setResponseType("arraybuffer"),A.setRequestHeader(this.requestHeader),A.setWithCredentials(this.withCredentials),A.load(t,function(o){try{n.parse(o,a,function(h){e(h),n.manager.itemEnd(t)},r)}catch(h){r(h)}},i,r)}setDRACOLoader(t){return this.dracoLoader=t,this}setKTX2Loader(t){return this.ktx2Loader=t,this}setMeshoptDecoder(t){return this.meshoptDecoder=t,this}register(t){return this.pluginCallbacks.indexOf(t)===-1&&this.pluginCallbacks.push(t),this}unregister(t){return this.pluginCallbacks.indexOf(t)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(t),1),this}parse(t,e,i,s){let n,a;const r={},A={},o=new TextDecoder;if(typeof t=="string")try{n=JSON.parse(t)}catch(c){a=t,s&&s(c);return}else if(t instanceof ArrayBuffer)if(o.decode(new Uint8Array(t,0,4))===ba){try{r[F.KHR_BINARY_GLTF]=new Lo(t)}catch(g){s&&s(g);return}try{n=JSON.parse(r[F.KHR_BINARY_GLTF].content)}catch(g){a=r[F.KHR_BINARY_GLTF].content,s&&s(g);return}}else try{n=JSON.parse(o.decode(t))}catch(g){a=o.decode(t),s&&s(g);return}else n=t;if(n.asset===void 0||n.asset.version[0]<2){s&&s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}this.json=n,this.jsonErrorData=a;const h=new Vo(n,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});h.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const g=this.pluginCallbacks[c](h);g.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),A[g.name]=g,r[g.name]=!0}if(n.extensionsUsed)for(let c=0;c<n.extensionsUsed.length;++c){const g=n.extensionsUsed[c],d=n.extensionsRequired||[];switch(g){case F.KHR_MATERIALS_UNLIT:r[g]=new Io;break;case F.KHR_DRACO_MESH_COMPRESSION:r[g]=new Go(n,this.dracoLoader);break;case F.KHR_TEXTURE_TRANSFORM:r[g]=new No;break;case F.KHR_MESH_QUANTIZATION:r[g]=new vo;break;default:d.indexOf(g)>=0&&A[g]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+g+'".')}}h.setExtensions(r),h.setPlugins(A),h.parse(i,s)}parseAsync(t,e){const i=this;return new Promise(function(s,n){i.parse(t,e,s,n)})}}function bo(){let l={};return{get:function(t){return l[t]},add:function(t,e){l[t]=e},remove:function(t){delete l[t]},removeAll:function(){l={}}}}function j(l,t,e){const i=l.json.materials[t];return i.extensions&&i.extensions[e]?i.extensions[e]:null}const F={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class mo{constructor(t){this.parser=t,this.name=F.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const t=this.parser,e=this.parser.json.nodes||[];for(let i=0,s=e.length;i<s;i++){const n=e[i];n.extensions&&n.extensions[this.name]&&n.extensions[this.name].light!==void 0&&t._addNodeRef(this.cache,n.extensions[this.name].light)}}_loadLight(t){const e=this.parser,i="light:"+t;let s=e.cache.get(i);if(s)return s;const n=e.json,A=((n.extensions&&n.extensions[this.name]||{}).lights||[])[t];let o;const h=new J(16777215);A.color!==void 0&&h.setRGB(A.color[0],A.color[1],A.color[2],it);const c=A.range!==void 0?A.range:0;switch(A.type){case"directional":o=new eo(h),o.target.position.set(0,0,-1),o.add(o.target);break;case"point":o=new $A(h),o.distance=c;break;case"spot":o=new XA(h),o.distance=c,A.spot=A.spot||{},A.spot.innerConeAngle=A.spot.innerConeAngle!==void 0?A.spot.innerConeAngle:0,A.spot.outerConeAngle=A.spot.outerConeAngle!==void 0?A.spot.outerConeAngle:Math.PI/4,o.angle=A.spot.outerConeAngle,o.penumbra=1-A.spot.innerConeAngle/A.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+A.type)}return o.position.set(0,0,0),Ct(o,A),A.intensity!==void 0&&(o.intensity=A.intensity),o.name=e.createUniqueName(A.name||"light_"+t),s=Promise.resolve(o),e.cache.add(i,s),s}getDependency(t,e){if(t==="light")return this._loadLight(e)}createNodeAttachment(t){const e=this,i=this.parser,n=i.json.nodes[t],r=(n.extensions&&n.extensions[this.name]||{}).light;return r===void 0?null:this._loadLight(r).then(function(A){return i._getNodeRef(e.cache,r,A)})}}class Io{constructor(){this.name=F.KHR_MATERIALS_UNLIT}getMaterialType(){return Ce}extendParams(t,e,i){const s=[];t.color=new J(1,1,1),t.opacity=1;const n=e.pbrMetallicRoughness;if(n){if(Array.isArray(n.baseColorFactor)){const a=n.baseColorFactor;t.color.setRGB(a[0],a[1],a[2],it),t.opacity=a[3]}n.baseColorTexture!==void 0&&s.push(i.assignTexture(t,"map",n.baseColorTexture,P))}return Promise.all(s)}}class Eo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);return i===null||i.emissiveStrength!==void 0&&(e.emissiveIntensity=i.emissiveStrength),Promise.resolve()}}class Bo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_CLEARCOAT}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];if(i.clearcoatFactor!==void 0&&(e.clearcoat=i.clearcoatFactor),i.clearcoatTexture!==void 0&&s.push(this.parser.assignTexture(e,"clearcoatMap",i.clearcoatTexture)),i.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=i.clearcoatRoughnessFactor),i.clearcoatRoughnessTexture!==void 0&&s.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",i.clearcoatRoughnessTexture)),i.clearcoatNormalTexture!==void 0&&(s.push(this.parser.assignTexture(e,"clearcoatNormalMap",i.clearcoatNormalTexture)),i.clearcoatNormalTexture.scale!==void 0)){const n=i.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new H(n,n)}return Promise.all(s)}}class Co{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_DISPERSION}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);return i===null||(e.dispersion=i.dispersion!==void 0?i.dispersion:0),Promise.resolve()}}class yo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IRIDESCENCE}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];return i.iridescenceFactor!==void 0&&(e.iridescence=i.iridescenceFactor),i.iridescenceTexture!==void 0&&s.push(this.parser.assignTexture(e,"iridescenceMap",i.iridescenceTexture)),i.iridescenceIor!==void 0&&(e.iridescenceIOR=i.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),i.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=i.iridescenceThicknessMinimum),i.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=i.iridescenceThicknessMaximum),i.iridescenceThicknessTexture!==void 0&&s.push(this.parser.assignTexture(e,"iridescenceThicknessMap",i.iridescenceThicknessTexture)),Promise.all(s)}}class xo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SHEEN}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];if(e.sheenColor=new J(0,0,0),e.sheenRoughness=0,e.sheen=1,i.sheenColorFactor!==void 0){const n=i.sheenColorFactor;e.sheenColor.setRGB(n[0],n[1],n[2],it)}return i.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=i.sheenRoughnessFactor),i.sheenColorTexture!==void 0&&s.push(this.parser.assignTexture(e,"sheenColorMap",i.sheenColorTexture,P)),i.sheenRoughnessTexture!==void 0&&s.push(this.parser.assignTexture(e,"sheenRoughnessMap",i.sheenRoughnessTexture)),Promise.all(s)}}class Qo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_TRANSMISSION}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];return i.transmissionFactor!==void 0&&(e.transmission=i.transmissionFactor),i.transmissionTexture!==void 0&&s.push(this.parser.assignTexture(e,"transmissionMap",i.transmissionTexture)),Promise.all(s)}}class wo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_VOLUME}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];e.thickness=i.thicknessFactor!==void 0?i.thicknessFactor:0,i.thicknessTexture!==void 0&&s.push(this.parser.assignTexture(e,"thicknessMap",i.thicknessTexture)),e.attenuationDistance=i.attenuationDistance||1/0;const n=i.attenuationColor||[1,1,1];return e.attenuationColor=new J().setRGB(n[0],n[1],n[2],it),Promise.all(s)}}class Mo{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_IOR}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);return i===null||(e.ior=i.ior!==void 0?i.ior:1.5),Promise.resolve()}}class So{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_SPECULAR}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];e.specularIntensity=i.specularFactor!==void 0?i.specularFactor:1,i.specularTexture!==void 0&&s.push(this.parser.assignTexture(e,"specularIntensityMap",i.specularTexture));const n=i.specularColorFactor||[1,1,1];return e.specularColor=new J().setRGB(n[0],n[1],n[2],it),i.specularColorTexture!==void 0&&s.push(this.parser.assignTexture(e,"specularColorMap",i.specularColorTexture,P)),Promise.all(s)}}class Fo{constructor(t){this.parser=t,this.name=F.EXT_MATERIALS_BUMP}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];return e.bumpScale=i.bumpFactor!==void 0?i.bumpFactor:1,i.bumpTexture!==void 0&&s.push(this.parser.assignTexture(e,"bumpMap",i.bumpTexture)),Promise.all(s)}}class Do{constructor(t){this.parser=t,this.name=F.KHR_MATERIALS_ANISOTROPY}getMaterialType(t){return j(this.parser,t,this.name)!==null?Et:null}extendMaterialParams(t,e){const i=j(this.parser,t,this.name);if(i===null)return Promise.resolve();const s=[];return i.anisotropyStrength!==void 0&&(e.anisotropy=i.anisotropyStrength),i.anisotropyRotation!==void 0&&(e.anisotropyRotation=i.anisotropyRotation),i.anisotropyTexture!==void 0&&s.push(this.parser.assignTexture(e,"anisotropyMap",i.anisotropyTexture)),Promise.all(s)}}class ko{constructor(t){this.parser=t,this.name=F.KHR_TEXTURE_BASISU}loadTexture(t){const e=this.parser,i=e.json,s=i.textures[t];if(!s.extensions||!s.extensions[this.name])return null;const n=s.extensions[this.name],a=e.options.ktx2Loader;if(!a){if(i.extensionsRequired&&i.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(t,n.source,a)}}class Ro{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_WEBP}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const a=n.extensions[e],r=s.images[a.source];let A=i.textureLoader;if(r.uri){const o=i.options.manager.getHandler(r.uri);o!==null&&(A=o)}return i.loadTextureImage(t,a.source,A)}}class To{constructor(t){this.parser=t,this.name=F.EXT_TEXTURE_AVIF}loadTexture(t){const e=this.name,i=this.parser,s=i.json,n=s.textures[t];if(!n.extensions||!n.extensions[e])return null;const a=n.extensions[e],r=s.images[a.source];let A=i.textureLoader;if(r.uri){const o=i.options.manager.getHandler(r.uri);o!==null&&(A=o)}return i.loadTextureImage(t,a.source,A)}}class fa{constructor(t,e){this.name=e,this.parser=t}loadBufferView(t){const e=this.parser.json,i=e.bufferViews[t];if(i.extensions&&i.extensions[this.name]){const s=i.extensions[this.name],n=this.parser.getDependency("buffer",s.buffer),a=this.parser.options.meshoptDecoder;if(!a||!a.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return n.then(function(r){const A=s.byteOffset||0,o=s.byteLength||0,h=s.count,c=s.byteStride,g=new Uint8Array(r,A,o);return a.decodeGltfBufferAsync?a.decodeGltfBufferAsync(h,c,g,s.mode,s.filter).then(function(d){return d.buffer}):a.ready.then(function(){const d=new ArrayBuffer(h*c);return a.decodeGltfBuffer(new Uint8Array(d),h,c,g,s.mode,s.filter),d})})}else return null}}class _o{constructor(t){this.name=F.EXT_MESH_GPU_INSTANCING,this.parser=t}createNodeMesh(t){const e=this.parser.json,i=e.nodes[t];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const s=e.meshes[i.mesh];for(const o of s.primitives)if(o.mode!==ot.TRIANGLES&&o.mode!==ot.TRIANGLE_STRIP&&o.mode!==ot.TRIANGLE_FAN&&o.mode!==void 0)return null;const a=i.extensions[this.name].attributes,r=[],A={};for(const o in a)r.push(this.parser.getDependency("accessor",a[o]).then(h=>(A[o]=h,A[o])));return r.length<1?null:(r.push(this.parser.createNodeMesh(t)),Promise.all(r).then(o=>{const h=o.pop(),c=h.isGroup?h.children:[h],g=o[0].count,d=[];for(const u of c){const p=new T,b=new B,f=new Qt,m=new B(1,1,1),E=new wA(u.geometry,u.material,g);for(let I=0;I<g;I++)A.TRANSLATION&&b.fromBufferAttribute(A.TRANSLATION,I),A.ROTATION&&f.fromBufferAttribute(A.ROTATION,I),A.SCALE&&m.fromBufferAttribute(A.SCALE,I),E.setMatrixAt(I,p.compose(b,f,m));for(const I in A)if(I==="_COLOR_0"){const C=A[I];E.instanceColor=new Qs(C.array,C.itemSize,C.normalized)}else I!=="TRANSLATION"&&I!=="ROTATION"&&I!=="SCALE"&&u.geometry.setAttribute(I,A[I]);O.prototype.copy.call(E,u),this.parser.assignFinalMaterial(E),d.push(E)}return h.isGroup?(h.clear(),h.add(...d),h):d[0]}))}}const ba="glTF",Ye=12,ma={JSON:1313821514,BIN:5130562};class Lo{constructor(t){this.name=F.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(t,0,Ye),i=new TextDecoder;if(this.header={magic:i.decode(new Uint8Array(t.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==ba)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const s=this.header.length-Ye,n=new DataView(t,Ye);let a=0;for(;a<s;){const r=n.getUint32(a,!0);a+=4;const A=n.getUint32(a,!0);if(a+=4,A===ma.JSON){const o=new Uint8Array(t,Ye+a,r);this.content=i.decode(o)}else if(A===ma.BIN){const o=Ye+a;this.body=t.slice(o,o+r)}a+=r}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class Go{constructor(t,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=F.KHR_DRACO_MESH_COMPRESSION,this.json=t,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(t,e){const i=this.json,s=this.dracoLoader,n=t.extensions[this.name].bufferView,a=t.extensions[this.name].attributes,r={},A={},o={};for(const h in a){const c=qs[h]||h.toLowerCase();r[c]=a[h]}for(const h in t.attributes){const c=qs[h]||h.toLowerCase();if(a[h]!==void 0){const g=i.accessors[t.attributes[h]],d=Re[g.componentType];o[c]=d.name,A[c]=g.normalized===!0}}return e.getDependency("bufferView",n).then(function(h){return new Promise(function(c,g){s.decodeDracoFile(h,function(d){for(const u in d.attributes){const p=d.attributes[u],b=A[u];b!==void 0&&(p.normalized=b)}c(d)},r,o,it,g)})})}}class No{constructor(){this.name=F.KHR_TEXTURE_TRANSFORM}extendTexture(t,e){return(e.texCoord===void 0||e.texCoord===t.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(t=t.clone(),e.texCoord!==void 0&&(t.channel=e.texCoord),e.offset!==void 0&&t.offset.fromArray(e.offset),e.rotation!==void 0&&(t.rotation=e.rotation),e.scale!==void 0&&t.repeat.fromArray(e.scale),t.needsUpdate=!0),t}}class vo{constructor(){this.name=F.KHR_MESH_QUANTIZATION}}class Ia extends Qe{constructor(t,e,i,s){super(t,e,i,s)}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,n=t*s*3+s;for(let a=0;a!==s;a++)e[a]=i[n+a];return e}interpolate_(t,e,i,s){const n=this.resultBuffer,a=this.sampleValues,r=this.valueSize,A=r*2,o=r*3,h=s-e,c=(i-e)/h,g=c*c,d=g*c,u=t*o,p=u-o,b=-2*d+3*g,f=d-g,m=1-b,E=f-g+c;for(let I=0;I!==r;I++){const C=a[p+I+r],x=a[p+I+A]*h,Q=a[u+I+r],y=a[u+I]*h;n[I]=m*C+E*x+b*Q+f*y}return n}}const Uo=new Qt;class qo extends Ia{interpolate_(t,e,i,s){const n=super.interpolate_(t,e,i,s);return Uo.fromArray(n).normalize().toArray(n),n}}const ot={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},Re={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Ea={9728:Ut,9729:qt,9984:rn,9985:Cr,9986:Br,9987:Le},Ba={33071:Xt,33648:qi,10497:_e},Us={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},qs={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Yt={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},zo={CUBICSPLINE:void 0,LINEAR:ve,STEP:Ne},zs={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Po(l){return l.DefaultMaterial===void 0&&(l.DefaultMaterial=new Ds({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ti})),l.DefaultMaterial}function Ae(l,t,e){for(const i in e.extensions)l[i]===void 0&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[i]=e.extensions[i])}function Ct(l,t){t.extras!==void 0&&(typeof t.extras=="object"?Object.assign(l.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function Oo(l,t,e){let i=!1,s=!1,n=!1;for(let o=0,h=t.length;o<h;o++){const c=t[o];if(c.POSITION!==void 0&&(i=!0),c.NORMAL!==void 0&&(s=!0),c.COLOR_0!==void 0&&(n=!0),i&&s&&n)break}if(!i&&!s&&!n)return Promise.resolve(l);const a=[],r=[],A=[];for(let o=0,h=t.length;o<h;o++){const c=t[o];if(i){const g=c.POSITION!==void 0?e.getDependency("accessor",c.POSITION):l.attributes.position;a.push(g)}if(s){const g=c.NORMAL!==void 0?e.getDependency("accessor",c.NORMAL):l.attributes.normal;r.push(g)}if(n){const g=c.COLOR_0!==void 0?e.getDependency("accessor",c.COLOR_0):l.attributes.color;A.push(g)}}return Promise.all([Promise.all(a),Promise.all(r),Promise.all(A)]).then(function(o){const h=o[0],c=o[1],g=o[2];return i&&(l.morphAttributes.position=h),s&&(l.morphAttributes.normal=c),n&&(l.morphAttributes.color=g),l.morphTargetsRelative=!0,l})}function jo(l,t){if(l.updateMorphTargets(),t.weights!==void 0)for(let e=0,i=t.weights.length;e<i;e++)l.morphTargetInfluences[e]=t.weights[e];if(t.extras&&Array.isArray(t.extras.targetNames)){const e=t.extras.targetNames;if(l.morphTargetInfluences.length===e.length){l.morphTargetDictionary={};for(let i=0,s=e.length;i<s;i++)l.morphTargetDictionary[e[i]]=i}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Ho(l){let t;const e=l.extensions&&l.extensions[F.KHR_DRACO_MESH_COMPRESSION];if(e?t="draco:"+e.bufferView+":"+e.indices+":"+Ps(e.attributes):t=l.indices+":"+Ps(l.attributes)+":"+l.mode,l.targets!==void 0)for(let i=0,s=l.targets.length;i<s;i++)t+=":"+Ps(l.targets[i]);return t}function Ps(l){let t="";const e=Object.keys(l).sort();for(let i=0,s=e.length;i<s;i++)t+=e[i]+":"+l[e[i]]+";";return t}function Os(l){switch(l){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Jo(l){return l.search(/\.jpe?g($|\?)/i)>0||l.search(/^data\:image\/jpeg/)===0?"image/jpeg":l.search(/\.webp($|\?)/i)>0||l.search(/^data\:image\/webp/)===0?"image/webp":l.search(/\.ktx2($|\?)/i)>0||l.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const Ko=new T;class Vo{constructor(t={},e={}){this.json=t,this.extensions={},this.plugins={},this.options=e,this.cache=new bo,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,s=-1,n=!1,a=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const r=navigator.userAgent;i=/^((?!chrome|android).)*safari/i.test(r)===!0;const A=r.match(/Version\/(\d+)/);s=i&&A?parseInt(A[1],10):-1,n=r.indexOf("Firefox")>-1,a=n?r.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||i&&s<17||n&&a<98?this.textureLoader=new WA(this.options.manager):this.textureLoader=new io(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new re(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(t){this.extensions=t}setPlugins(t){this.plugins=t}parse(t,e){const i=this,s=this.json,n=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(a){return a._markDefs&&a._markDefs()}),Promise.all(this._invokeAll(function(a){return a.beforeRoot&&a.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(a){const r={scene:a[0][s.scene||0],scenes:a[0],animations:a[1],cameras:a[2],asset:s.asset,parser:i,userData:{}};return Ae(n,r,s),Ct(r,s),Promise.all(i._invokeAll(function(A){return A.afterRoot&&A.afterRoot(r)})).then(function(){for(const A of r.scenes)A.updateMatrixWorld();t(r)})}).catch(e)}_markDefs(){const t=this.json.nodes||[],e=this.json.skins||[],i=this.json.meshes||[];for(let s=0,n=e.length;s<n;s++){const a=e[s].joints;for(let r=0,A=a.length;r<A;r++)t[a[r]].isBone=!0}for(let s=0,n=t.length;s<n;s++){const a=t[s];a.mesh!==void 0&&(this._addNodeRef(this.meshCache,a.mesh),a.skin!==void 0&&(i[a.mesh].isSkinnedMesh=!0)),a.camera!==void 0&&this._addNodeRef(this.cameraCache,a.camera)}}_addNodeRef(t,e){e!==void 0&&(t.refs[e]===void 0&&(t.refs[e]=t.uses[e]=0),t.refs[e]++)}_getNodeRef(t,e,i){if(t.refs[e]<=1)return i;const s=i.clone(),n=(a,r)=>{const A=this.associations.get(a);A!=null&&this.associations.set(r,A);for(const[o,h]of a.children.entries())n(h,r.children[o])};return n(i,s),s.name+="_instance_"+t.uses[e]++,s}_invokeOne(t){const e=Object.values(this.plugins);e.push(this);for(let i=0;i<e.length;i++){const s=t(e[i]);if(s)return s}return null}_invokeAll(t){const e=Object.values(this.plugins);e.unshift(this);const i=[];for(let s=0;s<e.length;s++){const n=t(e[s]);n&&i.push(n)}return i}getDependency(t,e){const i=t+":"+e;let s=this.cache.get(i);if(!s){switch(t){case"scene":s=this.loadScene(e);break;case"node":s=this._invokeOne(function(n){return n.loadNode&&n.loadNode(e)});break;case"mesh":s=this._invokeOne(function(n){return n.loadMesh&&n.loadMesh(e)});break;case"accessor":s=this.loadAccessor(e);break;case"bufferView":s=this._invokeOne(function(n){return n.loadBufferView&&n.loadBufferView(e)});break;case"buffer":s=this.loadBuffer(e);break;case"material":s=this._invokeOne(function(n){return n.loadMaterial&&n.loadMaterial(e)});break;case"texture":s=this._invokeOne(function(n){return n.loadTexture&&n.loadTexture(e)});break;case"skin":s=this.loadSkin(e);break;case"animation":s=this._invokeOne(function(n){return n.loadAnimation&&n.loadAnimation(e)});break;case"camera":s=this.loadCamera(e);break;default:if(s=this._invokeOne(function(n){return n!=this&&n.getDependency&&n.getDependency(t,e)}),!s)throw new Error("Unknown type: "+t);break}this.cache.add(i,s)}return s}getDependencies(t){let e=this.cache.get(t);if(!e){const i=this,s=this.json[t+(t==="mesh"?"es":"s")]||[];e=Promise.all(s.map(function(n,a){return i.getDependency(t,a)})),this.cache.add(t,e)}return e}loadBuffer(t){const e=this.json.buffers[t],i=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&t===0)return Promise.resolve(this.extensions[F.KHR_BINARY_GLTF].body);const s=this.options;return new Promise(function(n,a){i.load(We.resolveURL(e.uri,s.path),n,void 0,function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(t){const e=this.json.bufferViews[t];return this.getDependency("buffer",e.buffer).then(function(i){const s=e.byteLength||0,n=e.byteOffset||0;return i.slice(n,n+s)})}loadAccessor(t){const e=this,i=this.json,s=this.json.accessors[t];if(s.bufferView===void 0&&s.sparse===void 0){const a=Us[s.type],r=Re[s.componentType],A=s.normalized===!0,o=new r(s.count*a);return Promise.resolve(new at(o,a,A))}const n=[];return s.bufferView!==void 0?n.push(this.getDependency("bufferView",s.bufferView)):n.push(null),s.sparse!==void 0&&(n.push(this.getDependency("bufferView",s.sparse.indices.bufferView)),n.push(this.getDependency("bufferView",s.sparse.values.bufferView))),Promise.all(n).then(function(a){const r=a[0],A=Us[s.type],o=Re[s.componentType],h=o.BYTES_PER_ELEMENT,c=h*A,g=s.byteOffset||0,d=s.bufferView!==void 0?i.bufferViews[s.bufferView].byteStride:void 0,u=s.normalized===!0;let p,b;if(d&&d!==c){const f=Math.floor(g/d),m="InterleavedBuffer:"+s.bufferView+":"+s.componentType+":"+f+":"+s.count;let E=e.cache.get(m);E||(p=new o(r,f*d,s.count*d/h),E=new Nn(p,d/h),e.cache.add(m,E)),b=new gi(E,A,g%d/h,u)}else r===null?p=new o(s.count*A):p=new o(r,g,s.count*A),b=new at(p,A,u);if(s.sparse!==void 0){const f=Us.SCALAR,m=Re[s.sparse.indices.componentType],E=s.sparse.indices.byteOffset||0,I=s.sparse.values.byteOffset||0,C=new m(a[1],E,s.sparse.count*f),x=new o(a[2],I,s.sparse.count*A);r!==null&&(b=new at(b.array.slice(),b.itemSize,b.normalized)),b.normalized=!1;for(let Q=0,y=C.length;Q<y;Q++){const M=C[Q];if(b.setX(M,x[Q*A]),A>=2&&b.setY(M,x[Q*A+1]),A>=3&&b.setZ(M,x[Q*A+2]),A>=4&&b.setW(M,x[Q*A+3]),A>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}b.normalized=u}return b})}loadTexture(t){const e=this.json,i=this.options,n=e.textures[t].source,a=e.images[n];let r=this.textureLoader;if(a.uri){const A=i.manager.getHandler(a.uri);A!==null&&(r=A)}return this.loadTextureImage(t,n,r)}loadTextureImage(t,e,i){const s=this,n=this.json,a=n.textures[t],r=n.images[e],A=(r.uri||r.bufferView)+":"+a.sampler;if(this.textureCache[A])return this.textureCache[A];const o=this.loadImageSource(e,i).then(function(h){h.flipY=!1,h.name=a.name||r.name||"",h.name===""&&typeof r.uri=="string"&&r.uri.startsWith("data:image/")===!1&&(h.name=r.uri);const g=(n.samplers||{})[a.sampler]||{};return h.magFilter=Ea[g.magFilter]||qt,h.minFilter=Ea[g.minFilter]||Le,h.wrapS=Ba[g.wrapS]||_e,h.wrapT=Ba[g.wrapT]||_e,h.generateMipmaps=!h.isCompressedTexture&&h.minFilter!==Ut&&h.minFilter!==qt,h.anisotropy=4,s.associations.set(h,{textures:t}),h}).catch(function(){return null});return this.textureCache[A]=o,o}loadImageSource(t,e){const i=this,s=this.json,n=this.options;if(this.sourceCache[t]!==void 0)return this.sourceCache[t].then(c=>c.clone());const a=s.images[t],r=self.URL||self.webkitURL;let A=a.uri||"",o=!1;if(a.bufferView!==void 0)A=i.getDependency("bufferView",a.bufferView).then(function(c){o=!0;const g=new Blob([c],{type:a.mimeType});return A=r.createObjectURL(g),A});else if(a.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+t+" is missing URI and bufferView");const h=Promise.resolve(A).then(function(c){return new Promise(function(g,d){let u=g;e.isImageBitmapLoader===!0&&(u=function(p){const b=new st(p);b.needsUpdate=!0,g(b)}),e.load(We.resolveURL(c,n.path),u,void 0,d)})}).then(function(c){return o===!0&&r.revokeObjectURL(A),Ct(c,a),c.userData.mimeType=a.mimeType||Jo(a.uri),c}).catch(function(c){throw console.error("THREE.GLTFLoader: Couldn't load texture",A),c});return this.sourceCache[t]=h,h}assignTexture(t,e,i,s){const n=this;return this.getDependency("texture",i.index).then(function(a){if(!a)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(a=a.clone(),a.channel=i.texCoord),n.extensions[F.KHR_TEXTURE_TRANSFORM]){const r=i.extensions!==void 0?i.extensions[F.KHR_TEXTURE_TRANSFORM]:void 0;if(r){const A=n.associations.get(a);a=n.extensions[F.KHR_TEXTURE_TRANSFORM].extendTexture(a,r),n.associations.set(a,A)}}return s!==void 0&&(a.colorSpace=s),t[e]=a,a})}assignFinalMaterial(t){const e=t.geometry;let i=t.material;const s=e.attributes.tangent===void 0,n=e.attributes.color!==void 0,a=e.attributes.normal===void 0;if(t.isPoints){const r="PointsMaterial:"+i.uuid;let A=this.cache.get(r);A||(A=new ea,se.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,A.sizeAttenuation=!1,this.cache.add(r,A)),i=A}else if(t.isLine){const r="LineBasicMaterial:"+i.uuid;let A=this.cache.get(r);A||(A=new Yn,se.prototype.copy.call(A,i),A.color.copy(i.color),A.map=i.map,this.cache.add(r,A)),i=A}if(s||n||a){let r="ClonedMaterial:"+i.uuid+":";s&&(r+="derivative-tangents:"),n&&(r+="vertex-colors:"),a&&(r+="flat-shading:");let A=this.cache.get(r);A||(A=i.clone(),n&&(A.vertexColors=!0),a&&(A.flatShading=!0),s&&(A.normalScale&&(A.normalScale.y*=-1),A.clearcoatNormalScale&&(A.clearcoatNormalScale.y*=-1)),this.cache.add(r,A),this.associations.set(A,this.associations.get(i))),i=A}t.material=i}getMaterialType(){return Ds}loadMaterial(t){const e=this,i=this.json,s=this.extensions,n=i.materials[t];let a;const r={},A=n.extensions||{},o=[];if(A[F.KHR_MATERIALS_UNLIT]){const c=s[F.KHR_MATERIALS_UNLIT];a=c.getMaterialType(),o.push(c.extendParams(r,n,e))}else{const c=n.pbrMetallicRoughness||{};if(r.color=new J(1,1,1),r.opacity=1,Array.isArray(c.baseColorFactor)){const g=c.baseColorFactor;r.color.setRGB(g[0],g[1],g[2],it),r.opacity=g[3]}c.baseColorTexture!==void 0&&o.push(e.assignTexture(r,"map",c.baseColorTexture,P)),r.metalness=c.metallicFactor!==void 0?c.metallicFactor:1,r.roughness=c.roughnessFactor!==void 0?c.roughnessFactor:1,c.metallicRoughnessTexture!==void 0&&(o.push(e.assignTexture(r,"metalnessMap",c.metallicRoughnessTexture)),o.push(e.assignTexture(r,"roughnessMap",c.metallicRoughnessTexture))),a=this._invokeOne(function(g){return g.getMaterialType&&g.getMaterialType(t)}),o.push(Promise.all(this._invokeAll(function(g){return g.extendMaterialParams&&g.extendMaterialParams(t,r)})))}n.doubleSided===!0&&(r.side=br);const h=n.alphaMode||zs.OPAQUE;if(h===zs.BLEND?(r.transparent=!0,r.depthWrite=!1):(r.transparent=!1,h===zs.MASK&&(r.alphaTest=n.alphaCutoff!==void 0?n.alphaCutoff:.5)),n.normalTexture!==void 0&&a!==Ce&&(o.push(e.assignTexture(r,"normalMap",n.normalTexture)),r.normalScale=new H(1,1),n.normalTexture.scale!==void 0)){const c=n.normalTexture.scale;r.normalScale.set(c,c)}if(n.occlusionTexture!==void 0&&a!==Ce&&(o.push(e.assignTexture(r,"aoMap",n.occlusionTexture)),n.occlusionTexture.strength!==void 0&&(r.aoMapIntensity=n.occlusionTexture.strength)),n.emissiveFactor!==void 0&&a!==Ce){const c=n.emissiveFactor;r.emissive=new J().setRGB(c[0],c[1],c[2],it)}return n.emissiveTexture!==void 0&&a!==Ce&&o.push(e.assignTexture(r,"emissiveMap",n.emissiveTexture,P)),Promise.all(o).then(function(){const c=new a(r);return n.name&&(c.name=n.name),Ct(c,n),e.associations.set(c,{materials:t}),n.extensions&&Ae(s,c,n),c})}createUniqueName(t){const e=L.sanitizeNodeName(t||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(t){const e=this,i=this.extensions,s=this.primitiveCache;function n(r){return i[F.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(r,e).then(function(A){return Ca(A,r,e)})}const a=[];for(let r=0,A=t.length;r<A;r++){const o=t[r],h=Ho(o),c=s[h];if(c)a.push(c.promise);else{let g;o.extensions&&o.extensions[F.KHR_DRACO_MESH_COMPRESSION]?g=n(o):g=Ca(new ie,o,e),s[h]={primitive:o,promise:g},a.push(g)}}return Promise.all(a)}loadMesh(t){const e=this,i=this.json,s=this.extensions,n=i.meshes[t],a=n.primitives,r=[];for(let A=0,o=a.length;A<o;A++){const h=a[A].material===void 0?Po(this.cache):this.getDependency("material",a[A].material);r.push(h)}return r.push(e.loadGeometries(a)),Promise.all(r).then(function(A){const o=A.slice(0,A.length-1),h=A[A.length-1],c=[];for(let d=0,u=h.length;d<u;d++){const p=h[d],b=a[d];let f;const m=o[d];if(b.mode===ot.TRIANGLES||b.mode===ot.TRIANGLE_STRIP||b.mode===ot.TRIANGLE_FAN||b.mode===void 0)f=n.isSkinnedMesh===!0?new yA(p,m):new Ci(p,m),f.isSkinnedMesh===!0&&f.normalizeSkinWeights(),b.mode===ot.TRIANGLE_STRIP?f.geometry=ua(f.geometry,bn):b.mode===ot.TRIANGLE_FAN&&(f.geometry=ua(f.geometry,Vi));else if(b.mode===ot.LINES)f=new kA(p,m);else if(b.mode===ot.LINE_STRIP)f=new Ss(p,m);else if(b.mode===ot.LINE_LOOP)f=new RA(p,m);else if(b.mode===ot.POINTS)f=new TA(p,m);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+b.mode);Object.keys(f.geometry.morphAttributes).length>0&&jo(f,n),f.name=e.createUniqueName(n.name||"mesh_"+t),Ct(f,n),b.extensions&&Ae(s,f,b),e.assignFinalMaterial(f),c.push(f)}for(let d=0,u=c.length;d<u;d++)e.associations.set(c[d],{meshes:t,primitives:d});if(c.length===1)return n.extensions&&Ae(s,c[0],n),c[0];const g=new ns;n.extensions&&Ae(s,g,n),e.associations.set(g,{meshes:t});for(let d=0,u=c.length;d<u;d++)g.add(c[d]);return g})}loadCamera(t){let e;const i=this.json.cameras[t],s=i[i.type];if(!s){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return i.type==="perspective"?e=new _s(eA.radToDeg(s.yfov),s.aspectRatio||1,s.znear||1,s.zfar||2e6):i.type==="orthographic"&&(e=new da(-s.xmag,s.xmag,s.ymag,-s.ymag,s.znear,s.zfar)),i.name&&(e.name=this.createUniqueName(i.name)),Ct(e,i),Promise.resolve(e)}loadSkin(t){const e=this.json.skins[t],i=[];for(let s=0,n=e.joints.length;s<n;s++)i.push(this._loadNodeShallow(e.joints[s]));return e.inverseBindMatrices!==void 0?i.push(this.getDependency("accessor",e.inverseBindMatrices)):i.push(null),Promise.all(i).then(function(s){const n=s.pop(),a=s,r=[],A=[];for(let o=0,h=a.length;o<h;o++){const c=a[o];if(c){r.push(c);const g=new T;n!==null&&g.fromArray(n.array,o*16),A.push(g)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[o])}return new xs(r,A)})}loadAnimation(t){const e=this.json,i=this,s=e.animations[t],n=s.name?s.name:"animation_"+t,a=[],r=[],A=[],o=[],h=[];let c=0,g=s.channels.length;for(c=0,g=s.channels.length;c<g;c++){const d=s.channels[c],u=s.samplers[d.sampler],p=d.target,b=p.node,f=s.parameters!==void 0?s.parameters[u.input]:u.input,m=s.parameters!==void 0?s.parameters[u.output]:u.output;p.node!==void 0&&(a.push(this.getDependency("node",b)),r.push(this.getDependency("accessor",f)),A.push(this.getDependency("accessor",m)),o.push(u),h.push(p))}return Promise.all([Promise.all(a),Promise.all(r),Promise.all(A),Promise.all(o),Promise.all(h)]).then(function(d){const u=d[0],p=d[1],b=d[2],f=d[3],m=d[4],E=[];for(c=0,g=u.length;c<g;c++){const C=u[c],x=p[c],Q=b[c],y=f[c],M=m[c];if(C===void 0)continue;C.updateMatrix&&C.updateMatrix();const w=i._createAnimationTracks(C,x,Q,y,M);if(w)for(let S=0;S<w.length;S++)E.push(w[S])}const I=new PA(n,void 0,E);return Ct(I,s),I})}createNodeMesh(t){const e=this.json,i=this,s=e.nodes[t];return s.mesh===void 0?null:i.getDependency("mesh",s.mesh).then(function(n){const a=i._getNodeRef(i.meshCache,s.mesh,n);return s.weights!==void 0&&a.traverse(function(r){if(r.isMesh)for(let A=0,o=s.weights.length;A<o;A++)r.morphTargetInfluences[A]=s.weights[A]}),a})}loadNode(t){const e=this.json,i=this,s=e.nodes[t],n=i._loadNodeShallow(t),a=[],r=s.children||[];for(let o=0,h=r.length;o<h;o++)a.push(i.getDependency("node",r[o]));const A=s.skin===void 0?Promise.resolve(null):i.getDependency("skin",s.skin);return Promise.all([n,Promise.all(a),A]).then(function(o){const h=o[0],c=o[1],g=o[2];g!==null&&h.traverse(function(d){d.isSkinnedMesh&&d.bind(g,Ko)});for(let d=0,u=c.length;d<u;d++)h.add(c[d]);if(h.userData.pivot!==void 0&&c.length>0){const d=h.userData.pivot,u=c[0];h.pivot=new B().fromArray(d),h.position.x-=d[0],h.position.y-=d[1],h.position.z-=d[2],u.position.set(0,0,0),delete h.userData.pivot}return h})}_loadNodeShallow(t){const e=this.json,i=this.extensions,s=this;if(this.nodeCache[t]!==void 0)return this.nodeCache[t];const n=e.nodes[t],a=n.name?s.createUniqueName(n.name):"",r=[],A=s._invokeOne(function(o){return o.createNodeMesh&&o.createNodeMesh(t)});return A&&r.push(A),n.camera!==void 0&&r.push(s.getDependency("camera",n.camera).then(function(o){return s._getNodeRef(s.cameraCache,n.camera,o)})),s._invokeAll(function(o){return o.createNodeAttachment&&o.createNodeAttachment(t)}).forEach(function(o){r.push(o)}),this.nodeCache[t]=Promise.all(r).then(function(o){let h;if(n.isBone===!0?h=new Jn:o.length>1?h=new ns:o.length===1?h=o[0]:h=new O,h!==o[0])for(let c=0,g=o.length;c<g;c++)h.add(o[c]);if(n.name&&(h.userData.name=n.name,h.name=a),Ct(h,n),n.extensions&&Ae(i,h,n),n.matrix!==void 0){const c=new T;c.fromArray(n.matrix),h.applyMatrix4(c)}else n.translation!==void 0&&h.position.fromArray(n.translation),n.rotation!==void 0&&h.quaternion.fromArray(n.rotation),n.scale!==void 0&&h.scale.fromArray(n.scale);if(!s.associations.has(h))s.associations.set(h,{});else if(n.mesh!==void 0&&s.meshCache.refs[n.mesh]>1){const c=s.associations.get(h);s.associations.set(h,{...c})}return s.associations.get(h).nodes=t,h}),this.nodeCache[t]}loadScene(t){const e=this.extensions,i=this.json.scenes[t],s=this,n=new ns;i.name&&(n.name=s.createUniqueName(i.name)),Ct(n,i),i.extensions&&Ae(e,n,i);const a=i.nodes||[],r=[];for(let A=0,o=a.length;A<o;A++)r.push(s.getDependency("node",a[A]));return Promise.all(r).then(function(A){for(let h=0,c=A.length;h<c;h++){const g=A[h];g.parent!==null?n.add(po(g)):n.add(g)}const o=h=>{const c=new Map;for(const[g,d]of s.associations)(g instanceof se||g instanceof st)&&c.set(g,d);return h.traverse(g=>{const d=s.associations.get(g);d!=null&&c.set(g,d)}),c};return s.associations=o(n),n})}_createAnimationTracks(t,e,i,s,n){const a=[],r=t.name?t.name:t.uuid,A=[];Yt[n.path]===Yt.weights?t.traverse(function(g){g.morphTargetInfluences&&A.push(g.name?g.name:g.uuid)}):A.push(r);let o;switch(Yt[n.path]){case Yt.weights:o=Me;break;case Yt.rotation:o=Se;break;case Yt.translation:case Yt.scale:o=De;break;default:i.itemSize===1?o=Me:o=De;break}const h=s.interpolation!==void 0?zo[s.interpolation]:ve,c=this._getArrayFromAccessor(i);for(let g=0,d=A.length;g<d;g++){const u=new o(A[g]+"."+Yt[n.path],e.array,c,h);s.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(u),a.push(u)}return a}_getArrayFromAccessor(t){let e=t.array;if(t.normalized){const i=Os(e.constructor),s=new Float32Array(e.length);for(let n=0,a=e.length;n<a;n++)s[n]=e[n]*i;e=s}return e}_createCubicSplineTrackInterpolant(t){t.createInterpolant=function(i){const s=this instanceof Se?qo:Ia;return new s(this.times,this.values,this.getValueSize()/3,i)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Wo(l,t,e){const i=t.attributes,s=new Rt;if(i.POSITION!==void 0){const r=e.json.accessors[i.POSITION],A=r.min,o=r.max;if(A!==void 0&&o!==void 0){if(s.set(new B(A[0],A[1],A[2]),new B(o[0],o[1],o[2])),r.normalized){const h=Os(Re[r.componentType]);s.min.multiplyScalar(h),s.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const n=t.targets;if(n!==void 0){const r=new B,A=new B;for(let o=0,h=n.length;o<h;o++){const c=n[o];if(c.POSITION!==void 0){const g=e.json.accessors[c.POSITION],d=g.min,u=g.max;if(d!==void 0&&u!==void 0){if(A.setX(Math.max(Math.abs(d[0]),Math.abs(u[0]))),A.setY(Math.max(Math.abs(d[1]),Math.abs(u[1]))),A.setZ(Math.max(Math.abs(d[2]),Math.abs(u[2]))),g.normalized){const p=Os(Re[g.componentType]);A.multiplyScalar(p)}r.max(A)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}s.expandByVector(r)}l.boundingBox=s;const a=new It;s.getCenter(a.center),a.radius=s.min.distanceTo(s.max)/2,l.boundingSphere=a}function Ca(l,t,e){const i=t.attributes,s=[];function n(a,r){return e.getDependency("accessor",a).then(function(A){l.setAttribute(r,A)})}for(const a in i){const r=qs[a]||a.toLowerCase();r in l.attributes||s.push(n(i[a],r))}if(t.indices!==void 0&&!l.index){const a=e.getDependency("accessor",t.indices).then(function(r){l.setIndex(r)});s.push(a)}return $.workingColorSpace!==it&&"COLOR_0"in i&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${$.workingColorSpace}" not supported.`),Ct(l,t),Wo(l,t,e),Promise.all(s).then(function(){return t.targets!==void 0?Oo(l,t.targets,e):l})}class Yo{constructor(t=4){this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0,this.workerCreator=null}_initWorker(t){if(!this.workers[t]){const e=this.workerCreator();e.addEventListener("message",this._onMessage.bind(this,t)),this.workers[t]=e}}_getIdleWorker(){for(let t=0;t<this.pool;t++)if(!(this.workerStatus&1<<t))return t;return-1}_onMessage(t,e){const i=this.workersResolve[t];if(i&&i(e),this.queue.length){const{resolve:s,msg:n,transfer:a}=this.queue.shift();this.workersResolve[t]=s,this.workers[t].postMessage(n,a)}else this.workerStatus^=1<<t}setWorkerCreator(t){this.workerCreator=t}setWorkerLimit(t){this.pool=t}postMessage(t,e){return new Promise(i=>{const s=this._getIdleWorker();s!==-1?(this._initWorker(s),this.workerStatus|=1<<s,this.workersResolve[s]=i,this.workers[s].postMessage(t,e)):this.queue.push({resolve:i,msg:t,transfer:e})})}dispose(){this.workers.forEach(t=>t.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const Xo=0,ya=2,Zo=1,xa=2,$o=0,th=1,eh=10,ih=0,Qa=9,wa=15,Ma=16,Sa=22,Fa=37,Da=43,ka=76,Ra=83,Ta=97,_a=100,La=103,Ga=109,Na=122,va=123,Ua=131,qa=132,za=133,Pa=134,Oa=137,ja=138,Ha=139,Ja=140,Ka=141,Va=142,Wa=145,Ya=146,Xa=148,Za=152,$a=153,tr=154,er=155,ir=156,sr=157,nr=158,ar=165,rr=166,Ar=1000054e3,or=1000054001,hr=1000054004,cr=1000054005,js=1000066e3,lr=1000066004;class Xe{constructor(t,e,i,s){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+e,i),this._littleEndian=s,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_nextInt32(){const t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){const e=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,e}_skip(t){return this._offset+=t,this}_scan(t,e=0){const i=this._offset;let s=0;for(;this._dataView.getUint8(this._offset)!==e&&s<t;)s++,this._offset++;return s<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+i,s)}}const et=[171,75,84,88,32,50,48,187,13,10,26,10];function gr(l){return new TextDecoder().decode(l)}function sh(l){const t=new Uint8Array(l.buffer,l.byteOffset,et.length);if(t[0]!==et[0]||t[1]!==et[1]||t[2]!==et[2]||t[3]!==et[3]||t[4]!==et[4]||t[5]!==et[5]||t[6]!==et[6]||t[7]!==et[7]||t[8]!==et[8]||t[9]!==et[9]||t[10]!==et[10]||t[11]!==et[11])throw new Error("Missing KTX 2.0 identifier.");const e={vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null},i=17*Uint32Array.BYTES_PER_ELEMENT,s=new Xe(l,et.length,i,!0);e.vkFormat=s._nextUint32(),e.typeSize=s._nextUint32(),e.pixelWidth=s._nextUint32(),e.pixelHeight=s._nextUint32(),e.pixelDepth=s._nextUint32(),e.layerCount=s._nextUint32(),e.faceCount=s._nextUint32(),e.levelCount=s._nextUint32(),e.supercompressionScheme=s._nextUint32();const n=s._nextUint32(),a=s._nextUint32(),r=s._nextUint32(),A=s._nextUint32(),o=s._nextUint64(),h=s._nextUint64(),c=3*Math.max(e.levelCount,1)*8,g=new Xe(l,et.length+i,c,!0);for(let U=0,V=Math.max(e.levelCount,1);U<V;U++)e.levels.push({levelData:new Uint8Array(l.buffer,l.byteOffset+g._nextUint64(),g._nextUint64()),uncompressedByteLength:g._nextUint64()});const d=new Xe(l,n,a,!0);d._skip(4);const u=d._nextUint16(),p=d._nextUint16(),b=d._nextUint16(),f=d._nextUint16(),m={vendorId:u,descriptorType:p,versionNumber:b,colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},E=(f/4-6)/4;for(let U=0;U<E;U++){const V={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelType:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};64&V.channelType?(V.sampleLower=d._nextInt32(),V.sampleUpper=d._nextInt32()):(V.sampleLower=d._nextUint32(),V.sampleUpper=d._nextUint32()),m.samples[U]=V}e.dataFormatDescriptor.length=0,e.dataFormatDescriptor.push(m);const I=new Xe(l,r,A,!0);for(;I._offset<A;){const U=I._nextUint32(),V=I._scan(U),mt=gr(V);if(e.keyValue[mt]=I._nextUint8Array(U-V.byteLength-1),mt.match(/^ktx/i)){const Ui=gr(e.keyValue[mt]);e.keyValue[mt]=Ui.substring(0,Ui.lastIndexOf("\0"))}I._skip(U%4?4-U%4:0)}if(h<=0)return e;const C=new Xe(l,o,h,!0),x=C._nextUint16(),Q=C._nextUint16(),y=C._nextUint32(),M=C._nextUint32(),w=C._nextUint32(),S=C._nextUint32(),G=[];for(let U=0,V=Math.max(e.levelCount,1);U<V;U++)G.push({imageFlags:C._nextUint32(),rgbSliceByteOffset:C._nextUint32(),rgbSliceByteLength:C._nextUint32(),alphaSliceByteOffset:C._nextUint32(),alphaSliceByteLength:C._nextUint32()});const k=o+C._offset,z=k+y,v=z+M,Z=v+w,ct=new Uint8Array(l.buffer,l.byteOffset+k,y),yt=new Uint8Array(l.buffer,l.byteOffset+z,M),xt=new Uint8Array(l.buffer,l.byteOffset+v,w),vt=new Uint8Array(l.buffer,l.byteOffset+Z,S);return e.globalData={endpointCount:x,selectorCount:Q,imageDescs:G,endpointsData:ct,selectorsData:yt,tablesData:xt,extendedData:vt},e}let Hs,Nt,Js;const Ks={env:{emscripten_notify_memory_growth:function(l){Js=new Uint8Array(Nt.exports.memory.buffer)}}};class nh{init(){return Hs||(Hs=typeof fetch<"u"?fetch("data:application/wasm;base64,"+dr).then(t=>t.arrayBuffer()).then(t=>WebAssembly.instantiate(t,Ks)).then(this._init):WebAssembly.instantiate(Buffer.from(dr,"base64"),Ks).then(this._init),Hs)}_init(t){Nt=t.instance,Ks.env.emscripten_notify_memory_growth(0)}decode(t,e=0){if(!Nt)throw new Error("ZSTDDecoder: Await .init() before decoding.");const i=t.byteLength,s=Nt.exports.malloc(i);Js.set(t,s),e=e||Number(Nt.exports.ZSTD_findDecompressedSize(s,i));const n=Nt.exports.malloc(e),a=Nt.exports.ZSTD_decompress(n,e,s,i),r=Js.slice(n,n+a);return Nt.exports.free(s),Nt.exports.free(n),r}}const dr="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2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IAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQaiEFIARBEHYLIQQMAQsLA0AgBEEDcSIIQQNGBEAgBUECaiEFIARBAnYhBCAHQQNqIQcMAQsLIAcgCGoiBy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AUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAiAEQQRqIQQLIAVBAXEhBQJ+AkACQAJAIANBf2oiA0ECTQRAIANBAWsOAgIDAQtCfyAGRQ0DGiABIARqM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Oa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEh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QMgC0EBaiELIAMgEGohAwwBCwsDQCAEQQNHBEAgACAEQQJ0IgJqQazQAWogAiAHaigCVDYCACAEQQFqIQQMAQsLIAcoArwBIQgLQbp/IRAgEyAIayIAIBIgA2tLDQAgAwR/IAMgCCAAEAsgAGoFQQALIAFrIRALIAdB0AFqJAAgEAslACAAQgA3AgAgAEEAOwEIIABBADoACyAAIAE2AgwgACACOgAKC7QFAQN/IwBBMGsiBCQAIABB/wFqIgVBfWohBgJAIAMvAQIEQCAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohA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FEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgK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AAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",ah="display-p3",rh="display-p3-linear";({...$.spaces[P]});const Vs=new WeakMap;let Ws=0,Ys;class ht extends Vt{constructor(t){super(t),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new Yo,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(t){return this.transcoderPath=t,this}setWorkerLimit(t){return this.workerPool.setWorkerLimit(t),this}async detectSupportAsync(t){return console.warn('KTX2Loader: "detectSupportAsync()" has been deprecated. Use "detectSupport()" and "await renderer.init();" when creating the renderer.'),await t.init(),this.detectSupport(t)}detectSupport(t){return t.isWebGPURenderer===!0?this.workerConfig={astcSupported:t.hasFeature("texture-compression-astc"),astcHDRSupported:!1,etc1Supported:t.hasFeature("texture-compression-etc1"),etc2Supported:t.hasFeature("texture-compression-etc2"),dxtSupported:t.hasFeature("texture-compression-s3tc"),bptcSupported:t.hasFeature("texture-compression-bc"),pvrtcSupported:t.hasFeature("texture-compression-pvrtc")}:(this.workerConfig={astcSupported:t.extensions.has("WEBGL_compressed_texture_astc"),astcHDRSupported:t.extensions.has("WEBGL_compressed_texture_astc")&&t.extensions.get("WEBGL_compressed_texture_astc").getSupportedProfiles().includes("hdr"),etc1Supported:t.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:t.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:t.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:t.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:t.extensions.has("WEBGL_compressed_texture_pvrtc")||t.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},typeof navigator<"u"&&typeof navigator.platform<"u"&&typeof navigator.userAgent<"u"&&navigator.platform.indexOf("Linux")>=0&&navigator.userAgent.indexOf("Firefox")>=0&&this.workerConfig.astcSupported&&this.workerConfig.etc2Supported&&this.workerConfig.bptcSupported&&this.workerConfig.dxtSupported&&(this.workerConfig.astcSupported=!1,this.workerConfig.etc2Supported=!1)),this}init(){if(!this.transcoderPending){const t=new re(this.manager);t.setPath(this.transcoderPath),t.setWithCredentials(this.withCredentials);const e=t.loadAsync("basis_transcoder.js"),i=new re(this.manager);i.setPath(this.transcoderPath),i.setResponseType("arraybuffer"),i.setWithCredentials(this.withCredentials);const s=i.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([e,s]).then(([n,a])=>{const r=ht.BasisWorker.toString(),A=["/* constants */","let _EngineFormat = "+JSON.stringify(ht.EngineFormat),"let _EngineType = "+JSON.stringify(ht.EngineType),"let _TranscoderFormat = "+JSON.stringify(ht.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(ht.BasisFormat),"/* basis_transcoder.js */",n,"/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join(`
|
|
3
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([A])),this.transcoderBinary=a,this.workerPool.setWorkerCreator(()=>{const o=new Worker(this.workerSourceURL),h=this.transcoderBinary.slice(0);return o.postMessage({type:"init",config:this.workerConfig,transcoderBinary:h},[h]),o})}),Ws>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),Ws++}return this.transcoderPending}load(t,e,i,s){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const n=new re(this.manager);n.setPath(this.path),n.setCrossOrigin(this.crossOrigin),n.setWithCredentials(this.withCredentials),n.setRequestHeader(this.requestHeader),n.setResponseType("arraybuffer"),n.load(t,a=>{this.parse(a,e,s)},i,s)}parse(t,e,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");if(Vs.has(t))return Vs.get(t).promise.then(e).catch(i);this._createTexture(t).then(s=>e?e(s):null).catch(i)}_createTextureFrom(t,e){const{type:i,error:s,data:{faces:n,width:a,height:r,format:A,type:o,dfdFlags:h}}=t;if(i==="error")return Promise.reject(s);let c;if(e.faceCount===6)c=new LA(n,A,o);else{const g=n[0].mipmaps;c=e.layerCount>1?new _A(g,a,r,e.layerCount,A,o):new Ti(g,a,r,A,o)}return c.minFilter=n[0].mipmaps.length===1?qt:Le,c.magFilter=qt,c.generateMipmaps=!1,c.needsUpdate=!0,c.colorSpace=ur(e),c.premultiplyAlpha=!!(h&Zo),c}async _createTexture(t,e={}){const i=sh(new Uint8Array(t)),s=i.vkFormat===js&&i.dataFormatDescriptor[0].colorModel===167;if(!(i.vkFormat===ih||s&&!this.workerConfig.astcHDRSupported))return oh(i);const a=e,r=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:t,taskConfig:a},[t])).then(A=>this._createTextureFrom(A.data,i));return Vs.set(t,{promise:r}),r}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),Ws--}}ht.BasisFormat={ETC1S:0,UASTC:1,UASTC_HDR:2},ht.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16,BC6H:22,RGB_HALF:24,RGBA_HALF:25},ht.EngineFormat={RGBAFormat:Pt,RGBA_ASTC_4x4_Format:ei,RGB_BPTC_UNSIGNED_Format:Fr,RGBA_BPTC_Format:Ji,RGBA_ETC2_EAC_Format:gn,RGBA_PVRTC_4BPPV1_Format:ji,RGBA_S3TC_DXT5_Format:Oi,RGB_ETC1_Format:xr,RGB_ETC2_Format:ln,RGB_PVRTC_4BPPV1_Format:yr,RGBA_S3TC_DXT1_Format:Pi},ht.EngineType={UnsignedByteType:R,HalfFloatType:Zt,FloatType:zt},ht.BasisWorker=function(){let l,t,e;const i=_EngineFormat,s=_EngineType,n=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",function(u){const p=u.data;switch(p.type){case"init":l=p.config,r(p.transcoderBinary);break;case"transcode":t.then(()=>{try{const{faces:b,buffers:f,width:m,height:E,hasAlpha:I,format:C,type:x,dfdFlags:Q}=A(p.buffer);self.postMessage({type:"transcode",id:p.id,data:{faces:b,width:m,height:E,hasAlpha:I,format:C,type:x,dfdFlags:Q}},f)}catch(b){console.error(b),self.postMessage({type:"error",id:p.id,error:b.message})}});break}});function r(u){t=new Promise(p=>{e={wasmBinary:u,onRuntimeInitialized:p},BASIS(e)}).then(()=>{e.initializeBasis(),e.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function A(u){const p=new e.KTX2File(new Uint8Array(u));function b(){p.close(),p.delete()}if(!p.isValid())throw b(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");let f;if(p.isUASTC())f=a.UASTC;else if(p.isETC1S())f=a.ETC1S;else if(p.isHDR())f=a.UASTC_HDR;else throw new Error("THREE.KTX2Loader: Unknown Basis encoding");const m=p.getWidth(),E=p.getHeight(),I=p.getLayers()||1,C=p.getLevels(),x=p.getFaces(),Q=p.getHasAlpha(),y=p.getDFDFlags(),{transcoderFormat:M,engineFormat:w,engineType:S}=c(f,m,E,Q);if(!m||!E||!C)throw b(),new Error("THREE.KTX2Loader: Invalid texture");if(!p.startTranscoding())throw b(),new Error("THREE.KTX2Loader: .startTranscoding failed");const G=[],k=[];for(let z=0;z<x;z++){const v=[];for(let Z=0;Z<C;Z++){const ct=[];let yt,xt;for(let U=0;U<I;U++){const V=p.getImageLevelInfo(Z,U,z);z===0&&Z===0&&U===0&&(V.origWidth%4!==0||V.origHeight%4!==0)&&console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."),C>1?(yt=V.origWidth,xt=V.origHeight):(yt=V.width,xt=V.height);let mt=new Uint8Array(p.getImageTranscodedSizeInBytes(Z,U,0,M));const Ui=p.transcodeImage(mt,Z,U,z,M,0,-1,-1);if(S===s.HalfFloatType&&(mt=new Uint16Array(mt.buffer,mt.byteOffset,mt.byteLength/Uint16Array.BYTES_PER_ELEMENT)),!Ui)throw b(),new Error("THREE.KTX2Loader: .transcodeImage failed.");ct.push(mt)}const vt=d(ct);v.push({data:vt,width:yt,height:xt}),k.push(vt.buffer)}G.push({mipmaps:v,width:m,height:E,format:w,type:S})}return b(),{faces:G,buffers:k,width:m,height:E,hasAlpha:Q,dfdFlags:y,format:w,type:S}}const o=[{if:"astcSupported",basisFormat:[a.UASTC],transcoderFormat:[n.ASTC_4x4,n.ASTC_4x4],engineFormat:[i.RGBA_ASTC_4x4_Format,i.RGBA_ASTC_4x4_Format],engineType:[s.UnsignedByteType],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.BC7_M5,n.BC7_M5],engineFormat:[i.RGBA_BPTC_Format,i.RGBA_BPTC_Format],engineType:[s.UnsignedByteType],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.BC1,n.BC3],engineFormat:[i.RGBA_S3TC_DXT1_Format,i.RGBA_S3TC_DXT5_Format],engineType:[s.UnsignedByteType],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.ETC1,n.ETC2],engineFormat:[i.RGB_ETC2_Format,i.RGBA_ETC2_EAC_Format],engineType:[s.UnsignedByteType],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.ETC1],engineFormat:[i.RGB_ETC1_Format],engineType:[s.UnsignedByteType],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.PVRTC1_4_RGB,n.PVRTC1_4_RGBA],engineFormat:[i.RGB_PVRTC_4BPPV1_Format,i.RGBA_PVRTC_4BPPV1_Format],engineType:[s.UnsignedByteType],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0},{if:"bptcSupported",basisFormat:[a.UASTC_HDR],transcoderFormat:[n.BC6H],engineFormat:[i.RGB_BPTC_UNSIGNED_Format],engineType:[s.HalfFloatType],priorityHDR:1,needsPowerOfTwo:!1},{basisFormat:[a.ETC1S,a.UASTC],transcoderFormat:[n.RGBA32,n.RGBA32],engineFormat:[i.RGBAFormat,i.RGBAFormat],engineType:[s.UnsignedByteType,s.UnsignedByteType],priorityETC1S:100,priorityUASTC:100,needsPowerOfTwo:!1},{basisFormat:[a.UASTC_HDR],transcoderFormat:[n.RGBA_HALF],engineFormat:[i.RGBAFormat],engineType:[s.HalfFloatType],priorityHDR:100,needsPowerOfTwo:!1}],h={[a.ETC1S]:o.filter(u=>u.basisFormat.includes(a.ETC1S)).sort((u,p)=>u.priorityETC1S-p.priorityETC1S),[a.UASTC]:o.filter(u=>u.basisFormat.includes(a.UASTC)).sort((u,p)=>u.priorityUASTC-p.priorityUASTC),[a.UASTC_HDR]:o.filter(u=>u.basisFormat.includes(a.UASTC_HDR)).sort((u,p)=>u.priorityHDR-p.priorityHDR)};function c(u,p,b,f){const m=h[u];for(let E=0;E<m.length;E++){const I=m[E];if(I.if&&!l[I.if]||!I.basisFormat.includes(u)||f&&I.transcoderFormat.length<2||I.needsPowerOfTwo&&!(g(p)&&g(b)))continue;const C=I.transcoderFormat[f?1:0],x=I.engineFormat[f?1:0],Q=I.engineType[0];return{transcoderFormat:C,engineFormat:x,engineType:Q}}throw new Error("THREE.KTX2Loader: Failed to identify transcoding target.")}function g(u){return u<=2?!0:(u&u-1)===0&&u!==0}function d(u){if(u.length===1)return u[0];let p=0;for(let m=0;m<u.length;m++){const E=u[m];p+=E.byteLength}const b=new Uint8Array(p);let f=0;for(let m=0;m<u.length;m++){const E=u[m];b.set(E,f),f+=E.byteLength}return b}};const Ah=new Set([Pt,zi,Ge,oe]),Xs={[Ga]:Pt,[La]:Ge,[_a]:oe,[Ta]:Pt,[Ra]:Ge,[ka]:oe,[Da]:Pt,[Fa]:Pt,[Sa]:Ge,[Ma]:Ge,[wa]:oe,[Qa]:oe,[va]:zi,[Na]:zi,[Za]:gn,[Xa]:ln,[$a]:Qr,[tr]:wr,[er]:Mr,[ir]:Sr,[js]:ei,[nr]:ei,[sr]:ei,[lr]:Hi,[rr]:Hi,[ar]:Hi,[Pa]:Pi,[za]:Pi,[qa]:hn,[Ua]:hn,[ja]:Oi,[Oa]:Oi,[Ja]:kr,[Ha]:Dr,[Va]:Tr,[Ka]:Rr,[Ya]:Ji,[Wa]:Ji,[cr]:ji,[or]:ji,[hr]:cn,[Ar]:cn},Te={[Ga]:zt,[La]:zt,[_a]:zt,[Ta]:Zt,[Ra]:Zt,[ka]:Zt,[Da]:R,[Fa]:R,[Sa]:R,[Ma]:R,[wa]:R,[Qa]:R,[va]:An,[Na]:on,[Za]:R,[Xa]:R,[$a]:R,[tr]:R,[er]:R,[ir]:R,[js]:Zt,[nr]:R,[sr]:R,[lr]:Zt,[rr]:R,[ar]:R,[Pa]:R,[za]:R,[qa]:R,[Ua]:R,[ja]:R,[Oa]:R,[Ja]:R,[Ha]:R,[Va]:R,[Ka]:R,[Ya]:R,[Wa]:R,[cr]:R,[or]:R,[hr]:R,[Ar]:R};async function oh(l){const{vkFormat:t}=l;if(Xs[t]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat: "+t);Te[t]===void 0&&console.warn('THREE.KTX2Loader: Missing ".type" for vkFormat: '+t);let e;l.supercompressionScheme===ya&&(Ys||(Ys=new Promise(async a=>{const r=new nh;await r.init(),a(r)})),e=await Ys);const i=[];for(let a=0;a<l.levels.length;a++){const r=Math.max(1,l.pixelWidth>>a),A=Math.max(1,l.pixelHeight>>a),o=l.pixelDepth?Math.max(1,l.pixelDepth>>a):0,h=l.levels[a];let c;if(l.supercompressionScheme===Xo)c=h.levelData;else if(l.supercompressionScheme===ya)c=e.decode(h.levelData,h.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let g;Te[t]===zt?g=new Float32Array(c.buffer,c.byteOffset,c.byteLength/Float32Array.BYTES_PER_ELEMENT):Te[t]===Zt?g=new Uint16Array(c.buffer,c.byteOffset,c.byteLength/Uint16Array.BYTES_PER_ELEMENT):Te[t]===An||Te[t]===on?g=new Uint32Array(c.buffer,c.byteOffset,c.byteLength/Uint32Array.BYTES_PER_ELEMENT):g=c,i.push({data:g,width:r,height:A,depth:o})}const s=l.levelCount===0||i.length>1;let n;if(Ah.has(Xs[t]))n=l.pixelDepth===0?new ys(i[0].data,l.pixelWidth,l.pixelHeight):new AA(i[0].data,l.pixelWidth,l.pixelHeight,l.pixelDepth),n.minFilter=s?rn:Ut,n.magFilter=Ut,n.generateMipmaps=l.levelCount===0;else{if(l.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");n=new Ti(i,l.pixelWidth,l.pixelHeight),n.minFilter=s?Le:qt,n.magFilter=qt}return n.mipmaps=i,n.type=Te[t],n.format=Xs[t],n.colorSpace=ur(l),n.needsUpdate=!0,Promise.resolve(n)}function ur(l){const t=l.dataFormatDescriptor[0];return t.colorPrimaries===th?t.transferFunction===xa?P:it:t.colorPrimaries===eh?t.transferFunction===xa?ah:rh:(t.colorPrimaries===$o||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${t.colorPrimaries}"`),ii)}self.onmessage=l=>{const t=l.data;switch(t.type){case"init":break;case"load":ch(t);break;default:console.error("[Worker] Unknown message type:",t.type);break}},self.onerror=l=>{console.error("[Worker] Error:",l)};function hh(l){self.postMessage(l)}let Ze=null,Ni=null,vi=null;async function ch(l){Ze??=new fo,Ze.setMeshoptDecoder(pr),Ni??=new go,Ni.setDecoderConfig({type:"js"}),Ni.setDecoderPath(l.dracoDecoderPath),Ze.setDRACOLoader(Ni),vi??=new ht,vi.workerConfig=l.ktx2LoaderConfig,vi.setTranscoderPath(l.ktx2TranscoderPath),Ze.setKTX2Loader(vi),Ze.load(l.url,t=>{const e={type:"loaded-gltf",result:{url:l.url,geometries:[],textures:[]}};lh(t,e),hh(e)})}function lh(l,t){const{result:e}=t;for(const i of l.parser.associations.keys()){const s=l.parser.associations.get(i);if(s)if("isTexture"in i&&i.isTexture){const n=i,a=l.parser.json.textures[s.textures??-1];e.textures.push({texture:n,textureIndex:s.textures??-1,extensions:a?.extensions??{}})}else if("isMesh"in i&&i.isMesh){const n=i,a=s.meshes??-1,r=s.primitives??-1,A=l.parser.json.meshes[a];e.geometries.push({geometry:n.geometry,meshIndex:a,primitiveIndex:r,extensions:A?.extensions??{}})}else"isMaterial"in i&&i.isMaterial}}})();
|