@rr0/ufoathome 0.203.0 → 0.204.1
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-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 +296 -296
- 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--iqqhu1e.js → CaseReportExport-Dk3rKiVm.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/{HynekAssessor-DWDZGeLY.js → HynekAssessor-O1MFR79v.js} +1 -1
- 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-_kHZ7Tx3.js → ModuleSession-SivjhuIl.js} +3 -3
- 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/{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 +344 -325
- 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-DNYpHE9t.js → AdsbLolArchiveProvider-CNMGHqqx.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-B_TQEcNk.js → AirshipEditor-BVlkWwdL.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-zrtPXNvX.js → AirshipFlight-Cvl6xWPY.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-wHi_XgNK.js → Aurora-DOIRpjiG.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-CHAo9LbG.js → AuroraEditor-B0tCM7E7.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-CMoKbd0k.js → AuroraSimulation-CX7V0obh.js} +1 -1
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-Bylahnc2.js → BallesterGuaspAssessor-DEJId5n8.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonEditor-DOmOj25v.js → BalloonEditor-Drb5evP5.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-DkhpbdZV.js → BalloonFlight-CGXmDbNq.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-CwC6pRPq.js → BeamEditor-DP2LNObR.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-Zsq9zuJa.js → BeamSystem-BCaOtm3H.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-DslUOI4x.js → BirdEditor-CbYZcYyG.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-BoXaV-S_.js → BirdFlock-Dv9Awhvf.js} +1 -1
- package/dist-embed-sighting-editor/{CaseElement-DFnjs2AU.js → CaseElement-4CRoH54h.js} +2 -2
- package/dist-embed-sighting-editor/{CaseReportExport-CX87uNr9.js → CaseReportExport-W1lO4CR3.js} +1 -1
- package/dist-embed-sighting-editor/{ContrailSystem-hUtlCEq-.js → ContrailSystem-ChbOVWp-.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-C8qq_tSL.js → ControlPasses-Dgz_D6DL.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-uzQnTEH8.js → CoverageAssessor-CcVuVsG0.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-M2V3FKbS.js → DroneEditor-D6k4gYj4.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-C1bur42A.js → DroneFlight-D-MWhrXa.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-DRfoxMx8.js → DroneParameters-CdQbwFKD.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-BJDB9e9p.js → Flightradar24Provider-D_eLiI9k.js} +1 -1
- package/dist-embed-sighting-editor/{GLTFLoader-CQrldtm5.js → GLTFLoader-BIk0ozTu.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-BzXjwGDi.js → HeadlightSystem-C9tLjvpO.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-Bpze0IeH.js → HynekAssessor-B4ej1xgG.js} +1 -1
- package/dist-embed-sighting-editor/{InterviewEditorElement-C6y-8Wze.js → InterviewEditorElement-Bo4OG2ig.js} +3 -3
- package/dist-embed-sighting-editor/{LanternEditor-6fXL9oHW.js → LanternEditor-Hd-8kmET.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-Cl4c8oJt.js → LaserBeam-Ca2QUeCT.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-C9swLaSJ.js → LaunchEditor-BykQEscN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-CPBS4JLE.js → LaunchPlume-Dos-OyTV.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-zjImyFHC.js → LaunchSimulation-B0DgOoJM.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-ZiTya13j.js → ModelSource-szsl2QtY.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-BKl0Wk33.js → ModelThumbnails-dnCeD6UT.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-ZZnOiYz4.js → ModelViewer-BNGSukqO.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CYQ-Mn8w.js → ModuleConformance-CEXxsL48.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-BklqVucx.js → ModuleSession-DOhPD2XZ.js} +2 -2
- package/dist-embed-sighting-editor/ModuleThree-BY0cNbGt.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement-MEFltyZr.js → ModulesPanelElement-DTnJICg0.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-Bnx9Ld5_.js → NearestApproach-jDpDx7cm.js} +1 -1
- package/dist-embed-sighting-editor/{PoherAssessor-CNj_Nyci.js → PoherAssessor-yWlnEcoZ.js} +1 -1
- package/dist-embed-sighting-editor/{RailwaySystem-Dn-v2OAb.js → RailwaySystem-CAqOaX1c.js} +1 -1
- package/dist-embed-sighting-editor/{ReentryEditor-DPt4At81.js → ReentryEditor-CNLwoAIZ.js} +2 -2
- package/dist-embed-sighting-editor/{ReentrySimulation-DwaQrNN5.js → ReentrySimulation-Q-8h8lRK.js} +1 -1
- package/dist-embed-sighting-editor/{ReferenceSystem-DlaF5KWz.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-CdTMwgER.js → SearchlightEditor-sQh92hx7.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightSystem-jipCae7J.js → SearchlightSystem-B_RPbGj4.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_en-BmqJK2u_.js → SightingEditorMessages_en-V_dJYjNb.js} +1 -1
- package/{dist-embed-ufoathome/SightingEditorMessages_es-avQMqPMq.js → dist-embed-sighting-editor/SightingEditorMessages_es-DauDuhPa.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_fr-ClEadK1E.js → SightingEditorMessages_fr-zxTvQa2I.js} +1 -1
- package/dist-embed-sighting-editor/{SightingEditorMessages_it-Co5behaA.js → SightingEditorMessages_it-vvaao68O.js} +1 -1
- package/dist-embed-sighting-editor/SightingElement-4YMo_us5.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-sighting-editor/{SightingLabels_fr-D69zENbW.js → 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-CYhqKOnv.js → SkyLantern-Cj60Cn9B.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Bj0G3fL7.js → TraceSystem-BK0y5lRX.js} +2 -2
- package/dist-embed-sighting-editor/{WaterSystem-Cv4v7PXz.js → WaterSystem-DMeMEW3i.js} +2 -2
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +455 -434
- package/dist-embed-sighting-editor/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-sighting-editor/{trafficRuntime-BdBceXei.js → trafficRuntime-eGXY41n0.js} +1 -1
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-D169IKdZ.js → AdsbLolArchiveProvider-BJm3HMv9.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-CP_Xi-9o.js → Aurora-DooZfol8.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-B_Rxo_6I.js → AuroraEditor-COl6Uq7r.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-KHkJyuus.js → AuroraSimulation-8865pkCY.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-58lmGHUw.js → BallesterGuaspAssessor-CKK5Iybb.js} +1 -1
- package/dist-embed-ufoathome/{BalloonEditor-CAKXO8DQ.js → BalloonEditor-BBAtMeVM.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-BOsTgbHL.js → BeamEditor-D6I1zG9Z.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-C7OL1VWr.js → BeamSystem-BI4-w_0X.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-DZ9-YBfo.js → BodyEditor-yBNJy9AC.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-BgT6HnpX.js → CaseEditorElement-CPt1laCe.js} +64 -61
- package/dist-embed-ufoathome/{CaseElement-DVXLO8mr.js → CaseElement-CTZ3YIL0.js} +3 -3
- package/dist-embed-ufoathome/{CaseReportExport-Dui5KDc5.js → CaseReportExport-UNmAQ_xa.js} +3 -3
- package/dist-embed-ufoathome/{ColumnResize-CO4e1m-q.js → ColumnResize-D6vA9JBg.js} +9 -9
- package/dist-embed-ufoathome/{ControlPasses-CJ2jMdlf.js → ControlPasses-Bwafi16d.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-CzhOt6fv.js → CoverageAssessor-DINhJJFz.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-TCNh_VXc.js → Flightradar24Provider-BEVn6h-k.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-BaIfBICM.js → GLTFLoader-CqzCNjEl.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-B5AFUVEM.js → GeoJsonExport-B4GBH7Ei.js} +1 -1
- package/dist-embed-ufoathome/GeographicFigures-wtF2TmIn.js +1 -0
- package/dist-embed-ufoathome/HynekAssessor-De0RmEd0.js +1 -0
- package/dist-embed-ufoathome/{InterviewEditorElement-o21YUvNz.js → InterviewEditorElement-BVfNqEBS.js} +4 -4
- package/dist-embed-ufoathome/{InterviewElement-K_oIXneA.js → InterviewElement-BBEmBs1S.js} +1 -1
- package/dist-embed-ufoathome/{KmlExport-BfiqE1s2.js → KmlExport-C8yk8C7s.js} +1 -1
- package/dist-embed-ufoathome/{LanternEditor-CepeoImr.js → LanternEditor-DEeA3Kf_.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-IRXmv6wc.js → LaserBeam-BGs1pXaE.js} +1 -1
- package/dist-embed-ufoathome/LaunchEditor-CBEW_ih2.js +22 -0
- package/dist-embed-ufoathome/{LaunchPlume-CujlF3wZ.js → LaunchPlume-BbsUUQE0.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-58_ZZy8q.js → LaunchSimulation-DJJaKJGV.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-Bz25TN6e.js → ModelSource-B2Ie3T9B.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-CcYlw6gA.js → ModelThumbnails-BOfC5SZt.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-CD90RTYi.js → ModelViewer-CXP4K0sx.js} +1 -1
- package/dist-embed-ufoathome/{ModulesPanelElement-DZxFsuuG.js → ModulesPanelElement-DPkBhz-Y.js} +2 -2
- package/dist-embed-ufoathome/NearestApproach-D2cz2_44.js +1 -0
- package/dist-embed-ufoathome/{PoherAssessor-BkCJ1UTQ.js → PoherAssessor-CNOuLGVz.js} +1 -1
- package/dist-embed-ufoathome/PoherMatrix-C2fcLqDH.js +1 -0
- package/dist-embed-ufoathome/PoherSelfCheck-DnXcStjH.js +1 -0
- package/dist-embed-ufoathome/{ReentryEditor-BjyUUZGU.js → ReentryEditor-BCQM22Ps.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-5VI9Dla4.js → ReentrySimulation-BFhCb4sM.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-C0ZXvatV.js → ReferenceSystem-aZKW97nH.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-_IkJEoIB.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-DOvp2pYT.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-DPU1PgfT.js → SearchlightEditor-C8Jwy1VZ.js} +1 -1
- package/dist-embed-ufoathome/{SearchlightSystem-m0a11CEu.js → SearchlightSystem-D2TFaVqO.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-DqCoQwtn.js → ShareDialogElement-Dsc4v4jd.js} +150 -132
- package/dist-embed-ufoathome/Sighting-C1yj2-s5.js +1 -0
- package/dist-embed-ufoathome/{SightingEditorMessages_en-BmqJK2u_.js → SightingEditorMessages_en-V_dJYjNb.js} +1 -1
- package/{dist-embed-sighting-editor/SightingEditorMessages_es-avQMqPMq.js → dist-embed-ufoathome/SightingEditorMessages_es-DauDuhPa.js} +1 -1
- package/dist-embed-ufoathome/{SightingEditorMessages_fr-ClEadK1E.js → SightingEditorMessages_fr-zxTvQa2I.js} +1 -1
- package/dist-embed-ufoathome/{SightingEditorMessages_it-Co5behaA.js → SightingEditorMessages_it-vvaao68O.js} +1 -1
- package/dist-embed-ufoathome/SightingElement-CFItfa0b.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-ufoathome/{SightingLabels_fr-D69zENbW.js → 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-BLumvnJD.js → TraceSystem-_cZ6PZho.js} +1 -1
- package/dist-embed-ufoathome/{VideoButton-hYfTEunC.js → VideoButton-CeAdEi2m.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +10 -10
- package/dist-embed-ufoathome/sightingSchema-DoPVOlCB.js +1 -0
- package/dist-embed-ufoathome/{surroundingsSources-BWHnZ_qg.js → surroundingsSources-B7gbT2Pb.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-Xpncp71U.js → trafficRuntime-BKNJgPC4.js} +2 -2
- package/package.json +1 -1
- 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/LanternEditor-Be5Io1J-.js +0 -24
- package/dist-embed-sighting/ModuleThree-BLNSm2eY.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/ModuleThree-jNUgMjnf.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/SightingElement-C6CT6DBZ.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/sightingSchema-9MogCcUd.js +0 -1
- package/dist-embed-ufoathome/GeographicFigures-DrlbDt4f.js +0 -1
- package/dist-embed-ufoathome/HynekAssessor-DaCcWwTH.js +0 -1
- package/dist-embed-ufoathome/LaunchEditor-C4hq0VUw.js +0 -22
- package/dist-embed-ufoathome/NearestApproach-DsszB5Rd.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-CBWjF8TY.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-MaryBOLs.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-D-_IYi9n.js +0 -1
- package/dist-embed-ufoathome/SightingElement-CUrYpWRD.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/sightingSchema-9MogCcUd.js +0 -1
package/dist-embed-sighting-editor/{trafficRuntime-BdBceXei.js → trafficRuntime-eGXY41n0.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{aO as et,aP as g,aQ as It,aR as Z,aS as j,aT as N,aU as Dt,aV as V,aW as st,aX as Rt,K as at,aY as it}from"./rr0-sighting-editor.mjs";import{aZ as le}from"./rr0-sighting-editor.mjs";import{C as ot}from"./ContrailGrowth-DwHS8If9.js";const Tt=.25,rt=.4,ct=6,X=12,Bt=3,lt=.2,vt=.2,ht=24,Nt=3,Ct=24,ut=1,_t=.7,Ht=1.5,wt=.8,yt=1.3,dt=.02,Pt=700,kt=-30,pt=.9,mt=5,Lt=25,Ft=.5,jt=.12,Mt=[.13,.31],Gt=.16,Ut=1.6,Kt=2,zt=3.6,At=1.1,Wt=.3,Vt=1e3,gt=.7,Xt=.7;class Y{context;constructor(t){this.context=t}noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}et.isLive(this.context)&&et.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);et.isLive(this.context)&&this.context.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const s=this.voices.get(n.id)??this.build(t,n);this.retarget(t,s,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const s=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(s)):a.connect(s);const i=t.createGain(),o=e.character?.modulationDepth??0;i.gain.value=1-o/2;const r=t.createOscillator();r.type="sine";const l=t.createGain();l.gain.value=o/2,r.connect(l).connect(i.gain),i.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*ct*.5;const u=[],d=[],h=[];for(const D of g.OCTAVES){const I=t.createBiquadFilter();I.type="bandpass",I.frequency.value=D,I.Q.value=ut;const H=t.createBiquadFilter();H.type="bandpass",H.frequency.value=D,H.Q.value=ut;const P=t.createGain();P.gain.value=0,c.connect(I).connect(H).connect(P).connect(i),u.push(I),d.push(H),h.push(P)}const p=[];for(const[D,I]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(D!==void 0)for(let H=1;H<=Nt;H++){const P=t.createOscillator();P.type="sine",P.frequency.value=D*H;const tt=t.createGain();tt.gain.value=0,P.connect(tt).connect(a),p.push({oscillator:P,gain:tt,harmonic:H,baseHz:D,share:I??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const E=Mt.map(D=>{const I=t.createOscillator();return I.type="sine",I.frequency.value=D,I.connect(m),I}),O=t.createGain();O.gain.value=e.character?.roughness??lt;const B=t.createBufferSource();B.buffer=this.roughTable(t,Bt),B.loop=!0,B.loopStart=Math.random()*X*.5,B.connect(O).connect(i.gain);const v=t.createGain();v.gain.value=(e.character?.roughness??lt)*vt;const S=t.createBufferSource();S.buffer=this.roughTable(t,ht),S.loop=!0,S.loopStart=Math.random()*X*.5,S.connect(v).connect(i.gain);let F;const x=this.busOf(t)&&this.reverb;x&&(F=t.createGain(),F.gain.value=0,a.connect(F).connect(x));let L,_;if(!e.inside&&typeof t.createDelay=="function"){const D=t.createDelay(dt);D.delayTime.value=0;const I=t.createBiquadFilter();I.type="highshelf",I.frequency.value=Pt,I.gain.value=0;const H=t.createGain();H.gain.value=0,a.connect(D).connect(I).connect(H).connect(n??s);const P=t.createGain();P.gain.value=0,_=t.createBufferSource(),_.buffer=this.roughTable(t,ht),_.loop=!0,_.loopStart=Math.random()*X*.5,_.connect(P).connect(D.delayTime),L={delay:D,jitter:P,shelf:I,gain:H}}const k=[c,B,S,r,...p.map(D=>D.oscillator),...E,..._?[_]:[]];for(const D of k)D.start();const $={nodes:[a,i,l,O,v,m,...L?[L.delay,L.jitter,L.shelf,L.gain]:[],...p.map(D=>D.gain),...u,...d,...h,...F?[F]:[],...n?[n]:[],...k],sources:k,filters:u,seconds:d,gains:h,tones:p,lfo:r,lfoDepth:l,wander:E,wanderDepth:m,roughDepth:O,crackleDepth:v,beat:i,output:a,panner:n,send:F,echo:L};return this.voices.set(e.id,$),$}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Tt),i=Math.min(Ht,Math.max(_t,a.dopplerRatio)),o=Math.min(yt,Math.max(wt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*Y.unweighting(g.OCTAVES[m])),c=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),u=Math.min(1,Math.max(0,(a.distanceKm-mt)/(Lt-mt)));g.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(r,p*o)),s(e.seconds[m].frequency,Math.min(r,p*o)),s(e.gains[m].gain,l[m]*Math.sqrt(Vt/p))});const d=a.character;for(const{oscillator:p,gain:m,harmonic:E,baseHz:O,share:B}of e.tones){const v=O*E;s(p.frequency,v*i);const S=v*i;s(m.gain,S<r?B*Gt*l[Y.bandOf(S)]/E:0)}d?.modulationHz!==void 0&&s(e.lfo.frequency,d.modulationHz*i);const h=c>0?Y.saturated(c)/c:1;if(s(e.output.gain,h*(1-Wt*u)),s(e.wanderDepth.gain,h*jt*u/Mt.length),e.send&&s(e.send.gain,Y.reverbSend(a.distanceKm)),e.echo){const p=a.groundEcho;s(e.echo.gain.gain,p?.lowGain??0),p&&(s(e.echo.delay.delayTime,Math.min(dt,p.delayS)),s(e.echo.jitter.gain,p.jitterS),s(e.echo.shelf.gain,p.lowGain>0?Math.max(kt,20*Math.log10(Math.max(p.highGain,1e-6)/p.lowGain)):0))}if(e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-pt,Math.min(pt,Math.sin(p)))*(1-Ft*u);s(e.panner.pan,m)}}static saturated(t){const e=Xt*gt;if(t<=e)return t;const a=gt-e;return e+a*(1-Math.exp(-(t-e)/a))}static reverbSend(t){return Math.min(Ut,Math.sqrt(Math.max(0,t)/Kt))}static unweighting(t){return 10**(Math.min(Ct,Math.max(0,-g.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return g.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/g.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*X),s=t.createBuffer(1,n,t.sampleRate),i=s.getChannelData(0),o=Array.from({length:X*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let l=0;l<i.length;l++){const c=l/r,u=Math.floor(c),d=c-u,h=d*d*(3-2*d);i[l]=o[u%o.length]*(1-h)+o[(u+1)%o.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*zt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let i=0;for(let o=0;o<e;o++){const r=o/t.sampleRate,l=.6*Math.exp(-r/(At*2))+.04;i+=l*(Math.random()*2-1-i),s[o]=i*Math.exp(-r/At)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,rt/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},rt*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*ct,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class U{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],CONC:["Concorde","airliner-supersonic",25.6,61.7],DC3:["Douglas DC-3","piston-heavy",29,19.7],DC4:["Douglas DC-4","piston-heavy",35.8,28.6],P51:["North American P-51 Mustang","piston-heavy",11.3,9.8],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?U.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?U.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...U.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class C{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","airliner-supersonic","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"airliner-supersonic":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(C.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(C.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<C.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=C.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=It.find(h=>h.id===(n?"helicopter":"airliner")).create(),[i,o]=n?[5,7]:[17,18],r=t.spanM/2/i,l=t.lengthM/2/o,[c,u,d]=C.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?c:h.id.startsWith("strobe")?u:d;return{...h,offsetM:{x:h.offsetM.x*r,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=C.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!C.lampsOn(t.kind,e).navigation)return[];const s=c=>c<C.LANDING_LIGHTS_BELOW_FT;if(!a.some(c=>s(c.altitudeFt)))return[];const i=C.LANDING_INTENSITY*n,o=a.flatMap((c,u)=>u>0&&s(c.altitudeFt)!==s(a[u-1].altitudeFt)?[{t:c.t,intensity:s(c.altitudeFt)?i:0}]:[]),r=t.spanM/34,l=t.lengthM/36;return[-1,1].map(c=>({id:c<0?"landing-left":"landing-right",offsetM:{x:c*5*r,y:-1,z:3*l},color:C.LANDING_COLOR,intensity:s(a[0].altitudeFt)?i:0,pattern:{kind:"steady"},beamDeg:C.LANDING_BEAM_DEG,keyframes:o}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class J{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(J.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?J.BY_TYPE.get(t.toUpperCase()):void 0}}class T{static ID_PREFIX=Z.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=T.MAX_OBJECTS,s={}){return new Yt(t,e,a,n,s).build()}static idOf(t,e){return Z.idOf(t,e)}static keyOf(t){return Z.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*T.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=j.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*T.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*T.DEG);return{eastM:s*Math.sin(a.azimuthDeg*T.DEG),northM:s*Math.cos(a.azimuthDeg*T.DEG),upM:n*Math.sin(a.altitudeDeg*T.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const s=a[a.length-1];s&&n.t-s.t>N.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/T.DEG+360)%360}}class Yt{constructor(t,e,a,n,s){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=s}build(){const t=[];for(const a of this.tracks){const n=T.keyOf(a),s=this.options.models?.get(n)??U.of(void 0);T.segments(a).forEach((i,o)=>{const r=i.map(h=>({point:h,at:T.offsetOf(this.observer,h)}));if(!r.some(h=>h.at.altitudeDeg>=0))return;const l=r.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<r.length?T.bearingDeg(h.at,r[p+1].at):T.bearingDeg(r[p-1].at,h.at))})),c=T.idOf(a,o),u=r[Math.floor(r.length/2)].point,d=this.options.sunElevationAt?.(u)??90;t.push({object:{id:c,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:T.sizeOf(s),model:J.idOf(s.code)?{id:J.idOf(s.code)}:void 0,color:C.bodyColor(s),lights:[...C.lights(s,d),...C.landingLights(s,d,i.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:i},closestKm:Math.min(...r.map(h=>h.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const qt=[[20,0],[120,0],[130,1.5],[140,4],[150,7.5],[160,7.5]],Jt=[[20,1.5],[40,1],[60,1],[80,0],[120,0],[130,1],[140,1],[150,-3],[160,-6.5],[170,-12]],bt=.16,xt=1,$t=[[0,-2],[10,-1],[20,0],[40,0],[50,-2],[60,-4.5],[70,-7.5],[80,-11],[90,-15],[100,-19.5],[110,-25]],Zt=[[60,-15.8],[70,-11.5],[80,-8],[90,-5],[100,-2.7],[110,-1.2],[120,-.3],[130,0],[140,-2],[150,-6],[160,-10],[170,-15],[180,-20]],Qt=1.5,Et=-40,te=1.5,ee={takeoff:{jetMps:300,flightMps:80,jetShare:[1,1,.9,.6,.3,.1,0,0]},overflight:{jetMps:280,flightMps:130,jetShare:[1,1,.9,.6,.3,.1,0,0]},approach:{jetMps:180,flightMps:70,jetShare:[.6,.5,.4,.2,.1,0,0,0]}};class w{static bandsDb(t,e,a=340){const n=ee[e],s=w.fan(t)-w.fan(90),i=.62*Math.max(0,n.jetMps-n.flightMps)/a,o=-30*Math.log10(1+i/(1+i**5)**.2*Math.cos(t*Math.PI/180));return g.OCTAVES.map((r,l)=>{const c=o+w.jetRemainder(t,r*te/n.jetMps),u=n.jetShare[l];return 10*Math.log10(u*10**(c/10)+(1-u)*10**(s/10))})}static loudestDb(t){const e=w.loudest.get(t);if(e)return e;const a=g.OCTAVES.map(()=>-1/0);for(let n=0;n<=180;n+=5)w.bandsDb(n,t).forEach((s,i)=>a[i]=Math.max(a[i],s));return w.loudest.set(t,a),a}static loudest=new Map;static angleDeg(t,e){const a=t.reduce((s,i,o)=>s+i*e[o],0),n=Math.hypot(...t)*Math.hypot(...e);return n===0?90:Math.acos(Math.min(1,Math.max(-1,a/n)))*180/Math.PI}static fan(t){const e=w.read($t,t,!0),a=w.read(Zt,t,!0)+Qt;return 10*Math.log10(10**(e/10)+10**(a/10))}static jetRemainder(t,e){const a=Math.min(1,Math.max(0,Math.log(e/bt)/Math.log(xt/bt)));return(1-a)*w.read(qt,t)+a*w.read(Jt,t)}static read(t,e,a=!1){const[n,s]=[t[0],t[1]],[i,o]=[t[t.length-2],t[t.length-1]];if(e<=n[0])return a?Math.max(Et,n[1]+(s[1]-n[1])/(s[0]-n[0])*(e-n[0])):n[1];if(e>=o[0])return a?Math.max(Et,o[1]+(o[1]-i[1])/(o[0]-i[0])*(e-o[0])):o[1];for(let r=1;r<t.length;r++){const[l,c]=[t[r-1],t[r]];if(e<=c[0])return l[1]+(c[1]-l[1])*(e-l[0])/(c[0]-l[0])}return o[1]}}class A{static GRASS={flowResistivityKPa:200,earHeightM:1.6};static COHERENCE=.4;static JITTER_S=1e-4;static ECHO_UNDER_S=5e-4;static ECHO_FROM_S=.0015;static LOW_HZ=125;static HIGH_HZ=2e3;static AIR_DENSITY=1.2;static reflection(t,e,a=A.GRASS){const[n,s]=A.impedance(t,a);return A.reflected(n,s,Math.sin(Math.max(0,e)*Math.PI/180))}static impedance(t,e=A.GRASS){const a=A.AIR_DENSITY*t/(e.flowResistivityKPa*1e3);return[1+.0571*a**-.754,-.087*a**-.732]}static reflected(t,e,a){const[n,s,i,o]=[t*a-1,e*a,t*a+1,e*a],r=i*i+o*o;return{re:(n*i+s*o)/r,im:(s*i-n*o)/r}}static delayS(t,e=A.GRASS,a=340){return 2*e.earHeightM*Math.sin(Math.max(0,t)*Math.PI/180)/a}static excessDb(t,e=A.GRASS,a=340){const n=`${e.flowResistivityKPa}|${e.earHeightM}|${a}`;let s=A.overheads.get(n);return s||A.overheads.set(n,s=A.bandsDb(90,e,a)),A.bandsDb(t,e,a).map((i,o)=>i-s[o])}static echo(t,e=A.GRASS,a=340){const n=A.delayS(t,e,a);if(n<=A.ECHO_UNDER_S)return;const s=Math.min(1,(n-A.ECHO_UNDER_S)/(A.ECHO_FROM_S-A.ECHO_UNDER_S)),i=s*s*(3-2*s),o=r=>{const l=A.reflection(r,t,e);return i*A.COHERENCE*Math.hypot(l.re,l.im)};return{delayS:n,lowGain:o(A.LOW_HZ),highGain:o(A.HIGH_HZ),jitterS:A.JITTER_S}}static overheads=new Map;static thirds=g.OCTAVES.map(t=>[-1,0,1].map(e=>{const a=t*2**(e/3);return{middle:a,from:a*2**(-1/6),to:a*2**(1/6)}}));static impedances=new Map;static bandsDb(t,e,a){const n=A.delayS(t,e,a),s=A.COHERENCE,i=Math.sin(Math.max(0,t)*Math.PI/180);let o=A.impedances.get(e.flowResistivityKPa);return o||A.impedances.set(e.flowResistivityKPa,o=A.thirds.map(r=>r.map(l=>A.impedance(l.middle,e)))),A.thirds.map((r,l)=>{let c=0;return r.forEach((u,d)=>{const h=A.reflected(o[l][d][0],o[l][d][1],i),p=2*Math.PI*n*(u.to-u.from),[m,E]=p<1e-9?[1,0]:[(Math.sin(2*Math.PI*u.to*n)-Math.sin(2*Math.PI*u.from*n))/p,(Math.cos(2*Math.PI*u.from*n)-Math.cos(2*Math.PI*u.to*n))/p];c+=1+h.re*h.re+h.im*h.im+2*s*(h.re*m+h.im*E)}),10*Math.log10(c/r.length)})}}const q={takeoff:{shapeDb:[10,3,-3,-2,-2,-2,5,4],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},ae={takeoff:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},Ot=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7},regimes:q},{id:"turbojet-supersonic",name:"Supersonic turbojet airliner",kinds:["airliner-supersonic"],totalDbA:169.5,shapeDb:[-22,-13,-9,-6,-6,-9,-15,-25],character:{humHz:100,humShare:.7},regimes:ae},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7},regimes:q},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7},regimes:q},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7},regimes:q},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-20,-10,-3,-6,-10,-20,-27,-42],character:{toneHz:80,toneShare:.4,modulationHz:80,modulationDepth:.4}},{id:"piston-heavy",name:"Heavy piston aircraft",kinds:["piston-heavy"],totalDbA:140,shapeDb:[-31,-12,-11,-9,-7,-6,-7,-11],character:{toneHz:84,toneShare:.4,modulationHz:84,modulationDepth:.36}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ft=(b,t)=>b.map(e=>e+t-g.sumDb(b));function ne(b,t){if(!b)return;const e=t.toneRatio??1,a=t.toneGain??1;return{...b,...b.toneHz!==void 0?{toneHz:b.toneHz*e,toneShare:Math.min(1,(b.toneShare??0)*a)}:{},...b.humHz!==void 0?{humHz:b.humHz*e,humShare:Math.min(1,(b.humShare??0)*a)}:{}}}const St=Ot.map(b=>{const t=b.regimes===q?"turbofan":void 0,e={id:b.id,name:b.name,soundPowerA:ft(b.shapeDb,b.totalDbA),character:b.character,directivity:t};if(!b.regimes)return e;const a={overflight:e};for(const[n,s]of Object.entries(b.regimes))a[n]={id:`${b.id}-${n}`,name:`${b.name}, ${n}`,soundPowerA:ft(b.shapeDb.map((i,o)=>i+s.shapeDb[o]),b.totalDbA+s.levelDb),character:ne(b.character,s),directivity:t};return{...e,regimes:a}});class M{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=Dt.OUTDOOR_SHAPE_DB;static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static CLIMB_MPS=2.5;static DESCENT_MPS=1.5;static LOW_M=3e3;static CLIMB_SPAN_MS=3e4;static noiseOfKind(t){const e=Ot.find(a=>a.kinds.includes(t));return St.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=g.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return g.OCTAVES.map((s,i)=>t.soundPowerA[i]-n-g.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=M.DEFAULT_AMBIENT_DB_A,n=g.STANDARD,s){const i=M.ambientBands(a,s);return Object.entries(t.regimes??{overflight:t}).some(([r,l])=>M.bandsAt(l,e,n).map((c,u)=>c+(l.directivity==="turbofan"?w.loudestDb(r)[u]:0)).some((c,u)=>c>=Math.max(i[u]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)))}static ambientBands(t,e=M.AMBIENT_SHAPE_DB){const a=g.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??g.STANDARD,i=g.speedOfSound(s.temperatureC),o=t.points[t.points.length-1]?.t;if(o===void 0)return;let r=Math.min(a,o),l=N.positionAt(t,r);if(!l)return;let c=j.seenFrom(e,l.geo);for(let _=0;_<M.ITERATIONS;_++){const k=a-c.distanceKm*1e3*1e3/i,$=Math.abs(k-r);if(r=k,l=N.positionAt(t,r),!l)return;if(c=j.seenFrom(e,l.geo),$<M.CONVERGED_MS)break}const u=N.positionAt(t,a),d=u?j.seenFrom(e,u.geo):c,h=M.regimeAt(t,r,e),p=M.inRegime(n.noise??St[0],h),m=n.ambientDbA??M.DEFAULT_AMBIENT_DB_A,E=M.ambientBands(m,n.ambientShapeDb),O=M.emissionAngle(t,e,r),B=p.directivity==="turbofan"?w.bandsDb(O,h,i):void 0,v=n.ground===null?g.OCTAVES.map(()=>0):A.excessDb(c.altitudeDeg,n.ground,i),S=M.bandsAt(p,c.distanceKm,s).map((_,k)=>_+(B?.[k]??0)+v[k]),F=S.map((_,k)=>_>=Math.max(E[k]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)),x=S.indexOf(Math.max(...S)),L=F.lastIndexOf(!0);return{track:t,audible:F.some(Boolean),levelDbA:g.sumDb(S),bandsDbA:S,ambientDbA:m,delayS:(a-r)/1e3,emittedAtMs:r,sound:c,seen:d,lagDeg:M.angleBetween(c,d),dopplerRatio:M.doppler(t,e,r,i),dominantHz:g.OCTAVES[x],cutoffHz:L<0?void 0:g.OCTAVES[L],regime:h,noise:p,emissionAngleDeg:O}}static emissionAngle(t,e,a){const n=M.VELOCITY_STEP_MS,s=N.positionAt(t,a-n),i=N.positionAt(t,a+n),o=N.positionAt(t,a);if(!s||!i||!o)return 90;const r=d=>{const h=j.seenFrom(e,d),p=h.altitudeDeg*Math.PI/180,m=h.azimuthDeg*Math.PI/180,E=h.distanceKm*1e3;return[E*Math.cos(p)*Math.sin(m),E*Math.cos(p)*Math.cos(m),E*Math.sin(p)]},[l,c,u]=[r(s.geo),r(i.geo),r(o.geo)];return w.angleDeg(c.map((d,h)=>d-l[h]),u.map(d=>-d))}static regimeAt(t,e,a){const n=M.CLIMB_SPAN_MS,s=N.positionAt(t,e-n)??N.positionAt(t,e),i=N.positionAt(t,e+n)??N.positionAt(t,e),o=N.positionAt(t,e);if(!s||!i||!o)return"overflight";const r=(Math.min(e+n,t.points[t.points.length-1].t)-Math.max(e-n,t.points[0].t))/1e3;if(r<=0)return"overflight";const l=(i.altitudeFt-s.altitudeFt)*.3048/r;return o.altitudeFt*.3048-a.heightM>M.LOW_M?"overflight":l>M.CLIMB_MPS?"takeoff":l<-1.5?"approach":"overflight"}static inRegime(t,e){return t.regimes?.[e]??t}static profile(t,e,a,n,s=2e3,i={}){const o=[];let r,l,c=a;for(let u=a;u<=n;u+=s){const d=M.heardAt(t,e,u,i);d&&(!l||d.levelDbA>l.levelDbA)&&(l=d,c=u),d?.audible?r?r.untilMs=u:o.push(r={fromMs:u,untilMs:u}):r=void 0}return{track:t,audible:o,peakDbA:l?.levelDbA??-1/0,peakAtMs:c,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=c=>{const u=c.altitudeDeg*Math.PI/180,d=c.azimuthDeg*Math.PI/180;return[Math.cos(u)*Math.sin(d),Math.cos(u)*Math.cos(d),Math.sin(u)]},[n,s,i]=a(t),[o,r,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*o+s*r+i*l)))*180/Math.PI}static doppler(t,e,a,n){const s=M.VELOCITY_STEP_MS,i=N.positionAt(t,a-s),o=N.positionAt(t,a+s);if(!i||!o)return 1;const r=j.seenFrom(e,i.geo).distanceKm*1e3,l=j.seenFrom(e,o.geo).distanceKm*1e3;return 1/(1-(r-l)/(2*s/1e3)/n)}}class oe{static at(t,e,a,n,s={}){const i=N.seenFrom(t,a,n);if(!i)return;const o=U.of(e),r=M.heardAt(t,a,n,{noise:M.noiseOfKind(o.kind),...s});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:o.code??e?.type,name:o.basis==="nothing"?void 0:o.name,kind:o.kind,basis:o.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:i.altitudeFt,groundSpeedKt:i.groundSpeedKt,trackDeg:i.trackDeg,sky:i.sky,angularRateDegPerS:i.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class R{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1;static EXPANSION_RATIO=1.8;static HEADROOM_DB=Dt.HEADROOM_DB;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const i=new Set;for(const[o,r]of t){const l=M.noiseOfKind(U.of(e.get(a(r))).kind);let c=1/0;for(const u of r.points)c=Math.min(c,j.seenFrom(n,{lat:u.lat,lng:u.lng,heightM:u.altitudeFt*.3048}).distanceKm);M.couldBeHeard(l,c,s.ambientDbA,s.air,s.ambientShapeDb)&&i.add(o)}return i}static voices(t,e,a,n,s,i,o={}){const r=[];for(const l of t){const c=e.get(l);if(!c||o.only?.(l)===!1)continue;const u=o.kindOf?.(l)??U.of(a.get(n(c))).kind,d=o.noiseOf?.(l)??M.noiseOfKind(u),h=M.heardAt(c,s,i,{...o,noise:d});if(!h?.audible)continue;const p=o.throughDb,m=p?h.bandsDbA.map((E,O)=>E-(p[O]??0)):h.bandsDbA;p&&!R.noticed(m,h.ambientDbA,o.ambientShapeDb)||r.push({id:l,kind:u,bandAmplitudes:R.bandAmplitudes(m,h.ambientDbA,o.referenceAmplitude,{ambientShapeDb:o.ambientShapeDb,expandUnderKnee:o.expandUnderKnee}),levelDbA:p?g.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:h.noise.character,groundEcho:o.ground===null?void 0:A.echo(h.sound.altitudeDeg,o.ground,g.speedOfSound((o.air??g.STANDARD).temperatureC))})}return r.sort((l,c)=>c.levelDbA-l.levelDbA).slice(0,o.maxVoices??R.DEFAULT_MAX_VOICES)}static noticed(t,e,a){const n=M.ambientBands(e,a);return t.some((s,i)=>s>=n[i]+M.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=R.REFERENCE_AMPLITUDE,n={}){const s=M.ambientBands(e,n.ambientShapeDb),i=n.expandUnderKnee===!1?1:R.EXPANSION_RATIO,o=M.DETECTION_MARGIN_DB,r=g.sumDb(t),l=r-e,c=l>=R.KNEE_DB?R.KNEE_DB+(l-R.KNEE_DB)/R.COMPRESSION_RATIO:R.KNEE_DB-(R.KNEE_DB-l)*i,u=a*10**((c-R.HEADROOM_DB)/20);return t.map((d,h)=>{const p=Math.min(1,Math.max(0,(d-s[h]-o+R.MASKING_RANGE_DB)/(2*R.MASKING_RANGE_DB)));return p*p*(3-2*p)*u*10**((d-r)/20)})}static BANDS_HZ=g.OCTAVES}class Q{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(d,h=0)=>d.toLocaleString(n,{maximumFractionDigits:h}),i=(d,h)=>d.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),o=[],r=[t.registration,t.name].filter(Boolean).join(" · ");o.push(r||i(e.unnamed,{hex:t.hex}));const l=[i(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:i(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:i(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);o.push(l.join(" · ")),o.push(i(e.position,{distance:s(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:s(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const c=t.hearing;if(!c)o.push(e.soundUnknown);else if(!c.audible)o.push(i(e.inaudible,{level:s(Math.round(c.levelDbA)),ambient:s(Math.round(c.ambientDbA))}));else{const d=c.cutoffHz??0,h=d<=Q.RUMBLE_BELOW_HZ?e.rumble:d<=Q.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<Q.PITCH_NOTICED?"":i(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});o.push(i(e.heard,{level:s(Math.round(c.levelDbA)),delay:s(Math.round(c.delayS)),lag:s(Math.round(c.lagDeg)),character:i(h,{cutoff:s(d)}),pitch:m}))}t.contrail&&o.push(i(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const u=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return u.length>0&&o.push(u.join(" · ")),o.push(e.candidate),o.join(`
|
|
1
|
+
import{aP as et,aQ as g,aR as It,aS as Z,aT as j,aU as N,aV as Dt,aW as V,aX as st,aY as Rt,K as at,aZ as it}from"./rr0-sighting-editor.mjs";import{a_ as le}from"./rr0-sighting-editor.mjs";import{C as ot}from"./ContrailGrowth-DwHS8If9.js";const Tt=.25,rt=.4,ct=6,X=12,Bt=3,lt=.2,vt=.2,ht=24,Nt=3,Ct=24,ut=1,_t=.7,Ht=1.5,wt=.8,yt=1.3,dt=.02,Pt=700,kt=-30,pt=.9,mt=5,Lt=25,Ft=.5,jt=.12,Mt=[.13,.31],Gt=.16,Ut=1.6,Kt=2,zt=3.6,At=1.1,Wt=.3,Vt=1e3,gt=.7,Xt=.7;class Y{context;constructor(t){this.context=t}noiseBuffer;roughBuffers=new Map;voices=new Map;bus;reverb;reverbOut;level=1;master;paused=!0;requested=[];headingDeg=0;resume(){if(!this.context){if(typeof AudioContext>"u")return;try{this.context=new AudioContext}catch(t){console.warn("AircraftAudio: Web Audio unavailable, aircraft stay silent:",t);return}}et.isLive(this.context)&&et.unlock(this.context),this.apply()}setLevel(t){this.level=t,this.master&&(this.master.gain.value=t)}setPaused(t){t!==this.paused&&(this.paused=t,this.apply())}setVoices(t,e=0){this.requested=t,this.headingDeg=e,this.apply()}dispose(){for(const t of[...this.voices.keys()])this.release(t);et.isLive(this.context)&&this.context.close(),this.context=void 0,this.master=void 0,this.bus=void 0}apply(){const t=this.context;if(!t)return;const e=this.paused?[]:this.requested,a=new Set(e.map(n=>n.id));for(const n of[...this.voices.keys()])a.has(n)||this.release(n);for(const n of e){const s=this.voices.get(n.id)??this.build(t,n);this.retarget(t,s,n)}}build(t,e){const a=t.createGain();a.gain.value=0;let n;const s=this.busOf(t);typeof t.createStereoPanner=="function"?(n=t.createStereoPanner(),a.connect(n).connect(s)):a.connect(s);const i=t.createGain(),o=e.character?.modulationDepth??0;i.gain.value=1-o/2;const r=t.createOscillator();r.type="sine";const l=t.createGain();l.gain.value=o/2,r.connect(l).connect(i.gain),i.connect(a);const c=t.createBufferSource();c.buffer=this.noise(t),c.loop=!0,c.loopStart=Math.random()*ct*.5;const u=[],d=[],h=[];for(const D of g.OCTAVES){const I=t.createBiquadFilter();I.type="bandpass",I.frequency.value=D,I.Q.value=ut;const H=t.createBiquadFilter();H.type="bandpass",H.frequency.value=D,H.Q.value=ut;const P=t.createGain();P.gain.value=0,c.connect(I).connect(H).connect(P).connect(i),u.push(I),d.push(H),h.push(P)}const p=[];for(const[D,I]of[[e.character?.toneHz,e.character?.toneShare],[e.character?.humHz,e.character?.humShare]])if(D!==void 0)for(let H=1;H<=Nt;H++){const P=t.createOscillator();P.type="sine",P.frequency.value=D*H;const tt=t.createGain();tt.gain.value=0,P.connect(tt).connect(a),p.push({oscillator:P,gain:tt,harmonic:H,baseHz:D,share:I??0})}const m=t.createGain();m.gain.value=0,m.connect(a.gain);const E=Mt.map(D=>{const I=t.createOscillator();return I.type="sine",I.frequency.value=D,I.connect(m),I}),O=t.createGain();O.gain.value=e.character?.roughness??lt;const B=t.createBufferSource();B.buffer=this.roughTable(t,Bt),B.loop=!0,B.loopStart=Math.random()*X*.5,B.connect(O).connect(i.gain);const v=t.createGain();v.gain.value=(e.character?.roughness??lt)*vt;const S=t.createBufferSource();S.buffer=this.roughTable(t,ht),S.loop=!0,S.loopStart=Math.random()*X*.5,S.connect(v).connect(i.gain);let F;const x=this.busOf(t)&&this.reverb;x&&(F=t.createGain(),F.gain.value=0,a.connect(F).connect(x));let L,_;if(!e.inside&&typeof t.createDelay=="function"){const D=t.createDelay(dt);D.delayTime.value=0;const I=t.createBiquadFilter();I.type="highshelf",I.frequency.value=Pt,I.gain.value=0;const H=t.createGain();H.gain.value=0,a.connect(D).connect(I).connect(H).connect(n??s);const P=t.createGain();P.gain.value=0,_=t.createBufferSource(),_.buffer=this.roughTable(t,ht),_.loop=!0,_.loopStart=Math.random()*X*.5,_.connect(P).connect(D.delayTime),L={delay:D,jitter:P,shelf:I,gain:H}}const k=[c,B,S,r,...p.map(D=>D.oscillator),...E,..._?[_]:[]];for(const D of k)D.start();const $={nodes:[a,i,l,O,v,m,...L?[L.delay,L.jitter,L.shelf,L.gain]:[],...p.map(D=>D.gain),...u,...d,...h,...F?[F]:[],...n?[n]:[],...k],sources:k,filters:u,seconds:d,gains:h,tones:p,lfo:r,lfoDepth:l,wander:E,wanderDepth:m,roughDepth:O,crackleDepth:v,beat:i,output:a,panner:n,send:F,echo:L};return this.voices.set(e.id,$),$}retarget(t,e,a){const n=t.currentTime,s=(p,m)=>p.setTargetAtTime(m,n,Tt),i=Math.min(Ht,Math.max(_t,a.dopplerRatio)),o=Math.min(yt,Math.max(wt,Math.sqrt(a.dopplerRatio))),r=t.sampleRate*.45,l=a.bandAmplitudes.map((p,m)=>p*Y.unweighting(g.OCTAVES[m])),c=Math.sqrt(l.reduce((p,m)=>p+m*m,0)),u=Math.min(1,Math.max(0,(a.distanceKm-mt)/(Lt-mt)));g.OCTAVES.forEach((p,m)=>{s(e.filters[m].frequency,Math.min(r,p*o)),s(e.seconds[m].frequency,Math.min(r,p*o)),s(e.gains[m].gain,l[m]*Math.sqrt(Vt/p))});const d=a.character;for(const{oscillator:p,gain:m,harmonic:E,baseHz:O,share:B}of e.tones){const v=O*E;s(p.frequency,v*i);const S=v*i;s(m.gain,S<r?B*Gt*l[Y.bandOf(S)]/E:0)}d?.modulationHz!==void 0&&s(e.lfo.frequency,d.modulationHz*i);const h=c>0?Y.saturated(c)/c:1;if(s(e.output.gain,h*(1-Wt*u)),s(e.wanderDepth.gain,h*jt*u/Mt.length),e.send&&s(e.send.gain,Y.reverbSend(a.distanceKm)),e.echo){const p=a.groundEcho;s(e.echo.gain.gain,p?.lowGain??0),p&&(s(e.echo.delay.delayTime,Math.min(dt,p.delayS)),s(e.echo.jitter.gain,p.jitterS),s(e.echo.shelf.gain,p.lowGain>0?Math.max(kt,20*Math.log10(Math.max(p.highGain,1e-6)/p.lowGain)):0))}if(e.panner){const p=(a.azimuthDeg-this.headingDeg)*Math.PI/180,m=a.inside?0:Math.max(-pt,Math.min(pt,Math.sin(p)))*(1-Ft*u);s(e.panner.pan,m)}}static saturated(t){const e=Xt*gt;if(t<=e)return t;const a=gt-e;return e+a*(1-Math.exp(-(t-e)/a))}static reverbSend(t){return Math.min(Ut,Math.sqrt(Math.max(0,t)/Kt))}static unweighting(t){return 10**(Math.min(Ct,Math.max(0,-g.aWeightingDb(t)))/20)}static bandOf(t){let e=0;return g.OCTAVES.forEach((a,n)=>{Math.abs(Math.log(t/a))<Math.abs(Math.log(t/g.OCTAVES[e]))&&(e=n)}),e}roughTable(t,e){const a=this.roughBuffers.get(e);if(a)return a;const n=Math.floor(t.sampleRate*X),s=t.createBuffer(1,n,t.sampleRate),i=s.getChannelData(0),o=Array.from({length:X*e},()=>(Math.random()*2-1)**3),r=t.sampleRate/e;for(let l=0;l<i.length;l++){const c=l/r,u=Math.floor(c),d=c-u,h=d*d*(3-2*d);i[l]=o[u%o.length]*(1-h)+o[(u+1)%o.length]*h}return this.roughBuffers.set(e,s),s}roomImpulse(t){const e=Math.floor(t.sampleRate*zt),a=t.createBuffer(2,e,t.sampleRate);for(let n=0;n<2;n++){const s=a.getChannelData(n);let i=0;for(let o=0;o<e;o++){const r=o/t.sampleRate,l=.6*Math.exp(-r/(At*2))+.04;i+=l*(Math.random()*2-1-i),s[o]=i*Math.exp(-r/At)}}return a}busOf(t){if(this.bus)return this.bus;const e=t.createGain();if(e.gain.value=this.level,e.connect(t.destination),this.master=e,typeof t.createConvolver=="function"){const a=t.createConvolver();a.buffer=this.roomImpulse(t);const n=t.createGain();n.gain.value=.9,a.connect(n),this.reverb=a,this.reverbOut=n}if(typeof t.createDynamicsCompressor=="function"){const a=t.createDynamicsCompressor();a.threshold.value=-6,a.knee.value=3,a.ratio.value=4,a.attack.value=.005,a.release.value=.25,a.connect(e),this.bus=a}else this.bus=e;return this.reverbOut?.connect(this.bus),this.bus}release(t){const e=this.voices.get(t);if(!e)return;this.voices.delete(t);const a=this.context;a&&(e.output.gain.setTargetAtTime(0,a.currentTime,rt/3),setTimeout(()=>{for(const n of e.sources)try{n.stop()}catch{}for(const n of e.nodes)n.disconnect()},rt*1e3*3))}noise(t){if(this.noiseBuffer)return this.noiseBuffer;const e=t.createBuffer(1,t.sampleRate*ct,t.sampleRate),a=e.getChannelData(0);for(let n=0;n<a.length;n++)a[n]=Math.random()*2-1;return this.noiseBuffer=e,e}}class U{static TYPES={A318:["Airbus A318","airliner-narrow",34.1,31.4],A319:["Airbus A319","airliner-narrow",34.1,33.8],A320:["Airbus A320","airliner-narrow",34.1,37.6],A321:["Airbus A321","airliner-narrow",34.1,44.5],A19N:["Airbus A319neo","airliner-narrow",35.8,33.8],A20N:["Airbus A320neo","airliner-narrow",35.8,37.6],A21N:["Airbus A321neo","airliner-narrow",35.8,44.5],B737:["Boeing 737-700","airliner-narrow",34.3,33.6],B738:["Boeing 737-800","airliner-narrow",35.8,39.5],B739:["Boeing 737-900","airliner-narrow",35.8,42.1],B38M:["Boeing 737 MAX 8","airliner-narrow",35.9,39.5],B39M:["Boeing 737 MAX 9","airliner-narrow",35.9,42.2],B752:["Boeing 757-200","airliner-narrow",38,47.3],B753:["Boeing 757-300","airliner-narrow",38,54.4],B762:["Boeing 767-200","airliner-wide",47.6,48.5],B763:["Boeing 767-300","airliner-wide",47.6,54.9],B764:["Boeing 767-400","airliner-wide",51.9,61.4],B772:["Boeing 777-200","airliner-wide",60.9,63.7],B77L:["Boeing 777-200LR","airliner-wide",64.8,63.7],B77W:["Boeing 777-300ER","airliner-wide",64.8,73.9],B788:["Boeing 787-8","airliner-wide",60.1,56.7],B789:["Boeing 787-9","airliner-wide",60.1,62.8],B78X:["Boeing 787-10","airliner-wide",60.1,68.3],B744:["Boeing 747-400","airliner-wide",64.4,70.7],B748:["Boeing 747-8","airliner-wide",68.4,76.3],A306:["Airbus A300-600","airliner-wide",44.8,54.1],A310:["Airbus A310","airliner-wide",43.9,46.7],A332:["Airbus A330-200","airliner-wide",60.3,58.8],A333:["Airbus A330-300","airliner-wide",60.3,63.7],A338:["Airbus A330-800","airliner-wide",64,58.8],A339:["Airbus A330-900","airliner-wide",64,63.7],A343:["Airbus A340-300","airliner-wide",60.3,63.7],A346:["Airbus A340-600","airliner-wide",63.5,75.4],A359:["Airbus A350-900","airliner-wide",64.8,66.8],A35K:["Airbus A350-1000","airliner-wide",64.8,73.8],A388:["Airbus A380-800","airliner-wide",79.8,72.7],CONC:["Concorde","airliner-supersonic",25.6,61.7],DC3:["Douglas DC-3","piston-heavy",29,19.7],DC4:["Douglas DC-4","piston-heavy",35.8,28.6],P51:["North American P-51 Mustang","piston-heavy",11.3,9.8],E170:["Embraer 170","regional-jet",26,29.9],E75L:["Embraer 175","regional-jet",26,31.7],E75S:["Embraer 175","regional-jet",26,31.7],E190:["Embraer 190","regional-jet",28.7,36.2],E195:["Embraer 195","regional-jet",28.7,38.7],E290:["Embraer 190-E2","regional-jet",33.7,36.2],E295:["Embraer 195-E2","regional-jet",33.7,41.5],CRJ2:["Bombardier CRJ200","regional-jet",21.2,26.8],CRJ7:["Bombardier CRJ700","regional-jet",23.2,32.3],CRJ9:["Bombardier CRJ900","regional-jet",24.9,36.2],CRJX:["Bombardier CRJ1000","regional-jet",26.2,39.1],AT72:["ATR 72","regional-turboprop",27.1,27.2],AT76:["ATR 72-600","regional-turboprop",27.1,27.2],AT45:["ATR 42","regional-turboprop",24.6,22.7],DH8D:["Dash 8 Q400","regional-turboprop",28.4,32.8],DH8C:["Dash 8-300","regional-turboprop",27.4,25.7],SF34:["Saab 340","regional-turboprop",21.4,19.7],B190:["Beechcraft 1900","regional-turboprop",17.7,17.6],C25A:["Cessna CitationJet CJ2","business-jet",14.3,14.4],C56X:["Cessna Citation Excel","business-jet",17.2,16],C68A:["Cessna Citation Latitude","business-jet",22,18.9],C550:["Cessna Citation II","business-jet",15.8,14.4],E55P:["Embraer Phenom 300","business-jet",15.9,15.6],E50P:["Embraer Phenom 100","business-jet",12.3,12.8],GLF5:["Gulfstream G550","business-jet",28.5,29.4],FA7X:["Dassault Falcon 7X","business-jet",26.2,23.4],CL60:["Bombardier Challenger 600","business-jet",19.6,20.9],LJ45:["Learjet 45","business-jet",14.6,17.7],H25B:["Hawker 800","business-jet",15.7,15.6],C172:["Cessna 172","light-piston",11,8.3],C152:["Cessna 152","light-piston",10.2,7.3],C182:["Cessna 182","light-piston",10.9,8.8],P28A:["Piper Cherokee","light-piston",10.7,7.2],PA34:["Piper Seneca","light-piston",11.8,8.7],SR20:["Cirrus SR20","light-piston",10.9,7.9],SR22:["Cirrus SR22","light-piston",11.7,7.9],S22T:["Cirrus SR22T","light-piston",11.7,7.9],DA40:["Diamond DA40","light-piston",11.6,8.1],DA42:["Diamond DA42","light-piston",13.4,8.6],BE20:["Beechcraft King Air 200","turboprop-light",16.6,13.3],BE58:["Beechcraft Baron","light-piston",11.5,9.1],C208:["Cessna Caravan","turboprop-light",15.9,11.5],PC12:["Pilatus PC-12","turboprop-light",16.3,14.4],TBM9:["Daher TBM 900","turboprop-light",12.8,10.7],EC35:["Airbus H135","helicopter-light",10.2,12.1],EC45:["Airbus H145","helicopter-medium",11,13.6],AS50:["Airbus H125","helicopter-light",10.7,12.9],EC30:["Airbus H130","helicopter-light",10.7,12.6],B407:["Bell 407","helicopter-light",10.7,12.7],B06:["Bell 206","helicopter-light",10.2,12],B429:["Bell 429","helicopter-medium",10.9,13],B505:["Bell 505","helicopter-light",10.4,11.9],R44:["Robinson R44","helicopter-light",10.1,11.7],R22:["Robinson R22","helicopter-light",7.7,8.8],A109:["Agusta A109","helicopter-medium",11,13],A139:["Leonardo AW139","helicopter-medium",13.8,16.7],S92:["Sikorsky S-92","helicopter-heavy",17.2,20.9],H60:["Sikorsky UH-60 Black Hawk","helicopter-heavy",16.4,19.8],T38:["Northrop T-38 Talon","military-jet",7.7,14.1],HAWK:["BAE Hawk","military-jet",9.4,11.9],GLID:["Glider","glider",17,7],BALL:["Balloon","balloon",15,20],ULAC:["Ultralight","ultralight",9.5,6],C42:["Ikarus C42","ultralight",9.4,6.3],DRON:["Drone","unmanned",1,.6]};static CATEGORIES={A1:["Light aircraft","light-piston",11,8.3],A2:["Small aircraft","business-jet",15,15],A3:["Large aircraft","airliner-narrow",34.1,37.6],A4:["High-vortex large aircraft","airliner-narrow",38,47.3],A5:["Heavy aircraft","airliner-wide",60.3,63.7],A6:["High-performance aircraft","military-jet",8,14],A7:["Rotorcraft","helicopter-medium",10.7,12.7],B1:["Glider","glider",17,7],B2:["Lighter-than-air","balloon",15,20],B4:["Ultralight","ultralight",9.5,6],B6:["Unmanned aircraft","unmanned",1.5,1]};static GENERIC={name:"Airliner",kind:"airliner-narrow",spanM:34.1,lengthM:37.6,basis:"nothing"};static of(t){const e=t?.type?.toUpperCase(),a=e?U.TYPES[e]:void 0;if(a)return{code:e,name:a[0],kind:a[1],spanM:a[2],lengthM:a[3],basis:"type"};const n=t?.category?U.CATEGORIES[t.category]:void 0;return n?{name:n[0],kind:n[1],spanM:n[2],lengthM:n[3],basis:"category"}:{...U.GENERIC}}static isHelicopter(t){return t.kind.startsWith("helicopter")}}class C{static DUSK_SUN_ELEVATION_DEG=-.83;static ALWAYS=new Set(["airliner-narrow","airliner-wide","airliner-supersonic","regional-turboprop","regional-jet","business-jet"]);static NONE=new Set(["glider","balloon"]);static BRIGHTNESS={"light-piston":[.5,.2,.5],"turboprop-light":[.7,.4,.8],ultralight:[.4,.2,.4],unmanned:[0,.05,0],"helicopter-light":[1,1,1],"helicopter-medium":[1,1,1],"helicopter-heavy":[1,1,1],"military-jet":[1,1,1]};static LANDING_LIGHTS_BELOW_FT=1e4;static LANDING_INTENSITY=600;static LANDING_BEAM_DEG=10;static LANDING_COLOR="#fff1dc";static LANDING_BRIGHTNESS={"airliner-narrow":1,"airliner-wide":1,"airliner-supersonic":1,"regional-jet":.6,"regional-turboprop":.6,"business-jet":.4,"turboprop-light":.2,"light-piston":.1,ultralight:.05,"helicopter-light":.1,"helicopter-medium":.2,"helicopter-heavy":.2};static lampsOn(t,e){if(C.NONE.has(t))return{navigation:!1,beacon:!1,strobes:!1};if(C.ALWAYS.has(t))return{navigation:!0,beacon:!0,strobes:!0};const a=e<C.DUSK_SUN_ELEVATION_DEG;return t==="unmanned"?{navigation:!1,beacon:!1,strobes:a}:{navigation:a,beacon:a,strobes:a}}static lights(t,e){const a=C.lampsOn(t.kind,e),n=t.kind.startsWith("helicopter"),s=It.find(h=>h.id===(n?"helicopter":"airliner")).create(),[i,o]=n?[5,7]:[17,18],r=t.spanM/2/i,l=t.lengthM/2/o,[c,u,d]=C.BRIGHTNESS[t.kind]??[1,1,1];return s.filter(h=>h.id.startsWith("nav")?a.navigation:h.id.startsWith("strobe")?a.strobes:h.id.startsWith("beacon")?a.beacon:!0).filter(h=>!(h.id.startsWith("beacon")&&!a.beacon)).map(h=>{const p=h.id.startsWith("nav")?c:h.id.startsWith("strobe")?u:d;return{...h,offsetM:{x:h.offsetM.x*r,y:h.offsetM.y,z:h.offsetM.z*l},intensity:(h.intensity??1)*p}}).filter(h=>(h.intensity??1)>0)}static landingLights(t,e,a){const n=C.LANDING_BRIGHTNESS[t.kind]??0;if(n===0||!C.lampsOn(t.kind,e).navigation)return[];const s=c=>c<C.LANDING_LIGHTS_BELOW_FT;if(!a.some(c=>s(c.altitudeFt)))return[];const i=C.LANDING_INTENSITY*n,o=a.flatMap((c,u)=>u>0&&s(c.altitudeFt)!==s(a[u-1].altitudeFt)?[{t:c.t,intensity:s(c.altitudeFt)?i:0}]:[]),r=t.spanM/34,l=t.lengthM/36;return[-1,1].map(c=>({id:c<0?"landing-left":"landing-right",offsetM:{x:c*5*r,y:-1,z:3*l},color:C.LANDING_COLOR,intensity:s(a[0].altitudeFt)?i:0,pattern:{kind:"steady"},beamDeg:C.LANDING_BEAM_DEG,keyframes:o}))}static bodyColor(t){return t.kind==="military-jet"?"#8a8e94":t.kind.startsWith("helicopter")?"#c8ccd1":t.kind==="unmanned"?"#2c2e33":"#dde0e4"}}class J{static FAMILIES={"amvlab-a320":["A318","A319","A320","A321","A19N","A20N","A21N"],"amvlab-b737":["B732","B733","B734","B735","B736","B737","B738","B739","B37M","B38M","B39M","B3XM"],"amvlab-a350":["A359","A35K"],"amvlab-a380":["A388"],"amvlab-b787":["B788","B789","B78X"]};static BY_TYPE=new Map(Object.entries(J.FAMILIES).flatMap(([t,e])=>e.map(a=>[a,t])));static idOf(t){return t?J.BY_TYPE.get(t.toUpperCase()):void 0}}class T{static ID_PREFIX=Z.ID_PREFIX;static MAX_OBJECTS=40;static FT_TO_M=.3048;static DEG=Math.PI/180;static from(t,e,a,n=T.MAX_OBJECTS,s={}){return new Yt(t,e,a,n,s).build()}static idOf(t,e){return Z.idOf(t,e)}static keyOf(t){return Z.keyOf(t)}static HEIGHT_OVER_LENGTH=.29;static sizeOf(t){return{widthM:t.spanM,lengthM:t.lengthM,heightM:t.lengthM*T.HEIGHT_OVER_LENGTH}}static offsetOf(t,e){const a=j.seenFrom(t,{lat:e.lat,lng:e.lng,heightM:e.altitudeFt*T.FT_TO_M}),n=a.distanceKm*1e3,s=n*Math.cos(a.altitudeDeg*T.DEG);return{eastM:s*Math.sin(a.azimuthDeg*T.DEG),northM:s*Math.cos(a.azimuthDeg*T.DEG),upM:n*Math.sin(a.altitudeDeg*T.DEG),altitudeDeg:a.altitudeDeg,distanceKm:a.distanceKm}}static segments(t){const e=[];let a=[];for(const n of t.points){const s=a[a.length-1];s&&n.t-s.t>N.MAX_GAP_S*1e3&&(e.push(a),a=[]),a.push(n)}return e.push(a),e.filter(n=>n.length>=2)}static bearingDeg(t,e){return(Math.atan2(e.eastM-t.eastM,e.northM-t.northM)/T.DEG+360)%360}}class Yt{constructor(t,e,a,n,s){this.tracks=t,this.observer=e,this.startMs=a,this.maxObjects=n,this.options=s}build(){const t=[];for(const a of this.tracks){const n=T.keyOf(a),s=this.options.models?.get(n)??U.of(void 0);T.segments(a).forEach((i,o)=>{const r=i.map(h=>({point:h,at:T.offsetOf(this.observer,h)}));if(!r.some(h=>h.at.altitudeDeg>=0))return;const l=r.map((h,p)=>({t:h.point.t-this.startMs,eastM:h.at.eastM,northM:h.at.northM,altitudeM:h.at.upM,headingDeg:h.point.trackDeg??(p+1<r.length?T.bearingDeg(h.at,r[p+1].at):T.bearingDeg(r[p-1].at,h.at))})),c=T.idOf(a,o),u=r[Math.floor(r.length/2)].point,d=this.options.sunElevationAt?.(u)??90;t.push({object:{id:c,kind:"aircraft",eastM:l[0].eastM,northM:l[0].northM,headingDeg:l[0].headingDeg,sizeM:T.sizeOf(s),model:J.idOf(s.code)?{id:J.idOf(s.code)}:void 0,color:C.bodyColor(s),lights:[...C.lights(s,d),...C.landingLights(s,d,i.map(h=>({t:h.t-this.startMs,altitudeFt:h.altitudeFt})))],track:l},presence:{fromMs:l[0].t,untilMs:l[l.length-1].t},flight:{icao:a.icao,nonIcao:a.nonIcao,points:i},closestKm:Math.min(...r.map(h=>h.at.distanceKm))})})}t.sort((a,n)=>a.closestKm-n.closestKm);const e=t.slice(0,this.maxObjects);return{objects:e.map(a=>a.object),presence:new Map(e.map(a=>[a.object.id,a.presence])),flights:new Map(e.map(a=>[a.object.id,a.flight])),total:t.length,shown:e.length}}}const qt=[[20,0],[120,0],[130,1.5],[140,4],[150,7.5],[160,7.5]],Jt=[[20,1.5],[40,1],[60,1],[80,0],[120,0],[130,1],[140,1],[150,-3],[160,-6.5],[170,-12]],bt=.16,xt=1,$t=[[0,-2],[10,-1],[20,0],[40,0],[50,-2],[60,-4.5],[70,-7.5],[80,-11],[90,-15],[100,-19.5],[110,-25]],Zt=[[60,-15.8],[70,-11.5],[80,-8],[90,-5],[100,-2.7],[110,-1.2],[120,-.3],[130,0],[140,-2],[150,-6],[160,-10],[170,-15],[180,-20]],Qt=1.5,Et=-40,te=1.5,ee={takeoff:{jetMps:300,flightMps:80,jetShare:[1,1,.9,.6,.3,.1,0,0]},overflight:{jetMps:280,flightMps:130,jetShare:[1,1,.9,.6,.3,.1,0,0]},approach:{jetMps:180,flightMps:70,jetShare:[.6,.5,.4,.2,.1,0,0,0]}};class w{static bandsDb(t,e,a=340){const n=ee[e],s=w.fan(t)-w.fan(90),i=.62*Math.max(0,n.jetMps-n.flightMps)/a,o=-30*Math.log10(1+i/(1+i**5)**.2*Math.cos(t*Math.PI/180));return g.OCTAVES.map((r,l)=>{const c=o+w.jetRemainder(t,r*te/n.jetMps),u=n.jetShare[l];return 10*Math.log10(u*10**(c/10)+(1-u)*10**(s/10))})}static loudestDb(t){const e=w.loudest.get(t);if(e)return e;const a=g.OCTAVES.map(()=>-1/0);for(let n=0;n<=180;n+=5)w.bandsDb(n,t).forEach((s,i)=>a[i]=Math.max(a[i],s));return w.loudest.set(t,a),a}static loudest=new Map;static angleDeg(t,e){const a=t.reduce((s,i,o)=>s+i*e[o],0),n=Math.hypot(...t)*Math.hypot(...e);return n===0?90:Math.acos(Math.min(1,Math.max(-1,a/n)))*180/Math.PI}static fan(t){const e=w.read($t,t,!0),a=w.read(Zt,t,!0)+Qt;return 10*Math.log10(10**(e/10)+10**(a/10))}static jetRemainder(t,e){const a=Math.min(1,Math.max(0,Math.log(e/bt)/Math.log(xt/bt)));return(1-a)*w.read(qt,t)+a*w.read(Jt,t)}static read(t,e,a=!1){const[n,s]=[t[0],t[1]],[i,o]=[t[t.length-2],t[t.length-1]];if(e<=n[0])return a?Math.max(Et,n[1]+(s[1]-n[1])/(s[0]-n[0])*(e-n[0])):n[1];if(e>=o[0])return a?Math.max(Et,o[1]+(o[1]-i[1])/(o[0]-i[0])*(e-o[0])):o[1];for(let r=1;r<t.length;r++){const[l,c]=[t[r-1],t[r]];if(e<=c[0])return l[1]+(c[1]-l[1])*(e-l[0])/(c[0]-l[0])}return o[1]}}class A{static GRASS={flowResistivityKPa:200,earHeightM:1.6};static COHERENCE=.4;static JITTER_S=1e-4;static ECHO_UNDER_S=5e-4;static ECHO_FROM_S=.0015;static LOW_HZ=125;static HIGH_HZ=2e3;static AIR_DENSITY=1.2;static reflection(t,e,a=A.GRASS){const[n,s]=A.impedance(t,a);return A.reflected(n,s,Math.sin(Math.max(0,e)*Math.PI/180))}static impedance(t,e=A.GRASS){const a=A.AIR_DENSITY*t/(e.flowResistivityKPa*1e3);return[1+.0571*a**-.754,-.087*a**-.732]}static reflected(t,e,a){const[n,s,i,o]=[t*a-1,e*a,t*a+1,e*a],r=i*i+o*o;return{re:(n*i+s*o)/r,im:(s*i-n*o)/r}}static delayS(t,e=A.GRASS,a=340){return 2*e.earHeightM*Math.sin(Math.max(0,t)*Math.PI/180)/a}static excessDb(t,e=A.GRASS,a=340){const n=`${e.flowResistivityKPa}|${e.earHeightM}|${a}`;let s=A.overheads.get(n);return s||A.overheads.set(n,s=A.bandsDb(90,e,a)),A.bandsDb(t,e,a).map((i,o)=>i-s[o])}static echo(t,e=A.GRASS,a=340){const n=A.delayS(t,e,a);if(n<=A.ECHO_UNDER_S)return;const s=Math.min(1,(n-A.ECHO_UNDER_S)/(A.ECHO_FROM_S-A.ECHO_UNDER_S)),i=s*s*(3-2*s),o=r=>{const l=A.reflection(r,t,e);return i*A.COHERENCE*Math.hypot(l.re,l.im)};return{delayS:n,lowGain:o(A.LOW_HZ),highGain:o(A.HIGH_HZ),jitterS:A.JITTER_S}}static overheads=new Map;static thirds=g.OCTAVES.map(t=>[-1,0,1].map(e=>{const a=t*2**(e/3);return{middle:a,from:a*2**(-1/6),to:a*2**(1/6)}}));static impedances=new Map;static bandsDb(t,e,a){const n=A.delayS(t,e,a),s=A.COHERENCE,i=Math.sin(Math.max(0,t)*Math.PI/180);let o=A.impedances.get(e.flowResistivityKPa);return o||A.impedances.set(e.flowResistivityKPa,o=A.thirds.map(r=>r.map(l=>A.impedance(l.middle,e)))),A.thirds.map((r,l)=>{let c=0;return r.forEach((u,d)=>{const h=A.reflected(o[l][d][0],o[l][d][1],i),p=2*Math.PI*n*(u.to-u.from),[m,E]=p<1e-9?[1,0]:[(Math.sin(2*Math.PI*u.to*n)-Math.sin(2*Math.PI*u.from*n))/p,(Math.cos(2*Math.PI*u.from*n)-Math.cos(2*Math.PI*u.to*n))/p];c+=1+h.re*h.re+h.im*h.im+2*s*(h.re*m+h.im*E)}),10*Math.log10(c/r.length)})}}const q={takeoff:{shapeDb:[10,3,-3,-2,-2,-2,5,4],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},ae={takeoff:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:0},approach:{shapeDb:[0,0,0,0,0,0,0,0],levelDb:-8}},Ot=[{id:"turbofan-narrow-body",name:"Turbofan airliner, narrow-body",kinds:["airliner-narrow"],totalDbA:148,shapeDb:[-32,-17,-9,-6,-5,-7,-12,-22],character:{toneHz:1800,toneShare:.3,humHz:90,humShare:.7},regimes:q},{id:"turbojet-supersonic",name:"Supersonic turbojet airliner",kinds:["airliner-supersonic"],totalDbA:169.5,shapeDb:[-22,-13,-9,-6,-6,-9,-15,-25],character:{humHz:100,humShare:.7},regimes:ae},{id:"turbofan-wide-body",name:"Turbofan airliner, wide-body",kinds:["airliner-wide"],totalDbA:151,shapeDb:[-28,-14,-7,-4,-3,-6,-12,-22],character:{toneHz:1200,toneShare:.3,humHz:70,humShare:.7},regimes:q},{id:"regional-jet",name:"Regional jet",kinds:["regional-jet"],totalDbA:144,shapeDb:[-32,-17,-9,-5,-4,-6,-11,-21],character:{toneHz:1900,toneShare:.3,humHz:95,humShare:.7},regimes:q},{id:"business-jet",name:"Business jet",kinds:["business-jet"],totalDbA:141,shapeDb:[-30,-15,-8,-4,-3,-4,-9,-19],character:{toneHz:2500,toneShare:.25,humHz:110,humShare:.7},regimes:q},{id:"turboprop",name:"Turboprop",kinds:["regional-turboprop","turboprop-light"],totalDbA:138,shapeDb:[-14,-9,-8,-6,-8,-13,-20,-28],character:{toneHz:80,toneShare:.5}},{id:"light-piston",name:"Light piston aircraft",kinds:["light-piston"],totalDbA:130,shapeDb:[-20,-10,-3,-6,-10,-20,-27,-42],character:{toneHz:80,toneShare:.4,modulationHz:80,modulationDepth:.4}},{id:"piston-heavy",name:"Heavy piston aircraft",kinds:["piston-heavy"],totalDbA:140,shapeDb:[-31,-12,-11,-9,-7,-6,-7,-11],character:{toneHz:84,toneShare:.4,modulationHz:84,modulationDepth:.36}},{id:"ultralight",name:"Ultralight",kinds:["ultralight"],totalDbA:124,shapeDb:[-16,-8,-5,-4,-9,-15,-23,-31],character:{toneHz:140,toneShare:.4}},{id:"helicopter-light",name:"Light helicopter",kinds:["helicopter-light"],totalDbA:134,shapeDb:[-15,-8,-4,-3,-6,-10,-16,-24],character:{modulationHz:20,modulationDepth:.5}},{id:"helicopter-medium",name:"Medium helicopter",kinds:["helicopter-medium"],totalDbA:138,shapeDb:[-14,-7,-4,-3,-6,-10,-16,-24],character:{modulationHz:22,modulationDepth:.5}},{id:"helicopter-heavy",name:"Heavy helicopter",kinds:["helicopter-heavy"],totalDbA:144,shapeDb:[-12,-6,-4,-4,-7,-11,-17,-25],character:{modulationHz:17,modulationDepth:.5}},{id:"military-jet",name:"Military jet",kinds:["military-jet"],totalDbA:152,shapeDb:[-26,-12,-6,-3,-2,-3,-7,-15]},{id:"glider",name:"Glider",kinds:["glider"],totalDbA:85,shapeDb:[-30,-22,-15,-10,-8,-8,-14,-22]},{id:"balloon",name:"Hot-air balloon",kinds:["balloon"],totalDbA:100,shapeDb:[-25,-15,-9,-5,-3,-6,-12,-20]},{id:"unmanned",name:"Unmanned aircraft",kinds:["unmanned"],totalDbA:88,shapeDb:[-40,-30,-20,-12,-6,-3,-3,-8],character:{toneHz:450,toneShare:1}}],ft=(b,t)=>b.map(e=>e+t-g.sumDb(b));function ne(b,t){if(!b)return;const e=t.toneRatio??1,a=t.toneGain??1;return{...b,...b.toneHz!==void 0?{toneHz:b.toneHz*e,toneShare:Math.min(1,(b.toneShare??0)*a)}:{},...b.humHz!==void 0?{humHz:b.humHz*e,humShare:Math.min(1,(b.humShare??0)*a)}:{}}}const St=Ot.map(b=>{const t=b.regimes===q?"turbofan":void 0,e={id:b.id,name:b.name,soundPowerA:ft(b.shapeDb,b.totalDbA),character:b.character,directivity:t};if(!b.regimes)return e;const a={overflight:e};for(const[n,s]of Object.entries(b.regimes))a[n]={id:`${b.id}-${n}`,name:`${b.name}, ${n}`,soundPowerA:ft(b.shapeDb.map((i,o)=>i+s.shapeDb[o]),b.totalDbA+s.levelDb),character:ne(b.character,s),directivity:t};return{...e,regimes:a}});class M{static DEFAULT_AMBIENT_DB_A=35;static DETECTION_MARGIN_DB=3;static AMBIENT_SHAPE_DB=Dt.OUTDOOR_SHAPE_DB;static HEARING_FLOOR_DB_A=0;static ITERATIONS=30;static CONVERGED_MS=.5;static VELOCITY_STEP_MS=500;static CLIMB_MPS=2.5;static DESCENT_MPS=1.5;static LOW_M=3e3;static CLIMB_SPAN_MS=3e4;static noiseOfKind(t){const e=Ot.find(a=>a.kinds.includes(t));return St.find(a=>a.id===(e?.id??"turbofan-narrow-body"))}static bandsAt(t,e,a=g.STANDARD){const n=20*Math.log10(Math.max(e*1e3,1))+11;return g.OCTAVES.map((s,i)=>t.soundPowerA[i]-n-g.absorptionDbPerKm(s,a)*e)}static couldBeHeard(t,e,a=M.DEFAULT_AMBIENT_DB_A,n=g.STANDARD,s){const i=M.ambientBands(a,s);return Object.entries(t.regimes??{overflight:t}).some(([r,l])=>M.bandsAt(l,e,n).map((c,u)=>c+(l.directivity==="turbofan"?w.loudestDb(r)[u]:0)).some((c,u)=>c>=Math.max(i[u]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)))}static ambientBands(t,e=M.AMBIENT_SHAPE_DB){const a=g.sumDb(e);return e.map(n=>t+n-a)}static heardAt(t,e,a,n={}){const s=n.air??g.STANDARD,i=g.speedOfSound(s.temperatureC),o=t.points[t.points.length-1]?.t;if(o===void 0)return;let r=Math.min(a,o),l=N.positionAt(t,r);if(!l)return;let c=j.seenFrom(e,l.geo);for(let _=0;_<M.ITERATIONS;_++){const k=a-c.distanceKm*1e3*1e3/i,$=Math.abs(k-r);if(r=k,l=N.positionAt(t,r),!l)return;if(c=j.seenFrom(e,l.geo),$<M.CONVERGED_MS)break}const u=N.positionAt(t,a),d=u?j.seenFrom(e,u.geo):c,h=M.regimeAt(t,r,e),p=M.inRegime(n.noise??St[0],h),m=n.ambientDbA??M.DEFAULT_AMBIENT_DB_A,E=M.ambientBands(m,n.ambientShapeDb),O=M.emissionAngle(t,e,r),B=p.directivity==="turbofan"?w.bandsDb(O,h,i):void 0,v=n.ground===null?g.OCTAVES.map(()=>0):A.excessDb(c.altitudeDeg,n.ground,i),S=M.bandsAt(p,c.distanceKm,s).map((_,k)=>_+(B?.[k]??0)+v[k]),F=S.map((_,k)=>_>=Math.max(E[k]+M.DETECTION_MARGIN_DB,M.HEARING_FLOOR_DB_A)),x=S.indexOf(Math.max(...S)),L=F.lastIndexOf(!0);return{track:t,audible:F.some(Boolean),levelDbA:g.sumDb(S),bandsDbA:S,ambientDbA:m,delayS:(a-r)/1e3,emittedAtMs:r,sound:c,seen:d,lagDeg:M.angleBetween(c,d),dopplerRatio:M.doppler(t,e,r,i),dominantHz:g.OCTAVES[x],cutoffHz:L<0?void 0:g.OCTAVES[L],regime:h,noise:p,emissionAngleDeg:O}}static emissionAngle(t,e,a){const n=M.VELOCITY_STEP_MS,s=N.positionAt(t,a-n),i=N.positionAt(t,a+n),o=N.positionAt(t,a);if(!s||!i||!o)return 90;const r=d=>{const h=j.seenFrom(e,d),p=h.altitudeDeg*Math.PI/180,m=h.azimuthDeg*Math.PI/180,E=h.distanceKm*1e3;return[E*Math.cos(p)*Math.sin(m),E*Math.cos(p)*Math.cos(m),E*Math.sin(p)]},[l,c,u]=[r(s.geo),r(i.geo),r(o.geo)];return w.angleDeg(c.map((d,h)=>d-l[h]),u.map(d=>-d))}static regimeAt(t,e,a){const n=M.CLIMB_SPAN_MS,s=N.positionAt(t,e-n)??N.positionAt(t,e),i=N.positionAt(t,e+n)??N.positionAt(t,e),o=N.positionAt(t,e);if(!s||!i||!o)return"overflight";const r=(Math.min(e+n,t.points[t.points.length-1].t)-Math.max(e-n,t.points[0].t))/1e3;if(r<=0)return"overflight";const l=(i.altitudeFt-s.altitudeFt)*.3048/r;return o.altitudeFt*.3048-a.heightM>M.LOW_M?"overflight":l>M.CLIMB_MPS?"takeoff":l<-1.5?"approach":"overflight"}static inRegime(t,e){return t.regimes?.[e]??t}static profile(t,e,a,n,s=2e3,i={}){const o=[];let r,l,c=a;for(let u=a;u<=n;u+=s){const d=M.heardAt(t,e,u,i);d&&(!l||d.levelDbA>l.levelDbA)&&(l=d,c=u),d?.audible?r?r.untilMs=u:o.push(r={fromMs:u,untilMs:u}):r=void 0}return{track:t,audible:o,peakDbA:l?.levelDbA??-1/0,peakAtMs:c,peakDelayS:l?.delayS??0}}static angleBetween(t,e){const a=c=>{const u=c.altitudeDeg*Math.PI/180,d=c.azimuthDeg*Math.PI/180;return[Math.cos(u)*Math.sin(d),Math.cos(u)*Math.cos(d),Math.sin(u)]},[n,s,i]=a(t),[o,r,l]=a(e);return Math.acos(Math.min(1,Math.max(-1,n*o+s*r+i*l)))*180/Math.PI}static doppler(t,e,a,n){const s=M.VELOCITY_STEP_MS,i=N.positionAt(t,a-s),o=N.positionAt(t,a+s);if(!i||!o)return 1;const r=j.seenFrom(e,i.geo).distanceKm*1e3,l=j.seenFrom(e,o.geo).distanceKm*1e3;return 1/(1-(r-l)/(2*s/1e3)/n)}}class oe{static at(t,e,a,n,s={}){const i=N.seenFrom(t,a,n);if(!i)return;const o=U.of(e),r=M.heardAt(t,a,n,{noise:M.noiseOfKind(o.kind),...s});return{hex:`${t.nonIcao?"~":""}${t.icao.toString(16).padStart(6,"0")}`,registration:e?.registration,typeCode:o.code??e?.type,name:o.basis==="nothing"?void 0:o.name,kind:o.kind,basis:o.basis,military:e?.military===!0,restricted:e?.restricted===!0,altitudeFt:i.altitudeFt,groundSpeedKt:i.groundSpeedKt,trackDeg:i.trackDeg,sky:i.sky,angularRateDegPerS:i.angularRateDegPerS,hearing:r&&{audible:r.audible,levelDbA:r.levelDbA,ambientDbA:r.ambientDbA,delayS:r.delayS,lagDeg:r.lagDeg,dopplerRatio:r.dopplerRatio,cutoffHz:r.cutoffHz,dominantHz:r.dominantHz}}}}class R{static REFERENCE_AMPLITUDE=.02;static MASKING_RANGE_DB=6;static KNEE_DB=20;static COMPRESSION_RATIO=1;static EXPANSION_RATIO=1.8;static HEADROOM_DB=Dt.HEADROOM_DB;static DEFAULT_MAX_VOICES=4;static candidates(t,e,a,n,s={}){const i=new Set;for(const[o,r]of t){const l=M.noiseOfKind(U.of(e.get(a(r))).kind);let c=1/0;for(const u of r.points)c=Math.min(c,j.seenFrom(n,{lat:u.lat,lng:u.lng,heightM:u.altitudeFt*.3048}).distanceKm);M.couldBeHeard(l,c,s.ambientDbA,s.air,s.ambientShapeDb)&&i.add(o)}return i}static voices(t,e,a,n,s,i,o={}){const r=[];for(const l of t){const c=e.get(l);if(!c||o.only?.(l)===!1)continue;const u=o.kindOf?.(l)??U.of(a.get(n(c))).kind,d=o.noiseOf?.(l)??M.noiseOfKind(u),h=M.heardAt(c,s,i,{...o,noise:d});if(!h?.audible)continue;const p=o.throughDb,m=p?h.bandsDbA.map((E,O)=>E-(p[O]??0)):h.bandsDbA;p&&!R.noticed(m,h.ambientDbA,o.ambientShapeDb)||r.push({id:l,kind:u,bandAmplitudes:R.bandAmplitudes(m,h.ambientDbA,o.referenceAmplitude,{ambientShapeDb:o.ambientShapeDb,expandUnderKnee:o.expandUnderKnee}),levelDbA:p?g.sumDb(m):h.levelDbA,distanceKm:h.sound.distanceKm,dopplerRatio:h.dopplerRatio,azimuthDeg:h.sound.azimuthDeg,elevationDeg:h.sound.altitudeDeg,character:h.noise.character,groundEcho:o.ground===null?void 0:A.echo(h.sound.altitudeDeg,o.ground,g.speedOfSound((o.air??g.STANDARD).temperatureC))})}return r.sort((l,c)=>c.levelDbA-l.levelDbA).slice(0,o.maxVoices??R.DEFAULT_MAX_VOICES)}static noticed(t,e,a){const n=M.ambientBands(e,a);return t.some((s,i)=>s>=n[i]+M.DETECTION_MARGIN_DB)}static bandAmplitudes(t,e,a=R.REFERENCE_AMPLITUDE,n={}){const s=M.ambientBands(e,n.ambientShapeDb),i=n.expandUnderKnee===!1?1:R.EXPANSION_RATIO,o=M.DETECTION_MARGIN_DB,r=g.sumDb(t),l=r-e,c=l>=R.KNEE_DB?R.KNEE_DB+(l-R.KNEE_DB)/R.COMPRESSION_RATIO:R.KNEE_DB-(R.KNEE_DB-l)*i,u=a*10**((c-R.HEADROOM_DB)/20);return t.map((d,h)=>{const p=Math.min(1,Math.max(0,(d-s[h]-o+R.MASKING_RANGE_DB)/(2*R.MASKING_RANGE_DB)));return p*p*(3-2*p)*u*10**((d-r)/20)})}static BANDS_HZ=g.OCTAVES}class Q{static RUMBLE_BELOW_HZ=500;static DULL_BELOW_HZ=2e3;static PITCH_NOTICED=.03;static text(t,e,a,n){const s=(d,h=0)=>d.toLocaleString(n,{maximumFractionDigits:h}),i=(d,h)=>d.replace(/\{(\w+)\}/g,(p,m)=>h[m]??`{${m}}`),o=[],r=[t.registration,t.name].filter(Boolean).join(" · ");o.push(r||i(e.unnamed,{hex:t.hex}));const l=[i(e.altitude,{value:s(Math.round(t.altitudeFt/100)*100)}),t.groundSpeedKt===void 0?void 0:i(e.speed,{value:s(Math.round(t.groundSpeedKt))}),t.trackDeg===void 0?void 0:i(e.heading,{value:s(Math.round(t.trackDeg))})].filter(Boolean);o.push(l.join(" · ")),o.push(i(e.position,{distance:s(t.sky.distanceKm,t.sky.distanceKm<10?1:0),elevation:s(Math.round(t.sky.altitudeDeg)),bearing:a(t.sky.azimuthDeg)}));const c=t.hearing;if(!c)o.push(e.soundUnknown);else if(!c.audible)o.push(i(e.inaudible,{level:s(Math.round(c.levelDbA)),ambient:s(Math.round(c.ambientDbA))}));else{const d=c.cutoffHz??0,h=d<=Q.RUMBLE_BELOW_HZ?e.rumble:d<=Q.DULL_BELOW_HZ?e.muffled:e.broad,p=c.dopplerRatio-1,m=Math.abs(p)<Q.PITCH_NOTICED?"":i(p>0?e.pitchHigher:e.pitchLower,{percent:s(Math.round(Math.abs(p)*100))});o.push(i(e.heard,{level:s(Math.round(c.levelDbA)),delay:s(Math.round(c.delayS)),lag:s(Math.round(c.lagDeg)),character:i(h,{cutoff:s(d)}),pitch:m}))}t.contrail&&o.push(i(t.contrail.persistent?e.contrailPersistent:e.contrailShort,{rhi:s(Math.round(t.contrail.iceRelativeHumidity*100))}));const u=[t.military?e.military:void 0,t.restricted?e.restricted:void 0].filter(Boolean);return u.length>0&&o.push(u.join(" · ")),o.push(e.candidate),o.join(`
|
|
2
2
|
`)}}class nt{static EFFICIENCY={"airliner-narrow":.34,"airliner-wide":.38,"regional-jet":.32,"business-jet":.3,"military-jet":.22,unknown:.34};static efficiencyOf(t){return nt.EFFICIENCY[t]}}class f{static EMISSION_INDEX_WATER=1.25;static COMBUSTION_HEAT=432e5;static AIR_HEAT_CAPACITY=1004;static MOLAR_MASS_RATIO=.622;static FT_TO_M=.3048;static TROPOPAUSE_M=11e3;static TROPOPAUSE_HPA=226.32;static ISOTHERMAL_SCALE_HEIGHT_M=6341.62;static pressureAtAltitudeFt(t){const e=t*f.FT_TO_M;return e<=f.TROPOPAUSE_M?1013.25*(1-225577e-10*e)**5.25588:f.TROPOPAUSE_HPA*Math.exp(-(e-f.TROPOPAUSE_M)/f.ISOTHERMAL_SCALE_HEIGHT_M)}static saturationOverWaterPa(t){const e=t+273.15;return Math.exp(54.842763-6763.22/e-4.21*Math.log(e)+367e-6*e+Math.tanh(.0415*(e-218.8))*(53.878-1331.22/e-9.44523*Math.log(e)+.014025*e))}static saturationOverIcePa(t){const e=t+273.15;return Math.exp(9.550426-5723.265/e+3.53068*Math.log(e)-.00728332*e)}static iceRelativeHumidity(t,e){return e*f.saturationOverWaterPa(t)/f.saturationOverIcePa(t)}static mixingSlope(t,e){return f.EMISSION_INDEX_WATER*f.AIR_HEAT_CAPACITY*t*100/(f.MOLAR_MASS_RATIO*f.COMBUSTION_HEAT*(1-e))}static criticalTemperatureC(t,e){const a=Math.log(f.mixingSlope(t,e)-.053);return-46.46+9.43*a+.72*a*a}static requiredHumidity(t,e,a){const n=f.criticalTemperatureC(t,e);return(f.mixingSlope(t,e)*(a-n)+f.saturationOverWaterPa(n))/f.saturationOverWaterPa(a)}static evaluate(t,e){const a=f.criticalTemperatureC(t.pressureHpa,e),n=f.requiredHumidity(t.pressureHpa,e,t.temperatureC),s=f.iceRelativeHumidity(t.temperatureC,t.relativeHumidity),i=t.temperatureC<a&&t.relativeHumidity>=n;return{forms:i,persistent:i&&s>=1,criticalTemperatureC:a,requiredHumidity:n,iceRelativeHumidity:s}}}class G{static HOLD_MS=36e5;static DEG=Math.PI/180;static GAS_CONSTANT_OVER_GRAVITY=287.05/9.80665;static at(t,e,a){if(t.length===0)return;const n=t[0],s=t[t.length-1];if(e<n.t-G.HOLD_MS||e>s.t+G.HOLD_MS)return;const i=t.findIndex(h=>h.t>e),o=i===0?t[0]:t[(i===-1?t.length:i)-1],r=i===-1||i===0?o:t[i],l=G.atLevel(o,a),c=G.atLevel(r,a);if(!l||!c)return;const u=r.t>o.t?Math.min(1,Math.max(0,(e-o.t)/(r.t-o.t))):0,d=(h,p)=>h+(p-h)*u;return{pressureHpa:a,temperatureC:d(l.temperatureC,c.temperatureC),relativeHumidity:d(l.relativeHumidity,c.relativeHumidity),driftEastMs:d(l.driftEastMs,c.driftEastMs),driftNorthMs:d(l.driftNorthMs,c.driftNorthMs),shearPerS:d(l.shearPerS,c.shearPerS)}}static atLevel(t,e){const a=t.levels;for(let n=0;n+1<a.length;n++){const s=a[n],i=a[n+1];if(e>s.pressureHpa||e<i.pressureHpa)continue;const o=(Math.log(s.pressureHpa)-Math.log(e))/(Math.log(s.pressureHpa)-Math.log(i.pressureHpa)),r=(h,p)=>h+(p-h)*o,l=h=>{const p=h.windFromDeg*G.DEG;return{east:-h.windSpeedMs*Math.sin(p),north:-h.windSpeedMs*Math.cos(p)}},c=l(s),u=l(i),d=G.GAS_CONSTANT_OVER_GRAVITY*((s.temperatureC+i.temperatureC)/2+273.15)*Math.log(s.pressureHpa/i.pressureHpa);return{pressureHpa:e,temperatureC:r(s.temperatureC,i.temperatureC),relativeHumidity:r(s.relativeHumidity,i.relativeHumidity),driftEastMs:r(c.east,u.east),driftNorthMs:r(c.north,u.north),shearPerS:Math.hypot(u.east-c.east,u.north-c.north)/d}}}}class K{static MIN_ALTITUDE_FT=2e4;static DENSE_MS=3e5;static SPARSE_STEP_MS=6e4;static SATURATION_HORIZON_MS=3*36e5;static SATURATION_STEP_MS=6e5;static PRESSURE_STEP_HPA=5;static plan(t,e,a,n){if(a.length===0)return[];const s=[],i=new Map,o=(r,l,c)=>{const u=Math.round(l/K.PRESSURE_STEP_HPA)*K.PRESSURE_STEP_HPA,d=K.SATURATION_STEP_MS,h=Math.floor(r/d)*d,p=`${u}|${h}`,m=i.get(p);if(m!==void 0)return m+(h-r)/1e3;let E=1/0;for(let O=d;O<=K.SATURATION_HORIZON_MS;O+=d){const B=G.at(a,h+O,u);if(!B)break;if(f.evaluate(B,c).iceRelativeHumidity<1){E=O/1e3;break}}return i.set(p,E),E+(h-r)/1e3};for(const r of t.objects){const l=t.flights.get(r.id),c=r.track;if(!l||!c||c.length!==l.points.length)continue;const u=e?.get(Z.keyOf(l))??U.of(void 0),d=nt.efficiencyOf(u.kind);if(d===void 0)continue;const h=[];let p=-1/0;c.forEach((m,E)=>{if(m.t<-K.DENSE_MS&&E+1<c.length&&m.t-p<K.SPARSE_STEP_MS)return;p=m.t;const O=l.points[E],B=f.pressureAtAltitudeFt(O.altitudeFt),v=G.at(a,n+m.t,B),S=v&&f.evaluate(v,d);h.push({tMs:m.t,eastM:m.eastM,northM:m.northM,upM:m.altitudeM??0,forms:S?.forms??!1,persistent:S?.persistent??!1,lifetimeS:S?ot.lifetimeS(S.iceRelativeHumidity):0,driftEastMs:v?.driftEastMs??0,driftNorthMs:v?.driftNorthMs??0,shearPerS:v?.shearPerS??ot.TYPICAL_SHEAR_PER_S,iceRelativeHumidity:S?.iceRelativeHumidity??0,saturatedForS:S?.persistent?o(n+m.t,B,d):0})}),h.some((m,E)=>m.forms&&h[E+1]?.forms)&&s.push({id:r.id,spanM:u.spanM,points:h})}return s}}class y{static DEFAULT_KIND=V.DEFAULT_KIND;static STEP_MS=1e3;static LEAD_MS=12e4;static FT_PER_M=1/.3048;static ID_PREFIX="decor:";tracks=new Map;static kindOf(t,e){return V.kindOf(t,e)}static flies(t){return V.flies(t)}static ridden(t,e,a,n=()=>{}){const s=st.originOf(t);if(s)for(const i of t.decor){const o=V.kindOf(i,n(i));if(!o)continue;const r=i.sizeM,l=Math.max(r?.widthM??0,r?.lengthM??0,r?.heightM??0)/2;if(l<=0)continue;const c=y.pointAt(i,e,s),{distanceKm:u}=j.seenFrom(a,{lat:c.lat,lng:c.lng,heightM:c.altitudeFt/y.FT_PER_M});if(u*1e3<=l)return{decor:i,kind:o}}}voices(t,e,a,n={},s=()=>{}){const i=st.originOf(t);if(!i)return[];const o=new Map,r=new Map,l=Math.max(t.observerTrack.duration,(t.event.durationSeconds??0)*1e3),c=y.ridden(t,e,a,s)?.decor;for(const u of t.decor){const d=u===c?void 0:V.kindOf(u,s(u));if(!d)continue;const h=`${y.ID_PREFIX}${u.id}`;o.set(h,this.trackOf(u,h,i,l)),r.set(h,d)}for(const u of this.tracks.keys())o.has(u)||this.tracks.delete(u);return o.size===0?[]:R.voices(new Set(o.keys()),o,new Map,u=>String(u.icao),a,e,{...n,kindOf:u=>r.get(u)})}trackOf(t,e,a,n){const s=JSON.stringify([t.track,t.eastM,t.northM,t.headingDeg,a.lat,a.lng,n]),i=this.tracks.get(e);if(i?.key===s)return i.track;const o=[];for(let d=0;d<=n;d+=y.STEP_MS)o.push(y.pointAt(t,d,a));(o.length===0||o[o.length-1].t<n)&&o.push(y.pointAt(t,n,a));const r=o[0],l=o[1]??r,c=d=>(l[d]-r[d])/(l.t-r.t||1);for(let d=y.STEP_MS*10;d<=y.LEAD_MS;d+=y.STEP_MS*10)o.unshift({t:-d,lat:r.lat-c("lat")*d,lng:r.lng-c("lng")*d,altitudeFt:Math.max(0,r.altitudeFt-c("altitudeFt")*d)});const u={icao:y.hash(e),nonIcao:!0,points:o};return this.tracks.set(e,{key:s,track:u}),u}static pointAt(t,e,a){const n=Rt(t,e),s=at(n.eastM,-n.northM,a.lat,a.lng);return{t:e,lat:s.lat,lng:s.lng,altitudeFt:n.altitudeM*y.FT_PER_M}}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}class z{static CABIN_DB_A={"airliner-wide":76,"airliner-narrow":78,"regional-jet":78,"business-jet":82,"regional-turboprop":84,"turboprop-light":88,"light-piston":92,"piston-heavy":90,"military-jet":95,ultralight:95,"helicopter-light":95,"helicopter-medium":96,"helicopter-heavy":98,glider:70,balloon:60};static JET_CABINS=["airliner-narrow","airliner-wide","airliner-supersonic","regional-jet","business-jet"];static JET_CABIN_SHAPE_DB=[-3,-4,-13,-24,-33,-36,-42,-55];static DEFAULT_DB_A=78;static voice(t,e={}){const a=it.aircraftOf(t);if(!a)return;const n=M.noiseOfKind(a),s=it.insulationDb(t),i=z.JET_CABINS.includes(a)&&t?.windowsOpen!==!0?z.JET_CABIN_SHAPE_DB.map((c,u)=>c+g.aWeightingDb(g.OCTAVES[u])):n.soundPowerA.map((c,u)=>c-s[u]),o=g.sumDb(i),r=z.levelDbA(a,t?.noise),l=i.map(c=>c-o+r);return{id:"observer:cabin",kind:a,bandAmplitudes:R.bandAmplitudes(l,e.ambientDbA??0,e.referenceAmplitude,{ambientShapeDb:e.ambientShapeDb,expandUnderKnee:e.expandUnderKnee}),levelDbA:r,inside:!0,distanceKm:0,dopplerRatio:1,azimuthDeg:0,elevationDeg:0,character:n.character}}static levelDbA(t,e){return(z.CABIN_DB_A[t]??z.DEFAULT_DB_A)+20*Math.log10(Math.max(e??1,.01))}}class W{static STEP_MS=250;static FT_PER_M=1/.3048;static ID_PREFIX="body:";tracks=new Map;static noiseOf(t){const e=M.noiseOfKind(t.kind),a=t.quieterDb??0;return a===0?e:{...e,id:`${e.id}-${a}dB`,soundPowerA:e.soundPowerA.map(n=>n-a)}}voices(t,e,a,n,s,i,o={}){const r=new Map,l=new Map,c=new Map;for(const d of t){if(!d.sound)continue;const h=`${W.ID_PREFIX}${d.id}`,p=this.trackOf(d,h,e,n,i);p&&(r.set(h,p),l.set(h,d.sound.kind),c.set(h,W.noiseOf(d.sound)))}for(const d of this.tracks.keys())r.has(d)||this.tracks.delete(d);if(r.size===0)return[];const u=at(a.eastM,-a.northM,n.lat,n.lng);return R.voices(new Set(r.keys()),r,new Map,d=>String(d.icao),{lat:u.lat,lng:u.lng,heightM:a.upM},s,{...o,kindOf:d=>l.get(d),noiseOf:d=>c.get(d)})}trackOf(t,e,a,n,s){const i=`${n.lat},${n.lng},${s}`,o=this.tracks.get(e);if(o&&o.body===t&&o.origin===i)return o.track;const r=[];for(let c=-12e4;c<=s;c+=W.STEP_MS){const u=a(t,c);if(!u)continue;const d=at(u.eastM,-u.northM,n.lat,n.lng);r.push({t:c,lat:d.lat,lng:d.lng,altitudeFt:u.upM*W.FT_PER_M})}if(r.length<2)return;const l={icao:W.hash(e),nonIcao:!0,points:r};return this.tracks.set(e,{body:t,origin:i,track:l}),l}static hash(t){let e=0;for(let a=0;a<t.length;a++)e=e*31+t.charCodeAt(a)>>>0;return e}}export{Y as AircraftAudio,K as AircraftContrails,U as AircraftModels,Dt as AmbientNoise,W as BodyHearing,z as CabinHearing,y as DecorAircraftHearing,T as TrafficDecor,oe as TrafficInfos,R as TrafficSound,Q as TrafficTooltip,le as UPPER_AIR_SOURCES};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b5 as m,b6 as M,aY as I}from"./ShareDialogElement-Dsc4v4jd.js";import"./rr0-ufoathome.mjs";import"./Sighting-C1yj2-s5.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class d{static RECORD_BYTES=20;static NON_ICAO_FLAG=1<<24;static UNKNOWN=65535;static MAX_DT=35999;static decode(t){if(t.length%d.RECORD_BYTES!==0)throw new Error(`An aircraft tile is a multiple of ${d.RECORD_BYTES} bytes, not ${t.length}`);const e=new DataView(t.buffer,t.byteOffset,t.byteLength),r=[];for(let n=0;n<t.length;n+=d.RECORD_BYTES){const s=e.getUint32(n,!0),a=e.getUint16(n+16,!0),c=e.getUint16(n+18,!0);r.push({icao:s&16777215,nonIcao:(s&d.NON_ICAO_FLAG)!==0,secondsInHour:e.getUint16(n+4,!0)/10,lat:e.getInt32(n+6,!0)/1e5,lng:e.getInt32(n+10,!0)/1e5,altitudeFt:e.getInt16(n+14,!0)*25,groundSpeedKt:a===d.UNKNOWN?void 0:a/10,trackDeg:c===d.UNKNOWN?void 0:c/10})}return r}}const w="https://ufoathome.org/aircraft/index.json";class f{citation=m;static DEFAULT_RADIUS_KM=150;static FLAG_MILITARY=1;static FLAG_PIA=4;static FLAG_LADD=8;static KM_PER_DEG=111.32;static HOUR_MS=36e5;fetchImpl;indexUrls;index;hours=new Map;tiles=new Map;shards=new Map;constructor(t={}){this.fetchImpl=t.fetchImpl??fetch.bind(globalThis),this.indexUrls=t.indexUrls??f.defaultIndexUrls()}static defaultIndexUrls(){const t=[];return typeof location<"u"&&/^https?:$/.test(location.protocol)&&t.push(new URL("/aircraft/index.json",location.href).href),t.includes(w)||t.push(w),t}mayCover(t){return M.mayCover(t)}async between(t,e,r,n=f.DEFAULT_RADIUS_KM){const s=await this.loadIndex();if(!s)return{status:"failed"};const a=[];for(let o=Math.floor(e/f.HOUR_MS);o<=Math.floor(r/f.HOUR_MS);o++)a.push(o);if(!a.every(o=>s.index.days.includes(f.dayOf(o))))return{status:"outside"};const c=f.tilesAround(t,n);try{const o=(await Promise.all(a.flatMap(u=>c.map(i=>this.tileOf(s.base,u,i))))).flat();return{status:"found",tracks:f.merge(o,t,e,r,n)}}catch{return{status:"failed"}}}async describe(t,e){const r=await this.loadIndex();if(!r)return;const n=t.icao.toString(16).padStart(6,"0"),s=t.nonIcao?"non-icao":n.slice(0,2),a=`${e}/${s}`;let c=this.shards.get(a);c||(c=this.fetchImpl(new URL(`${e}/aircraft/${s}.json`,r.base).href).then(p=>p.ok?p.json():{}).catch(()=>({})),this.shards.set(a,c));const o=(await c)[t.nonIcao?`~${n}`:n];if(!o)return;const[u,i,l,h=0]=o,g={registration:u||void 0,type:i||void 0,category:l||void 0,military:(h&f.FLAG_MILITARY)!==0||void 0,restricted:(h&(f.FLAG_PIA|f.FLAG_LADD))!==0||void 0};return Object.values(g).some(p=>p!==void 0)?g:void 0}static tilesAround(t,e){const r=e/f.KM_PER_DEG,n=Math.max(-90,t.lat-r),s=Math.min(90,t.lat+r),a=Math.cos(Math.max(Math.abs(n),Math.abs(s))*Math.PI/180),c=a<1e-6?180:e/(f.KM_PER_DEG*a),o=new Set;if(c>=180)for(let i=-180;i<180;i++)o.add(i);else for(let i=Math.floor(t.lng-c);i<=Math.floor(t.lng+c);i++)o.add(I.wrapLongitude(i));const u=[];for(let i=Math.floor(n);i<=Math.min(89,Math.floor(s));i++)for(const l of o)u.push(`${i}_${l}`);return u}static dayOf(t){return new Date(t*f.HOUR_MS).toISOString().slice(0,10)}static merge(t,e,r,n,s){const a=new Map;for(const o of t){const u=o.points.filter(h=>h.t>=r&&h.t<=n&&I.groundDistanceKm(e,h)<=s);if(u.length===0)continue;const i=`${o.nonIcao?"~":""}${o.icao}`,l=a.get(i);l?l.points.push(...u):a.set(i,{icao:o.icao,nonIcao:o.nonIcao,points:u})}const c=[...a.values()];for(const o of c)o.points.sort((u,i)=>u.t-i.t);return c.sort((o,u)=>o.icao-u.icao)}loadIndex(){return this.index??=(async()=>{for(const t of this.indexUrls)try{const e=await this.fetchImpl(t);if(e.ok)return{index:await e.json(),base:t}}catch{}})(),this.index}tileOf(t,e,r){const n=f.dayOf(e),s=String(e%24).padStart(2,"0"),a=`${n}/${s}/${r}`;let c=this.tiles.get(a);return c||(c=this.hourIndex(t,n,s).then(async o=>{const u=o[r];if(!u)return[];const[i,l]=u,h=await this.fetchImpl(new URL(`${n}/${s}.pack`,t).href,{headers:{Range:`bytes=${i}-${i+l-1}`}});if(!h.ok)throw new Error(`The pack of ${n} ${s} h answered ${h.status}`);const g=new Uint8Array(await h.arrayBuffer()),p=h.status===206?g:g.subarray(i,i+l);return f.tracksOf(await f.gunzip(p),e)}),c.catch(()=>this.tiles.delete(a)),this.tiles.set(a,c)),c}hourIndex(t,e,r){const n=`${e}/${r}`;let s=this.hours.get(n);return s||(s=this.fetchImpl(new URL(`${e}/${r}.json`,t).href).then(a=>{if(a.status===404)return{};if(!a.ok)throw new Error(`The index of ${e} ${r} h answered ${a.status}`);return a.json()}),s.catch(()=>this.hours.delete(n)),this.hours.set(n,s)),s}static async gunzip(t){const e=new Blob([t]).stream().pipeThrough(new DecompressionStream("gzip"));return new Uint8Array(await new Response(e).arrayBuffer())}static tracksOf(t,e){const r=new Map;for(const n of d.decode(t)){const s=`${n.nonIcao?"~":""}${n.icao}`;let a=r.get(s);a||r.set(s,a={icao:n.icao,nonIcao:n.nonIcao,points:[]}),a.points.push({t:e*f.HOUR_MS+n.secondsInHour*1e3,lat:n.lat,lng:n.lng,altitudeFt:n.altitudeFt,groundSpeedKt:n.groundSpeedKt,trackDeg:n.trackDeg})}return[...r.values()]}}export{f as AdsbLolArchiveProvider,w as UFOATHOME_AIRCRAFT_INDEX_URL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{bn as F,b9 as y}from"./ShareDialogElement-DqCoQwtn.js";const N=[1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2e3,2005,2010,2015,2020,2025],b=[["g",1,0],["g",1,1],["h",1,1],["g",2,0],["g",2,1],["h",2,1],["g",2,2],["h",2,2],["g",3,0],["g",3,1],["h",3,1],["g",3,2],["h",3,2],["g",3,3],["h",3,3],["g",4,0],["g",4,1],["h",4,1],["g",4,2],["h",4,2],["g",4,3],["h",4,3],["g",4,4],["h",4,4],["g",5,0],["g",5,1],["h",5,1],["g",5,2],["h",5,2],["g",5,3],["h",5,3],["g",5,4],["h",5,4],["g",5,5],["h",5,5],["g",6,0],["g",6,1],["h",6,1],["g",6,2],["h",6,2],["g",6,3],["h",6,3],["g",6,4],["h",6,4],["g",6,5],["h",6,5],["g",6,6],["h",6,6],["g",7,0],["g",7,1],["h",7,1],["g",7,2],["h",7,2],["g",7,3],["h",7,3],["g",7,4],["h",7,4],["g",7,5],["h",7,5],["g",7,6],["h",7,6],["g",7,7],["h",7,7],["g",8,0],["g",8,1],["h",8,1],["g",8,2],["h",8,2],["g",8,3],["h",8,3],["g",8,4],["h",8,4],["g",8,5],["h",8,5],["g",8,6],["h",8,6],["g",8,7],["h",8,7],["g",8,8],["h",8,8],["g",9,0],["g",9,1],["h",9,1],["g",9,2],["h",9,2],["g",9,3],["h",9,3],["g",9,4],["h",9,4],["g",9,5],["h",9,5],["g",9,6],["h",9,6],["g",9,7],["h",9,7],["g",9,8],["h",9,8],["g",9,9],["h",9,9],["g",10,0],["g",10,1],["h",10,1],["g",10,2],["h",10,2],["g",10,3],["h",10,3],["g",10,4],["h",10,4],["g",10,5],["h",10,5],["g",10,6],["h",10,6],["g",10,7],["h",10,7],["g",10,8],["h",10,8],["g",10,9],["h",10,9],["g",10,10],["h",10,10],["g",11,0],["g",11,1],["h",11,1],["g",11,2],["h",11,2],["g",11,3],["h",11,3],["g",11,4],["h",11,4],["g",11,5],["h",11,5],["g",11,6],["h",11,6],["g",11,7],["h",11,7],["g",11,8],["h",11,8],["g",11,9],["h",11,9],["g",11,10],["h",11,10],["g",11,11],["h",11,11],["g",12,0],["g",12,1],["h",12,1],["g",12,2],["h",12,2],["g",12,3],["h",12,3],["g",12,4],["h",12,4],["g",12,5],["h",12,5],["g",12,6],["h",12,6],["g",12,7],["h",12,7],["g",12,8],["h",12,8],["g",12,9],["h",12,9],["g",12,10],["h",12,10],["g",12,11],["h",12,11],["g",12,12],["h",12,12],["g",13,0],["g",13,1],["h",13,1],["g",13,2],["h",13,2],["g",13,3],["h",13,3],["g",13,4],["h",13,4],["g",13,5],["h",13,5],["g",13,6],["h",13,6],["g",13,7],["h",13,7],["g",13,8],["h",13,8],["g",13,9],["h",13,9],["g",13,10],["h",13,10],["g",13,11],["h",13,11],["g",13,12],["h",13,12],["g",13,13],["h",13,13]],P=[[-31543,-2298,5922,-677,2905,-1061,924,1121,1022,-1469,-330,1256,3,572,523,876,628,195,660,-69,-361,-210,134,-75,-184,328,-210,264,53,5,-33,-86,-124,-16,3,63,61,-9,-11,83,-217,2,-58,-35,59,36,-90,-69,70,-55,-45,0,-13,34,-10,-41,-1,-21,28,18,-12,6,-22,11,8,8,-4,-14,-9,7,1,-13,2,5,-9,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,-1,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31464,-2298,5909,-728,2928,-1086,1041,1065,1037,-1494,-357,1239,34,635,480,880,643,203,653,-77,-380,-201,146,-65,-192,328,-193,259,56,-1,-32,-93,-125,-26,11,62,60,-7,-11,86,-221,4,-57,-32,57,32,-92,-67,70,-54,-46,0,-14,33,-11,-41,0,-20,28,18,-12,6,-22,11,8,8,-4,-15,-9,7,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31354,-2297,5898,-769,2948,-1128,1176,1e3,1058,-1524,-389,1223,62,705,425,884,660,211,644,-90,-400,-189,160,-55,-201,327,-172,253,57,-9,-33,-102,-126,-38,21,62,58,-5,-11,89,-224,5,-54,-29,54,28,-95,-65,71,-54,-47,1,-14,32,-12,-40,1,-19,28,18,-13,6,-22,11,8,8,-4,-15,-9,6,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31212,-2306,5875,-802,2956,-1191,1309,917,1084,-1559,-421,1212,84,778,360,887,678,218,631,-109,-416,-173,178,-51,-211,327,-148,245,58,-16,-34,-111,-126,-51,32,61,57,-2,-10,93,-228,8,-51,-26,49,23,-98,-62,72,-54,-48,2,-14,31,-12,-38,2,-18,28,19,-15,6,-22,11,8,8,-4,-15,-9,6,2,-13,3,5,-8,16,6,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31060,-2317,5845,-839,2959,-1259,1407,823,1111,-1600,-445,1205,103,839,293,889,695,220,616,-134,-424,-153,199,-57,-221,326,-122,236,58,-23,-38,-119,-125,-62,43,61,55,0,-10,96,-233,11,-46,-22,44,18,-101,-57,73,-54,-49,2,-14,29,-13,-37,4,-16,28,19,-16,6,-22,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,6,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30926,-2318,5817,-893,2969,-1334,1471,728,1140,-1645,-462,1202,119,881,229,891,711,216,601,-163,-426,-130,217,-70,-230,326,-96,226,58,-28,-44,-125,-122,-69,51,61,54,3,-9,99,-238,14,-40,-18,39,13,-103,-52,73,-54,-50,3,-14,27,-14,-35,5,-14,29,19,-17,6,-21,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,7,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30805,-2316,5808,-951,2980,-1424,1517,644,1172,-1692,-480,1205,133,907,166,896,727,205,584,-195,-422,-109,234,-90,-237,327,-72,218,60,-32,-53,-131,-118,-74,58,60,53,4,-9,102,-242,19,-32,-16,32,8,-104,-46,74,-54,-51,4,-15,25,-14,-34,6,-12,29,18,-18,6,-20,11,7,8,-3,-15,-9,5,2,-14,5,5,-6,18,8,-5,8,-19,8,10,-20,1,14,-12,5,12,-3,1,-2,-2,9,3,10,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30715,-2306,5812,-1018,2984,-1520,1550,586,1206,-1740,-494,1215,146,918,101,903,744,188,565,-226,-415,-90,249,-114,-241,329,-51,211,64,-33,-64,-136,-115,-76,64,59,53,4,-8,104,-246,25,-25,-15,25,4,-106,-40,74,-53,-52,4,-17,23,-14,-33,7,-11,29,18,-19,6,-19,11,7,8,-3,-15,-9,5,1,-15,6,5,-6,18,8,-5,7,-19,8,10,-20,1,15,-12,5,11,-3,1,-3,-2,9,3,11,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30654,-2292,5821,-1106,2981,-1614,1566,528,1240,-1790,-499,1232,163,916,43,914,762,169,550,-252,-405,-72,265,-141,-241,334,-33,208,71,-33,-75,-141,-113,-76,69,57,54,4,-7,105,-249,33,-18,-15,18,0,-107,-33,74,-53,-52,4,-18,20,-14,-31,7,-9,29,17,-20,5,-19,11,7,8,-3,-14,-10,5,1,-15,6,5,-5,19,9,-5,7,-19,8,10,-21,1,15,-12,5,11,-3,1,-3,-2,9,3,11,1,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30594,-2285,5810,-1244,2990,-1702,1578,477,1282,-1834,-499,1255,186,913,-11,944,776,144,544,-276,-421,-55,304,-178,-253,346,-12,194,95,-20,-67,-142,-119,-82,82,59,57,6,6,100,-246,16,-25,-9,21,-16,-104,-39,70,-40,-45,0,-18,0,2,-29,6,-10,28,15,-17,29,-22,13,7,12,-8,-21,-5,-12,9,-7,7,2,-10,18,7,3,2,-11,5,-21,-27,1,17,-11,29,3,-9,16,4,-3,9,-4,6,-3,1,-4,8,-3,11,5,1,1,2,-20,-5,-1,-1,-6,8,6,-1,-4,-3,-2,5,0,-2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30554,-2250,5815,-1341,2998,-1810,1576,381,1297,-1889,-476,1274,206,896,-46,954,792,136,528,-278,-408,-37,303,-210,-240,349,3,211,103,-20,-87,-147,-122,-76,80,54,57,-1,4,99,-247,33,-16,-12,12,-12,-105,-30,65,-55,-35,2,-17,1,0,-40,10,-7,36,5,-18,19,-16,22,15,5,-4,-22,-1,0,11,-21,15,-8,-13,17,5,-4,-1,-17,3,-7,-24,-1,19,-25,12,10,2,5,2,-5,8,-2,8,3,-11,8,-7,-8,4,13,-1,-2,13,-10,-4,2,4,-3,12,6,3,-3,2,6,10,11,3,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30500,-2215,5820,-1440,3003,-1898,1581,291,1302,-1944,-462,1288,216,882,-83,958,796,133,510,-274,-397,-23,290,-230,-229,360,15,230,110,-23,-98,-152,-121,-69,78,47,57,-9,3,96,-247,48,-8,-16,7,-12,-107,-24,65,-56,-50,2,-24,10,-4,-32,8,-11,28,9,-20,18,-18,11,9,10,-6,-15,-14,5,6,-23,10,3,-7,23,6,-4,9,-13,4,9,-11,-4,12,-5,7,2,6,4,-2,1,10,2,7,2,-6,5,5,-3,-5,-4,-1,0,2,-8,-3,-2,7,-4,4,1,-2,-3,6,7,-2,-1,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30421,-2169,5791,-1555,3002,-1967,1590,206,1302,-1992,-414,1289,224,878,-130,957,800,135,504,-278,-394,3,269,-255,-222,362,16,242,125,-26,-117,-156,-114,-63,81,46,58,-10,1,99,-237,60,-1,-20,-2,-11,-113,-17,67,-56,-55,5,-28,15,-6,-32,7,-7,23,17,-18,8,-17,15,6,11,-4,-14,-11,7,2,-18,10,4,-5,23,10,1,8,-20,4,6,-18,0,12,-9,2,1,0,4,-3,-1,9,-2,8,3,0,-1,5,1,-3,4,4,1,0,0,-1,2,4,-5,6,1,1,-1,-1,6,2,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30334,-2119,5776,-1662,2997,-2016,1594,114,1297,-2038,-404,1292,240,856,-165,957,804,148,479,-269,-390,13,252,-269,-219,358,19,254,128,-31,-126,-157,-97,-62,81,45,61,-11,8,100,-228,68,4,-32,1,-8,-111,-7,75,-57,-61,4,-27,13,-2,-26,6,-6,26,13,-23,1,-12,13,5,7,-4,-12,-14,9,0,-16,8,4,-1,24,11,-3,4,-17,8,10,-22,2,15,-13,7,10,-4,-1,-5,-1,10,5,10,1,-4,-2,1,-2,-3,2,2,1,-5,2,-2,6,4,-4,4,0,0,-2,2,3,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30220,-2068,5737,-1781,3e3,-2047,1611,25,1287,-2091,-366,1278,251,838,-196,952,800,167,461,-266,-395,26,234,-279,-216,359,26,262,139,-42,-139,-160,-91,-56,83,43,64,-12,15,100,-212,72,2,-37,3,-6,-112,1,72,-57,-70,1,-27,14,-4,-22,8,-2,23,13,-23,-2,-11,14,6,7,-2,-15,-13,6,-3,-17,5,6,0,21,11,-6,3,-16,8,10,-21,2,16,-12,6,10,-4,-1,-5,0,10,3,11,1,-2,-1,1,-3,-3,1,2,1,-5,3,-1,4,6,-4,4,0,1,-1,0,3,3,1,-1,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30100,-2013,5675,-1902,3010,-2067,1632,-68,1276,-2144,-333,1260,262,830,-223,946,791,191,438,-265,-405,39,216,-288,-218,356,31,264,148,-59,-152,-159,-83,-49,88,45,66,-13,28,99,-198,75,1,-41,6,-4,-111,11,71,-56,-77,1,-26,16,-5,-14,10,0,22,12,-23,-5,-12,14,6,6,-1,-16,-12,4,-8,-19,4,6,0,18,10,-10,1,-17,7,10,-21,2,16,-12,7,10,-4,-1,-5,-1,10,4,11,1,-3,-2,1,-3,-3,1,2,1,-5,3,-2,4,5,-4,4,-1,1,-1,0,3,3,1,-1,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29992,-1956,5604,-1997,3027,-2129,1663,-200,1281,-2180,-336,1251,271,833,-252,938,782,212,398,-257,-419,53,199,-297,-218,357,46,261,150,-74,-151,-162,-78,-48,92,48,66,-15,42,93,-192,71,4,-43,14,-2,-108,17,72,-59,-82,2,-27,21,-5,-12,16,1,18,11,-23,-2,-10,18,6,7,0,-18,-11,4,-7,-22,4,9,3,16,6,-13,-1,-15,5,10,-21,1,16,-12,9,9,-5,-3,-6,-1,9,7,10,2,-6,-5,2,-4,-4,1,2,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29873,-1905,5500,-2072,3044,-2197,1687,-306,1296,-2208,-310,1247,284,829,-297,936,780,232,361,-249,-424,69,170,-297,-214,355,47,253,150,-93,-154,-164,-75,-46,95,53,65,-16,51,88,-185,69,4,-48,16,-1,-102,21,74,-62,-83,3,-27,24,-2,-6,20,4,17,10,-23,0,-7,21,6,8,0,-19,-11,5,-9,-23,4,11,4,14,4,-15,-4,-11,5,10,-21,1,15,-12,9,9,-6,-3,-6,-1,9,7,9,1,-7,-5,2,-4,-4,1,3,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29775,-1848,5406,-2131,3059,-2279,1686,-373,1314,-2239,-284,1248,293,802,-352,939,780,247,325,-240,-423,84,141,-299,-214,353,46,245,154,-109,-153,-165,-69,-36,97,61,65,-16,59,82,-178,69,3,-52,18,1,-96,24,77,-64,-80,2,-26,26,0,-1,21,5,17,9,-23,0,-4,23,5,10,-1,-19,-10,6,-12,-22,3,12,4,12,2,-16,-6,-10,4,9,-20,1,15,-12,11,9,-7,-4,-7,-2,9,7,8,1,-7,-6,2,-3,-4,2,2,1,-5,3,-2,6,4,-4,3,0,1,-2,3,3,3,-1,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29692,-1784,5306,-2200,3070,-2366,1681,-413,1335,-2267,-262,1249,302,759,-427,940,780,262,290,-236,-418,97,122,-306,-214,352,46,235,165,-118,-143,-166,-55,-17,107,68,67,-17,68,72,-170,67,-1,-58,19,1,-93,36,77,-72,-69,1,-25,28,4,5,24,4,17,8,-24,-2,-6,25,6,11,-6,-21,-9,8,-14,-23,9,15,6,11,-5,-16,-7,-4,4,9,-20,3,15,-10,12,8,-6,-8,-8,-1,8,10,5,-2,-8,-8,3,-3,-6,1,2,0,-4,4,-1,5,4,-5,2,-1,2,-2,5,1,1,-2,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29619.4,-1728.2,5186.1,-2267.7,3068.4,-2481.6,1670.9,-458,1339.6,-2288,-227.6,1252.1,293.4,714.5,-491.1,932.3,786.8,272.6,250,-231.9,-403,119.8,111.3,-303.8,-218.8,351.4,43.8,222.3,171.9,-130.4,-133.1,-168.6,-39.3,-12.9,106.3,72.3,68.2,-17.4,74.2,63.7,-160.9,65.1,-5.9,-61.2,16.9,.7,-90.4,43.8,79,-74,-64.6,0,-24.2,33.3,6.2,9.1,24,6.9,14.8,7.3,-25.4,-1.2,-5.8,24.4,6.6,11.9,-9.2,-21.5,-7.9,8.5,-16.6,-21.5,9.1,15.5,7,8.9,-7.9,-14.9,-7,-2.1,5,9.4,-19.7,3,13.4,-8.4,12.5,6.3,-6.2,-8.9,-8.4,-1.5,8.4,9.3,3.8,-4.3,-8.2,-8.2,4.8,-2.6,-6,1.7,1.7,0,-3.1,4,-.5,4.9,3.7,-5.9,1,-1.2,2,-2.9,4.2,.2,.3,-2.2,-1.1,-7.4,2.7,-1.7,.1,-1.9,1.3,1.5,-.9,-.1,-2.6,.1,.9,-.7,-.7,.7,-2.8,1.7,-.9,.1,-1.2,1.2,-1.9,4,-.9,-2.2,-.3,-.4,.2,.3,.9,2.5,-.2,-2.6,.9,.7,-.5,.3,.3,0,-.3,0,-.4,.3,-.1,-.9,-.2,-.4,-.4,.8,-.2,-.9,-.9,.3,.2,.1,1.8,-.4,-.4,1.3,-1,-.4,-.1,.7,.7,-.4,.3,.3,.6,-.1,.3,.4,-.2,0,-.5,.1,-.9],[-29554.63,-1669.05,5077.99,-2337.24,3047.69,-2594.5,1657.76,-515.43,1336.3,-2305.83,-198.86,1246.39,269.72,672.51,-524.72,920.55,797.96,282.07,210.65,-225.23,-379.86,145.15,100,-305.36,-227,354.41,42.72,208.95,180.25,-136.54,-123.45,-168.05,-19.57,-13.55,103.85,73.6,69.56,-20.33,76.74,54.75,-151.34,63.63,-14.58,-63.53,14.58,.24,-86.36,50.94,79.88,-74.46,-61.14,-1.65,-22.57,38.73,6.82,12.3,25.35,9.37,10.93,5.42,-26.32,1.94,-4.64,24.8,7.62,11.2,-11.73,-20.88,-6.88,9.83,-18.11,-19.71,10.17,16.22,9.36,7.61,-11.25,-12.76,-4.87,-.06,5.58,9.76,-20.11,3.58,12.69,-6.94,12.67,5.01,-6.72,-10.76,-8.16,-1.25,8.1,8.76,2.92,-6.66,-7.73,-9.22,6.01,-2.17,-6.12,2.19,1.42,.1,-2.35,4.46,-.15,4.76,3.06,-6.58,.29,-1.01,2.06,-3.47,3.77,-.86,-.21,-2.31,-2.09,-7.93,2.95,-1.6,.26,-1.88,1.44,1.44,-.77,-.31,-2.27,.29,.9,-.79,-.58,.53,-2.69,1.8,-1.08,.16,-1.58,.96,-1.9,3.99,-1.39,-2.15,-.29,-.55,.21,.23,.89,2.38,-.38,-2.63,.96,.61,-.3,.4,.46,.01,-.35,.02,-.36,.28,.08,-.87,-.49,-.34,-.08,.88,-.16,-.88,-.76,.3,.33,.28,1.72,-.43,-.54,1.18,-1.07,-.37,-.04,.75,.63,-.26,.21,.35,.53,-.05,.38,.41,-.22,-.1,-.57,-.18,-.82],[-29496.57,-1586.42,4944.26,-2396.06,3026.34,-2708.54,1668.17,-575.73,1339.85,-2326.54,-160.4,1232.1,251.75,633.73,-537.03,912.66,808.97,286.48,166.58,-211.03,-356.83,164.46,89.4,-309.72,-230.87,357.29,44.58,200.26,189.01,-141.05,-118.06,-163.17,-.01,-8.03,101.04,72.78,68.69,-20.9,75.92,44.18,-141.4,61.54,-22.83,-66.26,13.1,3.02,-78.09,55.4,80.44,-75,-57.8,-4.55,-21.2,45.24,6.54,14,24.96,10.46,7.03,1.64,-27.61,4.92,-3.28,24.41,8.21,10.84,-14.5,-20.03,-5.59,11.83,-19.34,-17.41,11.61,16.71,10.85,6.96,-14.05,-10.74,-3.54,1.64,5.5,9.45,-20.54,3.45,11.51,-5.27,12.75,3.13,-7.14,-12.38,-7.42,-.76,7.97,8.43,2.14,-8.42,-6.08,-10.08,7.01,-1.94,-6.24,2.73,.89,-.1,-1.07,4.71,-.16,4.44,2.45,-7.22,-.33,-.96,2.13,-3.95,3.09,-1.99,-1.03,-1.97,-2.8,-8.31,3.05,-1.48,.13,-2.03,1.67,1.65,-.66,-.51,-1.76,.54,.85,-.79,-.39,.37,-2.51,1.79,-1.27,.12,-2.11,.75,-1.94,3.75,-1.86,-2.12,-.21,-.87,.3,.27,1.04,2.13,-.63,-2.49,.95,.49,-.11,.59,.52,0,-.39,.13,-.37,.27,.21,-.86,-.77,-.23,.04,.87,-.09,-.89,-.87,.31,.3,.42,1.66,-.45,-.59,1.08,-1.14,-.31,-.07,.78,.54,-.18,.1,.38,.49,.02,.44,.42,-.25,-.26,-.53,-.26,-.79],[-29441.46,-1501.77,4795.99,-2445.88,3012.2,-2845.41,1676.35,-642.17,1350.33,-2352.26,-115.29,1225.85,245.04,581.69,-538.7,907.42,813.68,283.54,120.49,-188.43,-334.85,180.95,70.38,-329.23,-232.91,360.14,46.98,192.35,196.98,-140.94,-119.14,-157.4,15.98,4.3,100.12,69.55,67.57,-20.61,72.79,33.3,-129.85,58.74,-28.93,-66.64,13.14,7.35,-70.85,62.41,81.29,-75.99,-54.27,-6.79,-19.53,51.82,5.59,15.07,24.45,9.32,3.27,-2.88,-27.5,6.61,-2.32,23.98,8.89,10.04,-16.78,-18.26,-3.16,13.18,-20.56,-14.6,13.33,16.16,11.76,5.69,-15.98,-9.1,-2.02,2.26,5.33,8.83,-21.77,3.02,10.76,-3.22,11.74,.67,-6.74,-13.2,-6.88,-.1,7.79,8.68,1.04,-9.06,-3.89,-10.54,8.44,-2.01,-6.26,3.28,.17,-.4,.55,4.55,-.55,4.4,1.7,-7.92,-.67,-.61,2.13,-4.16,2.33,-2.85,-1.8,-1.12,-3.59,-8.72,3,-1.4,0,-2.3,2.11,2.08,-.6,-.79,-1.05,.58,.76,-.7,-.2,.14,-2.12,1.7,-1.44,-.22,-2.57,.44,-2.01,3.49,-2.34,-2.09,-.16,-1.08,.46,.37,1.23,1.75,-.89,-2.19,.85,.27,.1,.72,.54,-.09,-.37,.29,-.43,.23,.22,-.89,-.94,-.16,-.03,.72,-.02,-.92,-.88,.42,.49,.63,1.56,-.42,-.5,.96,-1.24,-.19,-.1,.81,.42,-.13,-.04,.38,.48,.08,.48,.46,-.3,-.35,-.43,-.36,-.71],[-29403.41,-1451.37,4653.35,-2499.78,2981.96,-2991.72,1676.85,-734.62,1363,-2380.8,-81.96,1236.06,241.8,525.6,-542.52,902.82,809.47,282.1,86.18,-158.5,-309.47,199.75,47.44,-350.3,-234.42,363.26,47.52,187.86,208.36,-140.73,-121.43,-151.16,32.09,13.98,99.14,65.97,65.56,-19.22,72.96,25.02,-121.57,52.76,-36.06,-64.4,13.6,8.96,-64.8,68.04,80.54,-76.63,-51.5,-8.23,-16.85,56.45,2.36,15.8,23.56,6.3,-2.19,-7.21,-27.19,9.77,-1.9,23.66,9.74,8.43,-17.49,-15.23,-.49,12.83,-21.07,-11.76,15.28,14.94,13.65,3.62,-16.59,-6.9,-.34,2.9,5.03,8.36,-23.44,2.84,11.04,-1.48,9.86,-1.14,-5.13,-13.22,-6.2,1.08,7.79,8.82,.4,-9.23,-1.44,-11.86,9.6,-1.84,-6.25,3.38,-.11,-.18,1.66,3.5,-.86,4.86,.65,-8.62,-.88,-.11,1.88,-4.26,1.44,-3.43,-2.38,-.1,-3.84,-8.84,2.96,-1.36,-.02,-2.51,2.5,2.31,-.55,-.85,-.39,.28,.62,-.66,-.21,-.07,-1.66,1.44,-1.6,-.59,-2.98,.18,-1.97,3.09,-2.51,-2,-.13,-1.15,.43,.52,1.28,1.37,-1.14,-1.81,.71,.08,.31,.71,.49,-.15,-.26,.55,-.47,.16,.09,-.93,-1.13,-.04,-.33,.52,.08,-.93,-.88,.53,.64,.72,1.4,-.3,-.38,.75,-1.31,-.01,-.09,.76,.29,-.05,-.11,.37,.47,.13,.54,.45,-.41,-.46,-.36,-.4,-.6],[-29350,-1410.3,4545.5,-2556.2,2950.9,-3133.6,1648.7,-814.2,1360.9,-2404.2,-56.9,1243.8,237.6,453.4,-549.6,894.7,799.6,278.6,55.8,-134,-281.1,212,12,-375.4,-232.9,369,45.3,187.2,220,-138.7,-122.9,-141.9,42.9,20.9,106.2,64.3,63.8,-18.4,76.7,16.8,-115.7,48.9,-40.9,-59.8,14.9,10.9,-60.8,72.8,79.6,-76.9,-48.9,-8.8,-14.4,59.3,-1,15.8,23.5,2.5,-7.4,-11.2,-25.1,14.3,-2.2,23.1,10.9,7.2,-17.5,-12.6,2,11.5,-21.8,-9.7,16.9,12.7,14.9,.7,-16.8,-5.2,1,3.9,4.7,8,-24.8,3,12.1,-.2,8.3,-2.5,-3.4,-13.1,-5.3,2.4,7.2,8.6,-.6,-8.7,.8,-12.8,9.8,-1.3,-6.4,3.3,.2,.1,2,2.5,-1,5.4,-.5,-9,-.9,.4,1.5,-4.2,.9,-3.8,-2.6,.9,-3.9,-9,3,-1.4,0,-2.5,2.8,2.4,-.6,-.6,.1,0,.5,-.6,-.3,-.1,-1.2,1.1,-1.7,-1,-2.9,-.1,-1.8,2.6,-2.3,-2,-.1,-1.2,.4,.6,1.2,1,-1.2,-1.5,.6,0,.5,.6,.5,-.2,-.1,.8,-.5,.1,-.2,-.9,-1.2,.1,-.7,.2,.2,-.9,-.9,.6,.7,.7,1.2,-.2,-.3,.5,-1.3,.1,-.1,.7,.2,0,-.2,.3,.5,.2,.6,.4,-.6,-.5,-.3,-.4,-.5]],B=[12.6,10,-21.5,-11.2,-5.3,-27.3,-8.3,-11.1,-1.5,-4.4,3.8,.4,-.2,-15.6,-3.9,-1.7,-2.3,-1.3,-5.8,4.1,5.4,1.6,-6.8,-4.1,.6,1.3,-.5,0,2.1,.7,.5,2.3,1.7,1,1.9,-.2,-.3,.3,.8,-1.6,1.2,-.4,-.8,.8,.4,.7,.9,.9,-.1,-.1,.6,-.1,.5,.5,-.7,-.1,0,-.8,-.9,-.8,.5,.9,-.3,-.1,.2,-.3,0,.4,.4,-.3,-.1,.4,.3,-.5,.1,-.6,0,.3,.3,.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class d{static A_KM=6371.2;static MAX_DEGREE=13;static coefficientsAt(t){const a=t.getUTCFullYear()+(t.getUTCMonth()+t.getUTCDate()/31)/12,s=N;let n;if(a<=s[0])n=[...P[0]];else if(a>=s[s.length-1]){const e=Math.min(a-s[s.length-1],5);n=P[s.length-1].map((l,o)=>l+B[o]*e)}else{const e=s.findIndex(o=>o>a),l=(a-s[e-1])/(s[e]-s[e-1]);n=P[e-1].map((o,g)=>o+(P[e][g]-o)*l)}const i=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0)),r=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));return b.forEach(([e,l,o],g)=>{(e==="g"?i:r)[l][o]=n[g]}),{g:i,h:r}}static fieldAt(t,a,s,n,i=d.MAX_DEGREE){const r=Math.hypot(a,s,n),e=n/r,l=Math.max(Math.sqrt(Math.max(0,1-e*e)),1e-9),o=Math.atan2(s,a),g=d.p,c=d.dp;g[0][0]=1,c[0][0]=0;let f=0,K=0,E=0,_=(d.A_KM/r)**2;for(let h=1;h<=i;h++){_*=d.A_KM/r;for(let M=0;M<=h;M++){if(h===M){const O=h===1?1:Math.sqrt(1-1/(2*h));g[h][h]=O*l*g[h-1][h-1],c[h][h]=O*(l*c[h-1][h-1]+e*g[h-1][h-1])}else{const O=Math.sqrt(h*h-M*M),L=h-2>=M?Math.sqrt((h-1)**2-M*M):0,U=h-2>=M?g[h-2][M]:0,C=h-2>=M?c[h-2][M]:0;g[h][M]=((2*h-1)*e*g[h-1][M]-L*U)/O,c[h][M]=((2*h-1)*(e*c[h-1][M]-l*g[h-1][M])-L*C)/O}const T=Math.cos(M*o),x=Math.sin(M*o),G=t.g[h][M],H=t.h[h][M],k=G*T+H*x;f+=(h+1)*_*k*g[h][M],K-=_*k*c[h][M],E+=_*M*(G*x-H*T)*g[h][M]/l}}const m=Math.cos(o),R=Math.sin(o);return[f*l*m+K*e*m-E*R,f*l*R+K*e*R+E*m,f*e-K*l]}static p=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static dp=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static apexLatitude(t,a,s){const n=d.coefficientsAt(s),i=t*Math.PI/180,r=a*Math.PI/180;let e=[d.A_KM*Math.cos(i)*Math.cos(r),d.A_KM*Math.cos(i)*Math.sin(r),d.A_KM*Math.sin(i)];const l=d.fieldAt(n,...e),o=l[0]*e[0]+l[1]*e[1]+l[2]*e[2]<0?-1:1,g=K=>{const E=d.fieldAt(n,K[0],K[1],K[2],8),_=Math.hypot(E[0],E[1],E[2]);return[o*E[0]/_,o*E[1]/_,o*E[2]/_]};let c=d.A_KM,f=c;for(let K=0;K<4e3;K++){const E=.01*c,_=g(e),m=g([e[0]+_[0]*E/2,e[1]+_[1]*E/2,e[2]+_[2]*E/2]),R=g([e[0]+m[0]*E/2,e[1]+m[1]*E/2,e[2]+m[2]*E/2]),h=g([e[0]+R[0]*E,e[1]+R[1]*E,e[2]+R[2]*E]);if(e=[0,1,2].map(M=>e[M]+E/6*(_[M]+2*m[M]+2*R[M]+h[M])),c=Math.hypot(e[0],e[1],e[2]),c>30*d.A_KM)return Math.sign(t||1)*80;if(c<f)break;f=c}return Math.sign(o===-1?1:-1)*(Math.acos(Math.sqrt(Math.min(1,d.A_KM/f)))*180)/Math.PI}}class S{static PHOTONS_PER_KR=1e13/(4*Math.PI);static GREEN=S.line(557.7);static RED=S.line(631.5);static BLUE=S.line(427.8);static line(t){const a=y.colourMatching(t),s=662607015e-42*299792458/(t*1e-9),n=S.PHOTONS_PER_KR*s,i=y.linearSrgbOf(a).map(e=>Math.max(e,0)),r=.2126*i[0]+.7152*i[1]+.0722*i[2];return{wavelengthNm:t,cdM2PerKR:683*a[1]*n,colour:i.map(e=>e/r)}}}class D{static DEFAULT_KP=3;static NOON_SHIFT_DEG=8;static equatorwardEdgeDeg(t){return 66.5-2.04*Math.max(0,Math.min(12,t))}static widthDeg(t){return 8+1.2*Math.max(0,Math.min(12,t))}static diffuseKR(t){return .5+.15*Math.max(0,t)}static arcsOf(t){return t<1?1:Math.min(4,Math.round(1+t/2.5))}static arcKROf(t){return 10*2**(Math.max(0,t)/2.5)}static arcRedOf(t){const a=Math.max(0,t-6);return{share:.1+.25*a,peakKm:250+40*a,widthKm:70+30*a}}static redKROf(t){return t<=5?0:.5*(t-5)**1.5}static edgeAt(t,a){return t+D.NOON_SHIFT_DEG*(1-Math.cos(a*Math.PI/12))/2}}class p{static EARTH_KM=6371;static BOTTOM_KM=90;static TOP_KM=900;static ARC_BASE_KM=105;static ARC_SCALE_KM=35;static DIFFUSE_BASE_KM=115;static DIFFUSE_SCALE_KM=45;static RED_PEAK_KM=250;static RED_WIDTH_KM=70;static STORM_RED_PEAK_KM=380;static STORM_RED_WIDTH_KM=150;static ARC_THICKNESS_DEG=.06;static RED_OF_GREEN=.25;static BLUE_OF_GREEN=.12;static SUNLIT_BLUE_OF_GREEN=.2;static exponential(t,a,s){if(t<a-8)return 0;const n=Math.min(1,Math.max(0,(t-(a-8))/10));return n*n*(3-2*n)*Math.exp(-Math.max(0,t-a)/s)/(s+5)}static gaussian(t,a,s){const n=(t-a)/s;return Math.exp(-.5*n*n)/(s*Math.sqrt(2*Math.PI))}}class A{static FADE_MS=6e4;static OUT_OF_SIGHT_DEG=28;static kpAt(t,a){const s=t.activity;if(!s||s.length===0)return t.kp??D.DEFAULT_KP;if(a<=s[0].t)return s[0].kp;for(let n=1;n<s.length;n++){if(a>s[n].t)continue;const i=s[n-1],r=s[n];return i.kp+(r.kp-i.kp)*(a-i.t)/Math.max(r.t-i.t,1)}return s[s.length-1].kp}static fadeAt(t,a){const s=t.fromT===void 0?1:Math.min(1,Math.max(0,(a-t.fromT)/A.FADE_MS)),n=t.untilT===void 0?1:Math.min(1,Math.max(0,(t.untilT-a)/A.FADE_MS));return s*n}static apexes=new Map;static apexLatitude(t,a,s){const n=`${t.toFixed(2)},${a.toFixed(2)},${s.toISOString().slice(0,10)}`;let i=A.apexes.get(n);return i===void 0&&(i=d.apexLatitude(t,a,s),A.apexes.size>64&&A.apexes.clear(),A.apexes.set(n,i)),i}static seed(t){let a=2166136261;for(let s=0;s<t.length;s++)a=Math.imul(a^t.charCodeAt(s),16777619);return(a>>>0)%1e4/1e4}static viewAt(t,a,s,n,i){const r=A.fadeAt(t,a);if(r<=0)return;const e=A.kpAt(t,a),l=A.seed(t.id),o=a/1e3,g=Math.max(0,Math.min(4,Math.round(t.arcs??D.arcsOf(e)))),c=t.arcKR??D.arcKROf(e),f=D.widthDeg(e),K=[];for(let R=0;R<g;R++){const h=l*37+R*2.3,M=.7+.3*Math.sin(2*Math.PI*o/(90+40*R)+h);K.push({offsetDeg:f*(g===1?.15:.1+.8*R/(g-1)),kr:c*M/(1+.6*R),foldPhase:h,rayPhase:l*1e3+R*131})}const E=Math.abs(A.apexLatitude(s.lat,s.lng,n));if((t.edgeLatDeg??D.equatorwardEdgeDeg(e))-E>A.OUT_OF_SIGHT_DEG)return;const _=F.latitudeOf(s.lat,s.lng,n),m=_-E*Math.sign(_||1);return{id:t.id,kp:e,edgeDeg:(t.edgeLatDeg??D.equatorwardEdgeDeg(e))+m,widthDeg:f,diffuseKR:D.diffuseKR(e),redKR:t.redKR??D.redKROf(e),arcRed:D.arcRedOf(e),arcs:K,axis:F.axisAt(s.lat,s.lng,n),sun:i,observerLatitudeDeg:_-m,observerHeightKm:s.heightM/1e3,fade:r,timeS:o}}}class u{static STEPS=160;static along(t,a,s=u.STEPS){const i=p.EARTH_KM+t.observerHeightKm,r=u.shellRange(i,a[1]);if(!r)return[0,0,0];const[e,l]=r,o=(l-e)/s,g=[0,0,0];for(let c=0;c<s;c++){const f=e+(c+.5)*o,K=[a[0]*f,i+a[1]*f,a[2]*f],E=u.emission(t,K);g[0]+=E[0]*o,g[1]+=E[1]*o,g[2]+=E[2]*o}return[g[0]*t.fade,g[1]*t.fade,g[2]*t.fade]}static shellRange(t,a){const s=p.EARTH_KM,n=l=>{const o=t*a,g=t*t-l*l,c=o*o-g;if(c<0)return;const f=Math.sqrt(c);return[-o-f,-o+f]},i=n(s);if(i&&i[0]>0)return;const r=n(s+p.BOTTOM_KM),e=n(s+p.TOP_KM);return[Math.max(0,r[1]),e[1]]}static emission(t,a){const s=Math.hypot(a[0],a[1],a[2]),n=s-p.EARTH_KM;if(n<p.BOTTOM_KM-10||n>p.TOP_KM)return[0,0,0];const i=[a[0]/s,a[1]/s,a[2]/s],r=Math.asin(Math.max(-1,Math.min(1,i[0]*t.axis[0]+i[1]*t.axis[1]+i[2]*t.axis[2])))*180/Math.PI,e=Math.abs(F.footLatitude(r,n)),l=F.localTime(i,t.axis,t.sun),o=D.edgeAt(t.edgeDeg,l),g=t.widthDeg*(1-.4*(1-Math.cos(l*Math.PI/12))/2),c=p,f=u.smoothstep(o-1,o+.5,e)*(1-u.smoothstep(o+g-1,o+g+1.5,e));let K=t.diffuseKR*f*c.exponential(n,c.DIFFUSE_BASE_KM,c.DIFFUSE_SCALE_KM),E=t.diffuseKR*f*c.RED_OF_GREEN*c.gaussian(n,c.RED_PEAK_KM,c.RED_WIDTH_KM),_=0;const m=u.sunlit(a,t.sun);for(const R of t.arcs){const h=(e-(o+R.offsetDeg))/c.ARC_THICKNESS_DEG,M=Math.exp(-.5*h*h);if(M<1e-4)continue;const T=R.kr*M,x=T*c.exponential(n,c.ARC_BASE_KM,c.ARC_SCALE_KM);K+=x,E+=T*t.arcRed.share*c.gaussian(n,t.arcRed.peakKm,t.arcRed.widthKm),_+=x*c.BLUE_OF_GREEN+T*m*c.SUNLIT_BLUE_OF_GREEN*c.gaussian(n,300,120)}if(t.redKR>0){const R=(e-(o-1))/3;E+=t.redKR*Math.exp(-.5*R*R)*c.gaussian(n,c.STORM_RED_PEAK_KM,c.STORM_RED_WIDTH_KM)}return[K,E,_]}static sunlit(t,a){const s=t[0]*a[0]+t[1]*a[1]+t[2]*a[2];if(s>0)return 1;const n=Math.hypot(t[0]-s*a[0],t[1]-s*a[1],t[2]-s*a[2]);return u.smoothstep(p.EARTH_KM+20,p.EARTH_KM+80,n)}static smoothstep(t,a,s){const n=Math.min(1,Math.max(0,(s-t)/(a-t)));return n*n*(3-2*n)}}export{p as A,S as a,u as b,A as c,D as d};
|
|
1
|
+
import{bo as F,ba as y}from"./ShareDialogElement-Dsc4v4jd.js";const N=[1900,1905,1910,1915,1920,1925,1930,1935,1940,1945,1950,1955,1960,1965,1970,1975,1980,1985,1990,1995,2e3,2005,2010,2015,2020,2025],b=[["g",1,0],["g",1,1],["h",1,1],["g",2,0],["g",2,1],["h",2,1],["g",2,2],["h",2,2],["g",3,0],["g",3,1],["h",3,1],["g",3,2],["h",3,2],["g",3,3],["h",3,3],["g",4,0],["g",4,1],["h",4,1],["g",4,2],["h",4,2],["g",4,3],["h",4,3],["g",4,4],["h",4,4],["g",5,0],["g",5,1],["h",5,1],["g",5,2],["h",5,2],["g",5,3],["h",5,3],["g",5,4],["h",5,4],["g",5,5],["h",5,5],["g",6,0],["g",6,1],["h",6,1],["g",6,2],["h",6,2],["g",6,3],["h",6,3],["g",6,4],["h",6,4],["g",6,5],["h",6,5],["g",6,6],["h",6,6],["g",7,0],["g",7,1],["h",7,1],["g",7,2],["h",7,2],["g",7,3],["h",7,3],["g",7,4],["h",7,4],["g",7,5],["h",7,5],["g",7,6],["h",7,6],["g",7,7],["h",7,7],["g",8,0],["g",8,1],["h",8,1],["g",8,2],["h",8,2],["g",8,3],["h",8,3],["g",8,4],["h",8,4],["g",8,5],["h",8,5],["g",8,6],["h",8,6],["g",8,7],["h",8,7],["g",8,8],["h",8,8],["g",9,0],["g",9,1],["h",9,1],["g",9,2],["h",9,2],["g",9,3],["h",9,3],["g",9,4],["h",9,4],["g",9,5],["h",9,5],["g",9,6],["h",9,6],["g",9,7],["h",9,7],["g",9,8],["h",9,8],["g",9,9],["h",9,9],["g",10,0],["g",10,1],["h",10,1],["g",10,2],["h",10,2],["g",10,3],["h",10,3],["g",10,4],["h",10,4],["g",10,5],["h",10,5],["g",10,6],["h",10,6],["g",10,7],["h",10,7],["g",10,8],["h",10,8],["g",10,9],["h",10,9],["g",10,10],["h",10,10],["g",11,0],["g",11,1],["h",11,1],["g",11,2],["h",11,2],["g",11,3],["h",11,3],["g",11,4],["h",11,4],["g",11,5],["h",11,5],["g",11,6],["h",11,6],["g",11,7],["h",11,7],["g",11,8],["h",11,8],["g",11,9],["h",11,9],["g",11,10],["h",11,10],["g",11,11],["h",11,11],["g",12,0],["g",12,1],["h",12,1],["g",12,2],["h",12,2],["g",12,3],["h",12,3],["g",12,4],["h",12,4],["g",12,5],["h",12,5],["g",12,6],["h",12,6],["g",12,7],["h",12,7],["g",12,8],["h",12,8],["g",12,9],["h",12,9],["g",12,10],["h",12,10],["g",12,11],["h",12,11],["g",12,12],["h",12,12],["g",13,0],["g",13,1],["h",13,1],["g",13,2],["h",13,2],["g",13,3],["h",13,3],["g",13,4],["h",13,4],["g",13,5],["h",13,5],["g",13,6],["h",13,6],["g",13,7],["h",13,7],["g",13,8],["h",13,8],["g",13,9],["h",13,9],["g",13,10],["h",13,10],["g",13,11],["h",13,11],["g",13,12],["h",13,12],["g",13,13],["h",13,13]],P=[[-31543,-2298,5922,-677,2905,-1061,924,1121,1022,-1469,-330,1256,3,572,523,876,628,195,660,-69,-361,-210,134,-75,-184,328,-210,264,53,5,-33,-86,-124,-16,3,63,61,-9,-11,83,-217,2,-58,-35,59,36,-90,-69,70,-55,-45,0,-13,34,-10,-41,-1,-21,28,18,-12,6,-22,11,8,8,-4,-14,-9,7,1,-13,2,5,-9,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,-1,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31464,-2298,5909,-728,2928,-1086,1041,1065,1037,-1494,-357,1239,34,635,480,880,643,203,653,-77,-380,-201,146,-65,-192,328,-193,259,56,-1,-32,-93,-125,-26,11,62,60,-7,-11,86,-221,4,-57,-32,57,32,-92,-67,70,-54,-46,0,-14,33,-11,-41,0,-20,28,18,-12,6,-22,11,8,8,-4,-15,-9,7,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31354,-2297,5898,-769,2948,-1128,1176,1e3,1058,-1524,-389,1223,62,705,425,884,660,211,644,-90,-400,-189,160,-55,-201,327,-172,253,57,-9,-33,-102,-126,-38,21,62,58,-5,-11,89,-224,5,-54,-29,54,28,-95,-65,71,-54,-47,1,-14,32,-12,-40,1,-19,28,18,-13,6,-22,11,8,8,-4,-15,-9,6,1,-13,2,5,-8,16,5,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,2,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31212,-2306,5875,-802,2956,-1191,1309,917,1084,-1559,-421,1212,84,778,360,887,678,218,631,-109,-416,-173,178,-51,-211,327,-148,245,58,-16,-34,-111,-126,-51,32,61,57,-2,-10,93,-228,8,-51,-26,49,23,-98,-62,72,-54,-48,2,-14,31,-12,-38,2,-18,28,19,-15,6,-22,11,8,8,-4,-15,-9,6,2,-13,3,5,-8,16,6,-5,8,-18,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,8,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-31060,-2317,5845,-839,2959,-1259,1407,823,1111,-1600,-445,1205,103,839,293,889,695,220,616,-134,-424,-153,199,-57,-221,326,-122,236,58,-23,-38,-119,-125,-62,43,61,55,0,-10,96,-233,11,-46,-22,44,18,-101,-57,73,-54,-49,2,-14,29,-13,-37,4,-16,28,19,-16,6,-22,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,6,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30926,-2318,5817,-893,2969,-1334,1471,728,1140,-1645,-462,1202,119,881,229,891,711,216,601,-163,-426,-130,217,-70,-230,326,-96,226,58,-28,-44,-125,-122,-69,51,61,54,3,-9,99,-238,14,-40,-18,39,13,-103,-52,73,-54,-50,3,-14,27,-14,-35,5,-14,29,19,-17,6,-21,11,7,8,-3,-15,-9,6,2,-14,4,5,-7,17,7,-5,8,-19,8,10,-20,1,14,-11,5,12,-3,1,-2,-2,9,2,10,0,-2,-1,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30805,-2316,5808,-951,2980,-1424,1517,644,1172,-1692,-480,1205,133,907,166,896,727,205,584,-195,-422,-109,234,-90,-237,327,-72,218,60,-32,-53,-131,-118,-74,58,60,53,4,-9,102,-242,19,-32,-16,32,8,-104,-46,74,-54,-51,4,-15,25,-14,-34,6,-12,29,18,-18,6,-20,11,7,8,-3,-15,-9,5,2,-14,5,5,-6,18,8,-5,8,-19,8,10,-20,1,14,-12,5,12,-3,1,-2,-2,9,3,10,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-2,1,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30715,-2306,5812,-1018,2984,-1520,1550,586,1206,-1740,-494,1215,146,918,101,903,744,188,565,-226,-415,-90,249,-114,-241,329,-51,211,64,-33,-64,-136,-115,-76,64,59,53,4,-8,104,-246,25,-25,-15,25,4,-106,-40,74,-53,-52,4,-17,23,-14,-33,7,-11,29,18,-19,6,-19,11,7,8,-3,-15,-9,5,1,-15,6,5,-6,18,8,-5,7,-19,8,10,-20,1,15,-12,5,11,-3,1,-3,-2,9,3,11,0,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30654,-2292,5821,-1106,2981,-1614,1566,528,1240,-1790,-499,1232,163,916,43,914,762,169,550,-252,-405,-72,265,-141,-241,334,-33,208,71,-33,-75,-141,-113,-76,69,57,54,4,-7,105,-249,33,-18,-15,18,0,-107,-33,74,-53,-52,4,-18,20,-14,-31,7,-9,29,17,-20,5,-19,11,7,8,-3,-14,-10,5,1,-15,6,5,-5,19,9,-5,7,-19,8,10,-21,1,15,-12,5,11,-3,1,-3,-2,9,3,11,1,-2,-2,2,-3,-4,2,2,1,-5,2,-2,6,6,-4,4,0,0,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30594,-2285,5810,-1244,2990,-1702,1578,477,1282,-1834,-499,1255,186,913,-11,944,776,144,544,-276,-421,-55,304,-178,-253,346,-12,194,95,-20,-67,-142,-119,-82,82,59,57,6,6,100,-246,16,-25,-9,21,-16,-104,-39,70,-40,-45,0,-18,0,2,-29,6,-10,28,15,-17,29,-22,13,7,12,-8,-21,-5,-12,9,-7,7,2,-10,18,7,3,2,-11,5,-21,-27,1,17,-11,29,3,-9,16,4,-3,9,-4,6,-3,1,-4,8,-3,11,5,1,1,2,-20,-5,-1,-1,-6,8,6,-1,-4,-3,-2,5,0,-2,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30554,-2250,5815,-1341,2998,-1810,1576,381,1297,-1889,-476,1274,206,896,-46,954,792,136,528,-278,-408,-37,303,-210,-240,349,3,211,103,-20,-87,-147,-122,-76,80,54,57,-1,4,99,-247,33,-16,-12,12,-12,-105,-30,65,-55,-35,2,-17,1,0,-40,10,-7,36,5,-18,19,-16,22,15,5,-4,-22,-1,0,11,-21,15,-8,-13,17,5,-4,-1,-17,3,-7,-24,-1,19,-25,12,10,2,5,2,-5,8,-2,8,3,-11,8,-7,-8,4,13,-1,-2,13,-10,-4,2,4,-3,12,6,3,-3,2,6,10,11,3,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30500,-2215,5820,-1440,3003,-1898,1581,291,1302,-1944,-462,1288,216,882,-83,958,796,133,510,-274,-397,-23,290,-230,-229,360,15,230,110,-23,-98,-152,-121,-69,78,47,57,-9,3,96,-247,48,-8,-16,7,-12,-107,-24,65,-56,-50,2,-24,10,-4,-32,8,-11,28,9,-20,18,-18,11,9,10,-6,-15,-14,5,6,-23,10,3,-7,23,6,-4,9,-13,4,9,-11,-4,12,-5,7,2,6,4,-2,1,10,2,7,2,-6,5,5,-3,-5,-4,-1,0,2,-8,-3,-2,7,-4,4,1,-2,-3,6,7,-2,-1,0,-3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30421,-2169,5791,-1555,3002,-1967,1590,206,1302,-1992,-414,1289,224,878,-130,957,800,135,504,-278,-394,3,269,-255,-222,362,16,242,125,-26,-117,-156,-114,-63,81,46,58,-10,1,99,-237,60,-1,-20,-2,-11,-113,-17,67,-56,-55,5,-28,15,-6,-32,7,-7,23,17,-18,8,-17,15,6,11,-4,-14,-11,7,2,-18,10,4,-5,23,10,1,8,-20,4,6,-18,0,12,-9,2,1,0,4,-3,-1,9,-2,8,3,0,-1,5,1,-3,4,4,1,0,0,-1,2,4,-5,6,1,1,-1,-1,6,2,0,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30334,-2119,5776,-1662,2997,-2016,1594,114,1297,-2038,-404,1292,240,856,-165,957,804,148,479,-269,-390,13,252,-269,-219,358,19,254,128,-31,-126,-157,-97,-62,81,45,61,-11,8,100,-228,68,4,-32,1,-8,-111,-7,75,-57,-61,4,-27,13,-2,-26,6,-6,26,13,-23,1,-12,13,5,7,-4,-12,-14,9,0,-16,8,4,-1,24,11,-3,4,-17,8,10,-22,2,15,-13,7,10,-4,-1,-5,-1,10,5,10,1,-4,-2,1,-2,-3,2,2,1,-5,2,-2,6,4,-4,4,0,0,-2,2,3,2,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30220,-2068,5737,-1781,3e3,-2047,1611,25,1287,-2091,-366,1278,251,838,-196,952,800,167,461,-266,-395,26,234,-279,-216,359,26,262,139,-42,-139,-160,-91,-56,83,43,64,-12,15,100,-212,72,2,-37,3,-6,-112,1,72,-57,-70,1,-27,14,-4,-22,8,-2,23,13,-23,-2,-11,14,6,7,-2,-15,-13,6,-3,-17,5,6,0,21,11,-6,3,-16,8,10,-21,2,16,-12,6,10,-4,-1,-5,0,10,3,11,1,-2,-1,1,-3,-3,1,2,1,-5,3,-1,4,6,-4,4,0,1,-1,0,3,3,1,-1,-4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-30100,-2013,5675,-1902,3010,-2067,1632,-68,1276,-2144,-333,1260,262,830,-223,946,791,191,438,-265,-405,39,216,-288,-218,356,31,264,148,-59,-152,-159,-83,-49,88,45,66,-13,28,99,-198,75,1,-41,6,-4,-111,11,71,-56,-77,1,-26,16,-5,-14,10,0,22,12,-23,-5,-12,14,6,6,-1,-16,-12,4,-8,-19,4,6,0,18,10,-10,1,-17,7,10,-21,2,16,-12,7,10,-4,-1,-5,-1,10,4,11,1,-3,-2,1,-3,-3,1,2,1,-5,3,-2,4,5,-4,4,-1,1,-1,0,3,3,1,-1,-5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29992,-1956,5604,-1997,3027,-2129,1663,-200,1281,-2180,-336,1251,271,833,-252,938,782,212,398,-257,-419,53,199,-297,-218,357,46,261,150,-74,-151,-162,-78,-48,92,48,66,-15,42,93,-192,71,4,-43,14,-2,-108,17,72,-59,-82,2,-27,21,-5,-12,16,1,18,11,-23,-2,-10,18,6,7,0,-18,-11,4,-7,-22,4,9,3,16,6,-13,-1,-15,5,10,-21,1,16,-12,9,9,-5,-3,-6,-1,9,7,10,2,-6,-5,2,-4,-4,1,2,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29873,-1905,5500,-2072,3044,-2197,1687,-306,1296,-2208,-310,1247,284,829,-297,936,780,232,361,-249,-424,69,170,-297,-214,355,47,253,150,-93,-154,-164,-75,-46,95,53,65,-16,51,88,-185,69,4,-48,16,-1,-102,21,74,-62,-83,3,-27,24,-2,-6,20,4,17,10,-23,0,-7,21,6,8,0,-19,-11,5,-9,-23,4,11,4,14,4,-15,-4,-11,5,10,-21,1,15,-12,9,9,-6,-3,-6,-1,9,7,9,1,-7,-5,2,-4,-4,1,3,0,-5,3,-2,6,5,-4,3,0,1,-1,2,4,3,0,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29775,-1848,5406,-2131,3059,-2279,1686,-373,1314,-2239,-284,1248,293,802,-352,939,780,247,325,-240,-423,84,141,-299,-214,353,46,245,154,-109,-153,-165,-69,-36,97,61,65,-16,59,82,-178,69,3,-52,18,1,-96,24,77,-64,-80,2,-26,26,0,-1,21,5,17,9,-23,0,-4,23,5,10,-1,-19,-10,6,-12,-22,3,12,4,12,2,-16,-6,-10,4,9,-20,1,15,-12,11,9,-7,-4,-7,-2,9,7,8,1,-7,-6,2,-3,-4,2,2,1,-5,3,-2,6,4,-4,3,0,1,-2,3,3,3,-1,0,-6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29692,-1784,5306,-2200,3070,-2366,1681,-413,1335,-2267,-262,1249,302,759,-427,940,780,262,290,-236,-418,97,122,-306,-214,352,46,235,165,-118,-143,-166,-55,-17,107,68,67,-17,68,72,-170,67,-1,-58,19,1,-93,36,77,-72,-69,1,-25,28,4,5,24,4,17,8,-24,-2,-6,25,6,11,-6,-21,-9,8,-14,-23,9,15,6,11,-5,-16,-7,-4,4,9,-20,3,15,-10,12,8,-6,-8,-8,-1,8,10,5,-2,-8,-8,3,-3,-6,1,2,0,-4,4,-1,5,4,-5,2,-1,2,-2,5,1,1,-2,0,-7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[-29619.4,-1728.2,5186.1,-2267.7,3068.4,-2481.6,1670.9,-458,1339.6,-2288,-227.6,1252.1,293.4,714.5,-491.1,932.3,786.8,272.6,250,-231.9,-403,119.8,111.3,-303.8,-218.8,351.4,43.8,222.3,171.9,-130.4,-133.1,-168.6,-39.3,-12.9,106.3,72.3,68.2,-17.4,74.2,63.7,-160.9,65.1,-5.9,-61.2,16.9,.7,-90.4,43.8,79,-74,-64.6,0,-24.2,33.3,6.2,9.1,24,6.9,14.8,7.3,-25.4,-1.2,-5.8,24.4,6.6,11.9,-9.2,-21.5,-7.9,8.5,-16.6,-21.5,9.1,15.5,7,8.9,-7.9,-14.9,-7,-2.1,5,9.4,-19.7,3,13.4,-8.4,12.5,6.3,-6.2,-8.9,-8.4,-1.5,8.4,9.3,3.8,-4.3,-8.2,-8.2,4.8,-2.6,-6,1.7,1.7,0,-3.1,4,-.5,4.9,3.7,-5.9,1,-1.2,2,-2.9,4.2,.2,.3,-2.2,-1.1,-7.4,2.7,-1.7,.1,-1.9,1.3,1.5,-.9,-.1,-2.6,.1,.9,-.7,-.7,.7,-2.8,1.7,-.9,.1,-1.2,1.2,-1.9,4,-.9,-2.2,-.3,-.4,.2,.3,.9,2.5,-.2,-2.6,.9,.7,-.5,.3,.3,0,-.3,0,-.4,.3,-.1,-.9,-.2,-.4,-.4,.8,-.2,-.9,-.9,.3,.2,.1,1.8,-.4,-.4,1.3,-1,-.4,-.1,.7,.7,-.4,.3,.3,.6,-.1,.3,.4,-.2,0,-.5,.1,-.9],[-29554.63,-1669.05,5077.99,-2337.24,3047.69,-2594.5,1657.76,-515.43,1336.3,-2305.83,-198.86,1246.39,269.72,672.51,-524.72,920.55,797.96,282.07,210.65,-225.23,-379.86,145.15,100,-305.36,-227,354.41,42.72,208.95,180.25,-136.54,-123.45,-168.05,-19.57,-13.55,103.85,73.6,69.56,-20.33,76.74,54.75,-151.34,63.63,-14.58,-63.53,14.58,.24,-86.36,50.94,79.88,-74.46,-61.14,-1.65,-22.57,38.73,6.82,12.3,25.35,9.37,10.93,5.42,-26.32,1.94,-4.64,24.8,7.62,11.2,-11.73,-20.88,-6.88,9.83,-18.11,-19.71,10.17,16.22,9.36,7.61,-11.25,-12.76,-4.87,-.06,5.58,9.76,-20.11,3.58,12.69,-6.94,12.67,5.01,-6.72,-10.76,-8.16,-1.25,8.1,8.76,2.92,-6.66,-7.73,-9.22,6.01,-2.17,-6.12,2.19,1.42,.1,-2.35,4.46,-.15,4.76,3.06,-6.58,.29,-1.01,2.06,-3.47,3.77,-.86,-.21,-2.31,-2.09,-7.93,2.95,-1.6,.26,-1.88,1.44,1.44,-.77,-.31,-2.27,.29,.9,-.79,-.58,.53,-2.69,1.8,-1.08,.16,-1.58,.96,-1.9,3.99,-1.39,-2.15,-.29,-.55,.21,.23,.89,2.38,-.38,-2.63,.96,.61,-.3,.4,.46,.01,-.35,.02,-.36,.28,.08,-.87,-.49,-.34,-.08,.88,-.16,-.88,-.76,.3,.33,.28,1.72,-.43,-.54,1.18,-1.07,-.37,-.04,.75,.63,-.26,.21,.35,.53,-.05,.38,.41,-.22,-.1,-.57,-.18,-.82],[-29496.57,-1586.42,4944.26,-2396.06,3026.34,-2708.54,1668.17,-575.73,1339.85,-2326.54,-160.4,1232.1,251.75,633.73,-537.03,912.66,808.97,286.48,166.58,-211.03,-356.83,164.46,89.4,-309.72,-230.87,357.29,44.58,200.26,189.01,-141.05,-118.06,-163.17,-.01,-8.03,101.04,72.78,68.69,-20.9,75.92,44.18,-141.4,61.54,-22.83,-66.26,13.1,3.02,-78.09,55.4,80.44,-75,-57.8,-4.55,-21.2,45.24,6.54,14,24.96,10.46,7.03,1.64,-27.61,4.92,-3.28,24.41,8.21,10.84,-14.5,-20.03,-5.59,11.83,-19.34,-17.41,11.61,16.71,10.85,6.96,-14.05,-10.74,-3.54,1.64,5.5,9.45,-20.54,3.45,11.51,-5.27,12.75,3.13,-7.14,-12.38,-7.42,-.76,7.97,8.43,2.14,-8.42,-6.08,-10.08,7.01,-1.94,-6.24,2.73,.89,-.1,-1.07,4.71,-.16,4.44,2.45,-7.22,-.33,-.96,2.13,-3.95,3.09,-1.99,-1.03,-1.97,-2.8,-8.31,3.05,-1.48,.13,-2.03,1.67,1.65,-.66,-.51,-1.76,.54,.85,-.79,-.39,.37,-2.51,1.79,-1.27,.12,-2.11,.75,-1.94,3.75,-1.86,-2.12,-.21,-.87,.3,.27,1.04,2.13,-.63,-2.49,.95,.49,-.11,.59,.52,0,-.39,.13,-.37,.27,.21,-.86,-.77,-.23,.04,.87,-.09,-.89,-.87,.31,.3,.42,1.66,-.45,-.59,1.08,-1.14,-.31,-.07,.78,.54,-.18,.1,.38,.49,.02,.44,.42,-.25,-.26,-.53,-.26,-.79],[-29441.46,-1501.77,4795.99,-2445.88,3012.2,-2845.41,1676.35,-642.17,1350.33,-2352.26,-115.29,1225.85,245.04,581.69,-538.7,907.42,813.68,283.54,120.49,-188.43,-334.85,180.95,70.38,-329.23,-232.91,360.14,46.98,192.35,196.98,-140.94,-119.14,-157.4,15.98,4.3,100.12,69.55,67.57,-20.61,72.79,33.3,-129.85,58.74,-28.93,-66.64,13.14,7.35,-70.85,62.41,81.29,-75.99,-54.27,-6.79,-19.53,51.82,5.59,15.07,24.45,9.32,3.27,-2.88,-27.5,6.61,-2.32,23.98,8.89,10.04,-16.78,-18.26,-3.16,13.18,-20.56,-14.6,13.33,16.16,11.76,5.69,-15.98,-9.1,-2.02,2.26,5.33,8.83,-21.77,3.02,10.76,-3.22,11.74,.67,-6.74,-13.2,-6.88,-.1,7.79,8.68,1.04,-9.06,-3.89,-10.54,8.44,-2.01,-6.26,3.28,.17,-.4,.55,4.55,-.55,4.4,1.7,-7.92,-.67,-.61,2.13,-4.16,2.33,-2.85,-1.8,-1.12,-3.59,-8.72,3,-1.4,0,-2.3,2.11,2.08,-.6,-.79,-1.05,.58,.76,-.7,-.2,.14,-2.12,1.7,-1.44,-.22,-2.57,.44,-2.01,3.49,-2.34,-2.09,-.16,-1.08,.46,.37,1.23,1.75,-.89,-2.19,.85,.27,.1,.72,.54,-.09,-.37,.29,-.43,.23,.22,-.89,-.94,-.16,-.03,.72,-.02,-.92,-.88,.42,.49,.63,1.56,-.42,-.5,.96,-1.24,-.19,-.1,.81,.42,-.13,-.04,.38,.48,.08,.48,.46,-.3,-.35,-.43,-.36,-.71],[-29403.41,-1451.37,4653.35,-2499.78,2981.96,-2991.72,1676.85,-734.62,1363,-2380.8,-81.96,1236.06,241.8,525.6,-542.52,902.82,809.47,282.1,86.18,-158.5,-309.47,199.75,47.44,-350.3,-234.42,363.26,47.52,187.86,208.36,-140.73,-121.43,-151.16,32.09,13.98,99.14,65.97,65.56,-19.22,72.96,25.02,-121.57,52.76,-36.06,-64.4,13.6,8.96,-64.8,68.04,80.54,-76.63,-51.5,-8.23,-16.85,56.45,2.36,15.8,23.56,6.3,-2.19,-7.21,-27.19,9.77,-1.9,23.66,9.74,8.43,-17.49,-15.23,-.49,12.83,-21.07,-11.76,15.28,14.94,13.65,3.62,-16.59,-6.9,-.34,2.9,5.03,8.36,-23.44,2.84,11.04,-1.48,9.86,-1.14,-5.13,-13.22,-6.2,1.08,7.79,8.82,.4,-9.23,-1.44,-11.86,9.6,-1.84,-6.25,3.38,-.11,-.18,1.66,3.5,-.86,4.86,.65,-8.62,-.88,-.11,1.88,-4.26,1.44,-3.43,-2.38,-.1,-3.84,-8.84,2.96,-1.36,-.02,-2.51,2.5,2.31,-.55,-.85,-.39,.28,.62,-.66,-.21,-.07,-1.66,1.44,-1.6,-.59,-2.98,.18,-1.97,3.09,-2.51,-2,-.13,-1.15,.43,.52,1.28,1.37,-1.14,-1.81,.71,.08,.31,.71,.49,-.15,-.26,.55,-.47,.16,.09,-.93,-1.13,-.04,-.33,.52,.08,-.93,-.88,.53,.64,.72,1.4,-.3,-.38,.75,-1.31,-.01,-.09,.76,.29,-.05,-.11,.37,.47,.13,.54,.45,-.41,-.46,-.36,-.4,-.6],[-29350,-1410.3,4545.5,-2556.2,2950.9,-3133.6,1648.7,-814.2,1360.9,-2404.2,-56.9,1243.8,237.6,453.4,-549.6,894.7,799.6,278.6,55.8,-134,-281.1,212,12,-375.4,-232.9,369,45.3,187.2,220,-138.7,-122.9,-141.9,42.9,20.9,106.2,64.3,63.8,-18.4,76.7,16.8,-115.7,48.9,-40.9,-59.8,14.9,10.9,-60.8,72.8,79.6,-76.9,-48.9,-8.8,-14.4,59.3,-1,15.8,23.5,2.5,-7.4,-11.2,-25.1,14.3,-2.2,23.1,10.9,7.2,-17.5,-12.6,2,11.5,-21.8,-9.7,16.9,12.7,14.9,.7,-16.8,-5.2,1,3.9,4.7,8,-24.8,3,12.1,-.2,8.3,-2.5,-3.4,-13.1,-5.3,2.4,7.2,8.6,-.6,-8.7,.8,-12.8,9.8,-1.3,-6.4,3.3,.2,.1,2,2.5,-1,5.4,-.5,-9,-.9,.4,1.5,-4.2,.9,-3.8,-2.6,.9,-3.9,-9,3,-1.4,0,-2.5,2.8,2.4,-.6,-.6,.1,0,.5,-.6,-.3,-.1,-1.2,1.1,-1.7,-1,-2.9,-.1,-1.8,2.6,-2.3,-2,-.1,-1.2,.4,.6,1.2,1,-1.2,-1.5,.6,0,.5,.6,.5,-.2,-.1,.8,-.5,.1,-.2,-.9,-1.2,.1,-.7,.2,.2,-.9,-.9,.6,.7,.7,1.2,-.2,-.3,.5,-1.3,.1,-.1,.7,.2,0,-.2,.3,.5,.2,.6,.4,-.6,-.5,-.3,-.4,-.5]],B=[12.6,10,-21.5,-11.2,-5.3,-27.3,-8.3,-11.1,-1.5,-4.4,3.8,.4,-.2,-15.6,-3.9,-1.7,-2.3,-1.3,-5.8,4.1,5.4,1.6,-6.8,-4.1,.6,1.3,-.5,0,2.1,.7,.5,2.3,1.7,1,1.9,-.2,-.3,.3,.8,-1.6,1.2,-.4,-.8,.8,.4,.7,.9,.9,-.1,-.1,.6,-.1,.5,.5,-.7,-.1,0,-.8,-.9,-.8,.5,.9,-.3,-.1,.2,-.3,0,.4,.4,-.3,-.1,.4,.3,-.5,.1,-.6,0,.3,.3,.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];class d{static A_KM=6371.2;static MAX_DEGREE=13;static coefficientsAt(t){const a=t.getUTCFullYear()+(t.getUTCMonth()+t.getUTCDate()/31)/12,s=N;let n;if(a<=s[0])n=[...P[0]];else if(a>=s[s.length-1]){const e=Math.min(a-s[s.length-1],5);n=P[s.length-1].map((l,o)=>l+B[o]*e)}else{const e=s.findIndex(o=>o>a),l=(a-s[e-1])/(s[e]-s[e-1]);n=P[e-1].map((o,g)=>o+(P[e][g]-o)*l)}const i=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0)),r=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));return b.forEach(([e,l,o],g)=>{(e==="g"?i:r)[l][o]=n[g]}),{g:i,h:r}}static fieldAt(t,a,s,n,i=d.MAX_DEGREE){const r=Math.hypot(a,s,n),e=n/r,l=Math.max(Math.sqrt(Math.max(0,1-e*e)),1e-9),o=Math.atan2(s,a),g=d.p,c=d.dp;g[0][0]=1,c[0][0]=0;let f=0,K=0,E=0,_=(d.A_KM/r)**2;for(let h=1;h<=i;h++){_*=d.A_KM/r;for(let M=0;M<=h;M++){if(h===M){const O=h===1?1:Math.sqrt(1-1/(2*h));g[h][h]=O*l*g[h-1][h-1],c[h][h]=O*(l*c[h-1][h-1]+e*g[h-1][h-1])}else{const O=Math.sqrt(h*h-M*M),L=h-2>=M?Math.sqrt((h-1)**2-M*M):0,U=h-2>=M?g[h-2][M]:0,C=h-2>=M?c[h-2][M]:0;g[h][M]=((2*h-1)*e*g[h-1][M]-L*U)/O,c[h][M]=((2*h-1)*(e*c[h-1][M]-l*g[h-1][M])-L*C)/O}const T=Math.cos(M*o),x=Math.sin(M*o),G=t.g[h][M],H=t.h[h][M],k=G*T+H*x;f+=(h+1)*_*k*g[h][M],K-=_*k*c[h][M],E+=_*M*(G*x-H*T)*g[h][M]/l}}const m=Math.cos(o),R=Math.sin(o);return[f*l*m+K*e*m-E*R,f*l*R+K*e*R+E*m,f*e-K*l]}static p=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static dp=Array.from({length:d.MAX_DEGREE+1},()=>new Array(d.MAX_DEGREE+1).fill(0));static apexLatitude(t,a,s){const n=d.coefficientsAt(s),i=t*Math.PI/180,r=a*Math.PI/180;let e=[d.A_KM*Math.cos(i)*Math.cos(r),d.A_KM*Math.cos(i)*Math.sin(r),d.A_KM*Math.sin(i)];const l=d.fieldAt(n,...e),o=l[0]*e[0]+l[1]*e[1]+l[2]*e[2]<0?-1:1,g=K=>{const E=d.fieldAt(n,K[0],K[1],K[2],8),_=Math.hypot(E[0],E[1],E[2]);return[o*E[0]/_,o*E[1]/_,o*E[2]/_]};let c=d.A_KM,f=c;for(let K=0;K<4e3;K++){const E=.01*c,_=g(e),m=g([e[0]+_[0]*E/2,e[1]+_[1]*E/2,e[2]+_[2]*E/2]),R=g([e[0]+m[0]*E/2,e[1]+m[1]*E/2,e[2]+m[2]*E/2]),h=g([e[0]+R[0]*E,e[1]+R[1]*E,e[2]+R[2]*E]);if(e=[0,1,2].map(M=>e[M]+E/6*(_[M]+2*m[M]+2*R[M]+h[M])),c=Math.hypot(e[0],e[1],e[2]),c>30*d.A_KM)return Math.sign(t||1)*80;if(c<f)break;f=c}return Math.sign(o===-1?1:-1)*(Math.acos(Math.sqrt(Math.min(1,d.A_KM/f)))*180)/Math.PI}}class S{static PHOTONS_PER_KR=1e13/(4*Math.PI);static GREEN=S.line(557.7);static RED=S.line(631.5);static BLUE=S.line(427.8);static line(t){const a=y.colourMatching(t),s=662607015e-42*299792458/(t*1e-9),n=S.PHOTONS_PER_KR*s,i=y.linearSrgbOf(a).map(e=>Math.max(e,0)),r=.2126*i[0]+.7152*i[1]+.0722*i[2];return{wavelengthNm:t,cdM2PerKR:683*a[1]*n,colour:i.map(e=>e/r)}}}class D{static DEFAULT_KP=3;static NOON_SHIFT_DEG=8;static equatorwardEdgeDeg(t){return 66.5-2.04*Math.max(0,Math.min(12,t))}static widthDeg(t){return 8+1.2*Math.max(0,Math.min(12,t))}static diffuseKR(t){return .5+.15*Math.max(0,t)}static arcsOf(t){return t<1?1:Math.min(4,Math.round(1+t/2.5))}static arcKROf(t){return 10*2**(Math.max(0,t)/2.5)}static arcRedOf(t){const a=Math.max(0,t-6);return{share:.1+.25*a,peakKm:250+40*a,widthKm:70+30*a}}static redKROf(t){return t<=5?0:.5*(t-5)**1.5}static edgeAt(t,a){return t+D.NOON_SHIFT_DEG*(1-Math.cos(a*Math.PI/12))/2}}class p{static EARTH_KM=6371;static BOTTOM_KM=90;static TOP_KM=900;static ARC_BASE_KM=105;static ARC_SCALE_KM=35;static DIFFUSE_BASE_KM=115;static DIFFUSE_SCALE_KM=45;static RED_PEAK_KM=250;static RED_WIDTH_KM=70;static STORM_RED_PEAK_KM=380;static STORM_RED_WIDTH_KM=150;static ARC_THICKNESS_DEG=.06;static RED_OF_GREEN=.25;static BLUE_OF_GREEN=.12;static SUNLIT_BLUE_OF_GREEN=.2;static exponential(t,a,s){if(t<a-8)return 0;const n=Math.min(1,Math.max(0,(t-(a-8))/10));return n*n*(3-2*n)*Math.exp(-Math.max(0,t-a)/s)/(s+5)}static gaussian(t,a,s){const n=(t-a)/s;return Math.exp(-.5*n*n)/(s*Math.sqrt(2*Math.PI))}}class A{static FADE_MS=6e4;static OUT_OF_SIGHT_DEG=28;static kpAt(t,a){const s=t.activity;if(!s||s.length===0)return t.kp??D.DEFAULT_KP;if(a<=s[0].t)return s[0].kp;for(let n=1;n<s.length;n++){if(a>s[n].t)continue;const i=s[n-1],r=s[n];return i.kp+(r.kp-i.kp)*(a-i.t)/Math.max(r.t-i.t,1)}return s[s.length-1].kp}static fadeAt(t,a){const s=t.fromT===void 0?1:Math.min(1,Math.max(0,(a-t.fromT)/A.FADE_MS)),n=t.untilT===void 0?1:Math.min(1,Math.max(0,(t.untilT-a)/A.FADE_MS));return s*n}static apexes=new Map;static apexLatitude(t,a,s){const n=`${t.toFixed(2)},${a.toFixed(2)},${s.toISOString().slice(0,10)}`;let i=A.apexes.get(n);return i===void 0&&(i=d.apexLatitude(t,a,s),A.apexes.size>64&&A.apexes.clear(),A.apexes.set(n,i)),i}static seed(t){let a=2166136261;for(let s=0;s<t.length;s++)a=Math.imul(a^t.charCodeAt(s),16777619);return(a>>>0)%1e4/1e4}static viewAt(t,a,s,n,i){const r=A.fadeAt(t,a);if(r<=0)return;const e=A.kpAt(t,a),l=A.seed(t.id),o=a/1e3,g=Math.max(0,Math.min(4,Math.round(t.arcs??D.arcsOf(e)))),c=t.arcKR??D.arcKROf(e),f=D.widthDeg(e),K=[];for(let R=0;R<g;R++){const h=l*37+R*2.3,M=.7+.3*Math.sin(2*Math.PI*o/(90+40*R)+h);K.push({offsetDeg:f*(g===1?.15:.1+.8*R/(g-1)),kr:c*M/(1+.6*R),foldPhase:h,rayPhase:l*1e3+R*131})}const E=Math.abs(A.apexLatitude(s.lat,s.lng,n));if((t.edgeLatDeg??D.equatorwardEdgeDeg(e))-E>A.OUT_OF_SIGHT_DEG)return;const _=F.latitudeOf(s.lat,s.lng,n),m=_-E*Math.sign(_||1);return{id:t.id,kp:e,edgeDeg:(t.edgeLatDeg??D.equatorwardEdgeDeg(e))+m,widthDeg:f,diffuseKR:D.diffuseKR(e),redKR:t.redKR??D.redKROf(e),arcRed:D.arcRedOf(e),arcs:K,axis:F.axisAt(s.lat,s.lng,n),sun:i,observerLatitudeDeg:_-m,observerHeightKm:s.heightM/1e3,fade:r,timeS:o}}}class u{static STEPS=160;static along(t,a,s=u.STEPS){const i=p.EARTH_KM+t.observerHeightKm,r=u.shellRange(i,a[1]);if(!r)return[0,0,0];const[e,l]=r,o=(l-e)/s,g=[0,0,0];for(let c=0;c<s;c++){const f=e+(c+.5)*o,K=[a[0]*f,i+a[1]*f,a[2]*f],E=u.emission(t,K);g[0]+=E[0]*o,g[1]+=E[1]*o,g[2]+=E[2]*o}return[g[0]*t.fade,g[1]*t.fade,g[2]*t.fade]}static shellRange(t,a){const s=p.EARTH_KM,n=l=>{const o=t*a,g=t*t-l*l,c=o*o-g;if(c<0)return;const f=Math.sqrt(c);return[-o-f,-o+f]},i=n(s);if(i&&i[0]>0)return;const r=n(s+p.BOTTOM_KM),e=n(s+p.TOP_KM);return[Math.max(0,r[1]),e[1]]}static emission(t,a){const s=Math.hypot(a[0],a[1],a[2]),n=s-p.EARTH_KM;if(n<p.BOTTOM_KM-10||n>p.TOP_KM)return[0,0,0];const i=[a[0]/s,a[1]/s,a[2]/s],r=Math.asin(Math.max(-1,Math.min(1,i[0]*t.axis[0]+i[1]*t.axis[1]+i[2]*t.axis[2])))*180/Math.PI,e=Math.abs(F.footLatitude(r,n)),l=F.localTime(i,t.axis,t.sun),o=D.edgeAt(t.edgeDeg,l),g=t.widthDeg*(1-.4*(1-Math.cos(l*Math.PI/12))/2),c=p,f=u.smoothstep(o-1,o+.5,e)*(1-u.smoothstep(o+g-1,o+g+1.5,e));let K=t.diffuseKR*f*c.exponential(n,c.DIFFUSE_BASE_KM,c.DIFFUSE_SCALE_KM),E=t.diffuseKR*f*c.RED_OF_GREEN*c.gaussian(n,c.RED_PEAK_KM,c.RED_WIDTH_KM),_=0;const m=u.sunlit(a,t.sun);for(const R of t.arcs){const h=(e-(o+R.offsetDeg))/c.ARC_THICKNESS_DEG,M=Math.exp(-.5*h*h);if(M<1e-4)continue;const T=R.kr*M,x=T*c.exponential(n,c.ARC_BASE_KM,c.ARC_SCALE_KM);K+=x,E+=T*t.arcRed.share*c.gaussian(n,t.arcRed.peakKm,t.arcRed.widthKm),_+=x*c.BLUE_OF_GREEN+T*m*c.SUNLIT_BLUE_OF_GREEN*c.gaussian(n,300,120)}if(t.redKR>0){const R=(e-(o-1))/3;E+=t.redKR*Math.exp(-.5*R*R)*c.gaussian(n,c.STORM_RED_PEAK_KM,c.STORM_RED_WIDTH_KM)}return[K,E,_]}static sunlit(t,a){const s=t[0]*a[0]+t[1]*a[1]+t[2]*a[2];if(s>0)return 1;const n=Math.hypot(t[0]-s*a[0],t[1]-s*a[1],t[2]-s*a[2]);return u.smoothstep(p.EARTH_KM+20,p.EARTH_KM+80,n)}static smoothstep(t,a,s){const n=Math.min(1,Math.max(0,(s-t)/(a-t)));return n*n*(3-2*n)}}export{p as A,S as a,u as b,A as c,D as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as h,_ as o}from"./rr0-ufoathome.mjs";import{b as d,P as p}from"./SaidPosition-OJEYhVKN.js";import{
|
|
1
|
+
import{M as h,_ as o}from"./rr0-ufoathome.mjs";import{b as d,P as p}from"./SaidPosition-OJEYhVKN.js";import{bb as g}from"./ShareDialogElement-Dsc4v4jd.js";import{S as c}from"./SkyEventEditorStyle-CvY_AhbI.js";import{P as f,E as _}from"./ParameterForm-XbqxCLRn.js";import{c as u,d as n}from"./Aurora-DooZfol8.js";import"./GeoProjection-DvqDbRIx.js";import"./Sighting-C1yj2-s5.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const E=h.catalog({en:()=>o(()=>import("./AuroraParameterTexts_en-shkUd-dT.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_en),fr:()=>o(()=>import("./AuroraParameterTexts_fr-CoJnicWs.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_fr),es:()=>o(()=>import("./AuroraParameterTexts_es-CwGYyafK.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_es),it:()=>o(()=>import("./AuroraParameterTexts_it-DHniBj_2.js"),[],import.meta.url).then(a=>a.auroraParameterTexts_it)}),y=h.catalog({en:()=>o(()=>import("./AuroraEditorMessages_en-CpU3BS-B.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_en),fr:()=>o(()=>import("./AuroraEditorMessages_fr-0DtPXXAs.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_fr),es:()=>o(()=>import("./AuroraEditorMessages_es-i8-psDHN.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_es),it:()=>o(()=>import("./AuroraEditorMessages_it-Dn2UHyk9.js"),[],import.meta.url).then(a=>a.auroraEditorMessages_it)});class s{static fromKp(t){return r=>t(u.kpAt(r,0))}static time(t,r,e){return{type:"number",key:t,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,label:r,hint:e,group:"when"}}static SET={kind:"aurora",title:"aurora",parameters:[{type:"said",key:"title",label:"name",group:"field"},{type:"number",key:"kp",min:0,max:12,step:.33,label:"kp",hint:"kpHint",effective:t=>t.activity?.length?u.kpAt(t,0):n.DEFAULT_KP,group:"field"},{type:"number",key:"edgeLatDeg",min:20,max:75,step:.1,unit:"°",label:"edge",hint:"edgeHint",effective:s.fromKp(t=>Math.round(n.equatorwardEdgeDeg(t)*10)/10),group:"field"},{type:"number",key:"arcs",min:0,max:4,step:1,label:"arcs",hint:"arcsHint",effective:s.fromKp(n.arcsOf),group:"light"},{type:"number",key:"arcKR",min:.1,max:1e3,step:.1,unit:"kR",label:"arcBrightness",hint:"arcBrightnessHint",effective:s.fromKp(t=>Math.round(n.arcKROf(t)*10)/10),group:"light"},{type:"number",key:"redKR",min:0,max:100,step:.1,unit:"kR",label:"red",hint:"redHint",effective:s.fromKp(t=>Math.round(n.redKROf(t)*10)/10),group:"light"},s.time("fromT","from","fromHint"),s.time("untilT","until","untilHint")]};static publish(){d.publish(s.SET)}}class l{constructor(t,r,e){this.container=t,this.host=r,c.attach(t,"aurora-editor-part",l.STYLE),this.language=e,d.of("aurora")||s.publish(),this.ready=this.setLanguage(e)}messages;parameterTexts;ready;languageToken=0;currentId;form;list;language;shown=[];static STYLE=".aurora-editor-part { flex-basis: 100%; min-width: 0; } .aurora-editor-part .aurora-editor, .aurora-editor-part .aurora-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .aurora-editor-part #aurora-list, .aurora-editor-part .aurora-fields { flex-basis: 100%; min-width: 0; } .aurora-editor-part [hidden] { display: none !important; } .aurora-editor-part .aurora-intro { flex-basis: 100%; margin: 0; } .aurora-editor-part .aurora-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .aurora-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; } .aurora-editor-part input, .aurora-editor-part select { max-width: 100%; box-sizing: border-box; } .aurora-editor-part label { min-width: 0; max-width: 100%; } .aurora-editor-part input.parameter-derived::placeholder { opacity: .65; }";async setLanguage(t){const r=++this.languageToken;this.language=t;const[e,i]=await Promise.all([y.load(t),E.load(t)]);r===this.languageToken&&(this.messages=e,this.parameterTexts=i,this.render(),this.sync())}sync(){if(!this.messages)return;const t=this.auroras;this.shown=[...t],t.some(i=>i.id===this.currentId)||(this.currentId=t[0]?.id),this.list?.setItems(t.map(i=>({id:i.id,label:this.labelOf(i)})),this.currentId);const r=this.current;if(this.element("aurora-fields").hidden=r===void 0,!r)return;const e=p.resolve(d.of("aurora"),this.parameterTexts);this.form??=new f(this.element("aurora-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(e,r,()=>this.host.changed())}refresh(){if(!this.messages)return;const t=this.auroras;t.length===this.shown.length&&t.every((r,e)=>r===this.shown[e])||this.sync()}setTime(t){}get current(){return this.auroras.find(t=>t.id===this.currentId)}render(){const t=this.messages;this.form=void 0,this.container.innerHTML=`<div class="aurora-editor">
|
|
2
2
|
<p class="aurora-intro">${t.intro}</p>
|
|
3
3
|
<div id="aurora-list"></div>
|
|
4
4
|
<div id="aurora-fields" class="aurora-fields">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{n as O,bd as p}from"./ShareDialogElement-Dsc4v4jd.js";import{A,a as c,b,c as z}from"./Aurora-DooZfol8.js";import{S as $,B as L,A as P,V as h,p as _,M as I,a as B}from"./three.module-CbaHqYFq.js";import"./rr0-ufoathome.mjs";import"./Sighting-C1yj2-s5.js";import"./VisualAids-DI-hEL46.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class r{static RADIUS=885;static MAX_ARCS=4;static STEPS=56;static ALTITUDES=[-3,0,1,2,4,7,12,20,35,60,90];object;material;shown=!1;constructor(){const e=A,a=i=>i.toFixed(6);this.material=new $({uniforms:{uAxis:{value:new h(0,1,0)},uSun:{value:new h(0,-1,0)},uObserverKm:{value:e.EARTH_KM},uEdge:{value:60},uWidth:{value:8},uDiffuse:{value:0},uRed:{value:0},uArcRed:{value:new h(.1,250,70)},uArcs:{value:Array.from({length:r.MAX_ARCS},()=>new _)},uArcCount:{value:0},uTime:{value:0},uGreenLight:{value:new h},uRedLight:{value:new h},uBlueLight:{value:new h},uAir:{value:r.ALTITUDES.map(()=>new h(1,1,1))}},vertexShader:`
|
|
2
2
|
varying vec3 vDirection;
|
|
3
3
|
void main() {
|
|
4
4
|
vDirection = (modelMatrix * vec4(position, 1.0)).xyz - cameraPosition;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as l}from"./Account-C4jhsVtN.js";import{S as h}from"./rr0-ufoathome.mjs";import{N as m}from"./NearestApproach-
|
|
1
|
+
import{S as l}from"./Account-C4jhsVtN.js";import{S as h}from"./rr0-ufoathome.mjs";import{N as m}from"./NearestApproach-D2cz2_44.js";import{CoverageAssessor as S}from"./CoverageAssessor-DINhJJFz.js";import"./ShareDialogElement-Dsc4v4jd.js";import"./Sighting-C1yj2-s5.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./SaidPosition-OJEYhVKN.js";import"./GeoProjection-DvqDbRIx.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";class s{about="observer";static PAGE_WORDS=250;static ARTICLE_WORDS=500;static CLOSE_M=150;static WEIGHTS={witnesses:.25,occupation:.2,relation:.15,geography:.15,activity:.15,age:.1};static OCCUPATIONS={student:.3,worker:.5,farmer:.5,homemaker:.5,merchant:.7,business:.7,employee:.7,artist:.7,technician:.9,police:.9,pilot:.9,military:1};static RELATIONS={friends:.3,family:.6,professional:.8,none:1};static ACTIVITIES={leisure:.3,travelling:.6,cultural:.8,working:1};static FACTORS=l;static PENDING="pending";static WEAKEST_FIRST=["fitted","assumed","derived","stated","measured","established"];async assess(t){const e=t.account??{},i=this.information(t,e),o=this.strangeness(t,e),u=this.reliability(t,e),v=i.value,n=o.filter(d=>d.value>0).length/s.FACTORS.length,c=s.WEIGHTS,a=Object.keys(c).reduce((d,p)=>d+c[p]*u[p].value,0),r=[this.criterion("bg-information",i),...s.FACTORS.map((d,p)=>this.criterion(`bg-${d}`,o[p])),...Object.keys(c).map(d=>this.criterion(`bg-${d}`,u[d]))],b=Object.values(e.strangeness??{}).some(d=>d!==void 0);return e.source===void 0||!b?{verdict:s.PENDING,factors:{q:v,sigma:n,pi:a},criteria:r}:{score:v*n*a,factors:{q:v,sigma:n,pi:a},criteria:r}}criterion(t,e){return{id:t,value:e.value,basis:e.basis,paths:e.basis===void 0?[]:e.paths}}information(t,e){const i=e.source;if(i===void 0)return{value:0,paths:[]};const o=this.basis(t,"account.source"),u=e.enquiryMinutes,v=(a,r,b)=>u===void 0?{value:b,basis:this.weakest(o,"assumed"),paths:["account.source"]}:{value:u>=a?r:b,basis:this.weakest(o,this.basis(t,"account.enquiryMinutes")),paths:["account.source","account.enquiryMinutes"]},n=this.words(t),c=(a,r,b)=>({value:n>=a?r:b,basis:this.weakest(o,"derived"),paths:["account.source","event.description"]});switch(i){case"on-site":return v(120,1,.9);case"interview":return v(60,.9,.8);case"telephone":return v(30,.7,.6);case"questionnaire":return e.followedUp?c(s.PAGE_WORDS,.7,.6):{value:.6,basis:o,paths:["account.source"]};case"letter":case"social-media":return e.followedUp?c(s.PAGE_WORDS,.6,.5):c(s.PAGE_WORDS,.4,.3);case"press":return c(s.ARTICLE_WORDS,.2,.1)}}words(t){return(h.any.read(t.event.description)??"").split(/\s+/).filter(i=>i!=="").length}strangeness(t,e){const i=e.strangeness??{},o=s.FACTORS.map(n=>{const c=i[n];if(c!==void 0){const a=`account.strangeness.${n}`;return{value:c?1:0,basis:this.basis(t,a),paths:[a]}}switch(n){case"detection":{const a=t.instrument.category;return{value:a==="eye"||a==="binoculars"?0:1,basis:"derived",paths:["instrumentId"]}}case"close":{const a=m.of(t);return a===void 0?{value:0,paths:[]}:{value:a.m<=s.CLOSE_M?1:0,basis:a.basis,paths:a.paths}}case"beings":{const a=t.decor.map((r,b)=>({object:r,index:b})).filter(({object:r})=>r.kind==="entity");return a.length>0?{value:1,basis:"stated",paths:a.map(({index:r})=>`decor.${r}`)}:{value:0,basis:"derived",paths:["decor"]}}default:return{value:0,paths:[]}}}),u=s.FACTORS.indexOf("beings");return!["appearance","movement","incongruity"].some(n=>o[s.FACTORS.indexOf(n)].value>0)&&o[u].value>0&&(o[u]={...o[u],value:0}),o}reliability(t,e){const i=t.observerCount,o=i===1,u=i===1?.3:i===2?.5:i<=5?.7:i<=10?.9:1,v=e.observerGraduate?{value:1,basis:this.basis(t,"account.observerGraduate"),paths:["account.observerGraduate"]}:e.observerOccupationKind===void 0?{value:0,paths:[]}:{value:s.OCCUPATIONS[e.observerOccupationKind],basis:this.basis(t,"account.observerOccupationKind"),paths:["account.observerOccupationKind"]},n=o?{value:.6,basis:"derived",paths:["decor"]}:e.observersRelation===void 0?{value:0,paths:[]}:{value:s.RELATIONS[e.observersRelation],basis:this.basis(t,"account.observersRelation"),paths:["account.observersRelation"]},c=e.activity!==void 0?{value:s.ACTIVITIES[e.activity],basis:this.basis(t,"account.activity"),paths:["account.activity"]}:t.vehicle!==void 0?{value:s.ACTIVITIES.travelling,basis:"derived",paths:["vehicle"]}:{value:0,paths:[]},a=e.observerAgeYears,r=a===void 0?{value:0,paths:[]}:{value:a<10||a>75?.2:a<18?.4:a<35?.6:a<65?1:.8,basis:this.basis(t,"account.observerAgeYears"),paths:["account.observerAgeYears"]};return{witnesses:{value:u,basis:"derived",paths:["decor"]},occupation:v,relation:n,geography:{value:.5,basis:"derived",paths:["decor"]},activity:c,age:r}}basis(t,e){return S.basisAt(e,t)??"stated"}weakest(...t){return s.WEAKEST_FIRST.find(e=>t.includes(e))}}export{s as BallesterGuaspAssessor};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as m,_ as h,V as w,W as E,q as A,t as L}from"./rr0-ufoathome.mjs";import{a as f,b,P as O}from"./SaidPosition-OJEYhVKN.js";import{S as T}from"./SkyEventEditorStyle-CvY_AhbI.js";import{D as S}from"./DroneParameters-CfTAaLCT.js";import{BalloonFlight as c}from"./BalloonFlight-CvE7AHlm.js";import{b as x}from"./Sighting-
|
|
1
|
+
import{M as m,_ as h,V as w,W as E,q as A,t as L}from"./rr0-ufoathome.mjs";import{a as f,b,P as O}from"./SaidPosition-OJEYhVKN.js";import{S as T}from"./SkyEventEditorStyle-CvY_AhbI.js";import{D as S}from"./DroneParameters-CfTAaLCT.js";import{BalloonFlight as c}from"./BalloonFlight-CvE7AHlm.js";import{b as x}from"./Sighting-C1yj2-s5.js";import{P as M,a as k,E as R}from"./ParameterForm-XbqxCLRn.js";import"./GeoProjection-DvqDbRIx.js";import"./DroneFlight-CGNIh9XS.js";import"./Decor-Dn-cvniW.js";import"./VisualAids-DI-hEL46.js";const I=m.catalog({en:()=>h(()=>import("./BalloonParameterTexts_en-CHm_vRVx.js"),[],import.meta.url).then(a=>a.balloonParameterTexts_en),fr:()=>h(()=>import("./BalloonParameterTexts_fr-IhyPRhYG.js"),[],import.meta.url).then(a=>a.balloonParameterTexts_fr),es:()=>h(()=>import("./BalloonParameterTexts_es-BYaljnsn.js"),[],import.meta.url).then(a=>a.balloonParameterTexts_es),it:()=>h(()=>import("./BalloonParameterTexts_it-BqBPIfav.js"),[],import.meta.url).then(a=>a.balloonParameterTexts_it)});class i{static BALLOON="balloon";static RELEASE="letGo";static AIR="air";static FLIGHT="flight";static viewOf(e){const{balloon:t,windsAloft:s,plan:n,...o}=structuredClone(e),r={...o,balloon:typeof t=="string"?t:t.id,mode:e.group?"group":"one"};if(typeof t=="object"){const{id:d,...u}=t;Object.keys(u).length>0&&(r.figures=u)}return e.group||(r.release=structuredClone(e.releases?.[0]??{t:0})),s?.[0]&&(r.windAloft={...s[0]}),n&&n.length===1&&(r.cruiseM=n[0].altitudeM),r}static fromView(e,t){const{balloon:s,figures:n,mode:o,release:r,windAloft:d,cruiseM:u,...v}=structuredClone(e),l={...v,balloon:n&&Object.keys(n).length>0?{...n,id:s}:s};if(o==="group"){const p=r?.t??t.releases?.[0]?.t??0;l.group={count:10,fromT:p,untilT:p+6e4,...e.group??{}},t.group&&t.releases?.length?l.releases=t.releases:delete l.releases}else{delete l.group;const p={...r??{},t:r?.t??t.group?.fromT??0};l.releases=[p,...t.group?[]:t.releases?.slice(1)??[]]}const g=t.windsAloft?.slice(1)??[];return d&&Object.values(d).some(p=>p!==void 0)?l.windsAloft=[{atM:d.atM??1e3,towardDeg:d.towardDeg??0,speedMS:d.speedMS??0},...g]:g.length>0&&(l.windsAloft=g),t.plan&&t.plan.length>1?l.plan=t.plan:u!==void 0&&(l.plan=[{t:t.plan?.[0]?.t??0,altitudeM:u}]),l.wind&&l.wind.towardDeg===void 0&&l.wind.speedMS===void 0?delete l.wind:l.wind&&(l.wind.towardDeg??=0,l.wind.speedMS??=0),l}static typeOf(e){const t=e;return c.typeOf({balloon:t.figures?{...t.figures,id:t.balloon}:t.balloon,shape:t.shape})}static FIGURE={hair:"#5a2e14",skin:"#e8955a",bottom:"#f39a1e",shoes:"#f2f2f2"};static one(e){return f.read(e,"mode")!=="group"}static instant(e,t,s,n){return{type:"number",key:e,min:-36e3,max:36e3,step:1,unit:"s",scale:.001,required:!0,label:t,hint:"secondsOfTheRecording",group:s,visibleWhen:n}}static SET={kind:"balloons",title:"balloons",parameters:[{type:"said",key:"title",label:"name",group:i.BALLOON},{type:"choice",key:"balloon",required:!0,group:i.BALLOON,label:"type",choices:w.ALL.map(e=>({value:e.id,label:S.textKey(e.id)}))},{type:"choice",key:"shape",group:i.BALLOON,label:"shape",effective:()=>"round",choices:E.map(e=>({value:e,label:e})),visibleWhen:e=>i.typeOf(e).shapes!==void 0},{type:"colour",key:"color",group:i.BALLOON,label:"colour",hint:"itsLightsForAnLedBalloon",effective:e=>{const t=i.typeOf(e);return t.glow?.color??t.color}},...["hair","skin","bottom","shoes"].map(e=>({type:"colour",key:`partColors.${e}`,group:i.BALLOON,label:e,fallback:i.FIGURE[e],visibleWhen:t=>f.read(t,"shape")==="figure"})),{type:"number",key:"flames",min:1,max:9,step:1,group:i.BALLOON,label:"flamesLit",hint:"candlesOrFlares",effective:e=>i.typeOf(e).flames?.count,visibleWhen:e=>i.typeOf(e).flames!==void 0},{type:"colour",key:"partColors.flame",group:i.BALLOON,label:"flameColour",effective:e=>i.typeOf(e).flames?.color,visibleWhen:e=>i.typeOf(e).flames!==void 0},{type:"number",key:"figures.launchVolumeM3",min:.001,max:1e6,step:.001,unit:"m³",group:i.BALLOON,label:"filledWith",hint:"atSeaLevel",effective:e=>i.typeOf(e).launchVolumeM3},{type:"number",key:"figures.massKg",min:1e-4,max:1e5,step:1e-4,unit:"kg",group:i.BALLOON,label:"weight",hint:"withoutItsGas",effective:e=>i.typeOf(e).massKg},{type:"set",key:"explains",group:i.BALLOON,label:"standForTheShapes",options:(e,t)=>{const s=t?.shapes??[],n=(e.explains??[]).filter(o=>!s.some(r=>r.value===o));return[...s,...n.map(o=>({value:o,label:o}))]},empty:"noShape"},{type:"position",key:"site.eastM",secondKey:"site.northM",saidKey:"site.saidPosition",native:"local",step:1,rangeM:1e5,group:i.RELEASE,label:"whereLetGo"},{type:"number",key:"site.altitudeM",min:-1e3,max:9e3,step:.1,unit:"m",group:i.RELEASE,effective:()=>0,label:"heightOfTheSite",hint:"aboveTheGroundOfThePlace"},{type:"number",key:"site.originElevationM",min:-500,max:6e3,step:1,unit:"m",group:i.RELEASE,effective:()=>0,label:"thePlaceAboveTheSea",hint:"whatSetsHowThinTheAir"},{type:"choice",key:"mode",required:!0,group:i.RELEASE,label:"howMany",choices:[{value:"one",label:"oneBalloon"},{value:"group",label:"aGroup"}]},i.instant("release.t","letGoAt",i.RELEASE,i.one),{type:"number",key:"release.altitudeM",min:0,max:47e3,step:1,unit:"m",group:i.RELEASE,label:"firstSeenAt",hint:"alreadyUp",visibleWhen:i.one},{type:"number",key:"group.count",min:1,max:500,step:1,required:!0,group:i.RELEASE,label:"count",visibleWhen:e=>!i.one(e)},i.instant("group.fromT","firstLetGoAt",i.RELEASE,e=>!i.one(e)),i.instant("group.untilT","lastLetGoAt",i.RELEASE,e=>!i.one(e)),{type:"number",key:"group.radiusM",min:0,max:5e3,step:1,unit:"m",group:i.RELEASE,effective:()=>10,label:"letGoWithin",visibleWhen:e=>!i.one(e)},{type:"number",key:"group.fillSpread",min:0,max:1,step:.01,group:i.RELEASE,effective:()=>.1,label:"fillingUnlike",hint:"asAShare",visibleWhen:e=>!i.one(e)},{type:"number",key:"group.seed",min:0,max:4294967295,step:1,group:i.RELEASE,effective:()=>1,label:"draw",hint:"whatTheDrawsStartFrom",visibleWhen:e=>!i.one(e)},{type:"number",key:"wind.towardDeg",min:0,max:360,step:1,unit:"°",group:i.AIR,label:"windTowards",hint:"atTheGround",effective:()=>0},{type:"number",key:"wind.speedMS",min:0,max:100,step:.1,unit:"m/s",group:i.AIR,label:"windSpeed",effective:()=>0},{type:"number",key:"windAloft.atM",min:10,max:47e3,step:10,unit:"m",group:i.AIR,label:"windAloftAt",hint:"aboveTheSite"},{type:"number",key:"windAloft.towardDeg",min:0,max:360,step:1,unit:"°",group:i.AIR,label:"windAloftTowards"},{type:"number",key:"windAloft.speedMS",min:0,max:150,step:.1,unit:"m/s",group:i.AIR,label:"windAloftSpeed"},{type:"number",key:"airTemperatureC",min:-60,max:50,step:.5,unit:"°C",group:i.AIR,effective:()=>15,label:"airTemperature",hint:"atTheSite"},{type:"number",key:"turbulence.horizontalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>c.TURBULENCE.horizontalMS,label:"gustsAcross"},{type:"number",key:"turbulence.verticalMS",min:0,max:10,step:.1,unit:"m/s",group:i.AIR,effective:()=>c.TURBULENCE.verticalMS,label:"gustsUpAndDown"},{type:"number",key:"cruiseM",min:0,max:1e4,step:1,unit:"m",group:i.FLIGHT,effective:()=>c.CRUISE_M,label:"pilotHolds",hint:"aboveTheSite",visibleWhen:e=>i.typeOf(e).burner!==void 0},{type:"number",key:"triggerM",min:10,max:1e4,step:10,unit:"m",group:i.FLIGHT,label:"torchLitAt",hint:"itsAltimeterLightsIt",effective:e=>i.typeOf(e).torch?.aboveM,visibleWhen:e=>i.typeOf(e).torch!==void 0},{type:"number",key:"tetherM",min:1,max:5e3,step:1,unit:"m",group:i.FLIGHT,effective:()=>c.TETHER_M,label:"line",visibleWhen:e=>i.typeOf(e).envelope==="sealed"},{type:"boolean",key:"lit",group:i.FLIGHT,label:"lampLit",hint:"theLampUnderIt",visibleWhen:e=>i.typeOf(e).lamp!==void 0},{type:"number",key:"durationS",min:1,max:86400,step:1,unit:"s",group:i.FLIGHT,effective:e=>i.typeOf(e).durationS,label:"computedFor",hint:"itMayBurstOrLandBefore"}]};static publish(){b.publish(i.SET)}}const D=m.catalog({en:()=>h(()=>import("./BalloonEditorMessages_en-B2n2FutN.js"),[],import.meta.url).then(a=>a.balloonEditorMessages_en),fr:()=>h(()=>import("./BalloonEditorMessages_fr-BmUizmQy.js"),[],import.meta.url).then(a=>a.balloonEditorMessages_fr),es:()=>h(()=>import("./BalloonEditorMessages_es-BXppdrpF.js"),[],import.meta.url).then(a=>a.balloonEditorMessages_es),it:()=>h(()=>import("./BalloonEditorMessages_it-Dx0JODqK.js"),[],import.meta.url).then(a=>a.balloonEditorMessages_it)});class y{constructor(e,t,s){this.container=e,this.host=t,T.attach(e,"balloon-editor-part",y.STYLE),this.language=s,b.of("balloons")||i.publish(),this.ready=this.setLanguage(s)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;language;shown=[];viewed;static STYLE=`
|
|
2
2
|
.balloon-editor-part, .balloon-editor-part #balloon-list, .balloon-editor-part .launch-fields { flex-basis: 100%; min-width: 0; }
|
|
3
3
|
.balloon-editor-part .launch-editor, .balloon-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
|
|
4
4
|
.balloon-editor-part [hidden] { display: none !important; }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{M as T,_ as c}from"./rr0-ufoathome.mjs";import{b as I,P as E,I as x}from"./SaidPosition-OJEYhVKN.js";import{L as u}from"./LaserBeam-
|
|
1
|
+
import{M as T,_ as c}from"./rr0-ufoathome.mjs";import{b as I,P as E,I as x}from"./SaidPosition-OJEYhVKN.js";import{L as u}from"./LaserBeam-BGs1pXaE.js";import{S as L}from"./SkyEventEditorStyle-CvY_AhbI.js";import{bb as M}from"./ShareDialogElement-Dsc4v4jd.js";import{P as g,E as w,a as f}from"./ParameterForm-XbqxCLRn.js";import{T as _}from"./TimelineTracks-Daaqw9ly.js";import"./GeoProjection-DvqDbRIx.js";import"./Sighting-C1yj2-s5.js";import"./VisualAids-DI-hEL46.js";import"./three.module-CbaHqYFq.js";import"./Decor-Dn-cvniW.js";import"./RecordingIssue-BlWT8Xsu.js";import"./xyzImageryRaster-Dhxs0B26.js";import"./Obstacles-v9SkfBD7.js";const O=T.catalog({en:()=>c(()=>import("./BeamParameterTexts_en-DZB75ouZ.js"),[],import.meta.url).then(l=>l.beamParameterTexts_en),fr:()=>c(()=>import("./BeamParameterTexts_fr-BHG3fW40.js"),[],import.meta.url).then(l=>l.beamParameterTexts_fr),es:()=>c(()=>import("./BeamParameterTexts_es-AeZmsufG.js"),[],import.meta.url).then(l=>l.beamParameterTexts_es),it:()=>c(()=>import("./BeamParameterTexts_it-CPwmQX-g.js"),[],import.meta.url).then(l=>l.beamParameterTexts_it)});class h{static LIGHT_TITLE="light";static BEAM="beam";static WHEN="when";static nextPlace(e){const t=e[e.length-1]??{lat:0,lng:0,altitudeM:0},i=e[e.length-2];return i?{lat:2*t.lat-i.lat,lng:2*t.lng-i.lng,altitudeM:2*t.altitudeM-i.altitudeM}:{lat:t.lat,lng:t.lng+500/(111320*Math.max(.05,Math.cos(t.lat*Math.PI/180))),altitudeM:t.altitudeM}}static instant(e,t,i,s=!1){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t,hint:i,...s?{required:s}:{}}}static SET={kind:"beam",title:"beam",parameters:[{type:"said",key:"title",label:"name",group:h.BEAM},{type:"number",key:"divergenceMrad",min:.001,max:1e3,step:.001,unit:"mrad",group:h.BEAM,effective:()=>u.DEFAULT_DIVERGENCE_MRAD,label:"divergence",hint:"howFastItWidensFullAngle"},{type:"number",key:"apertureM",min:.001,max:10,step:.001,unit:"m",group:h.BEAM,effective:()=>u.DEFAULT_APERTURE_M,label:"widthAtTheEmitter"},{type:"number",key:"patchiness",min:0,max:100,step:1,unit:"%",scale:100,group:h.BEAM,effective:()=>u.DEFAULT_PATCHINESS,label:"unevenHaze",hint:"howUnevenlyTheHazeItCrosses"}]};static WAVELENGTH_HINT="itsColour532ForTheGreen";static POWER_HINT="theOpticalPowerItCarriesIts";static WAVELENGTH_LABEL="wavelength";static POWER_LABEL="power";static LIGHT={kind:"beam-light",title:h.LIGHT_TITLE,parameters:[{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",required:!0,label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",required:!0,label:h.POWER_LABEL,hint:h.POWER_HINT}]};static LIGHT_KEY={kind:"beam-light-key",title:h.LIGHT_TITLE,parameters:[h.instant("t","time","secondsOfTheRecording",!0),{type:"number",key:"wavelengthNm",min:380,max:780,step:1,unit:"nm",label:h.WAVELENGTH_LABEL,hint:h.WAVELENGTH_HINT,effective:(e,t)=>t?.wavelengthNm},{type:"number",key:"powerW",min:.001,max:1e5,step:.001,unit:"W",label:h.POWER_LABEL,hint:h.POWER_HINT,effective:(e,t)=>t?.powerW}]};static ON={kind:"beam-on",title:h.WHEN,parameters:[h.instant("fromT","onFrom","secondsOfTheRecordingEmptyFrom"),h.instant("untilT","offAt","secondsOfTheRecordingEmptyUntil")]};static MOVE_KEY={kind:"beam-move-key",title:"pathAtAnInstant",parameters:[h.instant("t","time","secondsOfTheRecording",!0)]};static hexOf(e){const t=u.colourOf(e),i=Math.max(...t,1e-9),s=n=>{const o=Math.min(1,Math.max(0,n/i)),a=o<=.0031308?12.92*o:1.055*o**(1/2.4)-.055;return Math.round(a*255).toString(16).padStart(2,"0")};return`#${t.map(s).join("")}`}static wavelengthOf(e){const t=h.hueOf(e);let i=532,s=1/0;for(let n=400;n<=700;n++){const o=Math.abs((h.hueOf(h.hexOf(n))-t+540)%360-180);o<s&&(s=o,i=n)}return i}static hueOf(e){const t=Number.parseInt(e.replace("#",""),16),[i,s,n]=[t>>16&255,t>>8&255,t&255].map(b=>b/255),o=Math.max(i,s,n),a=Math.min(i,s,n);if(o===a)return 0;const r=o-a;return((o===i?(s-n)/r%6:o===s?(n-i)/r+2:(i-s)/r+4)*60+360)%360}static PLACE={kind:"beam-place",title:"pointOfThePath",parameters:[{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:.1,label:"position"},{type:"number",key:"altitudeM",min:-500,max:1e5,step:.1,unit:"m",required:!0,label:"altitude",hint:"aboveTheSeaNotTheGround"}]};static publish(){I.publish(h.SET)}}const A=T.catalog({en:()=>c(()=>import("./BeamEditorMessages_en-DDvPWAdd.js"),[],import.meta.url).then(l=>l.beamEditorMessages_en),fr:()=>c(()=>import("./BeamEditorMessages_fr-CtX6uP-x.js"),[],import.meta.url).then(l=>l.beamEditorMessages_fr),es:()=>c(()=>import("./BeamEditorMessages_es-BhCkhUkN.js"),[],import.meta.url).then(l=>l.beamEditorMessages_es),it:()=>c(()=>import("./BeamEditorMessages_it-DVweRQFi.js"),[],import.meta.url).then(l=>l.beamEditorMessages_it)});class p{constructor(e,t,i){this.container=e,this.host=t,this.language=i,L.attach(e,"beam-editor",p.STYLE),I.of("beam")||h.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="on";onForm;lightForm;lightKeyForm;lightIndex;moveKeyForm;moveIndex;places;placeForm;placeIndex=0;language;shown=[];static STYLE='.beam-editor { flex-basis: 100%; min-width: 0; } .beam-editor #beam-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .beam-editor #beam-list, .beam-editor #beam-places { flex-basis: 100%; min-width: 0; } .beam-editor .launch-editor, .beam-editor .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .beam-editor .launch-fields { flex-basis: 100%; min-width: 0; } .beam-editor [hidden] { display: none !important; } .beam-editor select { min-width: 0; width: 100%; } .beam-editor .launch-intro { flex-basis: 100%; margin: 0; } .beam-editor .launch-track { flex-basis: 100%; margin: 0; } .beam-editor .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .beam-editor .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; } .beam-editor input, .beam-editor select { max-width: 100%; box-sizing: border-box; } .beam-editor input[type="text"] { width: 12em; } .beam-editor #launch-title { width: 18em; } .beam-editor label { min-width: 0; max-width: 100%; } .beam-editor input.parameter-derived::placeholder { opacity: .65; } .beam-editor .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; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([A.load(e),O.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.beams;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("beam-fields").hidden=t===void 0,!t)return;const i={said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()};this.form??=new g(this.element("beam-parameters"),this.language,"beam.",i),this.form.show(this.resolved(h.SET),this.targetOfBeam(),()=>this.written()),this.syncDetail(!0)}refresh(){if(!this.messages)return;this.syncAddState();const e=this.beams;if(e.length===this.shown.length&&e.every((t,i)=>t.id===this.shown[i].id)){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.pathOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addBeamNowhere)}get current(){return this.beams.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="on",this.lightIndex=void 0,this.moveIndex=void 0,this.placeIndex=0,this.sync())}resolved(e){return E.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
|
|
2
2
|
<p class="launch-intro">${e.intro}</p>
|
|
3
3
|
<div id="beam-list"></div>
|
|
4
4
|
<div id="beam-fields" class="launch-fields">
|