@rr0/ufoathome 0.202.1 → 0.204.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/dist-embed-interview/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-interview/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-interview/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-interview/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-interview/rr0-interview.mjs +1 -1
- package/dist-embed-scene/ModuleSession-Bh6KaOGK.js +3 -0
- package/dist-embed-scene/SceneNames_en--zj8Tlec.js +1 -0
- package/dist-embed-scene/SceneNames_es-toWs7p7i.js +1 -0
- package/dist-embed-scene/SceneNames_fr-w4Xdplid.js +1 -0
- package/dist-embed-scene/SceneNames_it-Cwcscdx7.js +1 -0
- package/dist-embed-scene/rr0-scene.mjs +302 -302
- package/dist-embed-scene/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting/{AdsbLolArchiveProvider-CsuxO9wl.js → AdsbLolArchiveProvider-BSewzrRe.js} +1 -1
- package/dist-embed-sighting/{AirshipEditor-DkDCkwGG.js → AirshipEditor-BiG7EYoB.js} +2 -2
- package/dist-embed-sighting/{AuroraEditor-C4tY9hXK.js → AuroraEditor-C1Y_zbNW.js} +1 -1
- package/dist-embed-sighting/{AuroraSimulation-C7LAHgWM.js → AuroraSimulation-B9GaDXC3.js} +2 -2
- package/dist-embed-sighting/{BallesterGuaspAssessor-BPaiHWd9.js → BallesterGuaspAssessor-BAXmW7XL.js} +1 -1
- package/dist-embed-sighting/BalloonEditor-D54CC7cn.js +24 -0
- package/dist-embed-sighting/{BeamEditor-DDzw-fB_.js → BeamEditor-SHXD10FH.js} +1 -1
- package/dist-embed-sighting/{BeamSystem-CsNwl_vM.js → BeamSystem-CP3J9Jgx.js} +1 -1
- package/dist-embed-sighting/{BirdEditor-BgNNcdhv.js → BirdEditor-BCit7Rs-.js} +1 -1
- package/dist-embed-sighting/{BirdFlock-DBgkxsxp.js → BirdFlock-DhsSOJTg.js} +1 -1
- package/dist-embed-sighting/{CaseReportExport-BtGCWD7H.js → CaseReportExport-CUy_3oyV.js} +2 -2
- package/dist-embed-sighting/{ContrailSystem-Di5w5IVi.js → ContrailSystem-70o5ynhD.js} +1 -1
- package/dist-embed-sighting/ControlPasses-DQMrWqA3.js +29 -0
- package/dist-embed-sighting/{CoverageAssessor-Cu9wP4ZB.js → CoverageAssessor-BdZ85Hmy.js} +1 -1
- package/dist-embed-sighting/{DroneEditor-5nuq52EG.js → DroneEditor-DwQsVj8U.js} +1 -1
- package/dist-embed-sighting/{DroneParameters-DHeJ7KyU.js → DroneParameters-91BBY10Y.js} +1 -1
- package/dist-embed-sighting/{Flightradar24Provider-p4a3_chL.js → Flightradar24Provider-NbfW-lDQ.js} +1 -1
- package/dist-embed-sighting/{GLTFLoader-fbsNsHlp.js → GLTFLoader-CTETHs7e.js} +1 -1
- package/dist-embed-sighting/GenerativeKitMessages-hgIQ_sST.js +1 -0
- package/dist-embed-sighting/{HeadlightSystem-Ce7sHylX.js → HeadlightSystem-ByKGq-30.js} +1 -1
- package/dist-embed-sighting/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting/{HynekAssessor-DWDZGeLY.js → HynekAssessor-O1MFR79v.js} +1 -1
- package/dist-embed-sighting/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting/LanternEditor-X0RgF4mn.js +24 -0
- package/dist-embed-sighting/{LaunchEditor-BGyLgkGS.js → LaunchEditor-oTKLz_5C.js} +1 -1
- package/dist-embed-sighting/{LaunchSimulation-DvexI06i.js → LaunchSimulation-ClRFO1uw.js} +1 -1
- package/dist-embed-sighting/ModuleSession-SivjhuIl.js +3 -0
- package/dist-embed-sighting/ModuleThree-TrytNggN.js +1 -0
- package/dist-embed-sighting/{NearestApproach-CONyx4c5.js → NearestApproach-BM7B5PuM.js} +1 -1
- package/dist-embed-sighting/{ParameterForm-DFHcolwG.js → ParameterForm-BghOJXLP.js} +1 -1
- package/dist-embed-sighting/{PoherAssessor-DI86qOCu.js → PoherAssessor-DZMtM2pW.js} +1 -1
- package/dist-embed-sighting/PoherMatrix-C2fcLqDH.js +1 -0
- package/dist-embed-sighting/PoherSelfCheck-PJvhaWFK.js +1 -0
- package/dist-embed-sighting/{RailwaySystem-DcJr9BY_.js → RailwaySystem-Dmx9y4gO.js} +1 -1
- package/dist-embed-sighting/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting/{ReentryEditor-C6EJJf4l.js → ReentryEditor-DozmlO_l.js} +1 -1
- package/dist-embed-sighting/{ReentrySimulation-BFVBOWrm.js → ReentrySimulation-WXW1IU2E.js} +1 -1
- package/dist-embed-sighting/{ReferenceSystem-zTvTqp5y.js → ReferenceSystem-BD7gXBee.js} +1 -1
- package/dist-embed-sighting/{RoadMarkings-DvWjbrSf.js → RoadMarkings-Bp07bgso.js} +1 -1
- package/dist-embed-sighting/SceneNames_en-BarwWQKA.js +1 -0
- package/dist-embed-sighting/SceneNames_es-CEdDjAb4.js +1 -0
- package/dist-embed-sighting/SceneNames_fr-m5WHqg-1.js +1 -0
- package/dist-embed-sighting/SceneNames_it-D_H_iZnc.js +1 -0
- package/dist-embed-sighting/{SearchlightEditor-By5Z3ef7.js → SearchlightEditor-BGmKCBrG.js} +1 -1
- package/dist-embed-sighting/{SearchlightSystem-PEMBDW1s.js → SearchlightSystem-5FPRRIkH.js} +1 -1
- package/dist-embed-sighting/SightingMessages_en-DKFVZnDu.js +1 -0
- package/dist-embed-sighting/SightingMessages_es-DYQlWvm0.js +1 -0
- package/dist-embed-sighting/SightingMessages_fr-BygVDDY9.js +1 -0
- package/dist-embed-sighting/SightingMessages_it-BI7GnXPz.js +1 -0
- package/dist-embed-sighting/{SkyLantern-yYihsrun.js → SkyLantern-1Rqy6fNz.js} +1 -1
- package/dist-embed-sighting/{TraceSystem-1K0WblAK.js → TraceSystem-DDlP7sxl.js} +2 -2
- package/dist-embed-sighting/{UfoMessages_en-CwRXodRE.js → UfoMessages_en-DvUA0KYR.js} +1 -1
- package/dist-embed-sighting/{WaterSystem-1VlNXZnO.js → WaterSystem-Ik6QzyT_.js} +2 -2
- package/dist-embed-sighting/rr0-sighting.mjs +417 -353
- package/dist-embed-sighting/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting/{trafficRuntime-BUvbWOcl.js → trafficRuntime-CjDwU1Lk.js} +1 -1
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-Bz1OjSjY.js → AdsbLolArchiveProvider-CNMGHqqx.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-BlJXyxlr.js → AirshipEditor-BVlkWwdL.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-Cx40Y8JT.js → AirshipFlight-Cvl6xWPY.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-Ldk66p1A.js → Aurora-DOIRpjiG.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-CGSomAFk.js → AuroraEditor-B0tCM7E7.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-vKcv2Hue.js → AuroraSimulation-CX7V0obh.js} +2 -2
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-CJyRqwvh.js → BallesterGuaspAssessor-DEJId5n8.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonEditor-CgO4LaWn.js → BalloonEditor-Drb5evP5.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-hLr_4TFU.js → BalloonFlight-CGXmDbNq.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-B8qreA3j.js → BeamEditor-DP2LNObR.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-D0hrju5J.js → BeamSystem-BCaOtm3H.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-BNzrfSqX.js → BirdEditor-CbYZcYyG.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-iSovVEZd.js → BirdFlock-Dv9Awhvf.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement-CC4gimF1.js +132 -0
- package/dist-embed-sighting-editor/{CaseReportExport-Bv6FWPs2.js → CaseReportExport-DmvvH_GH.js} +1 -1
- package/dist-embed-sighting-editor/{ContrailSystem-D3tXAg2r.js → ContrailSystem-ChbOVWp-.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-CaVHMhEY.js → ControlPasses-Dgz_D6DL.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-CTfHqAd_.js → CoverageAssessor-CcVuVsG0.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-BFsArPKi.js → DroneEditor-D6k4gYj4.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-B96pVrY1.js → DroneFlight-D-MWhrXa.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-DW-enQUo.js → DroneParameters-CdQbwFKD.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-CBGkjw03.js → Flightradar24Provider-D_eLiI9k.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-CrRPu-Pt.js → GLTFLoader-BIk0ozTu.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-BmPfcHt1.js → HeadlightSystem-C9tLjvpO.js} +1 -1
- package/dist-embed-sighting-editor/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-sighting-editor/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-sighting-editor/{HynekAssessor-nBidt6QV.js → HynekAssessor-B4ej1xgG.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-CQWfYlGL.js → InterviewEditorElement-Bo4OG2ig.js} +7 -7
- package/dist-embed-sighting-editor/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-sighting-editor/{LanternEditor-CjQVFowY.js → LanternEditor-Hd-8kmET.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-BVc8Mvhr.js → LaserBeam-Ca2QUeCT.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-Cz8Mzo4a.js → LaunchEditor-BykQEscN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-CvBhTPgN.js → LaunchPlume-Dos-OyTV.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-CkZIG-3P.js → LaunchSimulation-B0DgOoJM.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-B153oeTu.js → ModelSource-szsl2QtY.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-BUL_OLFv.js → ModelThumbnails-dnCeD6UT.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-BzBLcY9s.js → ModelViewer-BNGSukqO.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CpMYkYgb.js → ModuleConformance-CEXxsL48.js} +2 -2
- package/dist-embed-sighting-editor/ModuleSession-DOhPD2XZ.js +3 -0
- package/dist-embed-sighting-editor/ModuleThree-BY0cNbGt.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelElement-DTnJICg0.js +26 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-CXQhQMyu.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bj-cT3f4.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B-eaMXQz.js +1 -0
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-C3fS8UFN.js +1 -0
- package/dist-embed-sighting-editor/{NearestApproach-Bxo_N7a9.js → NearestApproach-jDpDx7cm.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-CEVA26zd.js → PoherAssessor-yWlnEcoZ.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-Ceb0_MVz.js → RailwaySystem-CAqOaX1c.js} +1 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-sighting-editor/{ReentryEditor-BWCK2g_s.js → ReentryEditor-CNLwoAIZ.js} +2 -2
- package/dist-embed-sighting-editor/{ReentrySimulation-B09JXMu5.js → ReentrySimulation-Q-8h8lRK.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-B15kw0uH.js → ReferenceSystem-B0tZDQ1-.js} +1 -1
- package/dist-embed-sighting-editor/SceneNames_en-CTJiUG-r.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_es-DHZMjSqb.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_fr-C36uyjbM.js +1 -0
- package/dist-embed-sighting-editor/SceneNames_it-BQJQm2rT.js +1 -0
- package/dist-embed-sighting-editor/{SearchlightEditor-BpwPOhJ6.js → SearchlightEditor-sQh92hx7.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightSystem-D7sdsRYn.js → SearchlightSystem-B_RPbGj4.js} +1 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-V_dJYjNb.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_es-DauDuhPa.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-zxTvQa2I.js +12 -0
- package/dist-embed-sighting-editor/SightingEditorMessages_it-vvaao68O.js +12 -0
- package/dist-embed-sighting-editor/SightingElement-BpYuBmJB.js +694 -0
- package/dist-embed-sighting-editor/{SightingFileEditor-Du3A9uZm.js → SightingFileEditor-tIOJTG_y.js} +1 -1
- package/dist-embed-sighting-editor/SightingLabels_en-dOsFjVRL.js +1 -0
- package/dist-embed-sighting-editor/SightingLabels_es-CKlP2BDO.js +1 -0
- package/{dist-embed-ufoathome/SightingLabels_fr-D69zENbW.js → dist-embed-sighting-editor/SightingLabels_fr-Cpkcf5_9.js} +1 -1
- package/{dist-embed-ufoathome/SightingLabels_it-COLZ2Qth.js → dist-embed-sighting-editor/SightingLabels_it-3127rMXm.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_en-CzICxNU3.js → SightingMessages_en-Drcr3k4V.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_es-CiVFZlgA.js → SightingMessages_es-BcaWM7Oy.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_fr-nopOVDa1.js → SightingMessages_fr-7IYuW095.js} +1 -1
- package/dist-embed-sighting-editor/{SightingMessages_it-Cu0nnPts.js → SightingMessages_it-BhDmZn6p.js} +1 -1
- package/dist-embed-sighting-editor/{SkyLantern-D6bru_e_.js → SkyLantern-Cj60Cn9B.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Bv4kLpie.js → TraceSystem-BK0y5lRX.js} +2 -2
- package/dist-embed-sighting-editor/{WaterSystem-Bbk_RJKg.js → WaterSystem-DMeMEW3i.js} +2 -2
- package/dist-embed-sighting-editor/{caseSchema-BEJTs2Ld.js → caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +508 -439
- package/dist-embed-sighting-editor/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting-editor/{trafficRuntime-Bu3my6S4.js → trafficRuntime-eGXY41n0.js} +1 -1
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-v1sSwhN1.js → AdsbLolArchiveProvider-Ck345V92.js} +1 -1
- package/dist-embed-ufoathome/{AirshipEditor-CBSrQM3J.js → AirshipEditor-EBfUtSiB.js} +1 -1
- package/dist-embed-ufoathome/{AirshipFlight-Dzpw8HRM.js → AirshipFlight-6yYGIRn8.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-Dc4u2vEw.js → Aurora-CMORgA2p.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-CeLzRDPj.js → AuroraEditor-CDZgVOlI.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-BT1CdWX5.js → AuroraSimulation-DqfSBul6.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-CPW-Omah.js → BallesterGuaspAssessor-DUNQZ9e8.js} +1 -1
- package/dist-embed-ufoathome/{BalloonEditor-dCIjTsIz.js → BalloonEditor-Cx3fRab8.js} +2 -2
- package/dist-embed-ufoathome/{BalloonFlight-CztT6ddg.js → BalloonFlight-CvE7AHlm.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-BS73mBZU.js → BeamEditor-gxTjO6Pr.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-C5EpRhij.js → BeamSystem-C8jjTJtB.js} +1 -1
- package/dist-embed-ufoathome/{BirdEditor-Dk3huwHa.js → BirdEditor-CBVGyUnK.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-BV8WwzAj.js → BodyEditor-DGaBo74A.js} +1 -1
- package/dist-embed-ufoathome/CaseEditorElement-BOp207Tr.js +3182 -0
- package/dist-embed-ufoathome/CaseElement-BGO5UZLP.js +132 -0
- package/dist-embed-ufoathome/{CaseReportExport-XLbFCkPg.js → CaseReportExport-6DFaJzfO.js} +3 -3
- package/dist-embed-ufoathome/ColumnResize-DnX89ynB.js +208 -0
- package/dist-embed-ufoathome/ConsentMessages_en-DBKCeDAn.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_es-Dby74lUq.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_fr-FGSpqzMc.js +1 -0
- package/dist-embed-ufoathome/ConsentMessages_it-BJWfXH6I.js +1 -0
- package/dist-embed-ufoathome/{ControlPasses-CKOU_3lG.js → ControlPasses-CeExr5X1.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-BYMf3Qhv.js → CoverageAssessor-BbqRqh0C.js} +1 -1
- package/dist-embed-ufoathome/{DroneEditor-D60uhSHO.js → DroneEditor-7X9CM_3H.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-_QPbhh5s.js → Flightradar24Provider-MzQcuUHn.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-DQeHB-Bk.js → GLTFLoader-CPUffC65.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-Pq_pPvjK.js → GeoJsonExport-D7QhWNRC.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-KII55iXE.js → GeographicFigures-BvEeCtxr.js} +1 -1
- package/dist-embed-ufoathome/HvsMessages_en-BiLhEAxJ.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_es-Cbj_6eFs.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_fr-DkvE2qm1.js +1 -0
- package/dist-embed-ufoathome/HvsMessages_it-BIJ87Uyb.js +1 -0
- package/dist-embed-ufoathome/HynekAssessor-BwjRkQWT.js +1 -0
- package/dist-embed-ufoathome/{InterviewEditorElement-BSwkegEp.js → InterviewEditorElement-CVCOicLD.js} +6 -6
- package/dist-embed-ufoathome/{InterviewElement-CfkDtybc.js → InterviewElement-ZI42DKRx.js} +2 -2
- package/dist-embed-ufoathome/InterviewMessages_en-Ikx6GjEd.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_es-DKWWyrnb.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DT0gXAKD.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_it-CF_9MYPt.js +3 -0
- package/dist-embed-ufoathome/{KmlExport-BMNwwys8.js → KmlExport-BX0nxAaA.js} +1 -1
- package/dist-embed-ufoathome/{LanternEditor-BapUZdog.js → LanternEditor-BROUv-vx.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-B-tlAzNB.js → LaserBeam-ChD9aV-N.js} +1 -1
- package/dist-embed-ufoathome/LaunchEditor-CM2Wcjv2.js +22 -0
- package/dist-embed-ufoathome/{LaunchPlume-D-vSb8tJ.js → LaunchPlume-DeVRe05u.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-CZ8Oba00.js → LaunchSimulation-RROdYccW.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-HSiigkeO.js → ModelSource-nXZ6eIH5.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-DWvRMmj_.js → ModelThumbnails-CRSm49vm.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-CM7qTW8F.js → ModelViewer-BQsl_Nfn.js} +1 -1
- package/dist-embed-ufoathome/ModuleSession-Dac4fD0X.js +3 -0
- package/dist-embed-ufoathome/ModulesPanelElement-BvzY1GUF.js +18 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_en-Dir0ADQe.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_es-B_ITNG5N.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-DbKLtD8s.js +1 -0
- package/dist-embed-ufoathome/ModulesPanelMessages_it-CE0q7D2c.js +1 -0
- package/dist-embed-ufoathome/{NearestApproach-PAsV5RlG.js → NearestApproach-DbUpe1iw.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-CniYlhUl.js → PoherAssessor-Dmro58tC.js} +1 -1
- package/dist-embed-ufoathome/PoherMatrix-C2fcLqDH.js +1 -0
- package/dist-embed-ufoathome/PoherSelfCheck-pcYj_hQ1.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireFeed-DmyYcwwf.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-vT3C3qXt.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireImport-BlTDOHWj.js +5 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_en-C5qzU8K7.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_es-DdhtmSew.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-COtovvqc.js +1 -0
- package/dist-embed-ufoathome/ReadingCheckTexts_it-Bz32XGh6.js +1 -0
- package/dist-embed-ufoathome/{ReentryEditor-Qax1sT82.js → ReentryEditor-Di0KzYeZ.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-CTeCaxZl.js → ReentrySimulation-HhdlSVkR.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-CM27OCUo.js → ReferenceSystem-B30-UBHY.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-EAUAsx9t.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-jTxLjnaW.js +1 -0
- package/dist-embed-ufoathome/SceneNames_en-sRbx6EJZ.js +1 -0
- package/dist-embed-ufoathome/SceneNames_es-pnfHB-7D.js +1 -0
- package/dist-embed-ufoathome/SceneNames_fr-BtTlti4C.js +1 -0
- package/dist-embed-ufoathome/SceneNames_it-DQKwdCVD.js +1 -0
- package/dist-embed-ufoathome/{SearchlightEditor-PuLz84pp.js → SearchlightEditor-B6_BW8FD.js} +1 -1
- package/dist-embed-ufoathome/{SearchlightSystem-B-tHvY1M.js → SearchlightSystem-D_DTpDNC.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-EzLob2Tz.js → ShareDialogElement-C0oFh0X4.js} +150 -132
- package/dist-embed-ufoathome/Sighting-BX_CmDY2.js +1 -0
- package/dist-embed-ufoathome/SightingEditorMessages_en-V_dJYjNb.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_es-DauDuhPa.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_fr-zxTvQa2I.js +12 -0
- package/dist-embed-ufoathome/SightingEditorMessages_it-vvaao68O.js +12 -0
- package/dist-embed-ufoathome/SightingElement-DzxTvvLN.js +694 -0
- package/dist-embed-ufoathome/{SightingFileEditor-DS1DRU2p.js → SightingFileEditor-D5_GwIsn.js} +1 -1
- package/dist-embed-ufoathome/SightingLabels_en-dOsFjVRL.js +1 -0
- package/dist-embed-ufoathome/SightingLabels_es-CKlP2BDO.js +1 -0
- package/{dist-embed-sighting-editor/SightingLabels_fr-D69zENbW.js → dist-embed-ufoathome/SightingLabels_fr-Cpkcf5_9.js} +1 -1
- package/{dist-embed-sighting-editor/SightingLabels_it-COLZ2Qth.js → dist-embed-ufoathome/SightingLabels_it-3127rMXm.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_en-CzICxNU3.js → SightingMessages_en-Drcr3k4V.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_es-CiVFZlgA.js → SightingMessages_es-BcaWM7Oy.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_fr-nopOVDa1.js → SightingMessages_fr-7IYuW095.js} +1 -1
- package/dist-embed-ufoathome/{SightingMessages_it-Cu0nnPts.js → SightingMessages_it-BhDmZn6p.js} +1 -1
- package/dist-embed-ufoathome/{TraceSystem-8XQX03MS.js → TraceSystem-CiBRo1aU.js} +1 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-ByVu39KF.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-D9bLboxq.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-nTqRf0ZK.js +1 -0
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-4cZC5-y5.js +1 -0
- package/dist-embed-ufoathome/{VideoButton-WNtEngz-.js → VideoButton-BseBKx2r.js} +1 -1
- package/dist-embed-ufoathome/{caseSchema-BEJTs2Ld.js → caseSchema-Cukbjeex.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +35 -17
- package/dist-embed-ufoathome/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-ufoathome/{surroundingsSources-UHKGesPa.js → surroundingsSources-BSh42KUu.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-CgY_7-NH.js → trafficRuntime-BMTtwn7o.js} +2 -2
- package/package.json +1 -1
- package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-scene/ModuleSession-bj7QHWjO.js +0 -3
- package/dist-embed-scene/SceneNames_en-BFJsR6Cc.js +0 -1
- package/dist-embed-scene/SceneNames_es-BHBTwcJ3.js +0 -1
- package/dist-embed-scene/SceneNames_fr-CFsA4XeK.js +0 -1
- package/dist-embed-scene/SceneNames_it-DkIgwviv.js +0 -1
- package/dist-embed-scene/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-sighting/BalloonEditor-CaWwqWKK.js +0 -24
- package/dist-embed-sighting/ControlPasses-Dr6eP2Mq.js +0 -29
- package/dist-embed-sighting/GenerativeKitMessages-NbyGMKAR.js +0 -1
- package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting/LanternEditor-Be5Io1J-.js +0 -24
- package/dist-embed-sighting/ModuleSession-DztK084a.js +0 -3
- package/dist-embed-sighting/ModuleThree-BLNSm2eY.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting/SceneNames_en-BlRTU7Hq.js +0 -1
- package/dist-embed-sighting/SceneNames_es-DMNd9trd.js +0 -1
- package/dist-embed-sighting/SceneNames_fr-DlMcv9D0.js +0 -1
- package/dist-embed-sighting/SceneNames_it-DqlWMlOE.js +0 -1
- package/dist-embed-sighting/SightingMessages_en-D3YVhgUj.js +0 -1
- package/dist-embed-sighting/SightingMessages_es-ME6FeTp-.js +0 -1
- package/dist-embed-sighting/SightingMessages_fr-BgXYuIq4.js +0 -1
- package/dist-embed-sighting/SightingMessages_it-DcE90eAl.js +0 -1
- package/dist-embed-sighting/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-sighting-editor/CaseElement-D80gHg4r.js +0 -131
- package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-sighting-editor/ModuleSession-b_pmjUfP.js +0 -3
- package/dist-embed-sighting-editor/ModuleThree-B_FZVqsf.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelElement-D0gn9Z-y.js +0 -15
- package/dist-embed-sighting-editor/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-sighting-editor/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-sighting-editor/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_en-c5zNw0Hi.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_es-CDjoBwy_.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_fr-CoZNmFu3.js +0 -1
- package/dist-embed-sighting-editor/SceneNames_it-CVEahBpq.js +0 -1
- package/dist-embed-sighting-editor/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-sighting-editor/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-sighting-editor/SightingElement-Bp-t_EAF.js +0 -693
- package/dist-embed-sighting-editor/SightingLabels_en-oIpytoq_.js +0 -1
- package/dist-embed-sighting-editor/SightingLabels_es-DUh1CTXl.js +0 -1
- package/dist-embed-sighting-editor/angular-size-CxoysZle.png +0 -0
- package/dist-embed-sighting-editor/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-sighting-editor/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-sighting-editor/protractor-DyE30B87.png +0 -0
- package/dist-embed-sighting-editor/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-ufoathome/CaseEditorElement-HR8RFluQ.js +0 -3175
- package/dist-embed-ufoathome/CaseElement-vCbCfGOv.js +0 -131
- package/dist-embed-ufoathome/ColumnResize-CEXrq3KB.js +0 -164
- package/dist-embed-ufoathome/HynekAssessor-wCDhgIB8.js +0 -1
- package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +0 -3
- package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +0 -3
- package/dist-embed-ufoathome/LaunchEditor-Cy5D-gwU.js +0 -22
- package/dist-embed-ufoathome/ModuleSession-BKDWGSEo.js +0 -3
- package/dist-embed-ufoathome/ModulesPanelElement-DsOa2zH0.js +0 -15
- package/dist-embed-ufoathome/ModulesPanelMessages_en-DuwrY3Pm.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_es-Bq5X-XuT.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_fr-B8cSDc6o.js +0 -1
- package/dist-embed-ufoathome/ModulesPanelMessages_it-BdC626aJ.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-CpZqkxlt.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireForm-LkllpNx-.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireImport-CNROmkT2.js +0 -5
- package/dist-embed-ufoathome/ReadingCheckTexts_en-eq6teExJ.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_es-CR_JJZMV.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_fr-pcDleIvY.js +0 -1
- package/dist-embed-ufoathome/ReadingCheckTexts_it-MFKeoXnq.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-Is3HX0n0.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-BbtX26Fi.js +0 -1
- package/dist-embed-ufoathome/SceneNames_en-7OZ7peGc.js +0 -1
- package/dist-embed-ufoathome/SceneNames_es-P5-Mavdi.js +0 -1
- package/dist-embed-ufoathome/SceneNames_fr-qzw0QzD0.js +0 -1
- package/dist-embed-ufoathome/SceneNames_it-Sqf8JFOd.js +0 -1
- package/dist-embed-ufoathome/Sighting-B7bsiTIQ.js +0 -1
- package/dist-embed-ufoathome/SightingEditorMessages_en-k7_ua2OM.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_es-Drqbbr5_.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_fr-B_K5hsuV.js +0 -12
- package/dist-embed-ufoathome/SightingEditorMessages_it-QCLg1d7x.js +0 -12
- package/dist-embed-ufoathome/SightingElement--qpGoyxL.js +0 -693
- package/dist-embed-ufoathome/SightingLabels_en-oIpytoq_.js +0 -1
- package/dist-embed-ufoathome/SightingLabels_es-DUh1CTXl.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_en-BK2qJyZN.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_es-B1-NDCau.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_fr-BTG047qo.js +0 -1
- package/dist-embed-ufoathome/UfoAtHomeMessages_it-Ryxv4HNU.js +0 -1
- package/dist-embed-ufoathome/angular-size-CxoysZle.png +0 -0
- package/dist-embed-ufoathome/azimuth-CvjiPmz0.png +0 -0
- package/dist-embed-ufoathome/elevation-DPr5S6Jt.png +0 -0
- package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +0 -7
- package/dist-embed-ufoathome/protractor-DyE30B87.png +0 -0
- package/dist-embed-ufoathome/sightingSchema-9MogCcUd.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{m as W,n as Z,o as Y,B as H,p as K,W as Q,i as P,_ as B,q as J,S as C,t as F}from"./rr0-sighting.mjs";class A{static of(t,n,a,s,i,e=new Date){const r=t.events??[],c=f=>f.url?new URL(f.url,n).href:void 0,o=r.filter(f=>f.eventType==="sighting"&&c(f)),u=o.filter(f=>f.interpretationOf===void 0),p=u.map(f=>A.witnessOf(f,c(f),a.get(c(f)),s)),l=f=>{const w=[f.interpretationOf].flat().filter(b=>typeof b=="string");return u.find(b=>b.id!==void 0&&w.includes(b.id))??u.find(b=>w.includes(a.get(c(b))?.id??""))},m=o.filter(f=>f.interpretationOf!==void 0).map(f=>{const w=l(f),b=w?p[u.indexOf(w)]:void 0;return A.readingOf(f,c(f),a.get(c(f)),b,w?a.get(c(w)):void 0,s,i)}),d=r.filter(f=>f.eventType==="interview").map(f=>{const w=u.find(b=>b.id!==void 0&&[f.interviewOf].flat().includes(b.id));return{title:s.read(f.title)??f.id??"",...w?{witness:p[u.indexOf(w)].title}:{},...f.time?{time:f.time}:{},by:A.names(f.by,s),...f.medium?{medium:f.medium}:{}}});A.placeOnMap(p,m);const g=s.read(t.summary);return{generatedAt:e.toISOString(),case:{...t.id?{id:t.id}:{},...t.title?{title:t.title}:{},...t.time?{time:t.time}:{},url:n,...g?{summary:g}:{}},witnesses:p,readings:m,interviews:d}}static witnessOf(t,n,a,s){const i=s.read(t.title)??s.read(a?.observer?.title)??t.id??n,e={...t.id?{id:t.id}:{},title:i,url:n,...t.time?{time:t.time}:{},indications:[],values:[],sources:[],moments:[]};if(!a)return e;const{recording:r,provenance:c}=W.strip(a),o=s.read(r.description);o&&(e.description=o);const u=r.place?.name;u&&(e.place=u),!e.time&&r.time&&(e.time=r.time),typeof r.durationSeconds=="number"&&(e.durationSeconds=r.durationSeconds),r.instrument&&(e.instrument=r.instrument),e.sources=(r.sources??[]).map(b=>{const v=b,y=s.read(v.title);return{...y?{title:y}:{},...v.authors?.length?{authors:v.authors}:{},...v.publication?.publisher?{publisher:v.publication.publisher}:{},...v.publication?.time?{time:v.publication.time}:{},...v.url?{url:v.url}:{},...v.index?{index:v.index}:{}}}),e.moments=[...r.milestones??[]].sort((b,v)=>b.t-v.t).map(b=>{const v=s.read(b.note);return{t:b.t,label:s.read(b.label)??"",...v?{note:v}:{}}});const p=r.observerTrack?.keyframes?.[0]?.pose,l=r.place?.locations?.[0],m=p?.lat??l?.lat,d=p?.lng??l?.lng;typeof m=="number"&&typeof d=="number"&&Object.assign(e,{lat:m,lng:d}),e.values=A.valuesOf(c,r,()=>!0,s);const g=Q.MODELS[0],f=r.account?.conditions,w=new Map;for(const b of r.timeline?.keyframes??[])for(const v of b.shapes){const y=s.read(v.shape.title);y&&!w.has(v.sourceId)&&w.set(v.sourceId,y)}return e.phenomena=Object.fromEntries(w),(r.timeline?.keyframes??[]).forEach((b,v)=>b.shapes.forEach((y,h)=>{const M=`timeline.keyframes.${v}.shapes.${h}.shape`,E=Z.traced(c,`${M}.aim`),O=Z.traced(c,`${M}.angular`);if(!E&&!O)return;const $=y.shape,x=c.at(`${M}.aim`)??c.at(`${M}.angular`),I={t:b.t,sourceId:y.sourceId,directionSaid:E,sizeSaid:O,...w.has(y.sourceId)?{phenomenon:w.get(y.sourceId)}:{},...$.aim?{aim:{azimuthDeg:$.aim.azimuthDeg,altitudeDeg:$.aim.altitudeDeg}}:{},...$.angular?{angular:$.angular}:{},...x?{basis:x.basis}:{},...x?.rationale?{rationale:s.read(x.rationale)??""}:{},...x?.source?{source:x.source}:{}};if(E&&$.aim){const L=(G,j,R)=>{const V=c.at(`${M}.aim.${R}`)??c.at(`${M}.aim`),q=g.law({kind:G,value:j,basis:V?.basis,how:V?.how},f);return[q.low??j,q.high??j]};I.uncertainty={azimuthDeg:L("heading",$.aim.azimuthDeg,"azimuthDeg"),altitudeDeg:L("elevation",$.aim.altitudeDeg,"altitudeDeg")}}e.indications.push(I)})),e}static readingOf(t,n,a,s,i,e,r){const c={...t.id?{id:t.id}:{},title:e.read(t.title)??e.read(a?.interpretation?.title)??n,url:n,reads:s?.title??"",by:A.names(t.by,e),...t.time?{time:t.time}:{},supposed:[],findings:[],comparisons:[],paths:[]};if(!a)return c;const{recording:o,provenance:u}=W.strip(a),p=e.read(o.description)??e.read(o.summary);p&&(c.description=p),c.supposed=A.valuesOf(u,o,(d,g)=>d.startsWith("interpretation")&&(g==="assumed"||g==="fitted"),e);const l=d=>typeof d=="string"?d:e.read(d)??"";if(c.findings=(o.interpretation?.findings??[]).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!0})),!i)return c;r&&c.findings.push(...r.findingsOf(i,a).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!1})));const m=o.interpretation?.bodies??[];if(m.length>0)try{const d=Z.forAccount(i);c.sensitivity=d.of(m,u),c.comparisons=d.comparisons(m),c.paths=A.pathsOf(m,i,c.comparisons.map(g=>g.t))}catch{}return c}static pathsOf(t,n,a){const s=Y(n),i={heightAt:()=>0},e=r=>H.eyeOf(s,r,i);return t.filter(r=>(r.explains?.length??0)>0).map(r=>{const c=new H(r,i,e),u=[...new Set([...r.track.map(p=>p.t),...a])].sort((p,l)=>p-l).map(p=>({t:p,state:c.at(p)})).filter(p=>p.state!==void 0).map(({t:p,state:l})=>({t:p,eastM:l.eastM,northM:l.northM}));return{bodyId:r.id,points:u}}).filter(r=>r.points.length>0)}static placeOnMap(t,n){const a=t.find(s=>s.lat!==void 0&&s.lng!==void 0);if(a){for(const s of t){if(s.lat===void 0||s.lng===void 0)continue;const i=K(s.lat,s.lng,a.lat,a.lng);s.at={eastM:i.x,northM:-i.z}}for(const s of n){const i=t.find(e=>e.title===s.reads)?.at;if(!i){s.paths=[];continue}for(const e of s.paths)for(const r of e.points)r.eastM+=i.eastM,r.northM+=i.northM}}}static valuesOf(t,n,a,s){return t.paths().flatMap(i=>{const e=t.at(i);return a(i,e.basis)?[{path:i,value:i.split(".").reduce((r,c)=>r?.[c],n),basis:e.basis,...e.rationale?{rationale:s.read(e.rationale)??""}:{},...e.source?{source:e.source}:{}}]:[]})}static names(t,n){const a=s=>s.replace(/([a-z])([A-Z])/g,"$1 $2");return(t??[]).map(s=>{if("people"in s){const[e,...r]=a(s.people).split(" ");return[...r,e].join(" ")}if("org"in s)return a(s.org);const i=s;return n.read(i.title)??i.id??""}).filter(s=>s!=="")}}class X{constructor(t,n){this.texts=t,this.language=n,this.decimal=new Intl.NumberFormat(n,{maximumFractionDigits:1}),this.signed=new Intl.NumberFormat(n,{maximumFractionDigits:2,signDisplay:"exceptZero"})}decimal;signed;number(t){return t===void 0||!Number.isFinite(t)?"":this.decimal.format(t)}degrees(t){return t===void 0?"":`${this.number(t)}°`}azimuth(t){return t===void 0?"":this.degrees((t%360+360)%360)}instant(t){return`${this.number(t/1e3)} s`}amount(t,n){switch(t){case"azimuth":case"altitude":return`${this.signed.format(n)}°`;case"time":return`${this.signed.format(n/1e3)} s`;default:return`×${new Intl.NumberFormat(this.language,{maximumFractionDigits:2}).format(n)}`}}rests(t){const n=t.source;return[n?[n.said?`interview ${n.said.interview??""} #${n.said.segment}`.replace(" "," "):void 0,typeof n.document=="string"?n.document:void 0,n.at,n.picture,n.tool,n.url].filter(Boolean).join(", "):"",t.rationale].filter(s=>s&&s!=="").join(" : ")}value(t){const n=t.value;return typeof n=="number"?this.number(n):typeof n=="string"?n:Array.isArray(n)?`[${n.length}]`:n===void 0?"":JSON.stringify(n)}robustness(t){const n=this.texts.robustness;return!t||t.compared===0?{kind:"nothing",text:n.nothing}:Z.measurable(t)?t.sufficient===!0?{kind:"sufficient",text:n.sufficient}:t.sufficient===!1?{kind:"fine-tuned",text:n.fineTuned.replace("{knob}",this.texts.knobs[t.margins[0].knob])}:{kind:"unjudged",text:n.unjudged}:{kind:"too-few",text:n.tooFew}}reproduced(t){return t&&t.compared>0?`${Math.round(t.agreement*t.compared)} / ${t.compared}`:""}ends(t){const n=(a,s)=>`${s?"≥ ":""}${this.amount(t.knob,a)}`;return{from:n(t.lower,t.lowerReached),to:n(t.upper,t.upperReached)}}fill(t,n){return t.replace(/\{(\w+)\}/g,(a,s)=>s in n?n[s]:a)}}class T{static FORMAT="ufoathome-case-report";static VERSION=1;static json(t,n){return JSON.stringify({format:T.FORMAT,version:T.VERSION,generator:`UFO@home ${n}`,...t},null,2)}static csv(t,n,a){const s=new X(n,a),i=n.columns,e=c=>c===void 0||!Number.isFinite(c)?"":String(Math.round(c*1e3)/1e3),r={};return r["indications.csv"]=T.table([i.witness,`${i.instant} (s)`,i.phenomenon,`${i.azimuth} (°)`,`${i.altitude} (°)`,`${i.azimuth} min`,`${i.azimuth} max`,`${i.altitude} min`,`${i.altitude} max`,`${i.size} (°)`,i.basis,i.rests],t.witnesses.flatMap(c=>c.indications.map(o=>[c.title,e(o.t/1e3),o.phenomenon??o.sourceId,e(o.aim?.azimuthDeg),e(o.aim?.altitudeDeg),e(o.uncertainty?.azimuthDeg[0]),e(o.uncertainty?.azimuthDeg[1]),e(o.uncertainty?.altitudeDeg[0]),e(o.uncertainty?.altitudeDeg[1]),o.sizeSaid?e(o.angular?.widthDeg):"",o.basis?n.bases[o.basis]:"",s.rests(o)]))),r["values.csv"]=T.table([i.witness,i.reading,i.path,i.value,i.basis,i.rests],[...t.witnesses.flatMap(c=>c.values.map(o=>[c.title,"",o.path,s.value(o),n.bases[o.basis],s.rests(o)])),...t.readings.flatMap(c=>c.supposed.map(o=>[c.reads,c.title,o.path,s.value(o),n.bases[o.basis],s.rests(o)]))]),r["readings.csv"]=T.table([i.reading,i.reads,i.by,i.time,i.reproduced,i.compared,`${i.gap} (°)`,i.robustness,i.supposedCount],t.readings.map(c=>[c.title,c.reads,c.by.join(", "),c.time??"",c.sensitivity&&c.sensitivity.compared>0?String(Math.round(c.sensitivity.agreement*c.sensitivity.compared)):"",c.sensitivity&&c.sensitivity.compared>0?String(c.sensitivity.compared):"",e(c.sensitivity?.medianSeparationDeg),s.robustness(c.sensitivity).text,String(c.supposed.length)])),r["margins.csv"]=T.table([i.reading,i.reads,i.knob,i.from,i.to,`${i.reference} min`,`${i.reference} max`,i.covered],t.readings.flatMap(c=>(c.sensitivity?.margins??[]).map(o=>[c.title,c.reads,n.knobs[o.knob],e(o.lower),e(o.upper),e(o.reference?.lower),e(o.reference?.upper),o.coverage===void 0?"":e(o.coverage)]))),r["comparisons.csv"]=T.table([i.reading,i.reads,`${i.instant} (s)`,i.phenomenon,`${i.said} ${i.azimuth}`,`${i.said} ${i.altitude}`,`${i.read} ${i.azimuth}`,`${i.read} ${i.altitude}`,`${i.separation} (°)`,i.agrees],t.readings.flatMap(c=>c.comparisons.map(o=>[c.title,c.reads,e(o.t/1e3),t.witnesses.find(u=>u.title===c.reads)?.phenomena?.[o.sourceId]??o.sourceId,e(o.said?.azimuthDeg),e(o.said?.altitudeDeg),e(o.predicted.azimuthDeg),e(o.predicted.altitudeDeg),e(o.separationDeg),o.agrees?n.yes:n.no]))),r["findings.csv"]=T.table([i.reading,i.reads,i.finding,i.outcome,i.against,i.origin],t.readings.flatMap(c=>c.findings.map(o=>[c.title,c.reads,o.text,n.outcomes[o.outcome],o.outcome==="fails"?n.grounds[o.against??"established"]:"",n.origins[o.written?"written":"computed"]]))),r}static table(t,n){const a=s=>/[",\r\n]/.test(s)?`"${s.replace(/"/g,'""')}"`:s;return[t,...n].map(s=>s.map(a).join(",")).join(`\r
|
|
1
|
+
import{p as W,W as Y,q as Z,t as K,B as H,u as Q,m as P,_ as B,v as J,S as C,w as F}from"./rr0-sighting.mjs";class A{static of(t,n,a,s,i,e=new Date){const r=t.events??[],c=f=>f.url?new URL(f.url,n).href:void 0,o=r.filter(f=>f.eventType==="sighting"&&c(f)),u=o.filter(f=>f.interpretationOf===void 0),p=u.map(f=>A.witnessOf(f,c(f),a.get(c(f)),s)),l=f=>{const w=[f.interpretationOf].flat().filter(b=>typeof b=="string");return u.find(b=>b.id!==void 0&&w.includes(b.id))??u.find(b=>w.includes(a.get(c(b))?.id??""))},m=o.filter(f=>f.interpretationOf!==void 0).map(f=>{const w=l(f),b=w?p[u.indexOf(w)]:void 0;return A.readingOf(f,c(f),a.get(c(f)),b,w?a.get(c(w)):void 0,s,i)}),d=r.filter(f=>f.eventType==="interview").map(f=>{const w=u.find(b=>b.id!==void 0&&[f.interviewOf].flat().includes(b.id));return{title:s.read(f.title)??f.id??"",...w?{witness:p[u.indexOf(w)].title}:{},...f.time?{time:f.time}:{},by:A.names(f.by,s),...f.medium?{medium:f.medium}:{}}});A.placeOnMap(p,m);const g=s.read(t.summary);return{generatedAt:e.toISOString(),case:{...t.id?{id:t.id}:{},...t.title?{title:t.title}:{},...t.time?{time:t.time}:{},url:n,...g?{summary:g}:{}},witnesses:p,readings:m,interviews:d}}static witnessOf(t,n,a,s){const i=s.read(t.title)??s.read(a?.observer?.title)??t.id??n,e={...t.id?{id:t.id}:{},title:i,url:n,...t.time?{time:t.time}:{},indications:[],values:[],sources:[],moments:[]};if(!a)return e;const{recording:r,provenance:c}=W.strip(a),o=s.read(r.description);o&&(e.description=o);const u=r.place?.name;u&&(e.place=u),!e.time&&r.time&&(e.time=r.time),typeof r.durationSeconds=="number"&&(e.durationSeconds=r.durationSeconds),r.instrument&&(e.instrument=r.instrument),e.sources=(r.sources??[]).map(b=>{const v=b,y=s.read(v.title);return{...y?{title:y}:{},...v.authors?.length?{authors:v.authors}:{},...v.publication?.publisher?{publisher:v.publication.publisher}:{},...v.publication?.time?{time:v.publication.time}:{},...v.url?{url:v.url}:{},...v.index?{index:v.index}:{}}}),e.moments=[...r.milestones??[]].sort((b,v)=>b.t-v.t).map(b=>{const v=s.read(b.note);return{t:b.t,label:s.read(b.label)??"",...v?{note:v}:{}}});const p=r.observerTrack?.keyframes?.[0]?.pose,l=r.place?.locations?.[0],m=p?.lat??l?.lat,d=p?.lng??l?.lng;typeof m=="number"&&typeof d=="number"&&Object.assign(e,{lat:m,lng:d}),e.values=A.valuesOf(c,r,()=>!0,s);const g=Y.MODELS[0],f=r.account?.conditions,w=new Map;for(const b of r.timeline?.keyframes??[])for(const v of b.shapes){const y=s.read(v.shape.title);y&&!w.has(v.sourceId)&&w.set(v.sourceId,y)}return e.phenomena=Object.fromEntries(w),(r.timeline?.keyframes??[]).forEach((b,v)=>b.shapes.forEach((y,h)=>{const M=`timeline.keyframes.${v}.shapes.${h}.shape`,E=Z.traced(c,`${M}.aim`),O=Z.traced(c,`${M}.angular`);if(!E&&!O)return;const $=y.shape,x=c.at(`${M}.aim`)??c.at(`${M}.angular`),I={t:b.t,sourceId:y.sourceId,directionSaid:E,sizeSaid:O,...w.has(y.sourceId)?{phenomenon:w.get(y.sourceId)}:{},...$.aim?{aim:{azimuthDeg:$.aim.azimuthDeg,altitudeDeg:$.aim.altitudeDeg}}:{},...$.angular?{angular:$.angular}:{},...x?{basis:x.basis}:{},...x?.rationale?{rationale:s.read(x.rationale)??""}:{},...x?.source?{source:x.source}:{}};if(E&&$.aim){const L=(G,j,R)=>{const V=c.at(`${M}.aim.${R}`)??c.at(`${M}.aim`),q=g.law({kind:G,value:j,basis:V?.basis,how:V?.how},f);return[q.low??j,q.high??j]};I.uncertainty={azimuthDeg:L("heading",$.aim.azimuthDeg,"azimuthDeg"),altitudeDeg:L("elevation",$.aim.altitudeDeg,"altitudeDeg")}}e.indications.push(I)})),e}static readingOf(t,n,a,s,i,e,r){const c={...t.id?{id:t.id}:{},title:e.read(t.title)??e.read(a?.interpretation?.title)??n,url:n,reads:s?.title??"",by:A.names(t.by,e),...t.time?{time:t.time}:{},supposed:[],findings:[],comparisons:[],paths:[]};if(!a)return c;const{recording:o,provenance:u}=W.strip(a),p=e.read(o.description)??e.read(o.summary);p&&(c.description=p),c.supposed=A.valuesOf(u,o,(d,g)=>d.startsWith("interpretation")&&(g==="assumed"||g==="fitted"),e);const l=d=>typeof d=="string"?d:e.read(d)??"";if(c.findings=(o.interpretation?.findings??[]).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!0})),!i)return c;r&&c.findings.push(...r.findingsOf(i,a).map(d=>({text:l(d.text),outcome:d.outcome,...d.against?{against:d.against}:{},written:!1})));const m=o.interpretation?.bodies??[];if(m.length>0)try{const d=Z.forAccount(i);c.sensitivity=d.of(m,u),c.comparisons=d.comparisons(m),c.paths=A.pathsOf(m,i,c.comparisons.map(g=>g.t))}catch{}return c}static pathsOf(t,n,a){const s=K(n),i={heightAt:()=>0},e=r=>H.eyeOf(s,r,i);return t.filter(r=>(r.explains?.length??0)>0).map(r=>{const c=new H(r,i,e),u=[...new Set([...r.track.map(p=>p.t),...a])].sort((p,l)=>p-l).map(p=>({t:p,state:c.at(p)})).filter(p=>p.state!==void 0).map(({t:p,state:l})=>({t:p,eastM:l.eastM,northM:l.northM}));return{bodyId:r.id,points:u}}).filter(r=>r.points.length>0)}static placeOnMap(t,n){const a=t.find(s=>s.lat!==void 0&&s.lng!==void 0);if(a){for(const s of t){if(s.lat===void 0||s.lng===void 0)continue;const i=Q(s.lat,s.lng,a.lat,a.lng);s.at={eastM:i.x,northM:-i.z}}for(const s of n){const i=t.find(e=>e.title===s.reads)?.at;if(!i){s.paths=[];continue}for(const e of s.paths)for(const r of e.points)r.eastM+=i.eastM,r.northM+=i.northM}}}static valuesOf(t,n,a,s){return t.paths().flatMap(i=>{const e=t.at(i);return a(i,e.basis)?[{path:i,value:i.split(".").reduce((r,c)=>r?.[c],n),basis:e.basis,...e.rationale?{rationale:s.read(e.rationale)??""}:{},...e.source?{source:e.source}:{}}]:[]})}static names(t,n){const a=s=>s.replace(/([a-z])([A-Z])/g,"$1 $2");return(t??[]).map(s=>{if("people"in s){const[e,...r]=a(s.people).split(" ");return[...r,e].join(" ")}if("org"in s)return a(s.org);const i=s;return n.read(i.title)??i.id??""}).filter(s=>s!=="")}}class X{constructor(t,n){this.texts=t,this.language=n,this.decimal=new Intl.NumberFormat(n,{maximumFractionDigits:1}),this.signed=new Intl.NumberFormat(n,{maximumFractionDigits:2,signDisplay:"exceptZero"})}decimal;signed;number(t){return t===void 0||!Number.isFinite(t)?"":this.decimal.format(t)}degrees(t){return t===void 0?"":`${this.number(t)}°`}azimuth(t){return t===void 0?"":this.degrees((t%360+360)%360)}instant(t){return`${this.number(t/1e3)} s`}amount(t,n){switch(t){case"azimuth":case"altitude":return`${this.signed.format(n)}°`;case"time":return`${this.signed.format(n/1e3)} s`;default:return`×${new Intl.NumberFormat(this.language,{maximumFractionDigits:2}).format(n)}`}}rests(t){const n=t.source;return[n?[n.said?`interview ${n.said.interview??""} #${n.said.segment}`.replace(" "," "):void 0,typeof n.document=="string"?n.document:void 0,n.at,n.picture,n.tool,n.url].filter(Boolean).join(", "):"",t.rationale].filter(s=>s&&s!=="").join(" : ")}value(t){const n=t.value;return typeof n=="number"?this.number(n):typeof n=="string"?n:Array.isArray(n)?`[${n.length}]`:n===void 0?"":JSON.stringify(n)}robustness(t){const n=this.texts.robustness;return!t||t.compared===0?{kind:"nothing",text:n.nothing}:Z.measurable(t)?t.sufficient===!0?{kind:"sufficient",text:n.sufficient}:t.sufficient===!1?{kind:"fine-tuned",text:n.fineTuned.replace("{knob}",this.texts.knobs[t.margins[0].knob])}:{kind:"unjudged",text:n.unjudged}:{kind:"too-few",text:n.tooFew}}reproduced(t){return t&&t.compared>0?`${Math.round(t.agreement*t.compared)} / ${t.compared}`:""}ends(t){const n=(a,s)=>`${s?"≥ ":""}${this.amount(t.knob,a)}`;return{from:n(t.lower,t.lowerReached),to:n(t.upper,t.upperReached)}}fill(t,n){return t.replace(/\{(\w+)\}/g,(a,s)=>s in n?n[s]:a)}}class T{static FORMAT="ufoathome-case-report";static VERSION=1;static json(t,n){return JSON.stringify({format:T.FORMAT,version:T.VERSION,generator:`UFO@home ${n}`,...t},null,2)}static csv(t,n,a){const s=new X(n,a),i=n.columns,e=c=>c===void 0||!Number.isFinite(c)?"":String(Math.round(c*1e3)/1e3),r={};return r["indications.csv"]=T.table([i.witness,`${i.instant} (s)`,i.phenomenon,`${i.azimuth} (°)`,`${i.altitude} (°)`,`${i.azimuth} min`,`${i.azimuth} max`,`${i.altitude} min`,`${i.altitude} max`,`${i.size} (°)`,i.basis,i.rests],t.witnesses.flatMap(c=>c.indications.map(o=>[c.title,e(o.t/1e3),o.phenomenon??o.sourceId,e(o.aim?.azimuthDeg),e(o.aim?.altitudeDeg),e(o.uncertainty?.azimuthDeg[0]),e(o.uncertainty?.azimuthDeg[1]),e(o.uncertainty?.altitudeDeg[0]),e(o.uncertainty?.altitudeDeg[1]),o.sizeSaid?e(o.angular?.widthDeg):"",o.basis?n.bases[o.basis]:"",s.rests(o)]))),r["values.csv"]=T.table([i.witness,i.reading,i.path,i.value,i.basis,i.rests],[...t.witnesses.flatMap(c=>c.values.map(o=>[c.title,"",o.path,s.value(o),n.bases[o.basis],s.rests(o)])),...t.readings.flatMap(c=>c.supposed.map(o=>[c.reads,c.title,o.path,s.value(o),n.bases[o.basis],s.rests(o)]))]),r["readings.csv"]=T.table([i.reading,i.reads,i.by,i.time,i.reproduced,i.compared,`${i.gap} (°)`,i.robustness,i.supposedCount],t.readings.map(c=>[c.title,c.reads,c.by.join(", "),c.time??"",c.sensitivity&&c.sensitivity.compared>0?String(Math.round(c.sensitivity.agreement*c.sensitivity.compared)):"",c.sensitivity&&c.sensitivity.compared>0?String(c.sensitivity.compared):"",e(c.sensitivity?.medianSeparationDeg),s.robustness(c.sensitivity).text,String(c.supposed.length)])),r["margins.csv"]=T.table([i.reading,i.reads,i.knob,i.from,i.to,`${i.reference} min`,`${i.reference} max`,i.covered],t.readings.flatMap(c=>(c.sensitivity?.margins??[]).map(o=>[c.title,c.reads,n.knobs[o.knob],e(o.lower),e(o.upper),e(o.reference?.lower),e(o.reference?.upper),o.coverage===void 0?"":e(o.coverage)]))),r["comparisons.csv"]=T.table([i.reading,i.reads,`${i.instant} (s)`,i.phenomenon,`${i.said} ${i.azimuth}`,`${i.said} ${i.altitude}`,`${i.read} ${i.azimuth}`,`${i.read} ${i.altitude}`,`${i.separation} (°)`,i.agrees],t.readings.flatMap(c=>c.comparisons.map(o=>[c.title,c.reads,e(o.t/1e3),t.witnesses.find(u=>u.title===c.reads)?.phenomena?.[o.sourceId]??o.sourceId,e(o.said?.azimuthDeg),e(o.said?.altitudeDeg),e(o.predicted.azimuthDeg),e(o.predicted.altitudeDeg),e(o.separationDeg),o.agrees?n.yes:n.no]))),r["findings.csv"]=T.table([i.reading,i.reads,i.finding,i.outcome,i.against,i.origin],t.readings.flatMap(c=>c.findings.map(o=>[c.title,c.reads,o.text,n.outcomes[o.outcome],o.outcome==="fails"?n.grounds[o.against??"established"]:"",n.origins[o.written?"written":"computed"]]))),r}static table(t,n){const a=s=>/[",\r\n]/.test(s)?`"${s.replace(/"/g,'""')}"`:s;return[t,...n].map(s=>s.map(a).join(",")).join(`\r
|
|
2
2
|
`)+`\r
|
|
3
3
|
`}}class D{static COLOURS=["#c2410c","#1d4ed8","#15803d","#7e22ce","#b91c1c","#0f766e"];static WIDTH=640;static HEIGHT=320;static MARGIN={left:44,right:12,top:12,bottom:34};static svg(t,n,a){const s=t.indications.filter(h=>h.directionSaid&&h.aim);if(s.length===0)return;const i=D.circularMean(s.map(h=>h.aim.azimuthDeg)),e=h=>i+((h-i)%360+540)%360-180,r=[];for(const h of s){const{azimuthDeg:M,altitudeDeg:E}=h.uncertainty??{azimuthDeg:[h.aim.azimuthDeg,h.aim.azimuthDeg],altitudeDeg:[h.aim.altitudeDeg,h.aim.altitudeDeg]};r.push({x:e(h.aim.azimuthDeg),y:h.aim.altitudeDeg}),r.push({x:e(h.aim.azimuthDeg)+(M[0]-h.aim.azimuthDeg),y:E[0]}),r.push({x:e(h.aim.azimuthDeg)+(M[1]-h.aim.azimuthDeg),y:E[1]})}for(const h of n)for(const M of h.comparisons)r.push({x:e(M.predicted.azimuthDeg),y:M.predicted.altitudeDeg});const c=r.map(h=>h.x),o=r.map(h=>h.y),[u,p]=D.padded(Math.min(...c),Math.max(...c),10),[l,m]=D.padded(Math.max(-10,Math.min(...o)),Math.min(90,Math.max(...o)),5),d=D.MARGIN,g=D.WIDTH-d.left-d.right,f=D.HEIGHT-d.top-d.bottom,w=h=>d.left+(h-u)/(p-u)*g,b=h=>d.top+(1-(h-l)/(m-l))*f,v=h=>Math.round(h*10)/10,y=[];for(const h of D.ticks(u,p))y.push(`<line x1="${v(w(h))}" y1="${d.top}" x2="${v(w(h))}" y2="${d.top+f}" class="grid"/>`),y.push(`<text x="${v(w(h))}" y="${d.top+f+14}" text-anchor="middle" class="tick">${a.number((h%360+360)%360)}°</text>`);for(const h of D.ticks(l,m))y.push(`<line x1="${d.left}" y1="${v(b(h))}" x2="${d.left+g}" y2="${v(b(h))}" class="${h===0?"horizon":"grid"}"/>`),y.push(`<text x="${d.left-6}" y="${v(b(h))+4}" text-anchor="end" class="tick">${a.number(h)}°</text>`);y.push(`<text x="${d.left+g/2}" y="${D.HEIGHT-4}" text-anchor="middle" class="axis">${a.texts.azimuth}</text>`),y.push(`<text x="12" y="${d.top+f/2}" text-anchor="middle" class="axis" transform="rotate(-90 12 ${d.top+f/2})">${a.texts.altitude}</text>`);for(const h of s){const M=h.uncertainty;if(!M)continue;const E=e(h.aim.azimuthDeg),O=w(E+M.azimuthDeg[0]-h.aim.azimuthDeg),$=w(E+M.azimuthDeg[1]-h.aim.azimuthDeg);y.push(`<rect x="${v(Math.min(O,$))}" y="${v(b(M.altitudeDeg[1]))}" width="${v(Math.abs($-O))}" height="${v(Math.max(1,b(M.altitudeDeg[0])-b(M.altitudeDeg[1])))}" class="uncertainty"/>`)}n.forEach((h,M)=>{const E=D.COLOURS[M%D.COLOURS.length];for(const O of h.comparisons){const $=w(e(O.predicted.azimuthDeg)),x=b(O.predicted.altitudeDeg);O.said&&y.push(`<line x1="${v(w(e(O.said.azimuthDeg)))}" y1="${v(b(O.said.altitudeDeg))}" x2="${v($)}" y2="${v(x)}" stroke="${E}" class="gap"/>`),y.push(D.mark(M,$,x,E,O.agrees))}});for(const h of s)y.push(`<circle cx="${v(w(e(h.aim.azimuthDeg)))}" cy="${v(b(h.aim.altitudeDeg))}" r="4" class="said"><title>${a.instant(h.t)}</title></circle>`);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${D.WIDTH} ${D.HEIGHT}" role="img" class="sky">${y.join("")}</svg>`}static mark(t,n,a,s,i){const r=o=>Math.round(o*10)/10,c=i?s:"none";switch(t%3){case 0:return`<path d="M${r(n-5)} ${r(a-5)}L${r(n+5)} ${r(a+5)}M${r(n-5)} ${r(a+5)}L${r(n+5)} ${r(a-5)}" stroke="${s}" stroke-width="${i?2.4:1.2}"/>`;case 1:return`<rect x="${r(n-5)}" y="${r(a-5)}" width="10" height="10" stroke="${s}" fill="${c}" stroke-width="1.4"/>`;default:return`<path d="M${r(n)} ${r(a-5-1)}L${r(n+5+1)} ${r(a+5)}L${r(n-5-1)} ${r(a+5)}Z" stroke="${s}" fill="${c}" stroke-width="1.4"/>`}}static legendMark(t){const n=D.COLOURS[t%D.COLOURS.length];return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14" aria-hidden="true">${D.mark(t,7,7,n,!0)}</svg>`}static circularMean(t){const n=Math.PI/180,a=t.reduce((i,e)=>i+Math.cos(e*n),0),s=t.reduce((i,e)=>i+Math.sin(e*n),0);return Math.atan2(s,a)/n}static padded(t,n,a){const s=Math.max(n-t,a),i=(t+n)/2;return[i-s/2-s*.08,i+s/2+s*.08]}static ticks(t,n){const a=n-t,s=[1,2,5,10,15,20,30,45,90].find(e=>a/e<=10)??90,i=[];for(let e=Math.ceil(t/s)*s;e<=n;e+=s)i.push(e);return i}}class k{static SIZE=520;static count=0;static MARGIN=28;static svg(t,n,a){const s=t.filter($=>$.at);if(s.length===0)return;const i=n.filter($=>$.paths.length>0),e=[...s.map($=>$.at),...i.flatMap($=>$.paths.flatMap(x=>x.points))],r=e.map($=>$.eastM),c=e.map($=>$.northM),o=Math.max(200,Math.max(...r)-Math.min(...r),Math.max(...c)-Math.min(...c))*1.25,u=(Math.max(...r)+Math.min(...r))/2,p=(Math.max(...c)+Math.min(...c))/2,l=k.SIZE-2*k.MARGIN,m=$=>k.MARGIN+($-u+o/2)/o*l,d=$=>k.MARGIN+(1-($-p+o/2)/o)*l,g=$=>Math.round($*10)/10,f=o*.75,w=Math.PI/180,b=($,x)=>({eastM:$.eastM+f*Math.sin(x*w),northM:$.northM+f*Math.cos(x*w)}),v=`plan-clip-${k.count++}`,y=[`<defs><clipPath id="${v}"><rect x="${k.MARGIN}" y="${k.MARGIN}" width="${l}" height="${l}"/></clipPath></defs>`,`<rect x="${k.MARGIN}" y="${k.MARGIN}" width="${l}" height="${l}" class="frame"/>`,`<g clip-path="url(#${v})">`];for(const $ of s)for(const x of $.indications){if(!x.directionSaid||!x.aim)continue;const I=$.at,L=x.uncertainty?.azimuthDeg;if(L&&L[1]-L[0]<180){const j=b(I,L[0]),R=b(I,L[1]);y.push(`<path d="M${g(m(I.eastM))} ${g(d(I.northM))}L${g(m(j.eastM))} ${g(d(j.northM))}L${g(m(R.eastM))} ${g(d(R.northM))}Z" class="fan"/>`)}const G=b(I,x.aim.azimuthDeg);y.push(`<line x1="${g(m(I.eastM))}" y1="${g(d(I.northM))}" x2="${g(m(G.eastM))}" y2="${g(d(G.northM))}" class="sight"><title>${a.instant(x.t)}</title></line>`)}i.forEach($=>{const x=D.COLOURS[n.indexOf($)%D.COLOURS.length];for(const I of $.paths){const L=I.points.map((j,R)=>`${R===0?"M":"L"}${g(m(j.eastM))} ${g(d(j.northM))}`).join("");y.push(`<path d="${L}" stroke="${x}" class="track"/>`);const G=I.points[I.points.length-1];y.push(`<circle cx="${g(m(G.eastM))}" cy="${g(d(G.northM))}" r="2.5" fill="${x}"/>`)}}),y.push("</g>");const h=[];for(const $ of s){const x=h.find(I=>Math.hypot(I.at.eastM-$.at.eastM,I.at.northM-$.at.northM)<o/100);x?x.names.push($.title):h.push({at:$.at,names:[$.title]})}for(const $ of h)y.push(`<circle cx="${g(m($.at.eastM))}" cy="${g(d($.at.northM))}" r="4.5" class="witness"/>`),y.push(`<text x="${g(m($.at.eastM)+7)}" y="${g(d($.at.northM)-7)}" class="name">${k.escape($.names.join(", "))}</text>`);const M=k.round(o/5),E=M/o*l,O=k.SIZE-10;return y.push(`<line x1="${k.MARGIN}" y1="${O}" x2="${g(k.MARGIN+E)}" y2="${O}" class="scale"/>`),y.push(`<text x="${g(k.MARGIN+E+6)}" y="${O+4}" class="tick">${k.escape(a.fill(a.texts.scale,{metres:a.number(M)}))}</text>`),y.push(`<path d="M${k.SIZE-18} 34L${k.SIZE-12} 18L${k.SIZE-6} 34Z" class="north"/><text x="${k.SIZE-12}" y="14" text-anchor="middle" class="tick">N</text>`),`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${k.SIZE} ${k.SIZE}" role="img" class="plan">${y.join("")}</svg>`}static round(t){const n=10**Math.floor(Math.log10(t));return[5,2,1].map(a=>a*n).find(a=>a<=t)??n}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}class S{static WIDTH=640;static HEIGHT=74;static LEFT=16;static RIGHT=16;static svg(t,n){const a=t.indications.map(l=>l.t),s=t.moments;if(a.length===0&&s.length===0)return;const i=Math.max(1e3,(t.durationSeconds??0)*1e3,...a,...s.map(l=>l.t)),e=S.WIDTH-S.LEFT-S.RIGHT,r=l=>S.LEFT+l/i*e,c=l=>Math.round(l*10)/10,o=40,u=[`<line x1="${S.LEFT}" y1="${o}" x2="${S.LEFT+e}" y2="${o}" class="axis-line"/>`],p=[.5,1,2,5,10,15,30,60,120,300,600].find(l=>i/1e3/l<=10)??600;for(let l=0;l*1e3<=i;l+=p)u.push(`<line x1="${c(r(l*1e3))}" y1="${o-3}" x2="${c(r(l*1e3))}" y2="${o+3}" class="axis-line"/>`),u.push(`<text x="${c(r(l*1e3))}" y="${o+16}" text-anchor="middle" class="tick">${n.instant(l*1e3)}</text>`);for(const l of s)u.push(`<line x1="${c(r(l.t))}" y1="8" x2="${c(r(l.t))}" y2="${o}" class="moment"/>`),u.push(`<text x="${c(r(l.t)+3)}" y="16" class="moment-label">${S.escape(l.label)}${l.note?`<title>${S.escape(l.note)}</title>`:""}</text>`);for(const l of a)u.push(`<circle cx="${c(r(l))}" cy="${o}" r="3.5" class="said"><title>${n.instant(l)}</title></circle>`);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${S.WIDTH} ${S.HEIGHT}" role="img" class="timeline">${u.join("")}</svg>`}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}}class z{static CSS=`
|
|
4
4
|
:root { color-scheme: light; --ink: #1b1d22; --dim: #5b6070; --line: #d6d9e0; --ok: #15803d; --warn: #b45309; --error: #b91c1c; }
|
|
@@ -62,4 +62,4 @@ ${o.join(`
|
|
|
62
62
|
`)}
|
|
63
63
|
</body>
|
|
64
64
|
</html>
|
|
65
|
-
`}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}const _=P.catalog({en:()=>B(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>B(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>B(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>B(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),J.load(a)]),o=A.of(n.caseJson,n.caseUrl,n.recordings,new C([...s]),new F(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.
|
|
65
|
+
`}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}const _=P.catalog({en:()=>B(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>B(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>B(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>B(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),J.load(a)]),o=A.of(n.caseJson,n.caseUrl,n.recordings,new C([...s]),new F(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.204.0")],{type:"text/html"}),`${u}.html`);return;case"print":U.print(z.of(o,r,a,"0.204.0"));return;case"json":U.download(new Blob([T.json(o,"0.204.0")],{type:"application/json"}),`${u}.json`);return;case"csv":{const{zipSync:p,strToU8:l}=await B(async()=>{const{zipSync:d,strToU8:g}=await import("./browser-CltifEM0.js");return{zipSync:d,strToU8:g}},[],import.meta.url),m=Object.fromEntries(Object.entries(T.csv(o,r,a)).map(([d,g])=>[d,l(`\uFEFF${g}`)]));U.download(new Blob([p(m)],{type:"application/zip"}),`${u}-tables.zip`)}}}static PICTURED_INSTANTS=3;static async pictures(t,n,a,s){const{registerScene:i,SCENE_ELEMENT_NAME:e}=await B(async()=>{const{registerScene:p,SCENE_ELEMENT_NAME:l}=await import("./rr0-sighting.mjs").then(m=>m.c4);return{registerScene:p,SCENE_ELEMENT_NAME:l}},[],import.meta.url);i();const r=t.witnesses.map(p=>{const l=p.indications.filter(f=>f.directionSaid).map(f=>f.t),m=l.length<=U.PICTURED_INSTANTS?l:[l[0],l[Math.floor(l.length/2)],l[l.length-1]],d=t.readings.filter(f=>f.reads===p.title&&f.comparisons.length>0),g=[{label:a.accountView,url:p.url,reading:void 0},...d.map(f=>({label:f.title,url:p.url,reading:f.url}))];return{witness:p,instants:[...new Set(m)],recordings:g}}).filter(p=>p.instants.length>0),c=r.reduce((p,l)=>p+l.instants.length*l.recordings.length,0);if(c===0)return;const o=document.createElement(e);o.setAttribute("max-pixel-ratio","1"),o.setAttribute("always-live",""),Object.assign(o.style,{position:"fixed",left:"-10000px",top:"0",width:"640px",height:"360px",visibility:"hidden",pointerEvents:"none"}),document.body.appendChild(o);let u=0;s?.(u,c);try{for(const p of r){const l=p.instants.map(d=>({t:d,views:[]})),m=n.recordings.get(p.witness.url);m&&(o.documentUrl=p.witness.url,o.sightingData=m);for(const d of p.recordings){const g=m,f=d.reading?n.recordings.get(d.reading):void 0;for(const w of l){let b;g&&(!d.reading||f)&&(w===l[0]&&(o.interpretation=U.bodiesOf(f??g,d.reading??p.witness.url)),b=await o.pictureAt(w.t,480).catch(()=>{})),w.views.push({label:d.label,...b?{image:b}:{}}),s?.(++u,c)}}p.witness.pictures=l}}finally{o.remove()}}static bodiesOf(t,n){const a=W.strip(t).recording.interpretation;if(a)return{...a,bodies:a.bodies.map(s=>s.model?.url?{...s,model:{...s.model,url:new URL(s.model.url,n).href}}:s)}}static print(t){const n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),n.style.cssText="position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0",n.addEventListener("load",()=>{const a=n.contentWindow;a&&(a.addEventListener("afterprint",()=>n.remove()),a.focus(),a.print(),window.setTimeout(()=>n.remove(),6e4))},{once:!0}),n.srcdoc=t,document.body.append(n)}static download(t,n){const a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=n,s.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e3)}}export{U as CaseReportExport};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as F,
|
|
1
|
+
import{G as F,a3 as m,a6 as I,Z as X,aq as D,ar as L}from"./rr0-sighting.mjs";import{C as x}from"./ContrailGrowth-DwHS8If9.js";class h{static MAX_SEGMENTS=8e3;static MIN_PIXELS=2;static UNRESOLVED_CONTRAST=.5;static STATIONS=[0,.5,1,1.5,2.25];static VERTICES_PER_SEGMENT=12*(h.STATIONS.length-1);static ICE_ASYMMETRY=.75;static phase(t){const s=h.ICE_ASYMMETRY;return(1-s*s)/(1+s*s-2*s*t)**1.5}object;group=new F;trails=[];positions=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*3);colors=new Float32Array(h.MAX_SEGMENTS*h.VERTICES_PER_SEGMENT*4);segments=0;constructor(){const t=new m;t.setAttribute("position",new I(this.positions,3)),t.setAttribute("color",new I(this.colors,4)),t.setDrawRange(0,0),this.object=new X(t,new D({vertexColors:!0,transparent:!0,depthWrite:!1,side:L})),this.object.frustumCulled=!1,this.object.name="contrails",this.group.name="contrails",this.group.add(this.object)}get segmentCount(){return this.segments}set(t){this.trails=t}update(t,s,c){let p=0;this.segments=0;for(const o of this.trails){const u=this.samplesOf(o,t,s),i=c(o.id);for(let a=0;a+1<u.length;a++){const n=u[a],M=u[a+1];if(!n.forms||!M.forms)continue;if(this.segments>=h.MAX_SEGMENTS)break;const d=this.pushSegment(p,n,M,o.spanM,i,s);d>p&&this.segments++,p=d}}const y=this.object.geometry;y.setDrawRange(0,p);for(const[o,u]of[["position",3],["color",4]]){const i=y.getAttribute(o);i.clearUpdateRanges(),p>0&&i.addUpdateRange(0,p*u),i.needsUpdate=!0}}samplesOf(t,s,c){const p=s-x.FORMATION_S*1e3,y=[],o=(n,M,d,T,l,N)=>({x:M+n.driftEastMs*l+c.origin.x,y:T,z:-(d+n.driftNorthMs*l)+c.origin.z,age:l,forms:N,point:n});let u=-1;t.points.forEach((n,M)=>{n.tMs>p||(u=M,y.push(o(n,n.eastM,n.northM,n.upM,(s-n.tMs)/1e3,n.forms)))});const i=t.points[u],a=t.points[u+1];if(i&&a){const n=(p-i.tMs)/(a.tMs-i.tMs),M=(d,T)=>d+(T-d)*n;y.push(o(i,M(i.eastM,a.eastM),M(i.northM,a.northM),M(i.upM,a.upM),x.FORMATION_S,i.forms&&a.forms))}return y}pushSegment(t,s,c,p,y,o){const u=e=>({persistent:e.point.persistent,lifetimeS:e.point.lifetimeS,spanM:p,shearPerS:e.point.shearPerS,saturatedForS:e.point.saturatedForS}),i=x.opacity(s.age,u(s)),a=x.opacity(c.age,u(c));if(i<=0&&a<=0)return t;const n={x:c.x-s.x,y:c.y-s.y,z:c.z-s.z};if(Math.hypot(n.x,n.y,n.z)<1e-6)return t;const M={x:(s.x+c.x)/2-o.eye.x,y:(s.y+c.y)/2-o.eye.y,z:(s.z+c.z)/2-o.eye.z},d=this.normalise(this.cross(n,M)),T=e=>{if(!o.sun)return y;const r={x:e.x-o.eye.x,y:e.y-o.eye.y,z:e.z-o.eye.z},E=h.phase((o.sun.x*r.x+o.sun.y*r.y+o.sun.z*r.z)/(Math.hypot(r.x,r.y,r.z)||1));return[y[0]*E,y[1]*E,y[2]*E]},l=(e,r)=>{const E=Math.hypot(e.x-o.eye.x,e.y-o.eye.y,e.z-o.eye.z),A=x.widthM(p,e.age,e.point.shearPerS),g=Math.max(A,h.MIN_PIXELS*o.pixelRad*E),z=r*(A/g)**h.UNRESOLVED_CONTRAST,S=x.profileExponent(e.age),G=h.STATIONS.map((j,P)=>P===h.STATIONS.length-1?0:z*Math.exp(-Math.LN2*j**S));return{half:g/2,profile:G,scattered:T(e)}},N=[{sample:s,...l(s,i)},{sample:c,...l(c,a)}],w=h.STATIONS.length-1,f=(e,r,E)=>{const A=h.STATIONS[r],g=e.half*A*E,z=t*3;this.positions[z]=e.sample.x+d.x*g,this.positions[z+1]=e.sample.y+d.y*g,this.positions[z+2]=e.sample.z+d.z*g;const S=t*4;this.colors[S]=e.scattered[0],this.colors[S+1]=e.scattered[1],this.colors[S+2]=e.scattered[2],this.colors[S+3]=e.profile[r],t++},[R,O]=N;for(const e of[-1,1])for(let r=0;r<w;r++)f(R,r+1,e),f(R,r,e),f(O,r+1,e),f(R,r,e),f(O,r,e),f(O,r+1,e);return t}cross(t,s){return{x:t.y*s.z-t.z*s.y,y:t.z*s.x-t.x*s.z,z:t.x*s.y-t.y*s.x}}normalise(t){const s=Math.hypot(t.x,t.y,t.z)||1;return{x:t.x/s,y:t.y/s,z:t.z/s}}dispose(){this.object.geometry.dispose(),this.object.material.dispose(),this.group.removeFromParent()}}export{h as ContrailSystem};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{K as A,Y as D,av as E,a0 as F,aw as y,ax as R,ay as P,Z as U,E as k,az as S,ae as b}from"./rr0-sighting.mjs";class w{target;wideCamera=new A;materials=new Map;draw(t){const{renderer:s,camera:r,equidistant:a}=t,i=s.getDrawingBufferSize(new D),n=i.x,o=i.y,e=n/o;if(a&&!E.supports(r.fov,e))throw new Error(`A field of ${r.fov}° is drawn through a cube, which the control passes do not follow yet: export through a narrower field.`);const c=this.sourceCamera(r,a?a.sourceFovDeg(r.fov,e):r.fov),d=this.usableTarget(n,o),l=this.drawDistance(t,c,d),u=this.drawPhenomenon(t,c,d),f=Math.tan(c.fov*Math.PI/360),h=new Float32Array(n*o),p=new Uint8Array(n*o);for(let v=0;v<o;v++)for(let g=0;g<n;g++){const m=this.sourcePixel(g,v,n,o,r.fov,e,f,a);if(m<0)continue;const x=v*n+g;h[x]=l[m*4];const M=u[m*4],T=u[m*4+1],C=u[m*4+2],_=u[m*4+3];p[x]=Math.max(M,T,C,_)>w.LIGHT_THRESHOLD?255:0}return{width:n,height:o,distanceM:h,phenomenon:p}}dispose(){this.target?.dispose();for(const t of this.materials.values())t.dispose();this.materials.clear()}static LIGHT_THRESHOLD=1e-6;sourcePixel(t,s,r,a,i,n,o,e){if(!e)return(a-1-s)*r+t;const c=(t+.5)/r*2-1,d=1-(s+.5)/a*2,l=e.directionFor(c,d,i);if(l.z>=0)return-1;const u=l.x/-l.z/(o*n),f=l.y/-l.z/o,h=Math.floor((u+1)/2*r),p=Math.floor((f+1)/2*a);return h<0||h>=r||p<0||p>=a?-1:p*r+h}sourceCamera(t,s){const r=this.wideCamera.copy(t);return r.fov=s,r.clearViewOffset(),r.updateProjectionMatrix(),r.updateMatrixWorld(),r}usableTarget(t,s){return this.target?(this.target.width!==t||this.target.height!==s)&&this.target.setSize(t,s):this.target=new F(t,s,{type:P,format:R,minFilter:y,magFilter:y,depthBuffer:!0}),this.target}drawDistance(t,s,r){const{renderer:a,scene:i}=t,n=[],o=[];for(const e of t.sky)e.visible&&(e.visible=!1,n.push(e));i.traverseVisible(e=>{if(e instanceof U){if(t.isSolid(e)){o.push({mesh:e,material:e.material}),e.material=Array.isArray(e.material)?e.material.map(c=>this.distanceMaterial(c)):this.distanceMaterial(e.material);return}}else if(!e.isPoints&&!e.isLine&&!e.isSprite)return;n.push(e)});for(const e of n)e.visible=!1;try{return this.drawInto(t,r,()=>a.render(i,s))}finally{for(const e of n)e.visible=!0;for(const{mesh:e,material:c}of o)e.material=c}}drawPhenomenon(t,s,r){return this.drawInto(t,r,()=>t.drawPhenomena(s))}drawInto(t,s,r){const{renderer:a,scene:i}=t,n=a.getRenderTarget(),o=a.autoClear,e=a.shadowMap.autoUpdate,c=i.fog,d=i.background,l=a.getClearAlpha(),u=a.getClearColor(new k);i.fog=null,i.background=null,a.shadowMap.autoUpdate=!1,a.setRenderTarget(s),a.setClearColor(0,0),a.clear(!0,!0,!0),a.autoClear=!1;try{r();const f=new Float32Array(s.width*s.height*4);return S.now(a,s,0,0,s.width,s.height,f),f}finally{a.autoClear=o,a.shadowMap.autoUpdate=e,a.setRenderTarget(n),a.setClearColor(u,l),i.fog=c,i.background=d}}distanceMaterial(t){const s=t.alphaTest??0,r=t.map??t.alphaMap??null,a=s>0&&r!==null,i=`${t.side}:${a?`${r.uuid}:${s}`:"-"}`;let n=this.materials.get(i);return n||(n=new b({defines:a?{CUTOUT:"",USE_UV:""}:{},uniforms:{cutoutMap:{value:r},cutoutAlpha:{value:s}},vertexShader:w.VERTEX,fragmentShader:w.FRAGMENT,side:t.side}),this.materials.set(i,n)),n}static VERTEX=`
|
|
2
|
+
#include <common>
|
|
3
|
+
#include <uv_pars_vertex>
|
|
4
|
+
#include <batching_pars_vertex>
|
|
5
|
+
#include <morphtarget_pars_vertex>
|
|
6
|
+
#include <skinning_pars_vertex>
|
|
7
|
+
varying float vDistance;
|
|
8
|
+
void main() {
|
|
9
|
+
#include <uv_vertex>
|
|
10
|
+
#include <batching_vertex>
|
|
11
|
+
#include <skinbase_vertex>
|
|
12
|
+
#include <begin_vertex>
|
|
13
|
+
#include <morphtarget_vertex>
|
|
14
|
+
#include <skinning_vertex>
|
|
15
|
+
#include <project_vertex>
|
|
16
|
+
vDistance = length(mvPosition.xyz);
|
|
17
|
+
}
|
|
18
|
+
`;static FRAGMENT=`
|
|
19
|
+
#include <uv_pars_fragment>
|
|
20
|
+
uniform sampler2D cutoutMap;
|
|
21
|
+
uniform float cutoutAlpha;
|
|
22
|
+
varying float vDistance;
|
|
23
|
+
void main() {
|
|
24
|
+
#ifdef CUTOUT
|
|
25
|
+
if (texture2D(cutoutMap, vUv).a < cutoutAlpha) discard;
|
|
26
|
+
#endif
|
|
27
|
+
gl_FragColor = vec4(vDistance, 0.0, 0.0, 1.0);
|
|
28
|
+
}
|
|
29
|
+
`}export{w as ControlPasses};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{x as o}from"./rr0-sighting.mjs";const l=[{id:"when",paths:["time"]},{id:"where",paths:["place.locations.*.lat","place.locations.*.lng","observerTrack.keyframes.*.pose.lat","observerTrack.keyframes.*.pose.lng"]},{id:"facing",paths:["observerTrack.keyframes.*.pose.headingDeg"]},{id:"apparent-size",paths:["timeline.keyframes.*.shapes.*.shape.angular.widthDeg","timeline.keyframes.*.shapes.*.shape.angular.heightDeg"]},{id:"sky-position",paths:["timeline.keyframes.*.shapes.*.shape.aim.azimuthDeg","timeline.keyframes.*.shapes.*.shape.aim.altitudeDeg"]},{id:"how-long",paths:["durationSeconds","endTime"]},{id:"appearance",paths:["timeline.keyframes.*.shapes.*.shape.kind","timeline.keyframes.*.shapes.*.shape.title","timeline.keyframes.*.shapes.*.shape.color","timeline.keyframes.*.shapes.*.shape.brightness"]},{id:"movement",paths:["timeline.keyframes.1.t","observerTrack.keyframes.1.t"]},{id:"sound",paths:["soundTrack.keyframes.*.sound.kind"]},{id:"conditions",paths:["weatherTrack.keyframes.*.weather.*","weather.*"]}],d=["fitted","assumed","derived","stated","measured","established"];class p{about="observer";async assess(a){const i=o(a,!0),s=l.map(e=>p.answer(e,i,a));return{score:s.filter(e=>e.basis==="stated").length/s.length,criteria:s}}static answer(a,i,s){const e=a.paths.flatMap(t=>p.resolve(t,i));if(e.length===0)return{id:a.id,paths:[]};const r=e.map(t=>p.basisAt(t,s)??"stated");return{id:a.id,basis:d.find(t=>r.includes(t)),paths:e}}static basisAt(a,i){const s=a.split(".");for(let e=s.length;e>0;e--){const r=i.provenance.at(s.slice(0,e).join("."))?.basis;if(r)return r}}static resolve(a,i){let s=[{path:[],value:i}];for(const e of a.split("."))s=s.flatMap(({path:r,value:t})=>{if(typeof t!="object"||t===null)return[];if(e!=="*"){const n=t[e];return n===void 0?[]:[{path:[...r,e],value:n}]}return Object.entries(t).filter(([,n])=>n!==void 0).map(([n,h])=>({path:[...r,n],value:h}))});return s.filter(({value:e})=>e!==null&&e!==""&&!(Array.isArray(e)&&e.length===0)).map(({path:e})=>e.join("."))}}export{p as CoverageAssessor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{m as g,_ as h,aN as x,aO as v,aS as P,aQ as _,aR as w}from"./rr0-sighting.mjs";import{S as T,P as m,a as f,E as O}from"./ParameterForm-BghOJXLP.js";import{D as p}from"./DroneParameters-91BBY10Y.js";import{T as I}from"./TimelineTracks-Cw7W2uiK.js";import"./DroneFlight-sMbiog9j.js";const b=g.catalog({en:()=>h(()=>import("./DroneParameterTexts_en-sL1dR2RG.js"),[],import.meta.url).then(o=>o.droneParameterTexts_en),fr:()=>h(()=>import("./DroneParameterTexts_fr-B8Ym7Yz6.js"),[],import.meta.url).then(o=>o.droneParameterTexts_fr),es:()=>h(()=>import("./DroneParameterTexts_es-Bg8_8XVE.js"),[],import.meta.url).then(o=>o.droneParameterTexts_es),it:()=>h(()=>import("./DroneParameterTexts_it-DfvWjvoc.js"),[],import.meta.url).then(o=>o.droneParameterTexts_it)}),y=g.catalog({en:()=>h(()=>import("./DroneEditorMessages_en-BViHK30c.js"),[],import.meta.url).then(o=>o.droneEditorMessages_en),fr:()=>h(()=>import("./DroneEditorMessages_fr-CvV0RyOT.js"),[],import.meta.url).then(o=>o.droneEditorMessages_fr),es:()=>h(()=>import("./DroneEditorMessages_es-D6bhIOAa.js"),[],import.meta.url).then(o=>o.droneEditorMessages_es),it:()=>h(()=>import("./DroneEditorMessages_it-CYi-jmVN.js"),[],import.meta.url).then(o=>o.droneEditorMessages_it)});class d{constructor(t,i,e){this.container=t,this.host=i,T.attach(t,"drone-editor-part",d.STYLE),this.language=e,x.of("drones")||p.publish(),this.ready=this.setLanguage(e)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;pointForm;pointIndex=0;language;shown=[];static STYLE='.drone-editor-part { flex-basis: 100%; min-width: 0; } .drone-editor-part #drone-list, .drone-editor-part #drone-timeline { flex-basis: 100%; min-width: 0; } .drone-editor-part #drone-timeline { padding: 4px 0; } .drone-editor-part #drone-path > .icon-btn { align-self: flex-end; } .drone-editor-part .launch-editor, .drone-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .drone-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .drone-editor-part [hidden] { display: none !important; } .drone-editor-part select { min-width: 0; width: 100%; } .drone-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .drone-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .drone-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .drone-editor-part input, .drone-editor-part select { max-width: 100%; box-sizing: border-box; } .drone-editor-part input[type="text"] { width: 12em; } .drone-editor-part label { min-width: 0; max-width: 100%; } .drone-editor-part input.parameter-derived::placeholder { opacity: .65; } .drone-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';static PATH_COLOR="#3b82c4";async setLanguage(t){const i=++this.languageToken;this.language=t;const[e,s]=await Promise.all([y.load(t),b.load(t)]);i===this.languageToken&&(this.messages=e,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.flights;this.shown=[...t],t.some(s=>s.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const i=this.current;if(this.element("drone-fields").hidden=i===void 0,!i)return;const e=this.element("drone-each");e.hidden=i.explainsEach===void 0,e.textContent=this.messages.explainsEachNote.replace("{n}",String(i.explainsEach?.length??0)),this.form??=new m(this.element("drone-parameters"),this.language,"drones.",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(this.resolved(p.SET),new f(()=>this.current,s=>this.editFlight(n=>s(n)),()=>({shapes:this.host.shapes().map(s=>({value:s.id,label:s.label}))}),this.host.positionPlace?.()),()=>this.written()),this.syncPoint(!0)}refresh(){if(!this.messages)return;this.syncAddState();const t=this.flights;if(t.length===this.shown.length&&t.every((i,e)=>i.id===this.shown[e].id)){this.syncTimeline();return}this.sync()}setTime(t){this.messages&&this.timeline?.setTime(t)}syncAddState(){const t=this.frontOfObserver()!==void 0;this.list?.setAddState(t,t?void 0:this.messages.addNowhere)}get current(){return this.flights.find(t=>t.id===this.currentId)}resolved(t){return v.resolve(t,this.parameterTexts)}render(){if(!this.messages)return;const t=this.messages;this.form=void 0,this.pointForm=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
2
|
<p class="launch-intro">${t.intro}</p>
|
|
3
3
|
<div id="drone-list"></div>
|
|
4
4
|
<div id="drone-fields" class="launch-fields">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aU as o,
|
|
1
|
+
import{aU as o,aN as f}from"./rr0-sighting.mjs";import{D as c,a,b}from"./DroneFlight-sMbiog9j.js";class e{static DRONE="drone";static FLIGHT="flight";static LOOK="look";static LIGHT_NAMES=[...new Set(c.ALL.flatMap(t=>Object.keys(t.lights)))];static textKey(t){return t.replace(/-([a-z])/g,(l,s)=>s.toUpperCase())}static flightOf(t){return t}static ownLight(t,l){return a.airframeOf(e.flightOf(t)).lights[l]}static formationUnstated(t){return(o.read(t,"count")??1)>1?"cluster":"single"}static formationOf(t){const l=o.read(t,"formation.kind");return typeof l=="string"?l:e.formationUnstated(t)}static hovers(t){return a.airframeOf(e.flightOf(t)).hovers}static light(t){const l=e.textKey(t),s=i=>e.ownLight(i,t)!==void 0,h=i=>{const u=e.flightOf(i).lights?.[t];return u===!1?!0:typeof u?.off=="boolean"?u.off:e.ownLight(i,t)?.off===!0},n=i=>s(i)&&!h(i);return[{type:"boolean",key:`lights.${t}.off`,group:l,label:"switchedOff",visibleWhen:s,effective:i=>e.flightOf(i).lights?.[t]===!1||e.ownLight(i,t)?.off===!0},{type:"colour",key:`lights.${t}.color`,group:l,label:"colour",visibleWhen:n,effective:i=>e.ownLight(i,t)?.color},{type:"number",key:`lights.${t}.candela`,min:0,max:1e5,step:.1,unit:"cd",group:l,label:"intensity",hint:"eachLed",visibleWhen:n,effective:i=>e.ownLight(i,t)?.candela},{type:"number",key:`lights.${t}.hz`,min:0,max:50,step:.05,unit:"Hz",group:l,label:"flashesASecond",hint:"steadyAtNought",visibleWhen:n,effective:i=>e.ownLight(i,t)?.hz??0},{type:"number",key:`lights.${t}.flashS`,min:.001,max:60,step:.001,unit:"s",group:l,label:"eachFlashLasts",visibleWhen:i=>n(i)&&(o.read(i,`lights.${t}.hz`)??e.ownLight(i,t)?.hz??0)>0,effective:i=>{const u=e.ownLight(i,t),p=o.read(i,`lights.${t}.hz`)??u?.hz??0;return u?.flashS??(p>0?Math.round(500/p)/1e3:void 0)}}]}static SET={kind:"drones",title:"drones",parameters:[{type:"said",key:"title",label:"name",group:e.DRONE},{type:"choice",key:"airframe",required:!0,group:e.DRONE,label:"airframe",choices:c.ALL.map(t=>({value:t.id,label:e.textKey(t.id)}))},{type:"number",key:"count",min:1,max:2e3,step:1,group:e.DRONE,effective:()=>1,label:"howMany"},{type:"set",key:"explains",group:e.DRONE,label:"standForTheShapes",hint:"theWholeGroupTakenForOne",visibleWhen:t=>e.flightOf(t).explainsEach===void 0,options:(t,l)=>{const s=l?.shapes??[],h=(e.flightOf(t).explains??[]).filter(n=>!s.some(i=>i.value===n));return[...s,...h.map(n=>({value:n,label:n}))]},empty:"noShape"},{type:"number",key:"seed",min:0,max:4294967295,step:1,group:e.DRONE,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFrom"},{type:"choice",key:"formation.kind",group:e.FLIGHT,label:"pattern",effective:t=>e.formationUnstated(t),choices:[{value:"single",label:"oneDrone"},{value:"cluster",label:"aLooseGroup"},{value:"line",label:"abreast"}],visibleWhen:t=>(o.read(t,"count")??1)>1},{type:"number",key:"formation.spacingM",min:.5,max:1e3,step:.5,unit:"m",group:e.FLIGHT,effective:t=>e.formationOf(t)==="line"?5:10,label:"spacing",hint:"betweenNeighbours",visibleWhen:t=>(o.read(t,"count")??1)>1&&e.formationOf(t)!=="single"},{type:"number",key:"headingDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"noseTowards",hint:"emptyItFacesWhereItGoes",placeholder:"whereItGoes",visibleWhen:e.hovers},{type:"number",key:"wind.fromDeg",min:0,max:360,step:1,unit:"°",group:e.FLIGHT,label:"windFrom",effective:()=>0,hint:"whatItLeansInto"},{type:"number",key:"wind.speedMS",min:0,max:60,step:.1,unit:"m/s",group:e.FLIGHT,label:"windSpeed",effective:()=>0},{type:"boolean",key:"silent",group:e.FLIGHT,label:"silent",hint:"notEvenItsRotors"},{type:"number",key:"quieterDb",min:0,max:60,step:1,unit:"dB",group:e.FLIGHT,label:"quieter",hint:"thanItsClass",effective:()=>0,visibleWhen:t=>o.read(t,"silent")!==!0},{type:"colour",key:"bodyColor",group:e.LOOK,label:"hull",effective:t=>a.airframeOf(e.flightOf(t)).bodyColor},...e.LIGHT_NAMES.flatMap(t=>e.light(t))]};static angular(t){return typeof t.azimuthDeg=="number"}static WAYPOINT={kind:"drones-waypoint",title:"pointOfThePath",parameters:[{type:"number",key:"t",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecording"},{type:"position",key:"eastM",secondKey:"northM",saidKey:"saidPosition",native:"local",step:1,rangeM:1e5,label:"position",visibleWhen:t=>!e.angular(t)},{type:"number",key:"altitudeM",min:-500,max:2e4,step:.1,unit:"m",required:!0,label:"height",hint:"aboveTheGroundOfThePlace",visibleWhen:t=>!e.angular(t)},{type:"number",key:"azimuthDeg",min:0,max:360,step:.1,unit:"°",required:!0,label:"azimuth",visibleWhen:t=>e.angular(t)},{type:"number",key:"altitudeDeg",min:-90,max:90,step:.1,unit:"°",required:!0,label:"elevation",visibleWhen:t=>e.angular(t)},{type:"number",key:"distanceM",min:0,max:1e5,step:1,unit:"m",required:!0,label:"distance",visibleWhen:t=>e.angular(t)},{type:"number",key:"eyeHeightM",min:0,max:1e4,step:.1,unit:"m",effective:()=>1.6,label:"eyeHeight",visibleWhen:t=>e.angular(t)}]};static waypointAt(t,l){const s=a.pathOf(t);if(s.length===0)return{t:Math.round(l),eastM:0,northM:0,altitudeM:0};const h=new b(s,a.airframeOf(t).hovers).at(l),n=i=>Math.round(i*10)/10;return{t:Math.round(l),eastM:n(h.eastM),northM:n(h.northM),altitudeM:n(h.upM)}}static publish(){f.publish(e.SET),f.publish(e.WAYPOINT)}}export{e as D};
|
package/dist-embed-sighting/{Flightradar24Provider-p4a3_chL.js → Flightradar24Provider-NbfW-lDQ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{aL as R,f as l,T as I}from"./rr0-sighting.mjs";class p extends Error{constructor(t){super(t),this.problem=t}}class e{citation=R;static FIRST_MS=Date.UTC(2016,4,11);static DEFAULT_RADIUS_KM=100;static RINGS_KM=[25,50];static SNAPSHOT_LIMIT=60;static SMALLEST_PLAN_RESULTS=20;static MAX_TRACED=8;static CREDITS_PER_SNAPSHOT_FLIGHT=8;static CREDITS_PER_TRACK=40;static CREDITS_FOR_NOTHING=1;static MAX_CREDITS_PER_PAGE=5e3;static WORST_CASE_CREDITS=(e.MAX_TRACED-1)*e.RINGS_KM.length*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.SNAPSHOT_LIMIT*e.CREDITS_PER_SNAPSHOT_FLIGHT+e.MAX_TRACED*e.CREDITS_PER_TRACK;static API="https://fr24api.flightradar24.com/api";static IN_THE_AIR_FT="1-60000";static KM_PER_DEG=111.32;token;fetchImpl;settleMs;requestsPerMinute;snapshots=[];tracks=new Map;descriptions=new Map;requestTimes=[];tokenOfMemory;latestQuestion=0;creditsSpent=0;constructor(t){this.token=t.token,this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.settleMs=t.settleMs??1500,this.requestsPerMinute=t.requestsPerMinute??10}mayCover(t){return t>=e.FIRST_MS&&t<=Date.now()}async between(t,n,i,o=e.DEFAULT_RADIUS_KM){const f=this.token();if(!f)return{status:"failed",problem:"credential"};f!==this.tokenOfMemory&&this.forgetAnswers(f);try{const a=await this.snapshotFor(f,t,n,i,o);if(!a)return{status:"failed"};const s=a.flights.slice(0,e.MAX_TRACED),h=await Promise.all(s.map(c=>this.trackOf(f,c))),u=[];return s.forEach((c,r)=>{const S=h[r].filter(T=>T.t>=n&&T.t<=i&&l.groundDistanceKm(t,T)<=o);S.length>0&&u.push({...e.addressOf(c),points:S})}),{status:"found",tracks:u,creditsSpent:this.creditsSpent,partial:{traced:s.length,seen:a.flights.length,moreSeen:a.flights.length>=e.SMALLEST_PLAN_RESULTS,withinKm:a.withinKm}}}catch(a){return{status:"failed",problem:a instanceof p?a.problem:"network",creditsSpent:this.creditsSpent}}}async describe(t){return this.descriptions.get(I.keyOf(t))}static addressOf(t){const n=t.hex?Number.parseInt(t.hex,16):Number.NaN;return Number.isFinite(n)?{icao:n,nonIcao:!1}:{icao:Number.parseInt(t.fr24_id,16),nonIcao:!0}}static boundsAround(t,n){const i=n/e.KM_PER_DEG,o=Math.min(90,t.lat+i),f=Math.max(-90,t.lat-i),a=Math.cos(Math.max(Math.abs(o),Math.abs(f))*Math.PI/180),s=a<1e-6?180:n/(e.KM_PER_DEG*a),h=Math.max(-180,t.lng-s),u=Math.min(180,t.lng+s);return[o,f,h,u].map(c=>c.toFixed(3)).join(",")}forgetAnswers(t){this.tokenOfMemory=t,this.snapshots.length=0,this.tracks.clear(),this.descriptions.clear()}async snapshotFor(t,n,i,o,f){const a=`${n.lat.toFixed(3)},${n.lng.toFixed(3)},${f}`;for(const u of this.snapshots){const c=await u.catch(()=>{});if(c&&c.place===a&&c.t>=i&&c.t<=o)return c}const s=++this.latestQuestion;if(this.settleMs>0&&await new Promise(u=>setTimeout(u,this.settleMs)),s!==this.latestQuestion)return;if(this.creditsSpent+e.WORST_CASE_CREDITS>e.MAX_CREDITS_PER_PAGE)throw new p("budget");const h=this.askSnapshot(t,n,Math.round((i+o)/2),f,a);return this.snapshots.push(h),h.catch(()=>this.snapshots.splice(this.snapshots.indexOf(h),1)),h}async askSnapshot(t,n,i,o,f){const a=[...e.RINGS_KM.filter(c=>c<o),o];let s=[],h=o;for(const c of a)if(h=c,s=await this.flightsWithin(t,n,i,c),s.length>=e.MAX_TRACED)break;const u=c=>l.groundDistanceKm(n,{lat:c.lat,lng:c.lon});return{t:i,place:f,withinKm:h,flights:[...s].sort((c,r)=>u(c)-u(r))}}async flightsWithin(t,n,i,o){const f=new URLSearchParams({timestamp:String(Math.floor(i/1e3)),bounds:e.boundsAround(n,o),altitude_ranges:e.IN_THE_AIR_FT,limit:String(e.SNAPSHOT_LIMIT)}),s=(await this.get(t,`/historic/flight-positions/full?${f}`)).data??[];this.creditsSpent+=s.length>0?s.length*e.CREDITS_PER_SNAPSHOT_FLIGHT:e.CREDITS_FOR_NOTHING;for(const h of s){const u={type:h.type||void 0,registration:h.reg||void 0};(u.type||u.registration)&&this.descriptions.set(I.keyOf(e.addressOf(h)),u)}return s}trackOf(t,n){let i=this.tracks.get(n.fr24_id);return i||(i=this.get(t,`/flight-tracks?flight_id=${encodeURIComponent(n.fr24_id)}`).then(o=>{const a=(Array.isArray(o)?o:o.data??[]).flatMap(s=>s.tracks??[]);return this.creditsSpent+=a.length>0?e.CREDITS_PER_TRACK:e.CREDITS_FOR_NOTHING,a.filter(s=>s.source?.toUpperCase()!=="ESTIMATED"&&s.alt>0).map(s=>({t:Date.parse(s.timestamp),lat:s.lat,lng:s.lon,altitudeFt:s.alt,groundSpeedKt:s.gspeed,trackDeg:s.track})).sort((s,h)=>s.t-h.t)}),i.catch(()=>this.tracks.delete(n.fr24_id)),this.tracks.set(n.fr24_id,i)),i}async get(t,n){await this.paced();const i=await this.fetchImpl(`${e.API}${n}`,{headers:{Accept:"application/json","Accept-Version":"v1",Authorization:`Bearer ${t}`}});if(!i.ok)throw new p(e.problemOf(i.status));return await i.json()}static problemOf(t){switch(t){case 401:return"credential";case 402:return"credits";case 429:return"rate";case 400:case 403:case 404:return"refused";default:return"network"}}async paced(){for(;;){const t=Date.now();for(;this.requestTimes.length>0&&t-this.requestTimes[0]>=6e4;)this.requestTimes.shift();if(this.requestTimes.length<this.requestsPerMinute){this.requestTimes.push(t);return}await new Promise(n=>setTimeout(n,6e4-(t-this.requestTimes[0])+50))}}}export{e as Flightradar24Provider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aZ as Le,a_ as Q,a$ as he,b0 as be,b1 as v,b2 as de,z as y,X as pe,C as F,b3 as w,aC as U,ar as Me,b4 as Se,b5 as ye,E as K,b6 as we,K as C,aA as me,b7 as Ne,aH as ge,b8 as Ie,b9 as Oe,a5 as V,ba as Ce,bb as Te,bc as Fe,bd as Pe,be as He,a0 as J,av as Re,bf as Z,bg as ke,bh as De,ak as Ge,bi as X,bj as ve,a4 as Ee,aq as Ue,ap as G,bk as Ke,a2 as Be,bl as je,Y as Ve,bm as Xe,bn as ze,bo as qe,al as We,G as z,J as Ye,ai as Qe,bp as Je,bq as Ze,br as $e,bs as en,bt as nn,bu as tn,bv as xe,a9 as sn,aD as ne,bw as te,bx as se,by as ie,bz as re,bA as rn,bB as on,ab as an,ac as cn}from"./rr0-sighting.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends be{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new bn(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new Sn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new yn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new wn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={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 ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new ye(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Se(u),c.distance=l;break;case"spot":c=new Me(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),S(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],w),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],w)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],w),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],w),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class bn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.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 i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class Sn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==b.TRIANGLES&&c.mode!==b.TRIANGLE_STRIP&&c.mode!==b.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new K,m=new C,T=new me,A=new C(1,1,1),x=new we(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class yn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class wn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,w,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,M=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*M+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const b={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={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"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function S(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){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 Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new K;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,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 s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),S(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=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&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let M=0,k=L.length;M<k;M++){const P=L[M];if(m.setX(P,N[M*o]),o>=2&&m.setY(P,N[M*o+1]),o>=3&&m.setZ(P,N[M*o+2]),o>=4&&m.setW(P,N[M*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),S(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],w),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],w)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),S(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Ke.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Be,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===b.TRIANGLES||m.mode===b.TRIANGLE_STRIP||m.mode===b.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===b.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===b.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===b.LINES)T=new Xe(R,A);else if(m.mode===b.LINE_STRIP)T=new ze(R,A);else if(m.mode===b.LINE_LOOP)T=new qe(R,A);else if(m.mode===b.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),S(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),S(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new K;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],M=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const B=s._createAnimationTracks(L,N,M,k,P);if(B)for(let j=0;j<B.length;j++)T.push(B[j])}const A=new $e(i,void 0,T);return S(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),S(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new K;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),S(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Kn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),S(f,n),Kn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
|
|
1
|
+
import{aZ as Le,a_ as Q,a$ as he,b0 as Me,b1 as v,b2 as de,C as y,Y as pe,E as F,b3 as w,aD as U,as as be,b4 as Se,b5 as ye,J as B,b6 as we,N as C,aB as me,b7 as Ne,aI as ge,b8 as Ie,b9 as Oe,a6 as V,ba as Ce,bb as Te,bc as Fe,bd as Pe,be as He,a1 as J,aw as Re,bf as Z,bg as ke,bh as De,al as Ge,bi as X,bj as ve,a5 as Ee,ar as Ue,aq as G,bk as Be,a3 as Ke,bl as je,Z as Ve,bm as Xe,bn as ze,bo as qe,am as We,G as z,K as Ye,aj as Qe,bp as Je,bq as Ze,br as $e,bs as en,bt as nn,bu as tn,bv as xe,aa as sn,aE as ne,bw as te,bx as se,by as ie,bz as re,bA as rn,bB as on,ac as an,ad as cn}from"./rr0-sighting.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new bn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new Sn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new yn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new wn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={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 ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],w);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new ye(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new Se(u),c.distance=l;break;case"spot":c=new be(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),S(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],w),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],w)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],w),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],w),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?y:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class bn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.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 i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class Sn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new B,m=new C,T=new me,A=new C(1,1,1),x=new we(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class yn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class wn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,w,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,b=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*b+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={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"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function S(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){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 Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new B;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,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 s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),S(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=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&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let b=0,k=L.length;b<k;b++){const P=L[b];if(m.setX(P,N[b*o]),o>=2&&m.setY(P,N[b*o+1]),o>=3&&m.setZ(P,N[b*o+2]),o>=4&&m.setW(P,N[b*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),S(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],w),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],w)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),S(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Be.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Ke,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),S(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),S(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new B;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],b=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const K=s._createAnimationTracks(L,N,b,k,P);if(K)for(let j=0;j<K.length;j++)T.push(K[j])}const A=new $e(i,void 0,T);return S(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),S(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new B;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),S(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Bn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==w&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),S(f,n),Bn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{m as r,_ as t}from"./rr0-sighting.mjs";const i=r.catalog({en:()=>t(()=>import("./GenerativeKitMessages_en-BY4B6yas.js"),[],import.meta.url).then(e=>e.generativeKitMessages_en),fr:()=>t(()=>import("./GenerativeKitMessages_fr-BY5yUJwK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_fr),es:()=>t(()=>import("./GenerativeKitMessages_es-_iYkoRhK.js"),[],import.meta.url).then(e=>e.generativeKitMessages_es),it:()=>t(()=>import("./GenerativeKitMessages_it-DAgB31P1.js"),[],import.meta.url).then(e=>e.generativeKitMessages_it)});export{i as generativeKitMessages};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{as as b,Z as g,N as P,at as m,a3 as C,a6 as E,ae as L,E as x,ar as R,au as I}from"./rr0-sighting.mjs";class i{constructor(e){this.scene=e}static REAL_BEAMS=4;static LAMPS=2;static DISTANCE_M=500;static AIR_LENGTH_M=90;static CLEAR_AIR_SCATTER_PER_M=2e-4;static SHADOW_MAP_PX=1024;beams=new Map;static airGeometry;has(e){return this.beams.has(e)}get size(){return this.beams.size}lamps(e){return this.beams.get(e)?.lamps??[]}airMeshes(e){return this.beams.get(e)?.air??[]}add(e){if(this.beams.has(e))return!0;if(this.beams.size>=i.REAL_BEAMS)return!1;const t=[],r=[];for(let n=0;n<i.LAMPS;n++){const a=new b(16777215,0,i.DISTANCE_M,Math.PI/8,.5,2);a.castShadow=e==="observer",a.shadow.mapSize.set(i.SHADOW_MAP_PX,i.SHADOW_MAP_PX),a.shadow.camera.near=.4,a.shadow.camera.far=110,a.shadow.bias=-4e-4,a.shadow.normalBias=.04,a.shadow.radius=2,this.scene.add(a),this.scene.add(a.target),t.push(a);const o=new g(i.airCone(),i.airMaterial());o.visible=!1,o.frustumCulled=!1,o.renderOrder=8,o.castShadow=!1,o.receiveShadow=!1,o.name="headlight air",this.scene.add(o),r.push(o)}return this.beams.set(e,{lamps:t,air:r}),!0}remove(e){const t=this.beams.get(e);if(t){for(const r of t.lamps)r.removeFromParent(),r.target.removeFromParent(),r.dispose();for(const r of t.air)r.removeFromParent(),r.material.dispose();this.beams.delete(e)}}clear(e){for(const t of[...this.beams.keys()])e&&t==="observer"||this.remove(t)}dispose(){this.clear(!1),i.airGeometry?.dispose(),i.airGeometry=void 0}aim(e,t,r,n,a,o,l){const c=this.beams.get(e),w=Math.max(l,i.CLEAR_AIR_SCATTER_PER_M);if(!c)return;const u=m.BEAMS[t],v=new P(-n.z,0,n.x),A=e==="observer"&&u!==void 0;c.lamps.forEach((s,d)=>{if(!u){s.intensity=0,c.air[d].visible=!1,s.shadow.autoUpdate=!1;return}const f=d===0?-1:1,h=u.pitchDeg*Math.PI/180,p=u.candela*m.DISPLAY_GAIN*o/c.lamps.length;s.color.set(u.color),s.intensity=p,s.angle=u.halfAngleDeg*Math.PI/180,s.penumbra=u.penumbra,A?(s.shadow.autoUpdate||(s.shadow.needsUpdate=!0),s.shadow.autoUpdate=!0):s.shadow.autoUpdate=!1,s.position.copy(r).addScaledVector(v,f*a);const M=n.clone().addScaledVector(v,-f*Math.tan(m.TOE_IN_DEG*Math.PI/180)).normalize();s.target.position.set(s.position.x+M.x*Math.cos(h)*50,s.position.y-Math.sin(h)*50,s.position.z+M.z*Math.cos(h)*50),s.target.updateMatrixWorld(),this.aimAir(c.air[d],s,u.color,p,w)})}aimAir(e,t,r,n,a){if(e.visible=a*n>1e-4,!e.visible)return;const o=i.AIR_LENGTH_M,l=o*Math.tan(t.angle);e.position.copy(t.position),e.scale.set(l,l,o),e.lookAt(t.target.position),e.updateMatrixWorld();const c=e.material.uniforms;c.uColor.value.set(r),c.uCandela.value=n,c.uScatter.value=a,c.uLength.value=o,c.uRadius.value=l}static airCone(){if(i.airGeometry)return i.airGeometry;const e=24,t=new Float32Array((e+1)*3);for(let a=0;a<e;a++){const o=a/e*Math.PI*2;t.set([Math.cos(o),Math.sin(o),1],(a+1)*3)}const r=[];for(let a=0;a<e;a++)r.push(0,1+a,1+(a+1)%e);const n=new C;return n.setAttribute("position",new E(t,3)),n.setIndex(r),i.airGeometry=n,n}static airMaterial(){return new L({transparent:!0,depthWrite:!1,depthTest:!0,blending:I,side:R,uniforms:{uColor:{value:new x(1,1,1)},uCandela:{value:0},uScatter:{value:0},uLength:{value:90},uRadius:{value:20}},vertexShader:`
|
|
2
2
|
varying vec3 vLocal;
|
|
3
3
|
varying vec3 vNormalView;
|
|
4
4
|
varying vec3 vViewDir;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Hypotheses weighed (HVS)",hint:"Stéphane Baron's HVS protocol weighs, for this observation, each hypothesis by its coverage (CS), the share of the file's elements it explains, and by its plausibility (PS), apart from the case: HVS = CS × PS, a value preferred and its envelope, never a probability. The raw CS is over every element counted (inferences of association are not), the discriminating CS over those that tell the hypotheses apart; that one names the dominant hypothesis. A hypothesis is admissible only if it covers at least half of the elements. A direction or a size a reading reconstructs is explained or not by its confrontation with the testimony; the rest, as the analyst declares. The plausibility and the context factor are the analyst's: UFO@home supplies no prior probability.",hintCase:"Stéphane Baron's HVS protocol weighs the case's hypotheses observation by observation: each witness has their own elements, and so their own evaluation, detailed in the summary of their observation. Here, what dominates for each.",credit:"Stéphane Baron's HVS protocol {protocol}",taxonomy:"taxonomy {taxonomy}",notSealed:"The list of elements is not frozen: it has to be before the hypotheses are weighed.",noElements:"No elements: the file lists none.",noHypotheses:"No hypothesis weighed.",unassigned:"The elements {ids} do not say which observation they are of: they count in no evaluation.",caseLine:{intro:"One evaluation per observation, detailed in each:",item:"{observation}: {verdict}",dominant:"dominant {hypothesis} (HVS {hvs})",none:"no dominant hypothesis"},iqi:{heading:"Information quality (IQI)",item:"{group}: {level}",total:"{sum} out of {of}",groups:{dateTime:"Date and time",place:"Place",identification:"Who the witnesses are",witnesses:"How many witnesses",enquiry:"Enquiry"},levels:{complete:"complete",partial:"partial",absent:"absent"},unrated:"to be rated",suggested:"suggested from the file"},elements:{heading:"Elements",id:"Id",element:"Element",status:"Status",statuses:{observed:"observed fact",inferred:"inference",association:"inference of association"},discriminating:"tells the hypotheses apart",explainedByReading:"explained: the reading reproduces it",notExplainedByReading:"not explained: the reading does not reproduce it",explainedDeclared:"explained, as the analyst judges",notExplainedDeclared:"not explained, as the analyst judges",variants:"the best of {n} readings confronted"},hypotheses:{heading:"Hypotheses",code:"Code",hypothesis:"Hypothesis",readings:"Readings",noReading:"none",byPhenomenon:"by the phenomenon {phenomenon}",chosen:"chosen by hand",noPhenomenon:"no phenomenon named",choose:"Choose…",keepChoice:"Keep this choice",automatic:"By the phenomenon",csRaw:"Raw CS",csDiscriminating:"Discriminating CS",ps:"PS",hvs:"HVS",standing:"Milestone",score:"{preferred} [{low} – {high}]",admissible:"admissible",notAdmissible:"not admissible",admissibleHint:"Admissible: covers at least half of the elements (raw CS ≥ 0.5). A filter before the hypotheses are told apart, not a verdict.",dominant:"dominant",identified:"stimulus identified",proven:"proof sealed",geometric:"geometric mean: a rating collapses",missing:"not rated: {names}",ratings:{existence:"existence",frequency:"frequency",compatibility:"compatibility",context:"context"}},loading:"…"};export{e as hvsMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={heading:"Hipótesis ponderadas (HVS)",hint:"El protocolo HVS de Stéphane Baron pondera, para esta observación, cada hipótesis por su cobertura (CS), la parte de los elementos del expediente que explica, y por su plausibilidad (PS), independiente del caso: HVS = CS × PS, un valor preferido y su envolvente, nunca una probabilidad. La CS bruta abarca todos los elementos contados (las inferencias de asociación no lo son), la CS discriminante solo los que separan las hipótesis; es esta la que designa la hipótesis dominante. Una hipótesis solo es admisible si cubre al menos la mitad de los elementos. Una dirección o un tamaño que una lectura reconstruye queda explicado o no según su confrontación con el testimonio; el resto, como lo declara el analista. La plausibilidad y el factor de contexto son los del analista: UFO@home no aporta ninguna probabilidad a priori.",hintCase:"El protocolo HVS de Stéphane Baron pondera las hipótesis del expediente observación por observación: cada testigo tiene sus propios elementos, y por tanto su propia evaluación, detallada en el resumen de su observación. Aquí, lo que domina en cada una.",credit:"Protocolo HVS {protocol} de Stéphane Baron",taxonomy:"taxonomía {taxonomy}",notSealed:"La lista de elementos no está cerrada: debe estarlo antes de ponderar las hipótesis.",noElements:"Ningún elemento: el expediente no enumera ninguno.",noHypotheses:"Ninguna hipótesis ponderada.",unassigned:"Los elementos {ids} no dicen de qué observación son: no cuentan en ninguna evaluación.",caseLine:{intro:"Una evaluación por observación, detallada en cada una:",item:"{observation}: {verdict}",dominant:"dominante {hypothesis} (HVS {hvs})",none:"ninguna hipótesis dominante"},iqi:{heading:"Calidad de la información (IQI)",item:"{group}: {level}",total:"{sum} de {of}",groups:{dateTime:"Fecha y hora",place:"Lugar",identification:"Identificación de los testigos",witnesses:"Número de testigos",enquiry:"Investigación"},levels:{complete:"completo",partial:"parcial",absent:"ausente"},unrated:"por evaluar",suggested:"sugerido a partir del expediente"},elements:{heading:"Elementos",id:"Id",element:"Elemento",status:"Estatus",statuses:{observed:"hecho observado",inferred:"inferencia",association:"inferencia de asociación"},discriminating:"separa las hipótesis",explainedByReading:"explicado: la lectura lo reproduce",notExplainedByReading:"no explicado: la lectura no lo reproduce",explainedDeclared:"explicado, según el analista",notExplainedDeclared:"no explicado, según el analista",variants:"la mejor de {n} lecturas confrontadas"},hypotheses:{heading:"Hipótesis",code:"Código",hypothesis:"Hipótesis",readings:"Lecturas",noReading:"ninguna",byPhenomenon:"según el fenómeno {phenomenon}",chosen:"elegidas a mano",noPhenomenon:"ningún fenómeno nombrado",choose:"Elegir…",keepChoice:"Conservar esta elección",automatic:"Según el fenómeno",csRaw:"CS bruta",csDiscriminating:"CS discriminante",ps:"PS",hvs:"HVS",standing:"Hito",score:"{preferred} [{low} – {high}]",admissible:"admisible",notAdmissible:"no admisible",admissibleHint:"Admisible: cubre al menos la mitad de los elementos (CS bruta ≥ 0,5). Un filtro antes de separar las hipótesis, no un veredicto.",dominant:"dominante",identified:"estímulo identificado",proven:"prueba sellada",geometric:"media geométrica: una nota se hunde",missing:"sin nota: {names}",ratings:{existence:"existencia",frequency:"frecuencia",compatibility:"compatibilidad",context:"contexto"}},loading:"…"};export{e as hvsMessages_es};
|