@rr0/ufoathome 0.201.0 → 0.202.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed-interview/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-interview/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-interview/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-interview/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-interview/rr0-interview.mjs +10 -6
- package/{dist-embed-sighting/AuroraSimulation-C9hvCV0W.js → dist-embed-scene/AuroraSimulation-Dh4kZW1x.js} +7 -2
- package/dist-embed-scene/rr0-scene.mjs +49 -45
- package/{dist-embed-scene/AuroraSimulation-BZpjImM0.js → dist-embed-sighting/AuroraSimulation-C7LAHgWM.js} +7 -2
- package/dist-embed-sighting/{CaseReportExport-DVVsc8gA.js → CaseReportExport-CkWf0HNx.js} +1 -1
- package/dist-embed-sighting/{InterviewElement-BduwyUn5.js → InterviewElement-B_ULRy5z.js} +9 -5
- package/dist-embed-sighting/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-sighting/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-sighting/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-sighting/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-sighting/rr0-sighting.mjs +52 -48
- package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-CWpyBqG3.js → AdsbLolArchiveProvider-Bz1OjSjY.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipEditor-BvnVNcF4.js → AirshipEditor-BlJXyxlr.js} +1 -1
- package/dist-embed-sighting-editor/{AirshipFlight-CB1Quf68.js → AirshipFlight-Cx40Y8JT.js} +1 -1
- package/dist-embed-sighting-editor/{Aurora-BRXvgyRM.js → Aurora-Ldk66p1A.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraEditor-JQ3kRqrq.js → AuroraEditor-CGSomAFk.js} +1 -1
- package/dist-embed-sighting-editor/{AuroraSimulation-i64MFW2z.js → AuroraSimulation-vKcv2Hue.js} +7 -2
- package/dist-embed-sighting-editor/{BallesterGuaspAssessor-BaKKAdY3.js → BallesterGuaspAssessor-Bylahnc2.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonEditor-C2oHClW7.js → BalloonEditor-CgO4LaWn.js} +1 -1
- package/dist-embed-sighting-editor/{BalloonFlight-B9A6MoCj.js → BalloonFlight-hLr_4TFU.js} +1 -1
- package/dist-embed-sighting-editor/{BeamEditor-CW7mTQjS.js → BeamEditor-B8qreA3j.js} +1 -1
- package/dist-embed-sighting-editor/{BeamSystem-CSfJjLCb.js → BeamSystem-D0hrju5J.js} +1 -1
- package/dist-embed-sighting-editor/{BirdEditor-BdxhCoW9.js → BirdEditor-BNzrfSqX.js} +1 -1
- package/dist-embed-sighting-editor/{BirdFlock-DCbrukNp.js → BirdFlock-iSovVEZd.js} +1 -1
- package/dist-embed-sighting-editor/{BodyEditor-DE8ZQrqe.js → BodyEditor-Bd_pKafG.js} +2 -2
- package/dist-embed-sighting-editor/{CaseElement-C46wM-nU.js → CaseElement-DPlro-7S.js} +3 -3
- package/dist-embed-sighting-editor/{CaseReportExport-UVrInf6H.js → CaseReportExport-C1g5C8hi.js} +2 -2
- package/dist-embed-sighting-editor/{ContrailSystem-CDSSxouG.js → ContrailSystem-D3tXAg2r.js} +1 -1
- package/dist-embed-sighting-editor/{ControlPasses-CsOVa-jq.js → ControlPasses-BMEmppip.js} +1 -1
- package/dist-embed-sighting-editor/{CoverageAssessor-DWY_gJJX.js → CoverageAssessor-uzQnTEH8.js} +1 -1
- package/dist-embed-sighting-editor/{DroneEditor-DgeuaHdb.js → DroneEditor-BFsArPKi.js} +1 -1
- package/dist-embed-sighting-editor/{DroneFlight-CFztr-9j.js → DroneFlight-B96pVrY1.js} +1 -1
- package/dist-embed-sighting-editor/{DroneParameters-CHmDmRoC.js → DroneParameters-DW-enQUo.js} +1 -1
- package/dist-embed-sighting-editor/{Flightradar24Provider-e6_3o9Jf.js → Flightradar24Provider-CBGkjw03.js} +1 -1
- package/dist-embed-sighting-editor/GLTFLoader-2Zbfb3kh.js +1 -0
- package/dist-embed-sighting-editor/{GenerativeKitMessages-CmqG-T2c.js → GenerativeKitMessages-DmeZ_YZO.js} +1 -1
- package/dist-embed-sighting-editor/{GeoExportTexts-Wjc5YKlM.js → GeoExportTexts-Cp95Dg-h.js} +1 -1
- package/dist-embed-sighting-editor/{GeoJsonExport-BSPGzTbG.js → GeoJsonExport-CdadOwd2.js} +1 -1
- package/dist-embed-sighting-editor/{GeographicFigures-D_TfLkj9.js → GeographicFigures-Bo9rsT_L.js} +1 -1
- package/dist-embed-sighting-editor/{HeadlightSystem-DljWmzj5.js → HeadlightSystem-CBmEcC9f.js} +1 -1
- package/dist-embed-sighting-editor/{HynekAssessor-BCDwoOI9.js → HynekAssessor-uub2VxTi.js} +1 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-_1fa2bG7.js +294 -0
- package/dist-embed-sighting-editor/{InterviewElement-DDa53uMq.js → InterviewElement-Ala811KB.js} +6 -2
- package/dist-embed-sighting-editor/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-sighting-editor/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-sighting-editor/{KmlExport-B46AfaoJ.js → KmlExport-DIxM5Hpx.js} +1 -1
- package/dist-embed-sighting-editor/{LanternEditor-CkbeitJh.js → LanternEditor-CjQVFowY.js} +1 -1
- package/dist-embed-sighting-editor/{LaserBeam-Ber-PT8j.js → LaserBeam-BVc8Mvhr.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchEditor-BsvHahqK.js → LaunchEditor-Cz8Mzo4a.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchPlume-BmPMeGMN.js → LaunchPlume-CvBhTPgN.js} +1 -1
- package/dist-embed-sighting-editor/{LaunchSimulation-g-ETWhEH.js → LaunchSimulation-CkZIG-3P.js} +1 -1
- package/dist-embed-sighting-editor/{ModelSource-DOUnBBhu.js → ModelSource-B153oeTu.js} +1 -1
- package/dist-embed-sighting-editor/{ModelThumbnails-TwG1snwZ.js → ModelThumbnails-BUL_OLFv.js} +1 -1
- package/dist-embed-sighting-editor/{ModelViewer-Y_B6eM4z.js → ModelViewer-BzBLcY9s.js} +1 -1
- package/dist-embed-sighting-editor/{ModuleConformance-CO1S9pa3.js → ModuleConformance-Cr6fM28A.js} +2 -2
- package/dist-embed-sighting-editor/{ModuleSession-VLS0tjAb.js → ModuleSession-WA6lqfV6.js} +3 -3
- package/dist-embed-sighting-editor/ModuleThree-CB_EjTOI.js +1 -0
- package/dist-embed-sighting-editor/{ModulesPanelElement--YQ0QtcW.js → ModulesPanelElement-BsRg3mzl.js} +3 -3
- package/dist-embed-sighting-editor/{NearestApproach-C_8Uvp6i.js → NearestApproach-Bnx9Ld5_.js} +1 -1
- package/dist-embed-sighting-editor/PictureRegistration-D8fDZm4v.js +1 -0
- package/dist-embed-sighting-editor/{PoherAssessor-DtDcuhWK.js → PoherAssessor-CNj_Nyci.js} +1 -1
- package/dist-embed-sighting-editor/{QuestionnaireFeed-CvLtuLIH.js → QuestionnaireFeed-B0j8W4JM.js} +1 -1
- package/dist-embed-sighting-editor/QuestionnaireForm-lzn9MPr2.js +1 -0
- package/dist-embed-sighting-editor/{QuestionnaireImport-BYj5QoJS.js → QuestionnaireImport-BmcxlQBq.js} +1 -1
- package/dist-embed-sighting-editor/RailwaySystem-6bwbv8UB.js +41 -0
- package/dist-embed-sighting-editor/{ReentryEditor-CW8H7KaA.js → ReentryEditor-BWCK2g_s.js} +1 -1
- package/dist-embed-sighting-editor/{ReentrySimulation-DVl__RjO.js → ReentrySimulation-B09JXMu5.js} +1 -1
- package/dist-embed-sighting-editor/ReferenceSystem-8QgwbbAG.js +1 -0
- package/dist-embed-sighting-editor/{RoadMarkings-DJraHdS6.js → RoadMarkings-Dl6zVQIx.js} +1 -1
- package/dist-embed-sighting-editor/ScenarioReadings-DyMshXS4.js +1 -0
- package/dist-embed-sighting-editor/{ScenarioSweep-Ddtuo_Af.js → ScenarioSweep-ByqOTfs2.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_en-p5YNYZhA.js → SceneNames_en-c5zNw0Hi.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_es-DlMqYLL9.js → SceneNames_es-CDjoBwy_.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_fr-lFA7hY3x.js → SceneNames_fr-CoZNmFu3.js} +1 -1
- package/dist-embed-sighting-editor/{SceneNames_it-CDwvX1Nw.js → SceneNames_it-CVEahBpq.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightEditor-BSI8hB1V.js → SearchlightEditor-BpwPOhJ6.js} +1 -1
- package/dist-embed-sighting-editor/{SearchlightSystem-DHfVi2np.js → SearchlightSystem-CEG52QDx.js} +1 -1
- package/dist-embed-sighting-editor/{SightingElement-T0x4j9Zt.js → SightingElement-BQdiez39.js} +3 -3
- package/dist-embed-sighting-editor/{SkyLantern-Dl4yl-lc.js → SkyLantern-D6bru_e_.js} +1 -1
- package/dist-embed-sighting-editor/{TraceSystem-Dbu_bgfE.js → TraceSystem-DZMUxSn-.js} +2 -2
- package/dist-embed-sighting-editor/{UfoMessages_en-BAuHAGgq.js → UfoMessages_en-DdCKc-Ez.js} +1 -1
- package/dist-embed-sighting-editor/{VideoButton-C8eRmv7A.js → VideoButton-CzJg9lBG.js} +1 -1
- package/dist-embed-sighting-editor/{WaterSystem-DpJCe_2Q.js → WaterSystem-CB5jE7qB.js} +2 -2
- package/dist-embed-sighting-editor/geipan-qt-2025-B_RUiH8B.js +7 -0
- package/dist-embed-sighting-editor/{interviewImport-zzDGCbXd.js → interviewImport-D4P6e28u.js} +1 -1
- package/dist-embed-sighting-editor/{interviewJson-DngUPqK8.js → interviewJson-BJF9C-Rb.js} +1 -1
- package/dist-embed-sighting-editor/interviewSchema-r5bW7skq.js +1 -0
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +421 -415
- package/dist-embed-sighting-editor/{surroundingsSources-lvh4Rw5C.js → surroundingsSources-CqL7lcmF.js} +1 -1
- package/dist-embed-sighting-editor/{trafficRuntime-Drx7CE9H.js → trafficRuntime-Bu3my6S4.js} +2 -2
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-CqedGYi5.js → AdsbLolArchiveProvider-KbJPyJ97.js} +1 -1
- package/dist-embed-ufoathome/{Aurora-CpZx9hQ3.js → Aurora-C_mCH4JM.js} +1 -1
- package/dist-embed-ufoathome/{AuroraEditor-D2v8sWVE.js → AuroraEditor-Dzvgh6e0.js} +1 -1
- package/dist-embed-ufoathome/{AuroraSimulation-DdSP66LD.js → AuroraSimulation-BRUnHmlp.js} +7 -2
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-C4IktJ1l.js → BallesterGuaspAssessor-DurdUgbG.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-CuW3LVO-.js → BeamEditor-Ccvx7l7x.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-BPEYuCF4.js → BeamSystem-CPM8m17q.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-COMX-T65.js → BodyEditor-BG--NjnZ.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-C5BHP8jT.js → CaseEditorElement-0J_TCeiq.js} +64 -62
- package/dist-embed-ufoathome/{CaseElement-CIZvyRVi.js → CaseElement-CRXPyMMR.js} +3 -3
- package/dist-embed-ufoathome/{CaseReportExport-BFbswUIB.js → CaseReportExport-DKrBXPgZ.js} +3 -3
- package/dist-embed-ufoathome/{ColumnResize-Dh6Xyspd.js → ColumnResize-DV-byvDt.js} +6 -6
- package/dist-embed-ufoathome/{ControlPasses-CnL1GmT-.js → ControlPasses-CKvTCqTI.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-CiqUEJkN.js → CoverageAssessor-MeOMUjkZ.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-_tNmWf11.js → Flightradar24Provider-DxTfswSh.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-BLk8prLt.js → GLTFLoader-pi-JKaNa.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-DkPKk-7q.js → GeoJsonExport-iyhoKOUU.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-l-PfHdSR.js → GeographicFigures-DBmuFlvH.js} +1 -1
- package/dist-embed-ufoathome/{HynekAssessor-BhnvqsYz.js → HynekAssessor-Bda6csgM.js} +1 -1
- package/dist-embed-ufoathome/InterviewAttachments-BP6Prvdu.js +1 -0
- package/dist-embed-ufoathome/InterviewEditorElement-BA060rqJ.js +294 -0
- package/dist-embed-ufoathome/{InterviewElement-CuRmQ0d3.js → InterviewElement-DvqsCA3I.js} +6 -2
- package/dist-embed-ufoathome/InterviewMessages_en-BrnxG2rl.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_es-Dxfjqrte.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_fr-DIA-1qu8.js +3 -0
- package/dist-embed-ufoathome/InterviewMessages_it-CYBEIKX-.js +3 -0
- package/dist-embed-ufoathome/{KmlExport-BUl3gOrw.js → KmlExport-DEPgRRWe.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-C7glTvQN.js → LaserBeam--dquPX_h.js} +1 -1
- package/dist-embed-ufoathome/{LaunchEditor-DvudtAzp.js → LaunchEditor-D3P0GkLr.js} +1 -1
- package/dist-embed-ufoathome/{LaunchPlume-CrDBzsQe.js → LaunchPlume-w4l4TR4A.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-DyOA4lPb.js → LaunchSimulation-BpZd-Nov.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-CoT4mxTx.js → ModelSource-Csnm3RH_.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-t59SZ3Vn.js → ModelThumbnails-Cnt2GxTb.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-DEdruEtl.js → ModelViewer-DOfAkPgK.js} +1 -1
- package/dist-embed-ufoathome/{ModulesPanelElement-N-ccpGxl.js → ModulesPanelElement-DH1oroWm.js} +2 -2
- package/dist-embed-ufoathome/{NearestApproach-Do15yfeg.js → NearestApproach-DJ98M81-.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-Cs8-ZBge.js → PoherAssessor-4zSdFnFp.js} +1 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-W69udpmT.js +1 -0
- package/dist-embed-ufoathome/QuestionnaireForm-U78nFPn5.js +1 -0
- package/dist-embed-ufoathome/{QuestionnaireImport-Cx1dQiha.js → QuestionnaireImport-Q5uHxQwU.js} +1 -1
- package/dist-embed-ufoathome/{ReentryEditor-CJUFkVFO.js → ReentryEditor-DEi9nT0z.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-B5QcdOTq.js → ReentrySimulation-CSO1vgro.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-DyzOUClN.js → ReferenceSystem--tiMGm4e.js} +1 -1
- package/dist-embed-ufoathome/ScenarioReadings-Dzdgopl3.js +1 -0
- package/dist-embed-ufoathome/ScenarioSweep-CMcleprC.js +1 -0
- package/dist-embed-ufoathome/{SearchlightEditor-CPDNpfNC.js → SearchlightEditor--1uL8bTa.js} +1 -1
- package/dist-embed-ufoathome/{SearchlightSystem-Ca0rZcXv.js → SearchlightSystem-7bntVtp_.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-CBeU9ChH.js → ShareDialogElement-Dlfy9NCE.js} +52 -48
- package/dist-embed-ufoathome/{SightingElement-BveOM4nF.js → SightingElement-BJSNmFM6.js} +2 -2
- package/dist-embed-ufoathome/{TraceSystem-CoHX04R3.js → TraceSystem-Cq2TgP-u.js} +1 -1
- package/dist-embed-ufoathome/{VideoButton-DNQmWtfv.js → VideoButton-MRJlVNm_.js} +1 -1
- package/dist-embed-ufoathome/geipan-qt-2025-B_RUiH8B.js +7 -0
- package/dist-embed-ufoathome/interviewSchema-r5bW7skq.js +1 -0
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +4 -4
- package/dist-embed-ufoathome/{surroundingsSources-C823p3dG.js → surroundingsSources--qffL_nJ.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-DtXb9B2f.js → trafficRuntime-CTCGr90P.js} +1 -1
- package/package.json +1 -1
- package/dist-embed-interview/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-interview/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-interview/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-interview/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-sighting/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-sighting/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-sighting/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting-editor/GLTFLoader-Df-r7_lf.js +0 -1
- package/dist-embed-sighting-editor/InterviewEditorElement-KHpgfy3k.js +0 -277
- package/dist-embed-sighting-editor/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-sighting-editor/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-sighting-editor/ModuleThree-DQ2dT7XW.js +0 -1
- package/dist-embed-sighting-editor/PictureRegistration-Br0xjLE2.js +0 -1
- package/dist-embed-sighting-editor/QuestionnaireForm-DA6LPvBt.js +0 -1
- package/dist-embed-sighting-editor/RailwaySystem-eT-ZKfZl.js +0 -41
- package/dist-embed-sighting-editor/ReferenceSystem-DxVYO7g9.js +0 -1
- package/dist-embed-sighting-editor/ScenarioReadings-BYqlpLo8.js +0 -1
- package/dist-embed-sighting-editor/geipan-qt-2025-j-yGY7EN.js +0 -7
- package/dist-embed-sighting-editor/interviewSchema-DRWvRSL2.js +0 -1
- package/dist-embed-ufoathome/InterviewEditorElement-iw2lnwx8.js +0 -277
- package/dist-embed-ufoathome/InterviewMessages_en-BRmuWrAg.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_es-BTotimwY.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_fr-DBCdGB0r.js +0 -1
- package/dist-embed-ufoathome/InterviewMessages_it-B5EyMD-k.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireFeed-BfvRSPoo.js +0 -1
- package/dist-embed-ufoathome/QuestionnaireForm-ByFmq67M.js +0 -1
- package/dist-embed-ufoathome/ScenarioReadings-CfZehU_P.js +0 -1
- package/dist-embed-ufoathome/ScenarioSweep-CDumnmq2.js +0 -1
- package/dist-embed-ufoathome/geipan-qt-2025-j-yGY7EN.js +0 -7
- package/dist-embed-ufoathome/interviewSchema-DRWvRSL2.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={title:"Título",time:"Fecha",by:"Entrevistador",medium:"Medio",witness:"Testigo",witnessNone:"—",summary:"Descripción",transcript:"Transcripción",transcriptHint:"Dirección del archivo de transcripción anonimizada (opcional)",summaryTab:"Resumen",fileTab:"Archivo",importFile:"Cargar un archivo",importFileHint:"JSON, texto, WebVTT, SRT; un cuestionario rellenado (JSON, CSV, texto) si el medio es Cuestionario: cada campo pasa a ser una pregunta y su respuesta",inputFileFromFile:"desde su disco",inputFileFromUrl:"desde una dirección",inputFileModeHint:"Pulsar para darlo de la otra forma: un archivo suyo o una dirección",inputFileLoad:"Cargar",saveButton:"Guardar",loading:"Cargando la transcripción…",invalid:"Este texto aún no es JSON válido: la entrevista conserva la última transcripción que entendió.",notATranscript:"Ese archivo no es una transcripción de entrevista (no tiene turnos de palabra).",questionnaireTab:"Cuestionario",questionnaire:{intro:"Rellene el {title}: cada respuesta se guarda con las palabras del testigo, y una pregunta dejada vacía queda sin respuesta.",source:"El cuestionario tal como lo publica {publisher}",other:"Otras preguntas",required:"Se pregunta a todo testigo",precise:"precisa",imprecise:"imprecisa",preciseHint:"Decirla mejor con sus palabras: una fecha o una hora aproximada, o de la que no está seguro",impreciseHint:"Elegir mejor una fecha o una hora exacta",impreciseDate:"p. ej. a principios de julio de 1965, un sábado, no estoy seguro del día",impreciseTime:"p. ej. hacia las 21 h, poco después de la puesta del sol",confidentialSealed:"Confidencial: sellada para {name}, el único que puede leerla; no figura en claro en ningún archivo.",confidentialSealedBefore:"Ya se dio una respuesta sellada para {name}: no puede volver a mostrarse, y escribir otra la sustituye.",confidentialNowhere:"Confidencial: este caso no nombra ningún destinatario para quien sellarla, así que no se guarda en ningún archivo."},feed:"Pasar a la observación",feedHint:"Lo que las respuestas dicen del momento, la duración, el color y la posición en el cielo se pasa a la observación del testigo, cada valor citando su respuesta",fed:"{n} valores pasados a la observación, cada uno citando su respuesta.",fedNothing:"Nada en las respuestas puede pasarse aún a la observación (fecha, hora, duración, color, dirección, altura).",unknownQuestionnaire:"El cuestionario {id} no es uno que esta versión conozca: sus preguntas se muestran tal como las tiene la entrevista.",notAQuestionnaire:"Ese archivo no contiene ningún campo de cuestionario (una pregunta y su respuesta).",loadFailed:"No se pudo leer esa transcripción.",editorLabel:"Transcripción de la entrevista en JSON",byHint:"Identificadores de personas de RR0, separados por comas",exchangesTab:"Intercambios",exchangesEmpty:"Todavía no se ha dicho nada.",redacted:"Pasaje eliminado",colon:": ",proofreadAll:"Revisado por todos.",proofreadPending:"Aún no revisado por: {names}",play:"Reproducir",pause:"Pausa",recordings:"Grabaciones ({n})",recordingsTitle:"Grabaciones",recordingKind:"Tipo",recordingAudio:"Audio",recordingVideo:"Vídeo",recordingFile:"Archivo",recordingOffset:"Desfase",recordingRemove:"Quitar",recordingAdd:"Añadir una grabación",recordingAddFirst:"Indique primero el archivo de la grabación de arriba",close:"Cerrar",noRecording:"Sin grabación: añada el archivo de audio o vídeo de la entrevista para poder escucharla.",redactSelection:"Retirar la selección",redactedWords:"pasaje retirado · {n} palabra(s)",sealOpen:"Abrir con {name}",sealOpened:"Confidencial, leída con {name}: se guarda solo en esta página, nunca se escribe.",sealFailed:"Esta clave no abre esta respuesta: se selló para otra.",redactAll:"Retirar todo",redactRestore:"Restablecer",restoreAll:"Restablecer todo",editTurn:"Modificar",deleteTurn:"Eliminar este turno de palabra",saveTurn:"Guardar",cancelTurn:"Cancelar",turnEditHint:"⟦ … ⟧ marca un pasaje retirado",selectionOnePassage:"La selección debe caber en un solo pasaje no retirado.",reviewedBy:"{name} ha revisado",linkMoment:"Vincular a un momento…",momentLabel:"Momento {k} · {text}",unlinkMoment:"Quitar este vínculo",noMoments:"La observación aún no tiene momentos con nombre.",redactReasonLabel:"Motivo",redactReasonHint:"Se dice de cada pasaje retirado a continuación: el lector de la entrevista publicada lo ve en lugar del pasaje",redactReasons:["vida privada","dato que identifica","fuera de tema","error de reconocimiento"],redactReason:"retirado en la revisión",roles:{interviewer:"Entrevistador",interviewee:"Entrevistado",witness:"Testigo",unattributed:"Voz por atribuir"},transcribe:"Transcribir la grabación",transcribeWith:"con",transcribeHint:"Convierte la grabación de la entrevista en turnos de palabra, con sus tiempos. De quién es cada voz queda por decir, turno por turno (Quién habla), y luego por hacer revisar.",transcribeLocal:"Nada sale de su ordenador. La primera vez, el modelo (unos {mb} MB) se descarga y el navegador lo conserva.",transcribeSends:"La grabación se enviará a {name} para ser transcrita.",transcribeReplaces:"La transcripción actual será reemplazada.",transcribeNoRecording:"La entrevista aún no tiene grabación: el botón abre la ventana donde añadirla.",transcribeKey:"Clave",transcribeKeyGet:"obtener una clave",transcribeKeyHint:"Se guarda en memoria hasta que se recarga la página, nunca se almacena",transcribeReading:"Leyendo la grabación…",transcribeLoading:"Descargando el modelo: {loaded} de {total} MB",transcribeLoadingSoFar:"Descargando el modelo: {loaded} MB",transcribeSending:"Enviando la grabación a {name}…",transcribeWaiting:"{name} transcribe la grabación…",transcribeProgress:"Transcribiendo: {done} de {total}",transcribeStop:"Detener",transcribeDone:"Transcrito por {engine}. Indique de quién es cada voz (Quién habla) y luego hágalo revisar.",transcribeStopped:"Transcripción detenida: no se ha cambiado nada.",transcribeErrors:{noKey:"Escriba primero su clave para este servicio.",key:"El servicio rechazó la clave.",rateLimited:"El servicio pide esperar (cuota alcanzada): inténtelo más tarde.",tooLarge:"La grabación es demasiado grande para leerse en la página: proporcione solo su audio.",unsupported:"Este navegador no puede ejecutar la transcripción.",failed:"La transcripción ha fallado: {detail}"},voiceNamed:"Voz {name}",whoSpeaks:"Quién habla…"};export{e as interviewMessages_es};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={title:"Titre",time:"Date",by:"Enquêteur",medium:"Moyen",witness:"Témoin",witnessNone:"—",summary:"Description",transcript:"Transcription",transcriptHint:"Adresse du fichier de transcription anonymisée (facultative)",summaryTab:"Résumé",fileTab:"Fichier",importFile:"Charger un fichier",importFileHint:"JSON, texte, WebVTT, SRT ; un questionnaire rempli (JSON, CSV, texte) si le moyen est Questionnaire : chaque champ devient une question et sa réponse",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",saveButton:"Sauver",loading:"Chargement de la transcription…",invalid:"Ce texte n'est pas encore du JSON valide : l'interview garde la dernière transcription qu'elle a comprise.",notATranscript:"Ce fichier n'est pas une transcription d'interview (il n'a pas de tours de parole).",questionnaireTab:"Questionnaire",questionnaire:{intro:"Remplissez le {title} : chaque réponse est gardée dans les mots du témoin, et une question laissée vide reste sans réponse.",source:"Le questionnaire tel que le publie {publisher}",other:"Autres questions",required:"Demandé à tout témoin",precise:"précise",imprecise:"imprécise",preciseHint:"La dire plutôt dans vos mots : une date ou une heure approximative, ou dont vous n'êtes pas sûr",impreciseHint:"Choisir plutôt une date ou une heure exacte",impreciseDate:"ex. début juillet 1965, un samedi, je ne suis pas sûr du jour",impreciseTime:"ex. vers 21 h, peu après le coucher du soleil",confidentialSealed:"Confidentielle : scellée pour {name}, qui seul peut la lire ; elle ne figure en clair dans aucun fichier.",confidentialSealedBefore:"Une réponse scellée pour {name} a déjà été donnée : elle ne peut plus être affichée, et en écrire une autre la remplace.",confidentialNowhere:"Confidentielle : ce dossier ne nomme aucun destinataire pour qui la sceller, elle n'est donc gardée dans aucun fichier."},feed:"Reporter dans l'observation",feedHint:"Ce que les réponses disent du moment, de la durée, de la couleur et de la position dans le ciel est reporté dans l'observation du témoin, chaque valeur citant sa réponse",fed:"{n} valeurs reportées dans l'observation, chacune citant sa réponse.",fedNothing:"Rien dans les réponses ne peut encore être reporté dans l'observation (date, heure, durée, couleur, direction, hauteur).",unknownQuestionnaire:"Le questionnaire {id} n'est pas connu de cette version : ses questions sont montrées telles que l'interview les a.",notAQuestionnaire:"Ce fichier ne contient aucun champ de questionnaire (une question et sa réponse).",loadFailed:"Cette transcription n'a pas pu être lue.",editorLabel:"Transcription de l'interview en JSON",byHint:"Identifiants de personnes RR0, séparés par des virgules",exchangesTab:"Échanges",exchangesEmpty:"Rien n'a encore été dit.",redacted:"Passage retiré",colon:" : ",proofreadAll:"Relu par tous les participants.",proofreadPending:"Pas encore relu par : {names}",play:"Lecture",pause:"Pause",recordings:"Enregistrements ({n})",recordingsTitle:"Enregistrements",recordingKind:"Type",recordingAudio:"Audio",recordingVideo:"Vidéo",recordingFile:"Fichier",recordingOffset:"Décalage",recordingRemove:"Retirer",recordingAdd:"Ajouter un enregistrement",recordingAddFirst:"Donnez d'abord le fichier de l'enregistrement ci-dessus",close:"Fermer",noRecording:"Aucun enregistrement : ajoutez le fichier audio ou vidéo de l'entretien pour pouvoir l'écouter.",redactSelection:"Retirer la sélection",redactedWords:"passage retiré · {n} mot(s)",sealOpen:"Ouvrir avec {name}",sealOpened:"Confidentielle, lue avec {name} : gardée dans cette page seulement, jamais écrite.",sealFailed:"Cette clé n'ouvre pas cette réponse : elle a été scellée pour une autre.",redactAll:"Retirer tout",redactRestore:"Rétablir",restoreAll:"Rétablir tout",editTurn:"Modifier",deleteTurn:"Supprimer ce tour de parole",saveTurn:"Enregistrer",cancelTurn:"Annuler",turnEditHint:"⟦ … ⟧ marque un passage retiré",selectionOnePassage:"La sélection doit tenir dans un seul passage non retiré.",reviewedBy:"{name} a relu",linkMoment:"Relier à un moment…",momentLabel:"Moment {k} · {text}",unlinkMoment:"Retirer ce lien",noMoments:"L'observation n'a pas encore de moment nommé.",redactReasonLabel:"Raison",redactReasonHint:"Dite de chaque passage retiré ensuite : le lecteur de l'interview publiée la voit à la place du passage",redactReasons:["vie privée","détail qui identifie","hors sujet","erreur de reconnaissance"],redactReason:"retiré à la relecture",roles:{interviewer:"Intervieweur",interviewee:"Interviewé",witness:"Témoin",unattributed:"Voix à attribuer"},transcribe:"Transcrire l'enregistrement",transcribeWith:"avec",transcribeHint:"Fait de l'enregistrement de l'entretien des tours de parole, avec leurs instants. À qui est chaque voix reste à dire, tour par tour (Qui parle), puis à faire relire.",transcribeLocal:"Rien ne quitte votre ordinateur. La première fois, le modèle (environ {mb} Mo) est téléchargé, puis gardé par le navigateur.",transcribeSends:"L'enregistrement sera envoyé à {name} pour être transcrit.",transcribeReplaces:"La transcription actuelle sera remplacée.",transcribeNoRecording:"L'interview n'a pas encore d'enregistrement : le bouton ouvre la fenêtre où l'ajouter.",transcribeKey:"Clé",transcribeKeyGet:"obtenir une clé",transcribeKeyHint:"Gardée en mémoire jusqu'au rechargement de la page, jamais enregistrée",transcribeReading:"Lecture de l'enregistrement…",transcribeLoading:"Téléchargement du modèle : {loaded} sur {total} Mo",transcribeLoadingSoFar:"Téléchargement du modèle : {loaded} Mo",transcribeSending:"Envoi de l'enregistrement à {name}…",transcribeWaiting:"{name} transcrit l'enregistrement…",transcribeProgress:"Transcription : {done} sur {total}",transcribeStop:"Arrêter",transcribeDone:"Transcrit par {engine}. Dites à qui est chaque voix (Qui parle), puis faites relire.",transcribeStopped:"Transcription arrêtée : rien n'a été changé.",transcribeErrors:{noKey:"Saisissez d'abord votre clé pour ce service.",key:"Le service a refusé la clé.",rateLimited:"Le service demande d'attendre (quota atteint) : réessayez plus tard.",tooLarge:"L'enregistrement est trop gros pour être lu dans la page : donnez-en l'audio seul.",unsupported:"Ce navigateur ne peut pas faire tourner la transcription.",failed:"La transcription a échoué : {detail}"},voiceNamed:"Voix {name}",whoSpeaks:"Qui parle…"};export{e as interviewMessages_fr};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={title:"Titolo",time:"Data",by:"Intervistatore",medium:"Mezzo",witness:"Testimone",witnessNone:"—",summary:"Descrizione",transcript:"Trascrizione",transcriptHint:"Indirizzo del file di trascrizione anonimizzata (facoltativo)",summaryTab:"Riepilogo",fileTab:"File",importFile:"Carica un file",importFileHint:"JSON, testo, WebVTT, SRT; un questionario compilato (JSON, CSV, testo) se il mezzo è Questionario: ogni campo diventa una domanda e la sua risposta",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",saveButton:"Salva",loading:"Caricamento della trascrizione…",invalid:"Questo testo non è ancora JSON valido: l'intervista conserva l'ultima trascrizione che ha capito.",notATranscript:"Quel file non è una trascrizione di intervista (non ha turni di parola).",questionnaireTab:"Questionario",questionnaire:{intro:"Compili il {title}: ogni risposta è conservata con le parole del testimone, e una domanda lasciata vuota resta senza risposta.",source:"Il questionario come lo pubblica {publisher}",other:"Altre domande",required:"Chiesto a ogni testimone",precise:"precisa",imprecise:"imprecisa",preciseHint:"Dirla piuttosto con parole sue: una data o un'ora approssimativa, o di cui non è sicuro",impreciseHint:"Scegliere piuttosto una data o un'ora esatta",impreciseDate:"es. inizio luglio 1965, un sabato, non sono sicuro del giorno",impreciseTime:"es. verso le 21, poco dopo il tramonto",confidentialSealed:"Riservata: sigillata per {name}, l'unico che può leggerla; non compare in chiaro in nessun file.",confidentialSealedBefore:"Una risposta sigillata per {name} è già stata data: non può più essere mostrata, e scriverne un'altra la sostituisce.",confidentialNowhere:"Riservata: questo caso non nomina alcun destinatario per cui sigillarla, quindi non è conservata in nessun file."},feed:"Riporta nell'osservazione",feedHint:"Ciò che le risposte dicono del momento, della durata, del colore e della posizione nel cielo è riportato nell'osservazione del testimone, ogni valore citando la sua risposta",fed:"{n} valori riportati nell'osservazione, ciascuno citando la sua risposta.",fedNothing:"Nulla nelle risposte può ancora essere riportato nell'osservazione (data, ora, durata, colore, direzione, altezza).",unknownQuestionnaire:"Il questionario {id} non è noto a questa versione: le sue domande sono mostrate come le ha l'intervista.",notAQuestionnaire:"Quel file non contiene alcun campo di questionario (una domanda e la sua risposta).",loadFailed:"Impossibile leggere quella trascrizione.",editorLabel:"Trascrizione dell'intervista in JSON",byHint:"Identificatori di persone RR0, separati da virgole",exchangesTab:"Scambi",exchangesEmpty:"Non è stato ancora detto nulla.",redacted:"Passaggio rimosso",colon:": ",proofreadAll:"Rivisto da tutti.",proofreadPending:"Non ancora rivisto da: {names}",play:"Riproduci",pause:"Pausa",recordings:"Registrazioni ({n})",recordingsTitle:"Registrazioni",recordingKind:"Tipo",recordingAudio:"Audio",recordingVideo:"Video",recordingFile:"File",recordingOffset:"Scarto",recordingRemove:"Rimuovi",recordingAdd:"Aggiungi una registrazione",recordingAddFirst:"Indichi prima il file della registrazione qui sopra",close:"Chiudi",noRecording:"Nessuna registrazione: aggiungi il file audio o video dell'intervista per poterla ascoltare.",redactSelection:"Rimuovi la selezione",redactedWords:"passaggio rimosso · {n} parola/e",sealOpen:"Aprire con {name}",sealOpened:"Riservata, letta con {name}: conservata solo in questa pagina, mai scritta.",sealFailed:"Questa chiave non apre questa risposta: è stata sigillata per un'altra.",redactAll:"Rimuovi tutto",redactRestore:"Ripristina",restoreAll:"Ripristina tutto",editTurn:"Modifica",deleteTurn:"Elimina questo turno",saveTurn:"Salva",cancelTurn:"Annulla",turnEditHint:"⟦ … ⟧ indica un passaggio rimosso",selectionOnePassage:"La selezione deve restare in un solo passaggio non rimosso.",reviewedBy:"{name} ha riletto",linkMoment:"Collega a un momento…",momentLabel:"Momento {k} · {text}",unlinkMoment:"Rimuovi questo collegamento",noMoments:"L'osservazione non ha ancora momenti con nome.",redactReasonLabel:"Motivo",redactReasonHint:"Detto di ogni passaggio rimosso in seguito: il lettore dell'intervista pubblicata lo vede al posto del passaggio",redactReasons:["vita privata","dettaglio che identifica","fuori tema","errore di riconoscimento"],redactReason:"rimosso in rilettura",roles:{interviewer:"Intervistatore",interviewee:"Intervistato",witness:"Testimone",unattributed:"Voce da attribuire"},transcribe:"Trascrivi la registrazione",transcribeWith:"con",transcribeHint:"Trasforma la registrazione dell'intervista in turni di parola, con i loro tempi. Di chi sia ogni voce resta da dire, turno per turno (Chi parla), e poi da far rileggere.",transcribeLocal:"Nulla lascia il tuo computer. La prima volta il modello (circa {mb} MB) viene scaricato e poi conservato dal browser.",transcribeSends:"La registrazione sarà inviata a {name} per essere trascritta.",transcribeReplaces:"La trascrizione attuale sarà sostituita.",transcribeNoRecording:"L'intervista non ha ancora una registrazione: il pulsante apre la finestra dove aggiungerla.",transcribeKey:"Chiave",transcribeKeyGet:"ottieni una chiave",transcribeKeyHint:"Tenuta in memoria fino al ricaricamento della pagina, mai salvata",transcribeReading:"Lettura della registrazione…",transcribeLoading:"Download del modello: {loaded} di {total} MB",transcribeLoadingSoFar:"Download del modello: {loaded} MB",transcribeSending:"Invio della registrazione a {name}…",transcribeWaiting:"{name} trascrive la registrazione…",transcribeProgress:"Trascrizione: {done} di {total}",transcribeStop:"Interrompi",transcribeDone:"Trascritto da {engine}. Indica di chi è ogni voce (Chi parla), poi fai rileggere.",transcribeStopped:"Trascrizione interrotta: non è stato cambiato nulla.",transcribeErrors:{noKey:"Inserisci prima la tua chiave per questo servizio.",key:"Il servizio ha rifiutato la chiave.",rateLimited:"Il servizio chiede di attendere (quota raggiunta): riprova più tardi.",tooLarge:"La registrazione è troppo grande per essere letta nella pagina: fornisci solo il suo audio.",unsupported:"Questo browser non può eseguire la trascrizione.",failed:"La trascrizione non è riuscita: {detail}"},voiceNamed:"Voce {name}",whoSpeaks:"Chi parla…"};export{e as interviewMessages_it};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{cv as Le,cw as Q,cx as he,cy as Me,cz as v,cA as de,bX as w,bZ as pe,bB as F,cB as b,cs as U,ci as Se,cC as ye,b9 as we,$ as B,cD as be,V as C,Z as me,cE as Ne,X as ge,cF as Ie,cG as Oe,bl as V,cH as Ce,cI as Te,cJ as Fe,cK as Pe,cL as He,c0 as J,cl as Re,cM as Z,cN as ke,cO as De,ce as Ge,cP as X,cQ as ve,b4 as Ee,bn as Ue,bm as G,cR as Be,bk as Ke,cS as je,b2 as Ve,cT as Xe,cU as ze,cV as qe,bz as We,a$ as z,ba as Ye,cc as Qe,cW as Je,cX as Ze,cY as $e,cZ as en,c_ as nn,c$ as tn,d0 as xe,c6 as sn,ct as ne,d1 as te,d2 as se,d3 as ie,d4 as re,d5 as rn,d6 as on,b5 as an,b6 as cn}from"./rr0-sighting-editor.mjs";function oe(f,n){if(n===Le)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),f;if(n===Q||n===he){let e=f.getIndex();if(e===null){const r=[],a=f.getAttribute("position");if(a!==void 0){for(let o=0;o<a.count;o++)r.push(o);f.setIndex(r),e=f.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),f}const s=e.count-2,t=[];if(n===Q)for(let r=1;r<=s;r++)t.push(e.getX(0)),t.push(e.getX(r)),t.push(e.getX(r+1));else for(let r=0;r<s;r++)r%2===0?(t.push(e.getX(r)),t.push(e.getX(r+1)),t.push(e.getX(r+2))):(t.push(e.getX(r+2)),t.push(e.getX(r+1)),t.push(e.getX(r)));t.length/3!==s&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const i=f.clone();return i.setIndex(t),i.clearGroups(),i}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",n),f}class jn extends Me{constructor(n){super(n),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(e){return new dn(e)}),this.register(function(e){return new pn(e)}),this.register(function(e){return new Ln(e)}),this.register(function(e){return new Mn(e)}),this.register(function(e){return new Sn(e)}),this.register(function(e){return new gn(e)}),this.register(function(e){return new Tn(e)}),this.register(function(e){return new Rn(e)}),this.register(function(e){return new En(e)}),this.register(function(e){return new hn(e)}),this.register(function(e){return new xn(e)}),this.register(function(e){return new mn(e)}),this.register(function(e){return new _n(e)}),this.register(function(e){return new An(e)}),this.register(function(e){return new ln(e)}),this.register(function(e){return new ae(e,g.EXT_MESHOPT_COMPRESSION)}),this.register(function(e){return new ae(e,g.KHR_MESHOPT_COMPRESSION)}),this.register(function(e){return new yn(e)})}load(n,e,s,t){const i=this;let r;if(this.resourcePath!=="")r=this.resourcePath;else if(this.path!==""){const c=v.extractUrlBase(n);r=v.resolveURL(c,this.path)}else r=v.extractUrlBase(n);this.manager.itemStart(n);const a=function(c){t?t(c):console.error(c),i.manager.itemError(n),i.manager.itemEnd(n)},o=new de(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(n,function(c){try{i.parse(c,r,function(u){e(u),i.manager.itemEnd(n)},a)}catch(u){a(u)}},s,a)}setDRACOLoader(n){return this.dracoLoader=n,this}setKTX2Loader(n){return this.ktx2Loader=n,this}setMeshoptDecoder(n){return this.meshoptDecoder=n,this}register(n){return this.pluginCallbacks.indexOf(n)===-1&&this.pluginCallbacks.push(n),this}unregister(n){return this.pluginCallbacks.indexOf(n)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(n),1),this}parse(n,e,s,t){let i;const r={},a={},o=new TextDecoder;if(typeof n=="string")i=JSON.parse(n);else if(n instanceof ArrayBuffer)if(o.decode(new Uint8Array(n,0,4))===Ae){try{r[g.KHR_BINARY_GLTF]=new wn(n)}catch(l){t&&t(l);return}i=JSON.parse(r[g.KHR_BINARY_GLTF].content)}else i=JSON.parse(o.decode(n));else i=n;if(i.asset===void 0||i.asset.version[0]<2){t&&t(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const c=new Un(i,{path:e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u<this.pluginCallbacks.length;u++){const l=this.pluginCallbacks[u](c);l.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),a[l.name]=l,r[l.name]=!0}if(i.extensionsUsed)for(let u=0;u<i.extensionsUsed.length;++u){const l=i.extensionsUsed[u],h=i.extensionsRequired||[];switch(l){case g.KHR_MATERIALS_UNLIT:r[l]=new fn;break;case g.KHR_DRACO_MESH_COMPRESSION:r[l]=new bn(i,this.dracoLoader);break;case g.KHR_TEXTURE_TRANSFORM:r[l]=new Nn;break;case g.KHR_MESH_QUANTIZATION:r[l]=new In;break;default:h.indexOf(l)>=0&&a[l]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+l+'".')}}c.setExtensions(r),c.setPlugins(a),c.parse(s,t)}parseAsync(n,e){const s=this;return new Promise(function(t,i){s.parse(n,e,t,i)})}}function un(){let f={};return{get:function(n){return f[n]},add:function(n,e){f[n]=e},remove:function(n){delete f[n]},removeAll:function(){f={}}}}function _(f,n,e){const s=f.json.materials[n];return s.extensions&&s.extensions[e]?s.extensions[e]:null}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",KHR_MESHOPT_COMPRESSION:"KHR_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class ln{constructor(n){this.parser=n,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const n=this.parser,e=this.parser.json.nodes||[];for(let s=0,t=e.length;s<t;s++){const i=e[s];i.extensions&&i.extensions[this.name]&&i.extensions[this.name].light!==void 0&&n._addNodeRef(this.cache,i.extensions[this.name].light)}}_loadLight(n){const e=this.parser,s="light:"+n;let t=e.cache.get(s);if(t)return t;const i=e.json,o=((i.extensions&&i.extensions[this.name]||{}).lights||[])[n];let c;const u=new F(16777215);o.color!==void 0&&u.setRGB(o.color[0],o.color[1],o.color[2],b);const l=o.range!==void 0?o.range:0;switch(o.type){case"directional":c=new we(u),c.target.position.set(0,0,-1),c.add(c.target);break;case"point":c=new ye(u),c.distance=l;break;case"spot":c=new Se(u),c.distance=l,o.spot=o.spot||{},o.spot.innerConeAngle=o.spot.innerConeAngle!==void 0?o.spot.innerConeAngle:0,o.spot.outerConeAngle=o.spot.outerConeAngle!==void 0?o.spot.outerConeAngle:Math.PI/4,c.angle=o.spot.outerConeAngle,c.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,c.target.position.set(0,0,-1),c.add(c.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return c.position.set(0,0,0),y(c,o),o.intensity!==void 0&&(c.intensity=o.intensity),c.name=e.createUniqueName(o.name||"light_"+n),t=Promise.resolve(c),e.cache.add(s,t),t}getDependency(n,e){if(n==="light")return this._loadLight(e)}createNodeAttachment(n){const e=this,s=this.parser,i=s.json.nodes[n],a=(i.extensions&&i.extensions[this.name]||{}).light;return a===void 0?null:this._loadLight(a).then(function(o){return s._getNodeRef(e.cache,a,o)})}}class fn{constructor(){this.name=g.KHR_MATERIALS_UNLIT}getMaterialType(){return G}extendParams(n,e,s){const t=[];n.color=new F(1,1,1),n.opacity=1;const i=e.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const r=i.baseColorFactor;n.color.setRGB(r[0],r[1],r[2],b),n.opacity=r[3]}i.baseColorTexture!==void 0&&t.push(s.assignTexture(n,"map",i.baseColorTexture,U))}return Promise.all(t)}}class hn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||s.emissiveStrength!==void 0&&(e.emissiveIntensity=s.emissiveStrength),Promise.resolve()}}class dn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_CLEARCOAT}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(s.clearcoatFactor!==void 0&&(e.clearcoat=s.clearcoatFactor),s.clearcoatTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatMap",s.clearcoatTexture)),s.clearcoatRoughnessFactor!==void 0&&(e.clearcoatRoughness=s.clearcoatRoughnessFactor),s.clearcoatRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),s.clearcoatNormalTexture!==void 0&&(t.push(this.parser.assignTexture(e,"clearcoatNormalMap",s.clearcoatNormalTexture)),s.clearcoatNormalTexture.scale!==void 0)){const i=s.clearcoatNormalTexture.scale;e.clearcoatNormalScale=new pe(i,i)}return Promise.all(t)}}class pn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_DISPERSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.dispersion=s.dispersion!==void 0?s.dispersion:0),Promise.resolve()}}class mn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IRIDESCENCE}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.iridescenceFactor!==void 0&&(e.iridescence=s.iridescenceFactor),s.iridescenceTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceMap",s.iridescenceTexture)),s.iridescenceIor!==void 0&&(e.iridescenceIOR=s.iridescenceIor),e.iridescenceThicknessRange===void 0&&(e.iridescenceThicknessRange=[100,400]),s.iridescenceThicknessMinimum!==void 0&&(e.iridescenceThicknessRange[0]=s.iridescenceThicknessMinimum),s.iridescenceThicknessMaximum!==void 0&&(e.iridescenceThicknessRange[1]=s.iridescenceThicknessMaximum),s.iridescenceThicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"iridescenceThicknessMap",s.iridescenceThicknessTexture)),Promise.all(t)}}class gn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SHEEN}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];if(e.sheenColor=new F(0,0,0),e.sheenRoughness=0,e.sheen=1,s.sheenColorFactor!==void 0){const i=s.sheenColorFactor;e.sheenColor.setRGB(i[0],i[1],i[2],b)}return s.sheenRoughnessFactor!==void 0&&(e.sheenRoughness=s.sheenRoughnessFactor),s.sheenColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenColorMap",s.sheenColorTexture,U)),s.sheenRoughnessTexture!==void 0&&t.push(this.parser.assignTexture(e,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(t)}}class Tn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_TRANSMISSION}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.transmissionFactor!==void 0&&(e.transmission=s.transmissionFactor),s.transmissionTexture!==void 0&&t.push(this.parser.assignTexture(e,"transmissionMap",s.transmissionTexture)),Promise.all(t)}}class Rn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_VOLUME}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.thickness=s.thicknessFactor!==void 0?s.thicknessFactor:0,s.thicknessTexture!==void 0&&t.push(this.parser.assignTexture(e,"thicknessMap",s.thicknessTexture)),e.attenuationDistance=s.attenuationDistance||1/0;const i=s.attenuationColor||[1,1,1];return e.attenuationColor=new F().setRGB(i[0],i[1],i[2],b),Promise.all(t)}}class En{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_IOR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);return s===null||(e.ior=s.ior!==void 0?s.ior:1.5,e.ior===0&&(e.ior=1e3)),Promise.resolve()}}class xn{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_SPECULAR}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];e.specularIntensity=s.specularFactor!==void 0?s.specularFactor:1,s.specularTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularIntensityMap",s.specularTexture));const i=s.specularColorFactor||[1,1,1];return e.specularColor=new F().setRGB(i[0],i[1],i[2],b),s.specularColorTexture!==void 0&&t.push(this.parser.assignTexture(e,"specularColorMap",s.specularColorTexture,U)),Promise.all(t)}}class An{constructor(n){this.parser=n,this.name=g.EXT_MATERIALS_BUMP}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return e.bumpScale=s.bumpFactor!==void 0?s.bumpFactor:1,s.bumpTexture!==void 0&&t.push(this.parser.assignTexture(e,"bumpMap",s.bumpTexture)),Promise.all(t)}}class _n{constructor(n){this.parser=n,this.name=g.KHR_MATERIALS_ANISOTROPY}getMaterialType(n){return _(this.parser,n,this.name)!==null?w:null}extendMaterialParams(n,e){const s=_(this.parser,n,this.name);if(s===null)return Promise.resolve();const t=[];return s.anisotropyStrength!==void 0&&(e.anisotropy=s.anisotropyStrength),s.anisotropyRotation!==void 0&&(e.anisotropyRotation=s.anisotropyRotation),s.anisotropyTexture!==void 0&&t.push(this.parser.assignTexture(e,"anisotropyMap",s.anisotropyTexture)),Promise.all(t)}}class Ln{constructor(n){this.parser=n,this.name=g.KHR_TEXTURE_BASISU}loadTexture(n){const e=this.parser,s=e.json,t=s.textures[n];if(!t.extensions||!t.extensions[this.name])return null;const i=t.extensions[this.name],r=e.options.ktx2Loader;if(!r){if(s.extensionsRequired&&s.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return e.loadTextureImage(n,i.source,r)}}class Mn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_WEBP}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class Sn{constructor(n){this.parser=n,this.name=g.EXT_TEXTURE_AVIF}loadTexture(n){const e=this.name,s=this.parser,t=s.json,i=t.textures[n];if(!i.extensions||!i.extensions[e])return null;const r=i.extensions[e],a=t.images[r.source];let o=s.textureLoader;if(a.uri){const c=s.options.manager.getHandler(a.uri);c!==null&&(o=c)}return s.loadTextureImage(n,r.source,o)}}class ae{constructor(n,e){this.name=e,this.parser=n}loadBufferView(n){const e=this.parser.json,s=e.bufferViews[n];if(s.extensions&&s.extensions[this.name]){const t=s.extensions[this.name],i=this.parser.getDependency("buffer",t.buffer),r=this.parser.options.meshoptDecoder;if(!r||!r.supported){if(e.extensionsRequired&&e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return i.then(function(a){const o=t.byteOffset||0,c=t.byteLength||0,u=t.count,l=t.byteStride,h=new Uint8Array(a,o,c);return r.decodeGltfBufferAsync?r.decodeGltfBufferAsync(u,l,h,t.mode,t.filter).then(function(d){return d.buffer}):r.ready.then(function(){const d=new ArrayBuffer(u*l);return r.decodeGltfBuffer(new Uint8Array(d),u,l,h,t.mode,t.filter),d})})}else return null}}class yn{constructor(n){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=n}createNodeMesh(n){const e=this.parser.json,s=e.nodes[n];if(!s.extensions||!s.extensions[this.name]||s.mesh===void 0)return null;const t=e.meshes[s.mesh];for(const c of t.primitives)if(c.mode!==M.TRIANGLES&&c.mode!==M.TRIANGLE_STRIP&&c.mode!==M.TRIANGLE_FAN&&c.mode!==void 0)return null;const r=s.extensions[this.name].attributes,a=[],o={};for(const c in r)a.push(this.parser.getDependency("accessor",r[c]).then(u=>(o[c]=u,o[c])));return a.length<1?null:(a.push(this.parser.createNodeMesh(n)),Promise.all(a).then(c=>{const u=c.pop(),l=u.isGroup?u.children:[u],h=c[0].count,d=[];for(const p of l){const R=new B,m=new C,T=new me,A=new C(1,1,1),x=new be(p.geometry,p.material,h);for(let E=0;E<h;E++)o.TRANSLATION&&m.fromBufferAttribute(o.TRANSLATION,E),o.ROTATION&&T.fromBufferAttribute(o.ROTATION,E),o.SCALE&&A.fromBufferAttribute(o.SCALE,E),x.setMatrixAt(E,R.compose(m,T,A));for(const E in o)if(E==="_COLOR_0"){const L=o[E];x.instanceColor=new Ne(L.array,L.itemSize,L.normalized)}else E!=="TRANSLATION"&&E!=="ROTATION"&&E!=="SCALE"&&p.geometry.setAttribute(E,o[E]);ge.prototype.copy.call(x,p),this.parser.assignFinalMaterial(x),d.push(x)}return u.isGroup?(u.clear(),u.add(...d),u):d[0]}))}}const Ae="glTF",D=12,ce={JSON:1313821514,BIN:5130562};class wn{constructor(n){this.name=g.KHR_BINARY_GLTF,this.content=null,this.body=null;const e=new DataView(n,0,D),s=new TextDecoder;if(this.header={magic:s.decode(new Uint8Array(n.slice(0,4))),version:e.getUint32(4,!0),length:e.getUint32(8,!0)},this.header.magic!==Ae)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const t=this.header.length-D,i=new DataView(n,D);let r=0;for(;r<t;){const a=i.getUint32(r,!0);r+=4;const o=i.getUint32(r,!0);if(r+=4,o===ce.JSON){const c=new Uint8Array(n,D+r,a);this.content=s.decode(c)}else if(o===ce.BIN){const c=D+r;this.body=n.slice(c,c+a)}r+=a}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class bn{constructor(n,e){if(!e)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=g.KHR_DRACO_MESH_COMPRESSION,this.json=n,this.dracoLoader=e,this.dracoLoader.preload()}decodePrimitive(n,e){const s=this.json,t=this.dracoLoader,i=n.extensions[this.name].bufferView,r=n.extensions[this.name].attributes,a={},o={},c={};for(const u in r){const l=$[u]||u.toLowerCase();a[l]=r[u]}for(const u in n.attributes){const l=$[u]||u.toLowerCase();if(r[u]!==void 0){const h=s.accessors[n.attributes[u]],d=H[h.componentType];c[l]=d.name,o[l]=h.normalized===!0}}return e.getDependency("bufferView",i).then(function(u){return new Promise(function(l,h){t.decodeDracoFile(u,function(d){for(const p in d.attributes){const R=d.attributes[p],m=o[p];m!==void 0&&(R.normalized=m)}l(d)},a,c,b,h)})})}}class Nn{constructor(){this.name=g.KHR_TEXTURE_TRANSFORM}extendTexture(n,e){return(e.texCoord===void 0||e.texCoord===n.channel)&&e.offset===void 0&&e.rotation===void 0&&e.scale===void 0||(n=n.clone(),e.texCoord!==void 0&&(n.channel=e.texCoord),e.offset!==void 0&&n.offset.fromArray(e.offset),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale!==void 0&&n.repeat.fromArray(e.scale),n.needsUpdate=!0),n}}class In{constructor(){this.name=g.KHR_MESH_QUANTIZATION}}class _e extends on{constructor(n,e,s,t){super(n,e,s,t)}copySampleValue_(n){const e=this.resultBuffer,s=this.sampleValues,t=this.valueSize,i=n*t*3+t;for(let r=0;r!==t;r++)e[r]=s[i+r];return e}interpolate_(n,e,s,t){const i=this.resultBuffer,r=this.sampleValues,a=this.valueSize,o=a*2,c=a*3,u=t-e,l=(s-e)/u,h=l*l,d=h*l,p=n*c,R=p-c,m=-2*d+3*h,T=d-h,A=1-m,x=T-h+l;for(let E=0;E!==a;E++){const L=r[R+E+a],N=r[R+E+o]*u,S=r[p+E+a],k=r[p+E]*u;i[E]=A*L+x*N+m*S+T*k}return i}}const On=new me;class Cn extends _e{interpolate_(n,e,s,t){const i=super.interpolate_(n,e,s,t);return On.fromArray(i).normalize().toArray(i),i}}const M={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},H={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},ue={9728:Re,9729:J,9984:He,9985:Pe,9986:Fe,9987:Te},le={33071:De,33648:ke,10497:Z},q={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},$={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},I={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Fn={CUBICSPLINE:void 0,LINEAR:xe,STEP:tn},W={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function Pn(f){return f.DefaultMaterial===void 0&&(f.DefaultMaterial=new Ee({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:rn})),f.DefaultMaterial}function O(f,n,e){for(const s in e.extensions)f[s]===void 0&&(n.userData.gltfExtensions=n.userData.gltfExtensions||{},n.userData.gltfExtensions[s]=e.extensions[s])}function y(f,n){n.extras!==void 0&&(typeof n.extras=="object"?Object.assign(f.userData,n.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+n.extras))}function Hn(f,n,e){let s=!1,t=!1,i=!1;for(let c=0,u=n.length;c<u;c++){const l=n[c];if(l.POSITION!==void 0&&(s=!0),l.NORMAL!==void 0&&(t=!0),l.COLOR_0!==void 0&&(i=!0),s&&t&&i)break}if(!s&&!t&&!i)return Promise.resolve(f);const r=[],a=[],o=[];for(let c=0,u=n.length;c<u;c++){const l=n[c];if(s){const h=l.POSITION!==void 0?e.getDependency("accessor",l.POSITION):f.attributes.position;r.push(h)}if(t){const h=l.NORMAL!==void 0?e.getDependency("accessor",l.NORMAL):f.attributes.normal;a.push(h)}if(i){const h=l.COLOR_0!==void 0?e.getDependency("accessor",l.COLOR_0):f.attributes.color;o.push(h)}}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o)]).then(function(c){const u=c[0],l=c[1],h=c[2];return s&&(f.morphAttributes.position=u),t&&(f.morphAttributes.normal=l),i&&(f.morphAttributes.color=h),f.morphTargetsRelative=!0,f})}function kn(f,n){if(f.updateMorphTargets(),n.weights!==void 0)for(let e=0,s=n.weights.length;e<s;e++)f.morphTargetInfluences[e]=n.weights[e];if(n.extras&&Array.isArray(n.extras.targetNames)){const e=n.extras.targetNames;if(f.morphTargetInfluences.length===e.length){f.morphTargetDictionary={};for(let s=0,t=e.length;s<t;s++)f.morphTargetDictionary[e[s]]=s}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function Dn(f){let n;const e=f.extensions&&f.extensions[g.KHR_DRACO_MESH_COMPRESSION];if(e?n="draco:"+e.bufferView+":"+e.indices+":"+Y(e.attributes):n=f.indices+":"+Y(f.attributes)+":"+f.mode,f.targets!==void 0)for(let s=0,t=f.targets.length;s<t;s++)n+=":"+Y(f.targets[s]);return n}function Y(f){let n="";const e=Object.keys(f).sort();for(let s=0,t=e.length;s<t;s++)n+=e[s]+":"+f[e[s]]+";";return n}function ee(f){switch(f){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function Gn(f){return f.search(/\.jpe?g($|\?)/i)>0||f.search(/^data\:image\/jpeg/)===0?"image/jpeg":f.search(/\.webp($|\?)/i)>0||f.search(/^data\:image\/webp/)===0?"image/webp":f.search(/\.ktx2($|\?)/i)>0||f.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const vn=new B;class Un{constructor(n={},e={}){this.json=n,this.extensions={},this.plugins={},this.options=e,this.cache=new un,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let s=!1,t=-1,i=!1,r=-1;if(typeof navigator<"u"&&typeof navigator.userAgent<"u"){const a=navigator.userAgent;s=/^((?!chrome|android).)*safari/i.test(a)===!0;const o=a.match(/Version\/(\d+)/);t=s&&o?parseInt(o[1],10):-1,i=a.indexOf("Firefox")>-1,r=i?a.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||s&&t<17||i&&r<98?this.textureLoader=new Ie(this.options.manager):this.textureLoader=new Oe(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new de(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(n){this.extensions=n}setPlugins(n){this.plugins=n}parse(n,e){const s=this,t=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(r){return r._markDefs&&r._markDefs()}),Promise.all(this._invokeAll(function(r){return r.beforeRoot&&r.beforeRoot()})).then(function(){return Promise.all([s.getDependencies("scene"),s.getDependencies("animation"),s.getDependencies("camera")])}).then(function(r){const a={scene:r[0][t.scene||0],scenes:r[0],animations:r[1],cameras:r[2],asset:t.asset,parser:s,userData:{}};return O(i,a,t),y(a,t),Promise.all(s._invokeAll(function(o){return o.afterRoot&&o.afterRoot(a)})).then(function(){for(const o of a.scenes)o.updateMatrixWorld();n(a)})}).catch(e)}_markDefs(){const n=this.json.nodes||[],e=this.json.skins||[],s=this.json.meshes||[];for(let t=0,i=e.length;t<i;t++){const r=e[t].joints;for(let a=0,o=r.length;a<o;a++)n[r[a]].isBone=!0}for(let t=0,i=n.length;t<i;t++){const r=n[t];r.mesh!==void 0&&(this._addNodeRef(this.meshCache,r.mesh),r.skin!==void 0&&(s[r.mesh].isSkinnedMesh=!0)),r.camera!==void 0&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(n,e){e!==void 0&&(n.refs[e]===void 0&&(n.refs[e]=n.uses[e]=0),n.refs[e]++)}_getNodeRef(n,e,s){if(n.refs[e]<=1)return s;const t=s.clone(),i=(r,a)=>{const o=this.associations.get(r);o!=null&&this.associations.set(a,o);for(const[c,u]of r.children.entries())i(u,a.children[c])};return i(s,t),t.name+="_instance_"+n.uses[e]++,t}_invokeOne(n){const e=Object.values(this.plugins);e.push(this);for(let s=0;s<e.length;s++){const t=n(e[s]);if(t)return t}return null}_invokeAll(n){const e=Object.values(this.plugins);e.unshift(this);const s=[];for(let t=0;t<e.length;t++){const i=n(e[t]);i&&s.push(i)}return s}getDependency(n,e){const s=n+":"+e;let t=this.cache.get(s);if(!t){switch(n){case"scene":t=this.loadScene(e);break;case"node":t=this._invokeOne(function(i){return i.loadNode&&i.loadNode(e)});break;case"mesh":t=this._invokeOne(function(i){return i.loadMesh&&i.loadMesh(e)});break;case"accessor":t=this.loadAccessor(e);break;case"bufferView":t=this._invokeOne(function(i){return i.loadBufferView&&i.loadBufferView(e)});break;case"buffer":t=this.loadBuffer(e);break;case"material":t=this._invokeOne(function(i){return i.loadMaterial&&i.loadMaterial(e)});break;case"texture":t=this._invokeOne(function(i){return i.loadTexture&&i.loadTexture(e)});break;case"skin":t=this.loadSkin(e);break;case"animation":t=this._invokeOne(function(i){return i.loadAnimation&&i.loadAnimation(e)});break;case"camera":t=this.loadCamera(e);break;default:if(t=this._invokeOne(function(i){return i!=this&&i.getDependency&&i.getDependency(n,e)}),!t)throw new Error("Unknown type: "+n);break}this.cache.add(s,t)}return t}getDependencies(n){let e=this.cache.get(n);if(!e){const s=this,t=this.json[n+(n==="mesh"?"es":"s")]||[];e=Promise.all(t.map(function(i,r){return s.getDependency(n,r)})),this.cache.add(n,e)}return e}loadBuffer(n){const e=this.json.buffers[n],s=this.fileLoader;if(e.type&&e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+e.type+" buffer type is not supported.");if(e.uri===void 0&&n===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const t=this.options;return new Promise(function(i,r){s.load(v.resolveURL(e.uri,t.path),i,void 0,function(){r(new Error('THREE.GLTFLoader: Failed to load buffer "'+e.uri+'".'))})})}loadBufferView(n){const e=this.json.bufferViews[n];return this.getDependency("buffer",e.buffer).then(function(s){const t=e.byteLength||0,i=e.byteOffset||0;return s.slice(i,i+t)})}loadAccessor(n){const e=this,s=this.json,t=this.json.accessors[n];if(t.bufferView===void 0&&t.sparse===void 0){const r=q[t.type],a=H[t.componentType],o=t.normalized===!0,c=new a(t.count*r);return Promise.resolve(new V(c,r,o))}const i=[];return t.bufferView!==void 0?i.push(this.getDependency("bufferView",t.bufferView)):i.push(null),t.sparse!==void 0&&(i.push(this.getDependency("bufferView",t.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",t.sparse.values.bufferView))),Promise.all(i).then(function(r){const a=r[0],o=q[t.type],c=H[t.componentType],u=c.BYTES_PER_ELEMENT,l=u*o,h=t.byteOffset||0,d=t.bufferView!==void 0?s.bufferViews[t.bufferView].byteStride:void 0,p=t.normalized===!0;let R,m;if(d&&d!==l){const T=Math.floor(h/d),A="InterleavedBuffer:"+t.bufferView+":"+t.componentType+":"+T+":"+t.count;let x=e.cache.get(A);x||(R=new c(a,T*d,t.count*d/u),x=new Ce(R,d/u),e.cache.add(A,x)),m=new sn(x,o,h%d/u,p)}else a===null?R=new c(t.count*o):R=new c(a,h,t.count*o),m=new V(R,o,p);if(t.sparse!==void 0){const T=q.SCALAR,A=H[t.sparse.indices.componentType],x=t.sparse.indices.byteOffset||0,E=t.sparse.values.byteOffset||0,L=new A(r[1],x,t.sparse.count*T),N=new c(r[2],E,t.sparse.count*o);a!==null&&(m=new V(m.array.slice(),m.itemSize,m.normalized)),m.normalized=!1;for(let S=0,k=L.length;S<k;S++){const P=L[S];if(m.setX(P,N[S*o]),o>=2&&m.setY(P,N[S*o+1]),o>=3&&m.setZ(P,N[S*o+2]),o>=4&&m.setW(P,N[S*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}m.normalized=p}return m})}loadTexture(n){const e=this.json,s=this.options,i=e.textures[n].source,r=e.images[i];let a=this.textureLoader;if(r.uri){const o=s.manager.getHandler(r.uri);o!==null&&(a=o)}return this.loadTextureImage(n,i,a)}loadTextureImage(n,e,s){const t=this,i=this.json,r=i.textures[n],a=i.images[e],o=(a.uri||a.bufferView)+":"+r.sampler;if(this.textureCache[o])return this.textureCache[o];const c=this.loadImageSource(e,s).then(function(u){u.flipY=!1,u.name=r.name||a.name||"",u.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(u.name=a.uri);const h=(i.samplers||{})[r.sampler]||{};return u.magFilter=ue[h.magFilter]||J,u.minFilter=ue[h.minFilter]||Te,u.wrapS=le[h.wrapS]||Z,u.wrapT=le[h.wrapT]||Z,u.generateMipmaps=!u.isCompressedTexture&&u.minFilter!==Re&&u.minFilter!==J,t.associations.set(u,{textures:n}),u}).catch(function(){return null});return this.textureCache[o]=c,c}loadImageSource(n,e){const s=this,t=this.json,i=this.options;if(this.sourceCache[n]!==void 0)return this.sourceCache[n].then(l=>l.clone());const r=t.images[n],a=self.URL||self.webkitURL;let o=r.uri||"",c=!1;if(r.bufferView!==void 0)o=s.getDependency("bufferView",r.bufferView).then(function(l){c=!0;const h=new Blob([l],{type:r.mimeType});return o=a.createObjectURL(h),o});else if(r.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+n+" is missing URI and bufferView");const u=Promise.resolve(o).then(function(l){return new Promise(function(h,d){let p=h;e.isImageBitmapLoader===!0&&(p=function(R){const m=new ne(R);m.needsUpdate=!0,h(m)}),e.load(v.resolveURL(l,i.path),p,void 0,d)})}).then(function(l){return c===!0&&a.revokeObjectURL(o),y(l,r),l.userData.mimeType=r.mimeType||Gn(r.uri),l}).catch(function(l){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),l});return this.sourceCache[n]=u,u}assignTexture(n,e,s,t){const i=this;return this.getDependency("texture",s.index).then(function(r){if(!r)return null;if(s.texCoord!==void 0&&s.texCoord>0&&(r=r.clone(),r.channel=s.texCoord),i.extensions[g.KHR_TEXTURE_TRANSFORM]){const a=s.extensions!==void 0?s.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const o=i.associations.get(r);r=i.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(r,a),i.associations.set(r,o)}}return t!==void 0&&(r.colorSpace=t),n[e]=r,r})}assignFinalMaterial(n){const e=n.geometry;let s=n.material;const t=e.attributes.tangent===void 0,i=e.attributes.color!==void 0,r=e.attributes.normal===void 0;if(n.isPoints){const a="PointsMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new Ge,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,o.sizeAttenuation=!1,this.cache.add(a,o)),s=o}else if(n.isLine){const a="LineBasicMaterial:"+s.uuid;let o=this.cache.get(a);o||(o=new ve,X.prototype.copy.call(o,s),o.color.copy(s.color),o.map=s.map,this.cache.add(a,o)),s=o}if(t||i||r){let a="ClonedMaterial:"+s.uuid+":";t&&(a+="derivative-tangents:"),i&&(a+="vertex-colors:"),r&&(a+="flat-shading:");let o=this.cache.get(a);o||(o=s.clone(),i&&(o.vertexColors=!0),r&&(o.flatShading=!0),t&&(o.normalScale&&(o.normalScale.y*=-1),o.clearcoatNormalScale&&(o.clearcoatNormalScale.y*=-1)),this.cache.add(a,o),this.associations.set(o,this.associations.get(s))),s=o}n.material=s}getMaterialType(){return Ee}loadMaterial(n){const e=this,s=this.json,t=this.extensions,i=s.materials[n];let r;const a={},o=i.extensions||{},c=[];if(o[g.KHR_MATERIALS_UNLIT]){const l=t[g.KHR_MATERIALS_UNLIT];r=l.getMaterialType(),c.push(l.extendParams(a,i,e))}else{const l=i.pbrMetallicRoughness||{};if(a.color=new F(1,1,1),a.opacity=1,Array.isArray(l.baseColorFactor)){const h=l.baseColorFactor;a.color.setRGB(h[0],h[1],h[2],b),a.opacity=h[3]}l.baseColorTexture!==void 0&&c.push(e.assignTexture(a,"map",l.baseColorTexture,U)),a.metalness=l.metallicFactor!==void 0?l.metallicFactor:1,a.roughness=l.roughnessFactor!==void 0?l.roughnessFactor:1,l.metallicRoughnessTexture!==void 0&&(c.push(e.assignTexture(a,"metalnessMap",l.metallicRoughnessTexture)),c.push(e.assignTexture(a,"roughnessMap",l.metallicRoughnessTexture))),r=this._invokeOne(function(h){return h.getMaterialType&&h.getMaterialType(n)}),c.push(Promise.all(this._invokeAll(function(h){return h.extendMaterialParams&&h.extendMaterialParams(n,a)})))}i.doubleSided===!0&&(a.side=Ue);const u=i.alphaMode||W.OPAQUE;if(u===W.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,u===W.MASK&&(a.alphaTest=i.alphaCutoff!==void 0?i.alphaCutoff:.5)),i.normalTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"normalMap",i.normalTexture)),a.normalScale=new pe(1,1),i.normalTexture.scale!==void 0)){const l=i.normalTexture.scale;a.normalScale.set(l,l)}if(i.occlusionTexture!==void 0&&r!==G&&(c.push(e.assignTexture(a,"aoMap",i.occlusionTexture)),i.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=i.occlusionTexture.strength)),i.emissiveFactor!==void 0&&r!==G){const l=i.emissiveFactor;a.emissive=new F().setRGB(l[0],l[1],l[2],b)}return i.emissiveTexture!==void 0&&r!==G&&c.push(e.assignTexture(a,"emissiveMap",i.emissiveTexture,U)),Promise.all(c).then(function(){const l=new r(a);return i.name&&(l.name=i.name),y(l,i),e.associations.set(l,{materials:n}),i.extensions&&O(t,l,i),l})}createUniqueName(n){const e=Be.sanitizeNodeName(n||"");return e in this.nodeNamesUsed?e+"_"+ ++this.nodeNamesUsed[e]:(this.nodeNamesUsed[e]=0,e)}loadGeometries(n){const e=this,s=this.extensions,t=this.primitiveCache;function i(a){return s[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,e).then(function(o){return fe(o,a,e)})}const r=[];for(let a=0,o=n.length;a<o;a++){const c=n[a],u=Dn(c),l=t[u];if(l)r.push(l.promise);else{let h;c.extensions&&c.extensions[g.KHR_DRACO_MESH_COMPRESSION]?h=i(c):h=fe(new Ke,c,e),t[u]={primitive:c,promise:h},r.push(h)}}return Promise.all(r)}loadMesh(n){const e=this,s=this.json,t=this.extensions,i=s.meshes[n],r=i.primitives,a=[];for(let o=0,c=r.length;o<c;o++){const u=r[o].material===void 0?Pn(this.cache):this.getDependency("material",r[o].material);a.push(u)}return a.push(e.loadGeometries(r)),Promise.all(a).then(function(o){const c=o.slice(0,o.length-1),u=o[o.length-1],l=[];for(let d=0,p=u.length;d<p;d++){const R=u[d],m=r[d];let T;const A=c[d];if(m.mode===M.TRIANGLES||m.mode===M.TRIANGLE_STRIP||m.mode===M.TRIANGLE_FAN||m.mode===void 0)T=i.isSkinnedMesh===!0?new je(R,A):new Ve(R,A),T.isSkinnedMesh===!0&&T.normalizeSkinWeights(),m.mode===M.TRIANGLE_STRIP?T.geometry=oe(T.geometry,he):m.mode===M.TRIANGLE_FAN&&(T.geometry=oe(T.geometry,Q));else if(m.mode===M.LINES)T=new Xe(R,A);else if(m.mode===M.LINE_STRIP)T=new ze(R,A);else if(m.mode===M.LINE_LOOP)T=new qe(R,A);else if(m.mode===M.POINTS)T=new We(R,A);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+m.mode);Object.keys(T.geometry.morphAttributes).length>0&&kn(T,i),T.name=e.createUniqueName(i.name||"mesh_"+n),y(T,i),m.extensions&&O(t,T,m),e.assignFinalMaterial(T),l.push(T)}for(let d=0,p=l.length;d<p;d++)e.associations.set(l[d],{meshes:n,primitives:d});if(l.length===1)return i.extensions&&O(t,l[0],i),l[0];const h=new z;i.extensions&&O(t,h,i),e.associations.set(h,{meshes:n});for(let d=0,p=l.length;d<p;d++)h.add(l[d]);return h})}loadCamera(n){let e;const s=this.json.cameras[n],t=s[s.type];if(!t){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return s.type==="perspective"?e=new Ye(Qe.radToDeg(t.yfov),t.aspectRatio||1,t.znear||1,t.zfar||2e6):s.type==="orthographic"&&(e=new Je(-t.xmag,t.xmag,t.ymag,-t.ymag,t.znear,t.zfar)),s.name&&(e.name=this.createUniqueName(s.name)),y(e,s),Promise.resolve(e)}loadSkin(n){const e=this.json.skins[n],s=[];for(let t=0,i=e.joints.length;t<i;t++)s.push(this._loadNodeShallow(e.joints[t]));return e.inverseBindMatrices!==void 0?s.push(this.getDependency("accessor",e.inverseBindMatrices)):s.push(null),Promise.all(s).then(function(t){const i=t.pop(),r=t,a=[],o=[];for(let c=0,u=r.length;c<u;c++){const l=r[c];if(l){a.push(l);const h=new B;i!==null&&h.fromArray(i.array,c*16),o.push(h)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',e.joints[c])}return new Ze(a,o)})}loadAnimation(n){const e=this.json,s=this,t=e.animations[n],i=t.name?t.name:"animation_"+n,r=[],a=[],o=[],c=[],u=[];for(let l=0,h=t.channels.length;l<h;l++){const d=t.channels[l],p=t.samplers[d.sampler],R=d.target,m=R.node,T=t.parameters!==void 0?t.parameters[p.input]:p.input,A=t.parameters!==void 0?t.parameters[p.output]:p.output;R.node!==void 0&&(r.push(this.getDependency("node",m)),a.push(this.getDependency("accessor",T)),o.push(this.getDependency("accessor",A)),c.push(p),u.push(R))}return Promise.all([Promise.all(r),Promise.all(a),Promise.all(o),Promise.all(c),Promise.all(u)]).then(function(l){const h=l[0],d=l[1],p=l[2],R=l[3],m=l[4],T=[];for(let x=0,E=h.length;x<E;x++){const L=h[x],N=d[x],S=p[x],k=R[x],P=m[x];if(L===void 0)continue;L.updateMatrix&&L.updateMatrix();const K=s._createAnimationTracks(L,N,S,k,P);if(K)for(let j=0;j<K.length;j++)T.push(K[j])}const A=new $e(i,void 0,T);return y(A,t),A})}createNodeMesh(n){const e=this.json,s=this,t=e.nodes[n];return t.mesh===void 0?null:s.getDependency("mesh",t.mesh).then(function(i){const r=s._getNodeRef(s.meshCache,t.mesh,i);return t.weights!==void 0&&r.traverse(function(a){if(a.isMesh)for(let o=0,c=t.weights.length;o<c;o++)a.morphTargetInfluences[o]=t.weights[o]}),r})}loadNode(n){const e=this.json,s=this,t=e.nodes[n],i=s._loadNodeShallow(n),r=[],a=t.children||[];for(let c=0,u=a.length;c<u;c++)r.push(s.getDependency("node",a[c]));const o=t.skin===void 0?Promise.resolve(null):s.getDependency("skin",t.skin);return Promise.all([i,Promise.all(r),o]).then(function(c){const u=c[0],l=c[1],h=c[2];h!==null&&u.traverse(function(d){d.isSkinnedMesh&&d.bind(h,vn)});for(let d=0,p=l.length;d<p;d++)u.add(l[d]);if(u.userData.pivot!==void 0&&l.length>0){const d=u.userData.pivot,p=l[0];u.pivot=new C().fromArray(d),u.position.x-=d[0],u.position.y-=d[1],u.position.z-=d[2],p.position.set(0,0,0),delete u.userData.pivot}return u})}_loadNodeShallow(n){const e=this.json,s=this.extensions,t=this;if(this.nodeCache[n]!==void 0)return this.nodeCache[n];const i=e.nodes[n],r=i.name?t.createUniqueName(i.name):"",a=[],o=t._invokeOne(function(c){return c.createNodeMesh&&c.createNodeMesh(n)});return o&&a.push(o),i.camera!==void 0&&a.push(t.getDependency("camera",i.camera).then(function(c){return t._getNodeRef(t.cameraCache,i.camera,c)})),t._invokeAll(function(c){return c.createNodeAttachment&&c.createNodeAttachment(n)}).forEach(function(c){a.push(c)}),this.nodeCache[n]=Promise.all(a).then(function(c){let u;if(i.isBone===!0?u=new en:c.length>1?u=new z:c.length===1?u=c[0]:u=new ge,u!==c[0])for(let l=0,h=c.length;l<h;l++)u.add(c[l]);if(i.name&&(u.userData.name=i.name,u.name=r),y(u,i),i.extensions&&O(s,u,i),i.matrix!==void 0){const l=new B;l.fromArray(i.matrix),u.applyMatrix4(l)}else i.translation!==void 0&&u.position.fromArray(i.translation),i.rotation!==void 0&&u.quaternion.fromArray(i.rotation),i.scale!==void 0&&u.scale.fromArray(i.scale);if(!t.associations.has(u))t.associations.set(u,{});else if(i.mesh!==void 0&&t.meshCache.refs[i.mesh]>1){const l=t.associations.get(u);t.associations.set(u,{...l})}return t.associations.get(u).nodes=n,u}),this.nodeCache[n]}loadScene(n){const e=this.extensions,s=this.json.scenes[n],t=this,i=new z;s.name&&(i.name=t.createUniqueName(s.name)),y(i,s),s.extensions&&O(e,i,s);const r=s.nodes||[],a=[];for(let o=0,c=r.length;o<c;o++)a.push(t.getDependency("node",r[o]));return Promise.all(a).then(function(o){for(let u=0,l=o.length;u<l;u++){const h=o[u];h.parent!==null?i.add(nn(h)):i.add(h)}const c=u=>{const l=new Map;for(const[h,d]of t.associations)(h instanceof X||h instanceof ne)&&l.set(h,d);return u.traverse(h=>{const d=t.associations.get(h);d!=null&&l.set(h,d)}),l};return t.associations=c(i),i})}_createAnimationTracks(n,e,s,t,i){const r=[],a=n.name?n.name:n.uuid,o=[];function c(d){d.morphTargetInfluences&&o.push(d.name?d.name:d.uuid)}I[i.path]===I.weights?(c(n),n.isGroup&&n.children.forEach(c)):o.push(a);let u;switch(I[i.path]){case I.weights:u=se;break;case I.rotation:u=ie;break;case I.translation:case I.scale:u=te;break;default:switch(s.itemSize){case 1:u=se;break;case 2:case 3:default:u=te;break}break}const l=t.interpolation!==void 0?Fn[t.interpolation]:xe,h=this._getArrayFromAccessor(s);for(let d=0,p=o.length;d<p;d++){const R=new u(o[d]+"."+I[i.path],e.array,h,l);t.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(R),r.push(R)}return r}_getArrayFromAccessor(n){let e=n.array;if(n.normalized){const s=ee(e.constructor),t=new Float32Array(e.length);for(let i=0,r=e.length;i<r;i++)t[i]=e[i]*s;e=t}return e}_createCubicSplineTrackInterpolant(n){n.createInterpolant=function(s){const t=this instanceof ie?Cn:_e;return new t(this.times,this.values,this.getValueSize()/3,s)},n.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function Bn(f,n,e){const s=n.attributes,t=new an;if(s.POSITION!==void 0){const a=e.json.accessors[s.POSITION],o=a.min,c=a.max;if(o!==void 0&&c!==void 0){if(t.set(new C(o[0],o[1],o[2]),new C(c[0],c[1],c[2])),a.normalized){const u=ee(H[a.componentType]);t.min.multiplyScalar(u),t.max.multiplyScalar(u)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const i=n.targets;if(i!==void 0){const a=new C,o=new C;for(let c=0,u=i.length;c<u;c++){const l=i[c];if(l.POSITION!==void 0){const h=e.json.accessors[l.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(o.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),o.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),o.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),h.normalized){const R=ee(H[h.componentType]);o.multiplyScalar(R)}a.max(o)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}t.expandByVector(a)}f.boundingBox=t;const r=new cn;t.getCenter(r.center),r.radius=t.min.distanceTo(t.max)/2,f.boundingSphere=r}function fe(f,n,e){const s=n.attributes,t=[];function i(r,a){return e.getDependency("accessor",r).then(function(o){f.setAttribute(a,o)})}for(const r in s){const a=$[r]||r.toLowerCase();a in f.attributes||t.push(i(s[r],a))}if(n.indices!==void 0&&!f.index){const r=e.getDependency("accessor",n.indices).then(function(a){f.setIndex(a)});t.push(r)}return re.workingColorSpace!==b&&"COLOR_0"in s&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${re.workingColorSpace}" not supported.`),y(f,n),Bn(f,n,e),Promise.all(t).then(function(){return n.targets!==void 0?Hn(f,n.targets,e):f})}export{jn as GLTFLoader};
|
|
@@ -1,277 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BrowserWhisperProvider-Dn44ZE45.js","./TranscriptionAudio-C_xvRUv2.js","./TranscriptionError-D_TCbYbt.js","./OpenAiTranscriptionProvider-DDW446tK.js","./AssemblyAiTranscriptionProvider-o2kkPD5o.js","./QuestionnaireForm-DA6LPvBt.js","./rr0-sighting-editor.mjs","./interviewJson-DngUPqK8.js","./interviewImport-zzDGCbXd.js","./SightingFileEditor-Du3A9uZm.js","./index-DSNA74v6.js","./sightingSchema-9MogCcUd.js","./QuestionnaireImport-BYj5QoJS.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{I as x,W as P,M as B,_ as b,S as A,r as V,a as M,b as z,E as C,H as R,A as F,c as Q,s as J,U as j,d as G,e as S,f as y,Q as K,g as I,h as O,l as Y}from"./rr0-sighting-editor.mjs";import{i as de}from"./rr0-sighting-editor.mjs";import{InterviewMedia as N}from"./InterviewMedia-CGVsMdje.js";import{register as X}from"./InterviewElement-DDa53uMq.js";import{InterviewFile as w}from"./interviewJson-DngUPqK8.js";class f{static partsOf(e){return e.parts?e.parts:e.redacted?[]:[{text:e.text??""}]}static shownRanges(e){const t=[];let r="",s=0;return e.forEach((i,n)=>{const a="redacted"in i?"▮":w.plain(i.text);/[\p{L}\p{N}.,;:!?)»”…▮]$/u.test(r)&&/^[\p{L}\p{N}(«“▮]/u.test(a)&&(s+=1);const d="redacted"in i?0:a.length;t.push({part:n,from:s,to:s+d}),s+=d,r=a}),t}static words(e){return e.trim()===""?0:e.trim().split(/\s+/u).length}static redact(e,t,r,s){const i=[...f.partsOf(e)],n=f.shownRanges(i).find(v=>!("redacted"in i[v.part])&&t>=v.from&&r<=v.to);if(!n)return;const a=w.plain(i[n.part].text),d=/[\p{L}\p{N}'’-]/u;let h=t-n.from,o=r-n.from;for(;h>0&&d.test(a[h-1])&&d.test(a[h]);)h--;for(;o<a.length&&d.test(a[o])&&d.test(a[o-1]);)o++;const c=a.slice(h,o);if(c.trim()==="")return;const l=a.slice(0,h).trimEnd(),p=a.slice(o).trimStart(),g=[...l!==""?[{text:l}]:[],{redacted:{reason:s,words:f.words(c)}},...p!==""?[{text:p}]:[]],m=i.slice(0,n.part).filter(v=>"redacted"in v).length;return i.splice(n.part,1,...g),f.setParts(e,i),{text:c.trim(),nth:m}}static redactWhole(e,t){const r=JSON.stringify({text:e.text,parts:e.parts}),s=f.partsOf(e).reduce((i,n)=>i+("redacted"in n?n.redacted.words??0:f.words(w.plain(n.text))),0);if(delete e.text,delete e.parts,e.redacted={reason:t,...s>0?{words:s}:{}},e.refs)for(const i of e.refs)delete i.range;return r}static restoreWhole(e,t){const{text:r,parts:s}=JSON.parse(t);delete e.redacted,s?e.parts=s:e.text=r??""}static restorePart(e,t,r){const s=[...f.partsOf(e)];let i=-1;const n=s.findIndex(a=>"redacted"in a&&++i===t);n!==-1&&(s.splice(n,1,{text:r}),f.setParts(e,s))}static raw(e,t=()=>{}){let r=-1,s="",i="";for(const n of f.partsOf(e)){const a="redacted"in n?`⟦${t(++r)??"…"}⟧`:n.text;s!==""&&!/\s$/u.test(i)&&!/^\s/u.test(a)&&(s+=" "),s+=a,i=a}return s}static fromRaw(e,t,r){const s=f.partsOf(e).filter(d=>"redacted"in d),i=[],n=new Map;let a=-1;return t.split(/⟦([^⟧]*)⟧/u).forEach((d,h)=>{if(h%2===0){d.trim()!==""&&i.push({text:d.trim()});return}a++;const o=d.trim();o===""||o==="…"||o==="..."?i.push({redacted:s[a]?.redacted??{reason:r}}):(i.push({redacted:{reason:r,words:f.words(o)}}),n.set(a,o))}),delete e.redacted,f.setParts(e,i),n}static setParts(e,t){const r=[];for(const s of t){const i=r[r.length-1],n=!("redacted"in s)&&/^[,.;:!?)»”…]/u.test(s.text)?"":" ";i&&!("redacted"in i)&&!("redacted"in s)?r[r.length-1]={text:`${i.text}${n}${s.text}`.replace(/\s+/gu," ").trim()}:r.push(s)}if(r.some(s=>"redacted"in s)){if(e.parts=r,delete e.text,e.refs)for(const s of e.refs)delete s.range}else e.text=r.map(s=>s.text).join(" "),delete e.parts}}class D{constructor(e,t,r){this.host=t,this.messages=r,e.classList.add("player"),e.innerHTML=`<div class="player-video" hidden></div>
|
|
3
|
-
<div class="player-bar">
|
|
4
|
-
<button type="button" class="icon-btn player-play" disabled>${x.PLAY}</button>
|
|
5
|
-
<span class="player-time">0:00</span>
|
|
6
|
-
<div class="speaker-track" role="slider" tabindex="0" aria-valuemin="0"></div>
|
|
7
|
-
<span class="player-time player-end">0:00</span>
|
|
8
|
-
<button type="button" class="pill-btn player-recordings"></button>
|
|
9
|
-
</div>
|
|
10
|
-
<p class="player-empty"></p>
|
|
11
|
-
<dialog class="recordings-window"><h3></h3><div class="recording-rows"></div><button type="button" class="pill-btn recording-add">${x.PLUS}<span></span></button></dialog>`,this.play=e.querySelector(".player-play"),this.time=e.querySelector(".player-time"),this.end=e.querySelector(".player-end"),this.track=e.querySelector(".speaker-track"),this.video=e.querySelector(".player-video"),this.empty=e.querySelector(".player-empty"),this.open=e.querySelector(".player-recordings"),this.window=e.querySelector(".recordings-window"),this.play.addEventListener("click",()=>{this.media&&(this.media.paused?this.media.play().catch(()=>{}):this.media.pause())}),this.track.addEventListener("pointerdown",s=>{const i=this.track.getBoundingClientRect();i.width>0&&this.seek((s.clientX-i.left)/i.width*this.duration)}),this.track.addEventListener("keydown",s=>{(s.key==="ArrowRight"||s.key==="ArrowLeft")&&this.seek(this.now+(s.key==="ArrowRight"?5:-5))}),this.open.addEventListener("click",()=>this.showWindow()),e.querySelector(".recording-add").addEventListener("click",()=>this.edit(s=>s.push({kind:"audio",src:""}))),P.dialog(this.window,r.close,()=>this.window.close())}static CSS=`
|
|
12
|
-
.player { margin: 0 0 4px; border-radius: 12px; }
|
|
13
|
-
.player-video { aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 10px; overflow: hidden; background: #0b1020; }
|
|
14
|
-
.player-video video { width: 100%; height: 100%; display: block; }
|
|
15
|
-
.player-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--ground-sunken); }
|
|
16
|
-
.player-time { font: 500 13px/1 var(--mono); color: var(--ink-dim); font-variant-numeric: tabular-nums; }
|
|
17
|
-
.speaker-track { position: relative; flex: 1 1 auto; height: 28px; border-radius: 6px; cursor: pointer; overflow: hidden;
|
|
18
|
-
background: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px 4px); }
|
|
19
|
-
.speaker-track .seg { position: absolute; top: 4px; bottom: 4px; border-radius: 2px; }
|
|
20
|
-
.speaker-track .seg[data-role="witness"] { background: #c9a14a; }
|
|
21
|
-
.speaker-track .seg[data-role="interviewer"] { background: #5b8fc4; }
|
|
22
|
-
.speaker-track .seg[data-role="other"] { background: var(--ink-faint); }
|
|
23
|
-
.speaker-track .seg.redacted { background: repeating-linear-gradient(135deg, var(--ink-faint) 0 3px, transparent 3px 6px); }
|
|
24
|
-
.speaker-track .head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #f5c451; }
|
|
25
|
-
.player-empty { margin: 6px 2px 0; font-size: 13px; color: var(--ink-faint); }
|
|
26
|
-
.recordings-window { max-width: min(36em, 94vw); padding: 18px 20px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ground-raised); color: var(--ink); }
|
|
27
|
-
.recordings-window::backdrop { background: rgba(7, 10, 18, .5); }
|
|
28
|
-
.recordings-window h3 { margin: 0 0 12px; font: 600 19px/1.3 var(--serif); }
|
|
29
|
-
.recording-row { display: grid; grid-template-columns: 8em minmax(0, 1fr) 7em auto; gap: 8px; align-items: end; margin-bottom: 10px; }
|
|
30
|
-
.recording-row label { display: flex; flex-direction: column; gap: 4px; font: 600 12px/1.3 var(--sans); color: var(--ink-dim); }
|
|
31
|
-
.recording-row input, .recording-row select { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
32
|
-
.recording-file { display: flex; gap: 6px; }
|
|
33
|
-
.recording-row .with-unit { display: flex; align-items: center; gap: 4px; font-weight: 400; color: var(--ink); }
|
|
34
|
-
.recording-status { grid-column: 1 / -1; margin: -4px 0 0; font-size: 12px; color: var(--ink-faint); }
|
|
35
|
-
.recording-status.error { color: var(--error); }
|
|
36
|
-
`;json;base;media;mediaFor="";picked=new Map;messages;play;time;end;track;video;empty;open;window;setMessages(e){this.messages=e,this.render()}show(e,t){this.json=e,this.base=t,this.render()}get now(){return this.media?Math.max(0,this.media.currentTime-(this.recordings[0]?.offset??0)):this.position}seek(e){this.position=Math.min(this.duration,Math.max(0,e)),this.media&&(this.media.currentTime=this.position+(this.recordings[0]?.offset??0)),this.placeHead(),this.host.timeChanged(this.position)}position=0;get recordings(){return Array.isArray(this.json?.recordings)?this.json.recordings:[]}get duration(){const e=this.media&&Number.isFinite(this.media.duration)?this.media.duration-(this.recordings[0]?.offset??0):0,t=Math.max(0,...(this.json?.segments??[]).map(r=>r.end??r.start??0));return Math.max(1,e,t)}render(){const e=this.messages,t=this.recordings;this.open.innerHTML='<svg class="icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M6 12V3.5l7-1.5V10.5"/><circle cx="4.5" cy="12" r="1.5"/><circle cx="11.5" cy="10.5" r="1.5"/></svg>',this.open.append(e.recordings.replace("{n}",String(t.length))),this.empty.textContent=t.length===0?e.noRecording:"",this.empty.hidden=t.length>0,this.play.title=e.play,this.play.setAttribute("aria-label",e.play),this.track.setAttribute("aria-label",e.recordingsTitle),this.ensureMedia(),this.drawTrack(),this.window.open&&this.drawRows()}ensureMedia(){const e=this.recordings[0],t=e?`${e.kind}|${e.src}`:"";if(t===this.mediaFor||(this.mediaFor=t,this.media?.pause(),this.media=void 0,this.video.replaceChildren(),this.video.hidden=!0,this.play.disabled=!0,!e||e.src===""))return;const r=document.createElement(e.kind==="video"?"video":"audio");r.preload="metadata",r.src=this.urlOf(e.src),r.addEventListener("loadedmetadata",()=>this.drawTrack()),r.addEventListener("timeupdate",()=>{this.placeHead(),this.host.timeChanged(this.now)});const s=()=>{const i=!r.paused;this.play.innerHTML=i?x.PAUSE:x.PLAY;const n=i?this.messages.pause:this.messages.play;this.play.title=n,this.play.setAttribute("aria-label",n)};r.addEventListener("play",s),r.addEventListener("pause",s),e.kind==="video"&&(this.video.append(r),this.video.hidden=!1),this.media=r,this.play.disabled=!1}recordingUrl(){const e=this.recordings[0];return e&&e.src!==""?this.urlOf(e.src):void 0}urlOf(e){const t=this.picked.get(e);if(t)return t;try{return new URL(e,this.base??location.href).href}catch{return e}}drawTrack(){const e=this.json,t=this.duration,r=(e?.segments??[]).filter(i=>i.start!==void 0);this.track.replaceChildren(...r.map(i=>{const n=document.createElement("span"),a=e?.speakers?.[i.speaker]?.role;n.className=i.redacted?"seg redacted":"seg",n.dataset.role=a==="witness"||a==="interviewer"?a:"other";const d=i.start??0,h=i.end??d+1;return n.style.left=`${d/t*100}%`,n.style.width=`${Math.max(.3,(h-d)/t*100)}%`,n}));const s=document.createElement("span");s.className="head",this.track.append(s),this.track.setAttribute("aria-valuemax",String(Math.round(t))),this.end.textContent=w.clock(t),this.placeHead()}placeHead(){const e=this.now,t=this.track.querySelector(".head");t&&(t.style.left=`${Math.min(e,this.duration)/this.duration*100}%`),this.time.textContent=w.clock(Math.floor(e)),this.track.setAttribute("aria-valuenow",String(Math.round(e)))}showWindow(){this.drawRows(),typeof this.window.showModal=="function"?this.window.showModal():this.window.setAttribute("open","")}drawRows(){const e=this.messages;this.window.querySelector("h3").textContent=e.recordingsTitle,this.window.querySelector(".recording-add span").textContent=e.recordingAdd,P.dialog(this.window,e.close,()=>this.window.close()),this.window.querySelector(".recording-rows").replaceChildren(...this.recordings.map((s,i)=>{const n=document.createElement("div");n.className="recording-row";const a=document.createElement("select");a.append(new Option(e.recordingAudio,"audio"),new Option(e.recordingVideo,"video")),a.value=s.kind,a.addEventListener("change",()=>this.edit(m=>{m[i].kind=a.value}));const d=document.createElement("input");d.type="text",d.value=s.src,d.placeholder="interview.mp3",d.addEventListener("change",()=>this.edit(m=>{m[i].src=d.value.trim()})),i===this.recordings.length-1&&d.addEventListener("input",()=>this.allowAdding(d.value.trim()!==""));const h=document.createElement("input");h.type="file",h.accept="audio/*,video/*",h.hidden=!0,h.addEventListener("change",()=>{const m=h.files?.[0];m&&(this.picked.set(m.name,URL.createObjectURL(m)),this.edit(v=>{v[i].src=m.name,m.type.startsWith("video/")&&(v[i].kind="video")}))});const o=document.createElement("button");o.type="button",o.className="icon-btn",o.title=e.recordingFile,o.setAttribute("aria-label",e.recordingFile),o.innerHTML='<svg class="icon" viewBox="0 0 16 16" width="16" height="16" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 4.5h4l1.5 1.5h5.5v6.5h-11z"/></svg>',o.addEventListener("click",()=>h.click());const c=document.createElement("span");c.className="recording-file",c.append(d,o,h);const l=document.createElement("input");l.type="number",l.step="0.1",l.value=s.offset!==void 0?String(s.offset):"",l.placeholder="0",l.addEventListener("change",()=>this.edit(m=>{const v=Number(l.value);l.value.trim()===""||!Number.isFinite(v)||v===0?delete m[i].offset:m[i].offset=v}));const p=document.createElement("button");p.type="button",p.className="icon-btn",p.innerHTML=x.TRASH,p.title=e.recordingRemove,p.setAttribute("aria-label",e.recordingRemove),p.addEventListener("click",()=>this.edit(m=>{m.splice(i,1)}));const g=document.createElement("p");return g.className="recording-status",this.check(s,g),n.append(this.labelled(e.recordingKind,a),this.labelled(e.recordingFile,c),this.labelled(e.recordingOffset,l,"s"),p,g),n}));const r=this.recordings[this.recordings.length-1];this.allowAdding(r===void 0||r.src!=="")}allowAdding(e){const t=this.window.querySelector(".recording-add");t.disabled=!e,t.title=e?"":this.messages.recordingAddFirst}labelled(e,t,r){const s=document.createElement("label"),i=document.createElement("span");if(i.textContent=e,r){const n=document.createElement("span");n.className="with-unit",n.append(t,r),s.append(i,n)}else s.append(i,t);return s}check(e,t){if(e.src==="")return;const r=document.createElement(e.kind==="video"?"video":"audio");r.preload="metadata",r.addEventListener("loadedmetadata",()=>{t.textContent=w.clock(Math.round(r.duration)),t.classList.remove("error")}),r.addEventListener("error",()=>{t.textContent=this.messages.loadFailed,t.classList.add("error")}),r.src=this.urlOf(e.src)}edit(e){const t=structuredClone(this.recordings);e(t),this.host.recordingsChanged(t)}}class L{constructor(e,t,r,s){this.sendsAudio=e,this.engine=t,this.load=r,this.downloadBytes=s}loaded;transcribe(e){return this.loaded??=this.load().catch(t=>{throw this.loaded=void 0,t}),this.loaded.then(t=>t.transcribe(e))}}const $="groq",_="openai",U="assemblyai",T=B.point("transcription").provide(B.BUILT_IN,[{id:"whisper-browser",name:"Whisper",credit:"OpenAI Whisper large-v3-turbo (MIT), run by Transformers.js (Apache 2.0)",creditUrl:"https://huggingface.co/onnx-community/whisper-large-v3-turbo",create:()=>new L(!1,"whisper-large-v3-turbo (Transformers.js, in the browser)",async()=>new(await b(async()=>{const{BrowserWhisperProvider:E}=await import("./BrowserWhisperProvider-Dn44ZE45.js");return{BrowserWhisperProvider:E}},__vite__mapDeps([0,1,2]),import.meta.url)).BrowserWhisperProvider,76e7)},{id:$,name:"Groq",credit:"Groq, Whisper large-v3-turbo, on your own key",creditUrl:"https://groq.com/terms-of-use",keyUrl:"https://console.groq.com/keys",create:()=>new L(!0,"whisper-large-v3-turbo (Groq)",async()=>new(await b(async()=>{const{OpenAiTranscriptionProvider:E}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:E}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.groq.com/openai/v1",model:"whisper-large-v3-turbo",key:()=>A.of($)}))},{id:_,name:"OpenAI",credit:"OpenAI, Whisper, on your own key",creditUrl:"https://openai.com/policies/row-terms-of-use/",keyUrl:"https://platform.openai.com/api-keys",create:()=>new L(!0,"whisper-1 (OpenAI)",async()=>new(await b(async()=>{const{OpenAiTranscriptionProvider:E}=await import("./OpenAiTranscriptionProvider-DDW446tK.js");return{OpenAiTranscriptionProvider:E}},__vite__mapDeps([3,1,2]),import.meta.url)).OpenAiTranscriptionProvider({base:"https://api.openai.com/v1",model:"whisper-1",key:()=>A.of(_)}))},{id:U,name:"AssemblyAI",credit:"AssemblyAI, voices told apart, on your own key",creditUrl:"https://www.assemblyai.com/legal/terms-of-service",keyUrl:"https://www.assemblyai.com/app/api-keys",create:()=>new L(!0,"AssemblyAI (speaker labels)",async()=>new(await b(async()=>{const{AssemblyAiTranscriptionProvider:E}=await import("./AssemblyAiTranscriptionProvider-o2kkPD5o.js");return{AssemblyAiTranscriptionProvider:E}},__vite__mapDeps([4,1,2]),import.meta.url)).AssemblyAiTranscriptionProvider({base:"https://api.assemblyai.com",key:()=>A.of(U)}))}]),q="rr0-interview-editor",Z=`
|
|
37
|
-
<style>
|
|
38
|
-
:host { display: block; }
|
|
39
|
-
/* The colours of the transcript's text editor (see SightingFileEditor): a key, a string, a number or a word, and a mistake. Dark mode redefines them. */
|
|
40
|
-
:host { --file-key: #1a5fb4; --file-string: #26662f; --file-literal: #a5321f; --rr0-alert: #c33; }
|
|
41
|
-
@media (prefers-color-scheme: dark) { :host { --file-key: #8cb8ff; --file-string: #8fd39a; --file-literal: #ffa08a; } }
|
|
42
|
-
[hidden] { display: none !important; }
|
|
43
|
-
/* Two groups as the recording's editor has its own (see sightingEditorTemplate): the open tab raised and joined to its panel. */
|
|
44
|
-
.group-tabs { --tab-line: color-mix(in srgb, CanvasText 35%, transparent); --tab-surface: color-mix(in srgb, CanvasText 5%, Canvas);
|
|
45
|
-
--tab-recessed: color-mix(in srgb, CanvasText 11%, Canvas); --tab-accent: #4a9eff;
|
|
46
|
-
display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0; margin: 0; padding: 0; border-bottom: 1px solid var(--tab-line); }
|
|
47
|
-
.group-tab { -webkit-user-select: none; user-select: none; font: inherit; font-weight: 600; cursor: pointer; color: color-mix(in srgb, CanvasText 70%, transparent); background: var(--tab-recessed);
|
|
48
|
-
border: 1px solid var(--tab-line); border-radius: 8px 8px 0 0; padding: .4em .6em; margin: 0 0 -1px -1px; position: relative; }
|
|
49
|
-
.group-tab:hover { color: CanvasText; background: color-mix(in srgb, CanvasText 16%, Canvas); }
|
|
50
|
-
.group-tab[aria-expanded="true"] { color: CanvasText; background: var(--tab-surface); border-bottom-color: var(--tab-surface); box-shadow: inset 0 2px 0 var(--tab-accent); z-index: 1; }
|
|
51
|
-
.group-tab:focus-visible { outline: 2px solid #4af; outline-offset: -2px; }
|
|
52
|
-
.group-panel { border: 1px solid var(--tab-line, color-mix(in srgb, CanvasText 35%, transparent)); border-top: 0; border-radius: 0 0 4px 4px;
|
|
53
|
-
background: color-mix(in srgb, CanvasText 5%, Canvas); padding: .5em .75em; margin: 0 0 .5em; }
|
|
54
|
-
.row { display: flex; align-items: center; gap: .5em; flex-wrap: wrap; margin-bottom: .5em; }
|
|
55
|
-
.group-panel > .row:last-child { margin-bottom: 0; }
|
|
56
|
-
label { display: flex; align-items: center; gap: .4em; }
|
|
57
|
-
label.wide { flex: 1 1 100%; align-items: flex-start; }
|
|
58
|
-
label.wide textarea { flex: 1 1 auto; min-width: 0; min-height: 9em; }
|
|
59
|
-
label.fill { flex: 1 1 100%; }
|
|
60
|
-
label.fill input { flex: 1 1 auto; }
|
|
61
|
-
input[type="text"] { min-width: 0; }
|
|
62
|
-
#by { width: 16em; }
|
|
63
|
-
input[type="url"] { width: 18em; max-width: 100%; }
|
|
64
|
-
${z.CSS}
|
|
65
|
-
select { min-width: 0; max-width: 100%; text-overflow: ellipsis; }
|
|
66
|
-
fieldset.witnesses { display: flex; flex-wrap: wrap; align-items: center; gap: .25em .75em; border: 0; margin: 0; padding: 0; min-width: 0; }
|
|
67
|
-
fieldset.witnesses legend { float: left; padding: 0; margin-right: .4em; }
|
|
68
|
-
#exchanges { --rr0-interview-max-height: 32em; --rr0-interview-overflow: auto; }
|
|
69
|
-
.file-note { margin: .3em 0; }
|
|
70
|
-
${y.rules([".file-note"])}
|
|
71
|
-
.file-editor { min-height: 18em; margin-top: .5em; }
|
|
72
|
-
/* ---- The design handoff's look (design_handoff_editeurs_ufoathome, §2 and §5) ---- */
|
|
73
|
-
:host {
|
|
74
|
-
${C.TOKENS}
|
|
75
|
-
--rr0-field-radius: 8px;
|
|
76
|
-
--rr0-input-font-size: 15px;
|
|
77
|
-
container-type: inline-size;
|
|
78
|
-
font: 400 15px/1.5 var(--sans);
|
|
79
|
-
color: var(--ink);
|
|
80
|
-
}
|
|
81
|
-
${C.HEAD}
|
|
82
|
-
${C.fields(".interview-app")}
|
|
83
|
-
.recordings-window :is(button, input, select) { font: inherit; }
|
|
84
|
-
.recordings-window .pill-btn { min-height: 36px; }
|
|
85
|
-
/* Its parts, underlined, as the case's are. */
|
|
86
|
-
#tabs { display: flex; gap: 6px; padding: 0; border-bottom: 1px solid var(--line); }
|
|
87
|
-
#tabs .group-tab {
|
|
88
|
-
display: inline-flex; align-items: center; gap: 8px; min-height: 0; margin: 0 0 -1px; padding: 12px 10px;
|
|
89
|
-
border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; box-shadow: none; color: var(--ink-dim); font: 600 15px/1.2 var(--sans);
|
|
90
|
-
}
|
|
91
|
-
/* A pictogram before each name, as the case's and the observation's tabs have. */
|
|
92
|
-
#tabs .group-tab > svg { flex: none; width: 16px; height: 16px; }
|
|
93
|
-
#tabs .group-tab:hover { background: none; color: var(--ink); }
|
|
94
|
-
#tabs .group-tab[aria-expanded="true"] { color: var(--ink); border-bottom-color: var(--glow-solid); background: none; box-shadow: none; }
|
|
95
|
-
.interview-app > .group-panel { margin: 0; padding: 18px 0 0; border: 0; border-radius: 0; background: none; color: var(--ink); }
|
|
96
|
-
/* Fields: the label above, the value under it, on a grid that fills the width; the title and what was established the whole width. */
|
|
97
|
-
#group-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px 16px; }
|
|
98
|
-
#group-summary > .row { display: contents; }
|
|
99
|
-
#group-summary label, #group-transcript label { display: flex; flex-direction: column; align-items: stretch; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
100
|
-
#group-summary :is(label.fill, label.wide) { grid-column: 1 / -1; }
|
|
101
|
-
#group-summary :is(input, select, textarea), #group-transcript input[type="text"] { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
102
|
-
#group-summary input[type="text"], #group-transcript input[type="text"] { height: 38px; }
|
|
103
|
-
#group-summary textarea { min-height: 9em; }
|
|
104
|
-
fieldset.witnesses { flex-direction: column; align-items: flex-start; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
105
|
-
/* A witness's name stays on one line beside its box: shrunk to its words, the label broke "Q. B." in two. */
|
|
106
|
-
#group-summary fieldset.witnesses label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; color: var(--ink); white-space: nowrap; }
|
|
107
|
-
/* The exchanges, one card an intervention, the speaker's colour down its side: a list that scrolls past 520 px (440 on a phone). */
|
|
108
|
-
#exchanges { --rr0-interview-max-height: 520px; --rr0-interview-line: var(--line-strong); }
|
|
109
|
-
#exchanges .rr0-interview-turns { padding-right: 4px; }
|
|
110
|
-
#exchanges .intervention { margin: 0 0 10px; padding: 6px 4px; border: 1px solid var(--line-strong); border-left: 3px solid var(--speaker); border-radius: 10px; background: var(--ground); }
|
|
111
|
-
#exchanges .intervention:hover { background: var(--ground-sunken); }
|
|
112
|
-
#exchanges .turn .who { display: inline-block; margin-bottom: 4px; padding: 1px 9px; border-radius: 999px; background: color-mix(in srgb, var(--speaker) 18%, transparent); color: var(--ink); font: 700 12px/1.5 var(--sans); }
|
|
113
|
-
#exchanges .turn .said { font-size: 15px; line-height: 1.55; color: var(--ink); }
|
|
114
|
-
#exchanges .turn .ref { border-color: var(--glow-dim); background: var(--warn-bg); color: var(--ink); font: 600 12px/1.6 var(--sans); padding: 1px 9px; }
|
|
115
|
-
#exchanges .turn.flash { background: var(--warn-bg); }
|
|
116
|
-
#exchanges .rr0-interview-status { padding: 8px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--ink-dim); font-size: 13px; }
|
|
117
|
-
#group-transcript > .row { margin-bottom: 12px; }
|
|
118
|
-
@container (max-width: 640px) { #exchanges { --rr0-interview-max-height: 440px; } }
|
|
119
|
-
${D.CSS}
|
|
120
|
-
${R.CSS}
|
|
121
|
-
${P.CSS}
|
|
122
|
-
${F.CSS}
|
|
123
|
-
${x.CSS}
|
|
124
|
-
/* Who has proofread it, said once above the exchanges, with a box each to say they have (see renderReview); the reader's own line goes. */
|
|
125
|
-
#exchanges .rr0-interview-status { display: none; }
|
|
126
|
-
.review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 10px; padding: 10px 14px;
|
|
127
|
-
border-radius: 10px; background: var(--warn-bg); font-size: 13px; color: var(--ink-dim); }
|
|
128
|
-
.review[data-done] { background: var(--neutral-bg); }
|
|
129
|
-
.review-boxes { display: flex; flex-wrap: wrap; gap: 14px; }
|
|
130
|
-
.review-boxes label { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
|
|
131
|
-
/* Where the words selected, or the passage taken out pressed, are: why it is taken out, and what to do with it. Fixed, as it is placed
|
|
132
|
-
against what it is about (see openRedactPop); in the top layer where popovers are known. */
|
|
133
|
-
.redact-pop { position: fixed; inset: auto; margin: 0; text-align: start; width: min(24em, calc(100vw - 32px)); box-sizing: border-box; padding: 10px 12px;
|
|
134
|
-
border: 1px solid var(--line-strong); border-radius: 10px; background: var(--ground-raised); color: var(--ink); box-shadow: 0 6px 24px rgba(0, 0, 0, .18); }
|
|
135
|
-
.redact-pop[hidden] { display: none; }
|
|
136
|
-
/* The words the popover is about, still marked once typing the reason has taken the selection away. */
|
|
137
|
-
::highlight(rr0-redact-pending) { background-color: var(--warn-bg, #fde9b0); color: inherit; text-decoration: underline 2px var(--glow-dim, #c90); }
|
|
138
|
-
.redact-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px; }
|
|
139
|
-
.redact-actions button[hidden] { display: none; }
|
|
140
|
-
.transcribe { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
|
|
141
|
-
.transcribe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
|
|
142
|
-
.transcribe-row label { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1.3 var(--sans); color: var(--ink-dim); }
|
|
143
|
-
.transcribe-row input[type="password"] { width: 14em; }
|
|
144
|
-
.transcribe .source-credit { font-size: 12px; color: var(--ink-faint); }
|
|
145
|
-
.transcribe-note { margin: .4em 0 0; }
|
|
146
|
-
.transcribe progress { width: 100%; margin-top: 6px; }
|
|
147
|
-
.redact-reason { display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: start; font: 600 12px/1.3 var(--sans); color: var(--ink-dim); }
|
|
148
|
-
.redact-reason input { box-sizing: border-box; width: 100%; font-weight: 400; }
|
|
149
|
-
.redact-note { margin: 6px 0 0; font-size: 13px; color: var(--ink-faint); }
|
|
150
|
-
.redact-note:empty { display: none; }
|
|
151
|
-
.redact-note.error { color: var(--error); }
|
|
152
|
-
/* Each turn: its time, which plays from there; what is taken out as a label that says how much, and puts it back while it is known. */
|
|
153
|
-
#exchanges .turn { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); column-gap: 14px; padding: 8px 10px; }
|
|
154
|
-
#exchanges .turn > .turn-time { grid-row: 1; grid-column: 1; }
|
|
155
|
-
#exchanges .turn > .who { grid-column: 1; align-self: start; }
|
|
156
|
-
#exchanges .turn > :not(.who, .turn-time) { grid-column: 2; }
|
|
157
|
-
#exchanges .turn > .said, #exchanges .turn > .redacted { grid-row: 1 / span 2; }
|
|
158
|
-
#exchanges .turn.goes-on > .who, #exchanges .turn.is-redacted > .who { display: block; visibility: hidden; }
|
|
159
|
-
/* The time is on the turn itself here: the reader's tooltip of it would say it twice. */
|
|
160
|
-
#exchanges .turn[data-time]::after { content: none !important; display: none !important; }
|
|
161
|
-
.turn-time { justify-self: start; min-height: 0; padding: 0; border: 0; background: none; color: var(--sky); font: 600 13px/1.4 var(--mono); cursor: pointer; }
|
|
162
|
-
.turn-time:hover:not(:disabled) { background: none; text-decoration: underline; }
|
|
163
|
-
#exchanges .bar.redacted-label { width: auto; height: auto; padding: 0 8px; border: 1px dashed var(--line-strong); border-radius: 999px; background: none; color: var(--ink-faint);
|
|
164
|
-
font: 600 12px/1.6 var(--sans); vertical-align: baseline; cursor: default; }
|
|
165
|
-
#exchanges .bar.redacted-label { cursor: pointer; }
|
|
166
|
-
#exchanges .bar.redacted-label:hover { border-color: var(--glow-dim); color: var(--ink); }
|
|
167
|
-
.turn-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; margin-top: 6px; }
|
|
168
|
-
.turn-tools button { min-height: 0; padding: 2px 4px; border: 0; background: none; color: var(--ink-faint); font: 600 13px/1.4 var(--sans); }
|
|
169
|
-
.turn-tools button:hover:not(:disabled) { background: none; color: var(--ink); }
|
|
170
|
-
.turn-tools .icon-btn { min-width: 0; }
|
|
171
|
-
#exchanges .turn.current { background: var(--warn-bg); border-radius: 8px; }
|
|
172
|
-
#exchanges .intervention:has(.turn.current) { border-color: var(--glow-dim); }
|
|
173
|
-
#exchanges .turn .refs { align-items: center; }
|
|
174
|
-
#exchanges .turn .ref { display: inline-block; max-width: calc(100% - 2em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
175
|
-
#exchanges .turn .ref .moment-letter { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; margin-right: 4px; border-radius: 50%; background: var(--glow-solid); color: var(--glow-on-solid); font: 700 11px/1 var(--sans); }
|
|
176
|
-
#exchanges .turn .ref-unlink { min-height: 0; padding: 0 4px; border: 0; background: none; color: var(--ink-faint); font: 600 13px/1 var(--sans); }
|
|
177
|
-
/* The questionnaire as a form: its sections one under the other, a question above its answer, the answer the width of the form. */
|
|
178
|
-
.form-fields { display: grid; gap: 18px; }
|
|
179
|
-
.form-intro, .form-source, .form-section-intro, .form-hint { margin: 0; color: var(--ink-dim); font: 400 14px/1.45 var(--sans); }
|
|
180
|
-
.form-section { display: grid; gap: 14px; margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 8px; }
|
|
181
|
-
.form-section > legend { padding: 0 6px; font: 600 15px/1.3 var(--sans); color: var(--ink); }
|
|
182
|
-
.form-field { display: grid; gap: 6px; }
|
|
183
|
-
.form-field > label { font: 600 14px/1.35 var(--sans); color: var(--ink); }
|
|
184
|
-
.form-field .required { color: var(--ink-faint); }
|
|
185
|
-
.form-field textarea { box-sizing: border-box; width: 100%; min-height: 4.5em; resize: vertical; }
|
|
186
|
-
.form-field input:not([type="radio"]) { box-sizing: border-box; width: 100%; max-width: 32rem; }
|
|
187
|
-
.form-choices { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 14px/1.3 var(--sans); }
|
|
188
|
-
.form-choices label { display: inline-flex; align-items: center; gap: 4px; }
|
|
189
|
-
/* How a date or a time is said reads as part of its question, as in the case's date: a link, not a button. */
|
|
190
|
-
.form-when-mode { min-height: 0; padding: 0; border: 0; background: none; color: inherit; font: 400 13px/1.3 var(--sans); text-decoration: underline;
|
|
191
|
-
text-underline-offset: .15em; cursor: pointer; }
|
|
192
|
-
.form-when-mode:disabled { text-decoration: none; cursor: default; }
|
|
193
|
-
/* The questionnaire's pictures are drawn on white: on a dark page they keep the paper they were drawn for. */
|
|
194
|
-
.form-figure { margin: 0; justify-self: start; max-width: min(100%, 16rem); }
|
|
195
|
-
.form-figure img { display: block; max-width: 100%; height: auto; padding: 6px; border-radius: 6px; background: #fff; }
|
|
196
|
-
#exchanges .sealed-open { grid-column: 2 / -1; display: grid; gap: 4px; justify-items: start; margin-top: 4px; }
|
|
197
|
-
#exchanges .sealed-open .opened { margin: 0; padding: 4px 8px; border-left: 3px solid var(--glow-dim); background: var(--neutral-bg); }
|
|
198
|
-
#exchanges .sealed-open .opened-note { margin: 0; color: var(--ink-faint); font: 400 12px/1.35 var(--sans); }
|
|
199
|
-
#exchanges .sealed-open .opened-note:empty { display: none; }
|
|
200
|
-
.form-confidential { margin: 0; padding-left: 22px; color: var(--ink-dim); font: 400 13px/1.4 var(--sans);
|
|
201
|
-
background: no-repeat left 2px / 15px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23888' stroke-width='1.6'%3E%3Crect x='3' y='7' width='10' height='7' rx='1.5'/%3E%3Cpath d='M5.5 7V5a2.5 2.5 0 0 1 5 0v2'/%3E%3C/svg%3E"); }
|
|
202
|
-
.form-confidential.nowhere { color: var(--warn, #b26b00); }
|
|
203
|
-
.form-figure figcaption { margin-top: 4px; color: var(--ink-dim); font: 400 12px/1.35 var(--sans); }
|
|
204
|
-
.form-feed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; color: var(--ink-dim); font: 400 13px/1.4 var(--sans); }
|
|
205
|
-
.turn-edit { display: flex; flex-direction: column; gap: 6px; }
|
|
206
|
-
.turn-edit textarea { box-sizing: border-box; width: 100%; min-height: 6em; }
|
|
207
|
-
.turn-edit .hint { font-size: 12px; color: var(--ink-faint); }
|
|
208
|
-
.turn-edit .buttons { display: flex; gap: 8px; }
|
|
209
|
-
</style>
|
|
210
|
-
<div class="interview-app">
|
|
211
|
-
<!-- The player: what plays the interview's recordings, with who speaks along it (see InterviewPlayer). -->
|
|
212
|
-
<div id="player"></div>
|
|
213
|
-
<div id="tabs" class="group-tabs">
|
|
214
|
-
<button class="group-tab" type="button" aria-controls="group-summary" aria-expanded="true">${x.SUMMARY}<span id="label-summary-group"></span></button>
|
|
215
|
-
<button id="form-tab" class="group-tab" type="button" aria-controls="group-form" aria-expanded="false" hidden>${x.SUMMARY}<span id="label-form-group"></span></button>
|
|
216
|
-
<button class="group-tab" type="button" aria-controls="group-exchanges" aria-expanded="false">${x.INTERVIEW}<span id="label-exchanges-group"></span></button>
|
|
217
|
-
<button class="group-tab" type="button" aria-controls="group-transcript" aria-expanded="false">${x.FILES}<span id="label-file-group"></span></button>
|
|
218
|
-
</div>
|
|
219
|
-
<section class="group-panel" id="group-summary" aria-labelledby="label-summary-group">
|
|
220
|
-
<div class="row">
|
|
221
|
-
<label class="fill"><span id="label-title"></span> <input id="title" type="text"/></label>
|
|
222
|
-
</div>
|
|
223
|
-
<div class="row">
|
|
224
|
-
<fieldset id="witness" class="witnesses"><legend id="label-witness"></legend></fieldset>
|
|
225
|
-
<label><span id="label-medium"></span> <select id="medium"></select></label>
|
|
226
|
-
<label><span id="label-time"></span> <input id="time" type="text" size="16" placeholder="2026-10-13 21:27"/></label>
|
|
227
|
-
<label><span id="label-by"></span> <input id="by" type="text" autocomplete="off" spellcheck="false"/></label>
|
|
228
|
-
</div>
|
|
229
|
-
<div class="row">
|
|
230
|
-
<label class="wide"><span id="label-summary"></span> <textarea id="summary"></textarea></label>
|
|
231
|
-
</div>
|
|
232
|
-
</section>
|
|
233
|
-
<section class="group-panel" id="group-form" aria-labelledby="label-form-group" hidden>
|
|
234
|
-
<p id="form-note" class="file-note" role="status" hidden></p>
|
|
235
|
-
<div id="form-fields" class="form-fields"></div>
|
|
236
|
-
<div class="form-feed"><button id="form-feed" type="button" class="pill-btn primary"></button> <span id="form-feed-hint"></span></div>
|
|
237
|
-
<p id="form-fed" class="file-note" role="status" hidden></p>
|
|
238
|
-
</section>
|
|
239
|
-
<section class="group-panel" id="group-exchanges" aria-labelledby="label-exchanges-group" hidden>
|
|
240
|
-
<!-- Transcribing the recording (see TranscriptionProvider): what with, what it sends or downloads, how far it has got. -->
|
|
241
|
-
<div id="transcribe" class="transcribe">
|
|
242
|
-
<div class="transcribe-row">
|
|
243
|
-
<span><button id="transcribe-start" type="button" class="pill-btn primary"></button> <span id="transcribe-hint"></span></span>
|
|
244
|
-
<label><span id="label-transcribe-with"></span> <select id="transcribe-source"></select></label>
|
|
245
|
-
<a id="transcribe-credit" class="source-credit" target="_blank" rel="noopener noreferrer"></a>
|
|
246
|
-
<label id="transcribe-key-row" hidden><span id="label-transcribe-key"></span> <input id="transcribe-key" type="password" autocomplete="off" spellcheck="false"/> <a id="transcribe-key-get" class="source-credit" target="_blank" rel="noopener noreferrer"></a></label>
|
|
247
|
-
<button id="transcribe-stop" type="button" class="pill-btn" hidden></button>
|
|
248
|
-
</div>
|
|
249
|
-
<p id="transcribe-note" class="transcribe-note" role="status"></p>
|
|
250
|
-
<progress id="transcribe-progress" hidden></progress>
|
|
251
|
-
</div>
|
|
252
|
-
<div id="review" class="review" hidden></div>
|
|
253
|
-
<div id="redact-pop" class="redact-pop" role="dialog" hidden>
|
|
254
|
-
<label class="redact-reason"><span id="label-redact-reason"></span><input id="redact-reason" type="text" list="redact-reasons" autocomplete="off"/></label>
|
|
255
|
-
<datalist id="redact-reasons"></datalist>
|
|
256
|
-
<p id="redact-note" class="redact-note" role="status"></p>
|
|
257
|
-
<div class="redact-actions">
|
|
258
|
-
<button id="redact-restore" type="button" class="pill-btn"></button>
|
|
259
|
-
<button id="redact-take" type="button" class="pill-btn primary"></button>
|
|
260
|
-
</div>
|
|
261
|
-
</div>
|
|
262
|
-
<rr0-interview id="exchanges"></rr0-interview>
|
|
263
|
-
</section>
|
|
264
|
-
<section class="group-panel" id="group-transcript" aria-labelledby="label-file-group" hidden>
|
|
265
|
-
<div class="row">
|
|
266
|
-
<label class="fill"><span id="label-url"></span> <input id="url" type="text" autocomplete="off" spellcheck="false" placeholder="interview-….json"/></label>
|
|
267
|
-
</div>
|
|
268
|
-
<div class="row toolbar">
|
|
269
|
-
<span class="input-file-row"><span id="label-import-file"></span> <rr0-input-file id="import" name="import" accept="application/json,.json,.txt,.md,.vtt,.srt,.csv,.tsv,text/*" placeholder="https://…/interview.json"></rr0-input-file></span>
|
|
270
|
-
<button id="save" type="button"></button>
|
|
271
|
-
</div>
|
|
272
|
-
<p id="file-note" class="file-note" hidden role="status"></p>
|
|
273
|
-
<div id="file-editor" class="file-editor"></div>
|
|
274
|
-
</section>
|
|
275
|
-
</div>
|
|
276
|
-
`;class u extends HTMLElement{shadow=this.attachShadow({mode:"open"});get importInput(){return this.shadow.getElementById("import")}messages;said=new M(["en"]);language="en";localeToken=0;current;options=[];group="summary";base;text;fileEditor;fileEditorLoading;shownFor;ready=Promise.resolve();player;drawn;takenOut=new Map;redactTarget;exchangesShown=Promise.resolve();lastReason;static transcriptionSourceId=T[0].id;transcribing;constructor(){super(),this.shadow.innerHTML=Z,customElements.upgrade(this.shadow),this.importInput.build();for(const r of["title","time","by","url","summary","witness","medium"])this.shadow.getElementById(r).addEventListener(r==="witness"||r==="medium"?"change":"input",()=>this.write(r));for(const r of this.shadow.querySelectorAll("#tabs .group-tab"))r.addEventListener("click",()=>this.openGroup(u.GROUPS[r.getAttribute("aria-controls")]??"summary"));this.shadow.getElementById("url").addEventListener("change",()=>{this.shownFor=void 0,this.text===void 0&&this.group==="file"&&this.showTranscript()}),this.importInput.addEventListener("filepick",r=>{const s=r.detail;s.file?this.importFromFile(s.file):this.importFromUrl(s.url)}),this.shadow.getElementById("save").addEventListener("click",()=>this.save()),this.shadow.getElementById("form-feed").addEventListener("click",()=>this.feedObservation()),this.shadow.getElementById("transcribe-start").addEventListener("click",()=>void this.transcribe()),this.shadow.getElementById("transcribe-stop").addEventListener("click",()=>this.transcribing?.abort()),this.shadow.getElementById("transcribe-source").addEventListener("change",r=>{u.transcriptionSourceId=r.target.value,this.transcribeOutcome=void 0,this.renderTranscribe()}),this.shadow.getElementById("transcribe-key").addEventListener("input",r=>{A.set(u.transcriptionSourceId,r.target.value),this.renderTranscribeStart()});const e=this.shadow.getElementById("exchanges");e.addEventListener("pointerup",()=>setTimeout(()=>this.selectionMade(),0)),e.addEventListener("keyup",r=>{r.shiftKey&&this.selectionMade()}),e.addEventListener("click",r=>{const s=r.target.closest(".bar.redacted-label");s&&this.openBar(s)}),e.addEventListener("keydown",r=>{const s=r.target.closest(".bar.redacted-label");s&&(r.key==="Enter"||r.key===" ")&&(r.preventDefault(),this.openBar(s))}),this.shadow.getElementById("redact-take").addEventListener("click",()=>void this.redactSelection()),this.shadow.getElementById("redact-restore").addEventListener("click",()=>{const r=this.redactTarget;this.closeRedactPop(),r?.kind==="bar"&&r.restorable&&this.restore(r.restorable)});const t=this.field("redact-reason");t.addEventListener("change",()=>{this.redactTarget?.kind==="bar"&&this.changeReason()}),t.addEventListener("keydown",r=>{r.key==="Escape"&&this.closeRedactPop(),r.key==="Enter"&&(r.preventDefault(),this.redactTarget?.kind==="selection"?this.redactSelection():this.changeReason().then(()=>this.closeRedactPop()))})}static GROUPS={"group-summary":"summary","group-form":"form","group-exchanges":"exchanges","group-transcript":"file"};static get observedAttributes(){return["readonly"]}attributeChangedCallback(){this.applyReadonly()}connectedCallback(){this.ready=this.loadLocale(),document.addEventListener("pointerdown",this.pressedElsewhere,!0)}pressedElsewhere=e=>{const t=this.shadow.getElementById("redact-pop");t&&!t.hidden&&!e.composedPath().includes(t)&&this.closeRedactPop()};disconnectedCallback(){document.removeEventListener("pointerdown",this.pressedElsewhere,!0),queueMicrotask(()=>{this.isConnected||this.releaseFileEditor()})}releaseFileEditor(){this.fileEditor&&(this.text=this.fileEditor.text,this.fileEditor.destroy(),this.fileEditor=void 0,this.fileEditorLoading=void 0,this.shownFor=void 0)}get event(){return this.current}set event(e){const t=e!==this.current;t&&(this.shownFor=void 0),this.current=e,this.render(),t&&this.heldThroughQuestionnaire?this.openGroup("form"):this.group==="form"&&(this.formShown=this.showForm()),this.takenOut.clear(),this.group==="file"&&this.showTranscript(),queueMicrotask(()=>{this.current===e&&this.showExchanges()})}set witnesses(e){this.options=e,this.render()}set documentUrl(e){this.base=e}get transcriptText(){return this.text}set transcriptText(e){this.text=e,this.shownFor=void 0}field(e){return this.shadow.getElementById(e)}async loadLocale(){const e=++this.localeToken,t=Q.preferencesFor(this),r=J(t,j),s=await G.load(r);e===this.localeToken&&(this.language=r,this.said=new M(t),this.messages=s,this.player||(this.player=new D(this.shadow.getElementById("player"),{timeChanged:i=>this.markCurrentTurn(i),recordingsChanged:i=>void this.editTranscript(n=>{i.length===0?delete n.recordings:n.recordings=i})},s),this.render()),this.render())}applyReadonly(){const e=this.hasAttribute("readonly");for(const t of["title","time","by","url","summary"])this.field(t).readOnly=e;for(const t of this.shadow.querySelectorAll("#witness input"))t.disabled=e;this.field("medium").disabled=e,this.importInput.disabled=e,this.renderTranscribe()}static byText(e){return(e??[]).map(t=>"people"in t?t.people:"org"in t?t.org:t.title??"").filter(t=>t!=="").join(", ")}render(){const e=this.messages;if(!e)return;const t=(l,p)=>{this.shadow.getElementById(l).textContent=p};t("label-summary-group",e.summaryTab),t("label-file-group",e.fileTab),t("label-exchanges-group",e.exchangesTab),t("label-form-group",e.questionnaireTab),t("form-feed",e.feed),R.say(this.shadow.getElementById("form-feed-hint"),"",e.feedHint);const r=this.shadow.getElementById("form-tab");r.hidden=!this.heldThroughQuestionnaire,!this.heldThroughQuestionnaire&&this.group==="form"&&this.openGroup("summary"),t("label-title",e.title),t("label-witness",e.witness),t("label-medium",e.medium),t("label-time",e.time),t("label-by",e.by),t("label-summary",e.summary),t("label-url",e.transcript),R.say(this.shadow.getElementById("label-import-file"),e.importFile,e.importFileHint),t("redact-take",e.redactSelection),t("redact-restore",e.redactRestore),t("label-redact-reason",e.redactReasonLabel);const s=this.field("redact-reason");s.placeholder=e.redactReason,s.title=e.redactReasonHint,t("transcribe-start",e.transcribe),this.shadow.getElementById("transcribe-hint").replaceChildren(R.of(e.transcribeHint)),t("label-transcribe-with",e.transcribeWith),t("label-transcribe-key",e.transcribeKey),t("transcribe-key-get",e.transcribeKeyGet),t("transcribe-stop",e.transcribeStop),this.field("transcribe-key").title=e.transcribeKeyHint,this.renderTranscribe(),this.player?.setMessages(e),this.importInput.messages=e,t("save",e.saveButton),this.field("url").title=e.transcriptHint,this.field("by").title=e.byHint;const i=this.current,n=this.shadow.activeElement,a=(l,p)=>{this.field(l)!==n&&(this.field(l).value=p)};a("title",this.said.read(i?.title)??""),a("time",i?.time??""),a("by",u.byText(i?.by)),a("url",i?.url??""),a("summary",this.said.read(i?.summary)??"");const d=[i?.interviewOf].flat().filter(l=>typeof l=="string"),h=this.shadow.getElementById("witness"),o=[...this.options,...d.filter(l=>!this.options.some(p=>p.id===l)).map(l=>({id:l,label:l}))];h.replaceChildren(h.querySelector("legend"),...o.map(l=>{const p=document.createElement("label"),g=document.createElement("input");return g.type="checkbox",g.value=l.id,g.checked=d.includes(l.id),p.append(g,l.label),p}));const c=this.shadow.getElementById("medium");if(c.replaceChildren(...N.ALL.map(l=>new Option(N.label(l,this.language),l))),i?.medium!==void 0&&!N.ALL.includes(i.medium)&&c.append(new Option(String(i.medium),String(i.medium))),i?.medium===void 0){const l=new Option(e.witnessNone,"");l.disabled=!0,l.hidden=!0,c.prepend(l)}c.value=i?.medium??"",this.applyReadonly()}write(e){const t=this.current;if(!t)return;const r=e==="witness"?"":this.field(e).value;switch(e){case"title":{const s=this.said.write(t.title,r,this.language);s===void 0?delete t.title:t.title=s;break}case"summary":{const s=this.said.write(t.summary,r,this.language);s===void 0?delete t.summary:t.summary=s;break}case"time":r.trim()===""?delete t.time:t.time=r.trim();break;case"url":r.trim()===""?delete t.url:t.url=r.trim();break;case"by":{const s=r.split(",").map(i=>i.trim()).filter(i=>i!=="");s.length===0?delete t.by:t.by=s.map(i=>({people:i}));break}case"witness":{const s=[...this.shadow.querySelectorAll("#witness input:checked")].map(i=>i.value);if(s.length===0){this.render();return}t.interviewOf=s.length===1?s[0]:s;break}case"medium":r===""?delete t.medium:t.medium=r;break}this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:e,event:t}})),e==="medium"&&this.render(),e!=="url"&&this.syncFileFromEvent()}openGroup(e){this.group=e;const t={summary:"group-summary",form:"group-form",exchanges:"group-exchanges",file:"group-transcript"};for(const r of this.shadow.querySelectorAll("#tabs .group-tab"))r.setAttribute("aria-expanded",String(r.getAttribute("aria-controls")===t[e]));for(const[r,s]of Object.entries(t))this.shadow.getElementById(s).hidden=r!==e;e==="file"&&this.showTranscript(),e==="exchanges"&&this.showExchanges(),e==="form"&&(this.formShown=this.showForm())}form;formToken=0;formShown=Promise.resolve();get heldThroughQuestionnaire(){return this.current?.medium==="questionnaire"}async showForm(){const e=this.current;if(!e||!this.heldThroughQuestionnaire)return;const t=++this.formToken,[{QuestionnaireForm:r},{QuestionnaireTemplates:s},i]=await Promise.all([b(()=>import("./QuestionnaireForm-DA6LPvBt.js"),__vite__mapDeps([5,6,7]),import.meta.url),b(()=>import("./rr0-sighting-editor.mjs").then(c=>c.dd),[],import.meta.url),this.transcriptJson(e)]);await this.ready;const n=i?.questionnaire?.id??s.DEFAULT,a=await s.load(n);if(t!==this.formToken||this.current!==e)return;const d=this.messages,h=this.shadow.getElementById("form-note");y.show(h,a?void 0:d.unknownQuestionnaire.replace("{id}",n),"warning"),this.form??=new r(this.shadow.getElementById("form-fields"),(c,l,p)=>void this.answerField(c,l,p)),this.form.show(a??{id:n,title:n,sections:[]},i,d.questionnaire,this.language,this.hasAttribute("readonly"),c=>this.confidentialAnswers.get(this.confidentialKey(e,c)));const o=this.shadow.getElementById("form-feed");o.disabled=this.hasAttribute("readonly")}async answerField(e,t,r){const{QuestionnaireTemplates:s}=await b(async()=>{const{QuestionnaireTemplates:o}=await import("./rr0-sighting-editor.mjs").then(c=>c.dd);return{QuestionnaireTemplates:o}},[],import.meta.url),i=this.current;if(!i)return;const n=await this.transcriptJson(i),a=await s.load(n?.questionnaire?.id??s.DEFAULT),d=a?s.field(a,e)?.confidential:void 0;let h;if(d){const o=this.confidentialKey(i,e),c=t.trim();if(c==="")this.confidentialAnswers.delete(o);else{this.confidentialAnswers.set(o,c);const l=n?.questionnaire?.recipient,{QuestionnaireSeal:p}=await b(async()=>{const{QuestionnaireSeal:g}=await import("./QuestionnaireSeal-DpZYUhnf.js");return{QuestionnaireSeal:g}},[],import.meta.url);h={reason:d.reason,...l?{sealed:await p.seal(c,l)}:{}}}}await this.editTranscript(o=>{if(a&&!o.segments.some(c=>c.field!==void 0)){const c=s.interview(a);o.segments=c.segments,o.questionnaire=c.questionnaire,c.language&&!o.language&&(o.language=c.language);for(const[l,p]of Object.entries(c.speakers))o.speakers[l]??=p}o.medium="questionnaire",s.answer(o,e,t,r,h)})}static openers=new Map;static openerFor(e){for(const t of B.point("sealed").sources){let r=u.openers.get(t);if(r||u.openers.set(t,r=t.create()),r.recipient===e)return{source:t,opener:r}}}offerOpening(e,t,r){const s=u.openerFor(r.for),i=this.current;if(!s||!i)return;const n=this.messages,a=t.field!==void 0?this.confidentialKey(i,t.field):void 0,d=document.createElement("div");d.className="sealed-open";const h=c=>{const l=document.createElement("p");l.className="opened",l.textContent=c;const p=document.createElement("p");p.className="opened-note",p.textContent=n.sealOpened.replace("{name}",s.source.name),d.replaceChildren(l,p)},o=a!==void 0?this.confidentialAnswers.get(a):void 0;if(o!==void 0)h(o);else{const c=document.createElement("button");c.type="button",c.className="pill-btn",c.textContent=n.sealOpen.replace("{name}",s.source.name),c.addEventListener("click",()=>{s.opener.open(r).then(p=>{p!==void 0&&(a!==void 0&&this.confidentialAnswers.set(a,p),h(p))},()=>y.show(l,n.sealFailed,"error"))});const l=document.createElement("p");l.className="opened-note",d.replaceChildren(c,l)}e.append(d)}confidentialAnswers=new Map;confidentialKey(e,t){return`${e.id??e.url??""}\0${t}`}feedObservation(){const e=this.current;e&&this.transcriptJson(e).then(t=>{const r=this.shadow.getElementById("form-fed"),s=i=>y.show(r,i>0?this.messages.fed.replace("{n}",String(i)):this.messages.fedNothing,i>0?"info":"warning");if(!t){s(0);return}this.dispatchEvent(new CustomEvent(K,{bubbles:!0,composed:!0,detail:{event:e,json:t,report:s}}))})}exchangesToken=0;async transcriptJson(e){try{const t=this.fileEditor?.text??this.text;if(t!==void 0)return w.read(JSON.parse(t));const r=this.transcriptUrl(e);if(r!==void 0)return w.read(await I.json(r))}catch{}}async showExchanges(){const e=this.current;if(!e)return;const t=++this.exchangesToken,r=await this.transcriptJson(e);await this.ready,!(t!==this.exchangesToken||this.current!==e)&&this.drawExchanges(r)}drawExchanges(e){const t=this.shadow.getElementById("exchanges");t.documentUrl=this.current?this.transcriptUrl(this.current):void 0,t.interview=e,this.drawn=e,this.player?.show(e,this.current?this.transcriptUrl(this.current):void 0),this.renderReview(e),this.renderRedactReasons(e),this.decorateExchanges(e),this.renderTranscribe()}async editTranscript(e){const t=this.current;if(!t||this.hasAttribute("readonly"))return;const r=await this.transcriptJson(t)??JSON.parse(this.template(t));Array.isArray(r.segments)||(r.segments=[]),e(r);const s=u.pretty(u.withEventFields(r,t));this.fileEditor?.replaceText(s,!1),this.onEdited(s),await this.exchangesShown}get redactReason(){return this.reasonOf(this.lastReason)}reasonOf(e){e=e?.trim()||this.messages.redactReason;const t=this.givenReasons(this.drawn).find(r=>this.said.read(r)===e);return t!==void 0?typeof t=="string"?t:{...t}:this.said.write(void 0,e,this.language)??e}givenReasons(e){const t=new Map;for(const r of e?.segments??[])for(const s of[r.redacted,...(r.parts??[]).map(i=>"redacted"in i?i.redacted:void 0)]){if(!s)continue;const i=JSON.stringify(s.reason),n=t.get(i);n?n.n++:t.set(i,{reason:s.reason,n:1})}return[...t.values()].sort((r,s)=>s.n-r.n).map(r=>r.reason)}renderRedactReasons(e){const t=this.messages;if(!t)return;const r=this.givenReasons(e).map(n=>this.said.read(n)??"").filter(n=>n!==""),s=t.redactReasons.filter(n=>!r.some(a=>a.toLowerCase().startsWith(n.toLowerCase()))),i=[...new Set([...r,...s])];this.shadow.getElementById("redact-reasons").replaceChildren(...i.map(n=>new Option(n,n)))}speakerLabel(e,t){const r=w.speakerName(e,t),s=e.speakers?.[t]?.role;return s===w.UNATTRIBUTED&&e.speakers[t].title?this.messages.voiceNamed.replace("{name}",r):r===s&&s in this.messages.roles?this.messages.roles[s]:r}renderReview(e){const t=this.shadow.getElementById("review"),r=Object.entries(e?.speakers??{}).filter(([,d])=>d.role!==w.UNATTRIBUTED).map(([d])=>d);if(t.hidden=!e||r.length===0,!e||r.length===0)return;const s=d=>["approved","covered"].includes(e.proofreading?.[d]?.status??""),i=r.filter(d=>!s(d)),n=document.createElement("span");n.textContent=i.length===0?this.messages.proofreadAll:this.messages.proofreadPending.replace("{names}",i.map(d=>this.speakerLabel(e,d)).join(", ")),t.toggleAttribute("data-done",i.length===0);const a=document.createElement("span");a.className="review-boxes";for(const d of r){const h=document.createElement("label"),o=document.createElement("input");o.type="checkbox",o.checked=s(d),o.disabled=this.hasAttribute("readonly"),o.addEventListener("change",()=>void this.editTranscript(c=>{c.proofreading??={},o.checked?c.proofreading[d]={status:"approved",date:new Date().toISOString().slice(0,10)}:c.proofreading[d]={status:"pending"}})),h.append(o,this.messages.reviewedBy.replace("{name}",this.speakerLabel(e,d))),a.append(h)}t.replaceChildren(n,a)}momentsOf(e,t){const r=e.speakers?.[t]?.of??w.sightingsOf(e)[0];return this.options.find(s=>s.id===r)?.moments??this.options.flatMap(s=>s.moments??[])}decorateExchanges(e){if(!e)return;const t=this.messages,r=this.hasAttribute("readonly");for(const s of this.shadow.querySelectorAll("#exchanges .turn[data-segment]")){const i=Number(s.dataset.segment),n=e.segments[i];if(!n)continue;if(n.start!==void 0){const o=document.createElement("button");o.type="button",o.className="turn-time",o.textContent=w.clock(n.start),o.addEventListener("click",()=>this.player?.seek(n.start)),s.prepend(o)}const a=n.redacted?[n.redacted]:f.partsOf(n).flatMap(o=>"redacted"in o?[o.redacted]:[]);s.querySelectorAll(".bar").forEach((o,c)=>{const l=a[c]?.words;o.textContent=l!==void 0?t.redactedWords.replace("{n}",String(l)):t.redacted,o.classList.add("redacted-label");const p=n.redacted?`${i}:all`:`${i}:${c}`;this.takenOut.has(p)&&(o.dataset.restorable=p)});const d=n.redacted?.sealed;d&&this.offerOpening(s,n,d);const h=this.momentsOf(e,n.speaker);s.querySelectorAll(".ref").forEach((o,c)=>{const l=n.refs?.[c];if(!l)return;const p=h.find(m=>Math.abs(m.at-l.at)<.05);if(p){const m=document.createElement("span");m.className="moment-letter",m.textContent=p.label.slice(0,2),o.replaceChildren(m,t.momentLabel.replace("{k}",p.label).replace("{text}",p.note??w.clock(l.at)))}if(r)return;const g=document.createElement("button");g.type="button",g.className="ref-unlink",g.textContent="×",g.title=t.unlinkMoment,g.setAttribute("aria-label",t.unlinkMoment),g.addEventListener("click",()=>void this.editTranscript(m=>{m.segments[i].refs?.splice(c,1),m.segments[i].refs?.length===0&&delete m.segments[i].refs})),o.after(g)}),r||s.append(this.turnTools(e,i,n,h))}}turnTools(e,t,r,s){const i=this.messages,n=document.createElement("div");n.className="turn-tools";const a=(o,c)=>{const l=document.createElement("button");return l.type="button",l.textContent=o,l.addEventListener("click",c),l};if(e.speakers?.[r.speaker]?.role==="witness"&&!r.redacted){const o=a(i.linkMoment,()=>{});n.append(o),new F(o,`moment-menu-${t}`,l=>void this.editTranscript(p=>{const g=p.segments[t].refs??[];g.some(m=>Math.abs(m.at-Number(l))<.05)||g.push({at:Number(l)}),p.segments[t].refs=g}),l=>`moment-${t}-${l}`).setKinds(s.length>0?s.map(l=>({value:String(l.at),label:i.momentLabel.replace("{k}",l.label).replace("{text}",l.note??w.clock(l.at))})):[{value:"",label:i.noMoments,disabledReason:i.noMoments}])}if(r.redacted||n.append(a(i.editTurn,()=>this.editTurn(t))),!r.redacted&&!this.hasAttribute("readonly")){const o=a(i.whoSpeaks,()=>{});n.append(o),new F(o,`speaker-menu-${t}`,l=>void b(async()=>{const{InterviewImport:p}=await import("./interviewImport-zzDGCbXd.js");return{InterviewImport:p}},__vite__mapDeps([8,7,6]),import.meta.url).then(({InterviewImport:p})=>this.editTranscript(g=>{p.attribute(g,t,l)})),l=>`speaker-${t}-${l}`).setKinds(Object.keys(e.speakers??{}).map(l=>({value:l,label:this.speakerLabel(e,l),...l===r.speaker?{disabledReason:this.speakerLabel(e,l)}:{}})))}const d=this.takenOut.has(`${t}:all`)||[...this.takenOut.keys()].some(o=>o.startsWith(`${t}:`));if(r.redacted||r.parts&&d){const o=a(i.restoreAll,()=>void this.restoreAll(t));o.disabled=!d,n.append(o)}else n.append(a(i.redactAll,()=>void this.editTranscript(o=>{this.forget(t),this.takenOut.set(`${t}:all`,f.redactWhole(o.segments[t],this.redactReason))}).then(()=>{const o=this.shadow.querySelector(`#exchanges .turn[data-segment="${t}"] .bar.redacted-label`);o&&this.openBar(o)})));const h=a("",()=>void this.editTranscript(o=>{o.segments.splice(t,1),this.shiftTakenOut(t)}));return h.className="icon-btn",h.innerHTML=x.TRASH,h.title=i.deleteTurn,h.setAttribute("aria-label",i.deleteTurn),n.append(h),n}selectionMade(){const e=this.messages;if(!e||this.hasAttribute("readonly"))return;const t=this.shadow.getSelection?.()??document.getSelection(),r=t&&t.rangeCount>0?t.getRangeAt(0):void 0,s=this.shadow.getElementById("exchanges");if(!r||r.collapsed||!s.contains(r.startContainer)||!s.contains(r.endContainer))return;const i=l=>l instanceof Element?l:l.parentElement,n=i(r.startContainer)?.closest(".said");if(!n&&!i(r.endContainer)?.closest(".said"))return;const a=n&&i(r.endContainer)?.closest(".said")===n&&!i(r.startContainer)?.closest(".bar")&&!i(r.endContainer)?.closest(".bar"),d=r.getBoundingClientRect();if(!a){this.openRedactPop({kind:"selection",index:-1,from:0,to:0},d,e.selectionOnePassage);return}const h=Number(n.closest(".turn").dataset.segment),o=u.offsetIn(n,r.startContainer,r.startOffset),c=u.offsetIn(n,r.endContainer,r.endOffset);this.openRedactPop({kind:"selection",index:h,from:Math.min(o,c),to:Math.max(o,c)},d),u.markPending(r)}static PENDING="rr0-redact-pending";static markPending(e){const t=globalThis.CSS?.highlights,r=globalThis.Highlight;!t||!r||(e?t.set(u.PENDING,new r(e.cloneRange())):t.delete(u.PENDING))}openBar(e){if(this.hasAttribute("readonly"))return;const t=e.closest(".turn");if(!t)return;const r=Number(t.dataset.segment),s=[...t.querySelectorAll(".bar")].indexOf(e),i=this.drawn?.segments[r];if(!i)return;const n=i.redacted?"all":s,a=`${r}:${n}`;this.openRedactPop({kind:"bar",index:r,nth:n,restorable:this.takenOut.has(a)?a:void 0},e.getBoundingClientRect())}openRedactPop(e,t,r){const s=this.shadow.getElementById("redact-pop"),i=this.field("redact-reason");u.markPending(),this.redactTarget=e;const n=this.shadow.getElementById("redact-take"),a=this.shadow.getElementById("redact-restore");n.hidden=e.kind!=="selection",n.disabled=!!r,a.hidden=e.kind!=="bar"||!e.restorable,i.disabled=!!r,i.value=e.kind==="bar"?this.said.read(this.redactionAt(this.drawn,e.index,e.nth)?.reason)??"":this.lastReason??"";const d=this.shadow.getElementById("redact-note");d.textContent=r??"",d.classList.toggle("error",!!r),s.hidden=!1,typeof s.showPopover=="function"&&s.isConnected&&(s.setAttribute("popover","manual"),s.matches(":popover-open")||s.showPopover());const h=s.offsetWidth||320,o=s.offsetHeight||120,c=t.bottom+6+o<=window.innerHeight;s.style.top=`${Math.max(8,c?t.bottom+6:t.top-6-o)}px`,s.style.left=`${Math.max(8,Math.min(t.left,window.innerWidth-h-8))}px`,r||i.focus({preventScroll:!0})}closeRedactPop(){const e=this.shadow.getElementById("redact-pop");this.redactTarget=void 0,u.markPending(),typeof e.hidePopover=="function"&&e.matches?.(":popover-open")&&e.hidePopover(),e.hidden=!0}redactionAt(e,t,r){const s=e?.segments[t];if(s)return r==="all"?s.redacted:f.partsOf(s).flatMap(i=>"redacted"in i?[i.redacted]:[])[r]}async changeReason(){const e=this.redactTarget;if(e?.kind!=="bar")return;const t=this.reasonOf(this.field("redact-reason").value),r=this.redactionAt(this.drawn,e.index,e.nth);!r||JSON.stringify(r.reason)===JSON.stringify(t)||await this.editTranscript(s=>{if(e.nth!=="all"){const n=this.redactionAt(s,e.index,e.nth);n&&(n.reason=t);return}const i=JSON.stringify(s.segments[e.index].redacted?.reason);for(let n=e.index;n<s.segments.length;n++){const a=s.segments[n].redacted;if(!a||n>e.index&&JSON.stringify(a.reason)!==i)break;a.reason=t}})}async redactSelection(){const e=this.messages,t=this.redactTarget;if(t?.kind!=="selection"||t.index<0)return;this.lastReason=this.field("redact-reason").value.trim()||void 0;const r=this.redactReason;let s=!1;if(await this.editTranscript(i=>{const n=f.redact(i.segments[t.index],t.from,t.to,r);n&&(s=!0,this.shiftParts(t.index,n.nth),this.takenOut.set(`${t.index}:${n.nth}`,n.text))}),!s){const i=this.shadow.getElementById("redact-note");i.textContent=e.selectionOnePassage,i.classList.add("error");return}this.closeRedactPop(),(this.shadow.getSelection?.()??document.getSelection())?.removeAllRanges()}static offsetIn(e,t,r){let s=0;const i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:n=>n.parentElement?.closest(".bar")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT});for(let n=i.nextNode();n;n=i.nextNode()){if(n===t)return s+r;if(t.contains(n)&&t!==n){const d=[...t.childNodes].slice(0,r);return s+d.reduce((h,o)=>h+(o instanceof Element&&o.closest(".bar")?0:(o.textContent??"").length),0)}s+=(n.textContent??"").length}return s}async restore(e){const t=this.takenOut.get(e);if(t===void 0)return;const[r,s]=e.split(":"),i=Number(r);await this.editTranscript(n=>{s==="all"?f.restoreWhole(n.segments[i],t):(f.restorePart(n.segments[i],Number(s),t),this.shiftParts(i,Number(s),-1)),this.takenOut.delete(e)})}async restoreAll(e){if(this.takenOut.has(`${e}:all`)){await this.restore(`${e}:all`);return}const t=[...this.takenOut.keys()].filter(r=>r.startsWith(`${e}:`)).map(r=>Number(r.split(":")[1])).sort((r,s)=>s-r);for(const r of t)await this.restore(`${e}:${r}`)}editTurn(e){const r=this.drawn?.segments[e],s=this.shadow.querySelector(`#exchanges .turn[data-segment="${e}"] .said`);if(!r||!s)return;const i=this.messages,n=document.createElement("div");n.className="turn-edit";const a=document.createElement("textarea");a.value=f.raw(r,l=>this.takenOut.get(`${e}:${l}`));const d=document.createElement("span");d.className="hint",d.textContent=i.turnEditHint;const h=document.createElement("div");h.className="buttons";const o=document.createElement("button");o.type="button",o.className="pill-btn primary",o.textContent=i.saveTurn,o.addEventListener("click",()=>void this.editTranscript(l=>{const p=f.fromRaw(l.segments[e],a.value,this.redactReason);this.forget(e);for(const[g,m]of p)this.takenOut.set(`${e}:${g}`,m)}));const c=document.createElement("button");c.type="button",c.className="pill-btn",c.textContent=i.cancelTurn,c.addEventListener("click",()=>this.drawExchanges(this.drawn)),h.append(o,c),n.append(a,d,h),s.replaceWith(n),a.focus()}forget(e){for(const t of[...this.takenOut.keys()])t.startsWith(`${e}:`)&&this.takenOut.delete(t)}shiftParts(e,t,r=1){const s=[...this.takenOut].filter(([i])=>i.startsWith(`${e}:`)&&i!==`${e}:all`&&Number(i.split(":")[1])>=t+(r<0?1:0));for(const[i]of s)this.takenOut.delete(i);for(const[i,n]of s)this.takenOut.set(`${e}:${Number(i.split(":")[1])+r}`,n)}shiftTakenOut(e){const t=[...this.takenOut];this.takenOut.clear();for(const[r,s]of t){const[i,n]=r.split(":"),a=Number(i);a<e?this.takenOut.set(r,s):a>e&&this.takenOut.set(`${a-1}:${n}`,s)}}markCurrentTurn(e){const t=this.drawn?.segments??[];let r=-1;t.forEach((n,a)=>{n.start!==void 0&&n.start<=e&&(r=a)});for(const n of this.shadow.querySelectorAll("#exchanges .turn.current"))n.classList.remove("current");const s=this.shadow.querySelector(`#exchanges .turn[data-segment="${r}"]`);if(!s)return;s.classList.add("current");const i=s.closest(".rr0-interview-turns");i&&(s.offsetTop<i.scrollTop||s.offsetTop>i.scrollTop+i.clientHeight-s.offsetHeight)&&i.scrollTo({top:s.offsetTop-i.clientHeight/3,behavior:"smooth"})}async revealSegment(e){this.openGroup("exchanges"),await this.showExchanges(),this.shadow.getElementById("exchanges").revealSegment(e)}transcribeOutcome;renderTranscribe(){this.shadow.getElementById("transcribe").hidden=this.hasAttribute("readonly")||!this.transcribing&&!this.player?.recordingUrl();const e=this.messages;if(!e)return;const t=this.shadow.getElementById("transcribe-source");[...t.options].map(o=>o.value).join()!==T.map(o=>o.id).join()&&t.replaceChildren(...T.map(o=>{const c=new Option(o.name,o.id);return c.title=o.credit,c}));const r=O(T,u.transcriptionSourceId);t.value=r.id;const s=this.shadow.getElementById("transcribe-credit");s.href=r.creditUrl,s.textContent=r.credit,this.shadow.getElementById("transcribe-key-row").hidden=!r.keyUrl,this.shadow.getElementById("transcribe-key-get").href=r.keyUrl??"";const i=this.field("transcribe-key");if(i!==this.shadow.activeElement&&(i.value=A.of(r.id)??""),this.transcribing)return;const n=this.player?.recordingUrl();this.renderTranscribeStart();const a=this.shadow.getElementById("transcribe-note");if(this.transcribeOutcome){y.show(a,this.transcribeOutcome.text,this.transcribeOutcome.kind);return}if(!n){y.show(a,e.transcribeNoRecording);return}const d=r.create(),h=[d.sendsAudio?e.transcribeSends.replace("{name}",r.name):e.transcribeLocal.replace("{mb}",String(Math.round((d.downloadBytes??0)/1e6)))];(this.drawn?.segments?.length??0)>0&&h.push(e.transcribeReplaces),y.show(a,h.join(" "),d.sendsAudio?"warning":"info")}renderTranscribeStart(){if(this.transcribing||!this.messages)return;const e=O(T,u.transcriptionSourceId),t=this.shadow.getElementById("transcribe-start");t.disabled=!!e.keyUrl&&!A.of(e.id),t.title=t.disabled?this.messages.transcribeErrors.noKey:""}showTranscribing(e){this.shadow.getElementById("transcribe-start").disabled=e,this.shadow.getElementById("transcribe-stop").hidden=!e,this.shadow.getElementById("transcribe-source").disabled=e,this.field("transcribe-key").disabled=e,this.shadow.getElementById("transcribe-progress").hidden=!e}showProgress(e){const t=this.messages,r=this.shadow.getElementById("transcribe-note"),s=this.shadow.getElementById("transcribe-progress"),i=n=>String(Math.round(n/1e6));if(e==="reading")s.removeAttribute("value"),y.show(r,t.transcribeReading);else if(e.stage==="loading")e.total?(s.max=e.total,s.value=e.loaded,y.show(r,t.transcribeLoading.replace("{loaded}",i(e.loaded)).replace("{total}",i(e.total)))):(s.removeAttribute("value"),y.show(r,t.transcribeLoadingSoFar.replace("{loaded}",i(e.loaded))));else if(e.stage==="sending"||e.stage==="waiting"){s.removeAttribute("value");const n=O(T,u.transcriptionSourceId).name;y.show(r,(e.stage==="sending"?t.transcribeSending:t.transcribeWaiting).replace("{name}",n))}else s.max=e.total,s.value=e.done,y.show(r,t.transcribeProgress.replace("{done}",w.clock(Math.round(e.done))).replace("{total}",w.clock(Math.round(e.total))))}async transcribe(){const e=this.messages,t=this.current,r=this.player?.recordingUrl();if(!e||!t||this.transcribing||this.hasAttribute("readonly"))return;if(!r){this.player?.showWindow();return}const s=O(T,u.transcriptionSourceId),i=s.create(),n=this.transcribing=new AbortController;this.transcribeOutcome=void 0,this.showTranscribing(!0),this.showProgress("reading");try{const[{TranscriptionAudio:a},{TranscriptionError:d},{InterviewImport:h}]=await Promise.all([b(()=>import("./TranscriptionAudio-C_xvRUv2.js"),[],import.meta.url),b(()=>import("./TranscriptionError-D_TCbYbt.js"),[],import.meta.url),b(()=>import("./interviewImport-zzDGCbXd.js"),__vite__mapDeps([8,7,6]),import.meta.url)]),o=await fetch(r,{signal:n.signal});if(!o.ok)throw new d("failed",`HTTP ${o.status}`);if(Number(o.headers.get("content-length")??0)>a.MAX_BYTES)throw new d("tooLarge");const c=await o.arrayBuffer();if(c.byteLength>a.MAX_BYTES)throw new d("tooLarge");const l=await a.decode(c).catch(()=>{throw new d("failed",e.loadFailed)}),p=this.drawn?.language??this.language,g=await i.transcribe({samples:l,language:p,signal:n.signal,progress:k=>this.showProgress(k)}),m=[t.interviewOf].flat().filter(k=>typeof k=="string"),v=h.transcribed(g,{by:(t.by??[]).flatMap(k=>"people"in k?[k.people]:[]),witnesses:this.options.filter(k=>m.length===0||m.includes(k.id)).map(({id:k,label:W})=>({id:k,label:W}))});if(!v)throw new d("failed",e.exchangesEmpty);if(n.signal.aborted||this.current!==t)throw new DOMException("Aborted","AbortError");const{anonymization:ee,...H}=await this.transcriptJson(t)??{};await this.take({...H,...v,language:p,transcription:{method:"automatic",engine:i.engine,note:`Transcribed in UFO@home by ${i.engine}: whose each voice is was not known, to be attributed, then proofread.`}}),this.transcribeOutcome={text:e.transcribeDone.replace("{engine}",s.name),kind:"info"}}catch(a){const d=a;n.signal.aborted||d?.name==="AbortError"?this.transcribeOutcome={text:e.transcribeStopped,kind:"info"}:d?.name==="TranscriptionError"&&d.code?this.transcribeOutcome={text:e.transcribeErrors[d.code].replace("{detail}",d.detail??""),kind:"error"}:this.transcribeOutcome={text:e.transcribeErrors.failed.replace("{detail}",String(d?.message??a)),kind:"error"}}finally{this.transcribing=void 0,this.showTranscribing(!1),this.renderTranscribe()}}note(e,t="info"){y.show(this.shadow.getElementById("file-note"),e,t)}transcriptUrl(e){return e.url?new URL(e.url,this.base??location.href).href:void 0}static pretty(e){return JSON.stringify(e,null,2)+`
|
|
277
|
-
`}static SHARED=["title","time","medium","by","interviewOf","summary"];static ORDER=["version","id","language","title","time","medium","by","interviewOf","summary","speakers","transcription","proofreading","anonymization","recordings","segments"];static ordered(e){const t={};for(const r of u.ORDER)r in e&&(t[r]=e[r]);for(const r of Object.keys(e))r in t||(t[r]=e[r]);return t}static witnessesOf(e){return[e].flat().filter(t=>typeof t=="string")}static withEventFields(e,t){const r={...e};for(const i of u.SHARED)t[i]===void 0?delete r[i]:r[i]=structuredClone(t[i]);const s=r.speakers;if(typeof s=="object"&&s!==null){const i={...s},n=(a,d,h)=>{h.forEach((o,c)=>{const l=c===0?a:`${a}${c+1}`;i[l]?i[l]={...i[l],[d]:o}:c>0&&(i[l]={role:a,[d]:o})})};n("interviewer","by",t.by??[]),n("witness","of",u.witnessesOf(t.interviewOf)),r.speakers=i}return u.ordered(r)}applyFileToEvent(e,t){const r=this.current;if(!r)return!1;const s=JSON.stringify(u.SHARED.map(a=>r[a])),i=a=>typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a),n={title:i,summary:i,time:a=>typeof a=="string",medium:a=>typeof a=="string",by:a=>Array.isArray(a),interviewOf:a=>typeof a=="string"||Array.isArray(a)};for(const a of u.SHARED){const d=e[a];d!==void 0&&n[a](d)?r[a]=structuredClone(d):t&&delete r[a]}return JSON.stringify(u.SHARED.map(a=>r[a]))!==s}syncFileFromEvent(){const e=this.current,t=this.fileEditor?.text??this.text;if(!e||t===void 0)return;let r;try{r=JSON.parse(t)}catch{return}if(typeof r!="object"||r===null||Array.isArray(r))return;const s=u.pretty(u.withEventFields(r,e));s!==t&&(this.text=s,this.fileEditor?.replaceText(s,!1),this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:e,text:s}})))}template(e){return u.pretty(u.withEventFields({version:1,language:this.language,speakers:{interviewer:{role:"interviewer"},witness:{role:"witness"}},segments:[]},e))}loadFileEditor(e){return this.fileEditorLoading??=(async()=>{try{const[{SightingFileEditor:t},{default:r},s]=await Promise.all([b(()=>import("./SightingFileEditor-Du3A9uZm.js"),__vite__mapDeps([9,10,11]),import.meta.url),b(()=>import("./interviewSchema-DRWvRSL2.js"),[],import.meta.url),Y(this.language)]);return this.fileEditor=new t(this.shadow.getElementById("file-editor"),e,i=>this.onEdited(i),this.messages.editorLabel,{baseline:e,phrases:s.fileSearchPhrases,schema:r}),this.fileEditor}catch(t){throw this.fileEditorLoading=void 0,t}})(),this.fileEditorLoading}async showTranscript(){const e=this.current;if(!e||this.shownFor===e)return;this.note(this.messages.loading);let t=this.text;if(t===void 0){const r=this.transcriptUrl(e);if(r!==void 0)try{const s=await I.json(r);this.current===e&&typeof s=="object"&&s!==null&&!Array.isArray(s)?(this.applyFileToEvent(s,!1)&&this.fileChangedEvent(),t=u.pretty(u.withEventFields(s,e))):t=u.pretty(s)}catch{this.note(this.messages.loadFailed,"error")}t??=this.template(e)}if(this.current===e)try{const r=await this.loadFileEditor(t);if(this.current!==e)return;r.replaceText(t,!1),this.shownFor=e,this.text!==void 0||this.transcriptUrl(e)===void 0?this.note(void 0):this.shadow.getElementById("file-note").textContent===this.messages.loading&&this.note(void 0)}catch{this.note(this.messages.loadFailed,"error")}}onEdited(e){this.text=e;let t,r=!0;try{t=JSON.parse(e)}catch{r=!1}this.note(r?void 0:this.messages.invalid,"error");const s=this.current;if(r&&s&&typeof t=="object"&&t!==null&&!Array.isArray(t)&&this.applyFileToEvent(t,!0)&&this.fileChangedEvent(),s&&!s.url&&e.trim()!==""){const i=s.id??"1";s.url=`${i.startsWith("interview")?i:`interview-${i}`}.json`,this.field("url").value=s.url,this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"url",event:s}}))}this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"transcript",event:s,text:e}})),this.exchangesShown=this.showExchanges()}fileChangedEvent(){this.render(),this.dispatchEvent(new CustomEvent(S,{bubbles:!0,composed:!0,detail:{field:"file",event:this.current}}))}async take(e){if(typeof e!="object"||e===null||!Array.isArray(e.segments)){this.note(this.messages.notATranscript,"error");return}const t=this.current;t&&this.applyFileToEvent(e,!1)&&this.fileChangedEvent();const r=u.pretty(t?u.withEventFields(e,t):e);await this.loadFileEditor(r).then(s=>s.replaceText(r,!1),()=>{}),this.shownFor=this.current,this.note(void 0),this.onEdited(r)}async importFromFile(e){try{const t=await e.text();let r;try{r=JSON.parse(t)}catch{r=void 0}const s=this.importHints();if(this.isQuestionnaire(r)){await this.takeQuestionnaire(r??t,e.name);return}if(typeof r!="object"||r===null){const{InterviewImport:i}=await b(async()=>{const{InterviewImport:a}=await import("./interviewImport-zzDGCbXd.js");return{InterviewImport:a}},__vite__mapDeps([8,7,6]),import.meta.url),n=i.parse(t,s);r=n&&{...n,transcription:{note:`Imported from ${e.name}: who speaks and when are as the file gave them, to be checked.`}}}r===void 0?this.note(this.messages.notATranscript,"error"):await this.take(r)}catch{this.note(this.messages.loadFailed,"error")}}importHints(){const e=this.current,t=[e?.interviewOf].flat().filter(r=>typeof r=="string");return{by:(e?.by??[]).map(r=>u.byText([r])).filter(r=>r!==""),witnesses:this.options.filter(r=>t.length===0||t.includes(r.id))}}isQuestionnaire(e){const t=typeof e=="object"&&e!==null&&Array.isArray(e.segments);return this.current?.medium==="questionnaire"&&!t}async takeQuestionnaire(e,t){const[{QuestionnaireImport:r},{QuestionnaireTemplates:s}]=await Promise.all([b(()=>import("./QuestionnaireImport-BYj5QoJS.js"),__vite__mapDeps([12,7,6]),import.meta.url),b(()=>import("./rr0-sighting-editor.mjs").then(d=>d.dd),[],import.meta.url)]),i=this.current?await this.transcriptJson(this.current):void 0,n=await s.load(i?.questionnaire?.id??s.DEFAULT),a=r.parse(e,this.importHints(),n);if(!a){this.note(this.messages.notAQuestionnaire,"error");return}await this.take({...a,transcription:{method:"manual",note:`Imported from ${t}: one question and its answer per field, as the witness filled it in.`}})}async importFromUrl(e){try{const t=new URL(e,this.base??location.href).href,r=await I.json(t);this.isQuestionnaire(r)?await this.takeQuestionnaire(r,t.split("/").pop()??t):await this.take(r)}catch{this.note(this.messages.loadFailed,"error")}}save(){const e=this.fileEditor?.text??this.text;if(e===void 0)return;const t=(this.current?.url??"").split("/").pop()||`${this.current?.id??"interview"}.json`,r=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=r,s.download=t,s.click(),URL.revokeObjectURL(r)}}function ne(){X(),V(),customElements.get(q)||customElements.define(q,u)}export{S as INTERVIEW_CHANGE_EVENT,q as INTERVIEW_EDITOR_ELEMENT_NAME,de as INTERVIEW_SEEK_EVENT,u as InterviewEditorElement,ne as register};
|