@rr0/ufoathome 0.198.0 → 0.199.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-scene/rr0-scene.mjs +4 -4
- package/dist-embed-sighting/CaseMessages_en-BC0lku35.js +1 -0
- package/dist-embed-sighting/CaseMessages_es-Cbktn5vj.js +1 -0
- package/dist-embed-sighting/CaseMessages_fr-D_6J6ONO.js +1 -0
- package/dist-embed-sighting/CaseMessages_it-CYyww4oG.js +1 -0
- package/dist-embed-sighting/{CaseReportExport-FwJF5IpU.js → CaseReportExport-CAuwP-Ec.js} +1 -1
- package/dist-embed-sighting/rr0-sighting.mjs +70 -56
- package/dist-embed-sighting-editor/{CaseEditorMessages_en-CpJLWbJD.js → CaseEditorMessages_en-pog3M_U6.js} +1 -1
- package/{dist-embed-ufoathome/CaseEditorMessages_es-C5YOqVpF.js → dist-embed-sighting-editor/CaseEditorMessages_es-Dz1N0VpM.js} +1 -1
- package/{dist-embed-ufoathome/CaseEditorMessages_fr-rMlMgrqV.js → dist-embed-sighting-editor/CaseEditorMessages_fr-BOKVeIXM.js} +1 -1
- package/{dist-embed-ufoathome/CaseEditorMessages_it-Bkiv2Hun.js → dist-embed-sighting-editor/CaseEditorMessages_it-BKAkbKq-.js} +1 -1
- package/dist-embed-sighting-editor/CaseElement--JmpOsUW.js +131 -0
- package/dist-embed-sighting-editor/CaseMessages_en-BC0lku35.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_es-Cbktn5vj.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_fr-D_6J6ONO.js +1 -0
- package/dist-embed-sighting-editor/CaseMessages_it-CYyww4oG.js +1 -0
- package/dist-embed-sighting-editor/{CaseReportExport-KT66dpR3.js → CaseReportExport-nFM_7lq4.js} +1 -1
- package/dist-embed-sighting-editor/{SightingElement-BeSLIyc4.js → SightingElement-DsR4mBCh.js} +3 -3
- package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +116 -104
- package/dist-embed-ufoathome/{AdsbLolArchiveProvider-JkDVK-Wz.js → AdsbLolArchiveProvider-B9MGq-iQ.js} +1 -1
- package/dist-embed-ufoathome/{BallesterGuaspAssessor-DzziZOkS.js → BallesterGuaspAssessor-BehuINgj.js} +1 -1
- package/dist-embed-ufoathome/{BeamEditor-m4MRFy0I.js → BeamEditor-CFYAfywp.js} +1 -1
- package/dist-embed-ufoathome/{BeamSystem-BFNN3Xww.js → BeamSystem-Bt5Dnpzy.js} +1 -1
- package/dist-embed-ufoathome/{BodyEditor-DZqWh3EO.js → BodyEditor-B96fap0d.js} +1 -1
- package/dist-embed-ufoathome/{CaseEditorElement-BrSqilvj.js → CaseEditorElement-D-RKShTH.js} +88 -77
- package/dist-embed-ufoathome/{CaseEditorMessages_en-CpJLWbJD.js → CaseEditorMessages_en-pog3M_U6.js} +1 -1
- package/{dist-embed-sighting-editor/CaseEditorMessages_es-C5YOqVpF.js → dist-embed-ufoathome/CaseEditorMessages_es-Dz1N0VpM.js} +1 -1
- package/{dist-embed-sighting-editor/CaseEditorMessages_fr-rMlMgrqV.js → dist-embed-ufoathome/CaseEditorMessages_fr-BOKVeIXM.js} +1 -1
- package/{dist-embed-sighting-editor/CaseEditorMessages_it-Bkiv2Hun.js → dist-embed-ufoathome/CaseEditorMessages_it-BKAkbKq-.js} +1 -1
- package/dist-embed-ufoathome/CaseElement-BFDRYL5v.js +131 -0
- package/dist-embed-ufoathome/CaseMessages_en-BC0lku35.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_es-Cbktn5vj.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_fr-D_6J6ONO.js +1 -0
- package/dist-embed-ufoathome/CaseMessages_it-CYyww4oG.js +1 -0
- package/dist-embed-ufoathome/{CaseReportExport-CwBAgZme.js → CaseReportExport-VrulN0VG.js} +3 -3
- package/dist-embed-ufoathome/{ColumnResize-C49_XHWG.js → ColumnResize-DD0wwlp2.js} +7 -6
- package/dist-embed-ufoathome/{ContrailSystem-CVT54pMd.js → ContrailSystem-BKeTHlcZ.js} +1 -1
- package/dist-embed-ufoathome/{ControlPasses-CmDGLFA2.js → ControlPasses-D3vc-NmG.js} +1 -1
- package/dist-embed-ufoathome/{CoverageAssessor-BKEW2-dP.js → CoverageAssessor-Be38W7Im.js} +1 -1
- package/dist-embed-ufoathome/{Flightradar24Provider-CUPvKj60.js → Flightradar24Provider-DdPjGVJg.js} +1 -1
- package/dist-embed-ufoathome/{GLTFLoader-JllrlS20.js → GLTFLoader-D1_vI_Fe.js} +1 -1
- package/dist-embed-ufoathome/{GeoJsonExport-B8LRb6M2.js → GeoJsonExport-B2qogWLj.js} +1 -1
- package/dist-embed-ufoathome/{GeographicFigures-E90eVA3k.js → GeographicFigures-Ds8kfyn7.js} +1 -1
- package/dist-embed-ufoathome/{HeadlightSystem-BCkhhE3j.js → HeadlightSystem-BdhHphIq.js} +1 -1
- package/dist-embed-ufoathome/{HynekAssessor-kWpP2lwd.js → HynekAssessor-MqnQfg3F.js} +1 -1
- package/dist-embed-ufoathome/{InterviewEditorElement-DDMWQp-N.js → InterviewEditorElement-DjQuGytO.js} +1 -1
- package/dist-embed-ufoathome/{InterviewElement-DYGm6T0e.js → InterviewElement-BrlawcDm.js} +1 -1
- package/dist-embed-ufoathome/{KmlExport-ei6QS4y5.js → KmlExport-AzofE76s.js} +1 -1
- package/dist-embed-ufoathome/{LaserBeam-BA_48EH8.js → LaserBeam-Ced8VujI.js} +1 -1
- package/dist-embed-ufoathome/{LaunchEditor-JorB3eU0.js → LaunchEditor-D-5OJi90.js} +1 -1
- package/dist-embed-ufoathome/{LaunchPlume-Suh-rDzJ.js → LaunchPlume-DdeLDyDg.js} +1 -1
- package/dist-embed-ufoathome/{LaunchSimulation-Ckxc6aZE.js → LaunchSimulation-BeCHjgE5.js} +1 -1
- package/dist-embed-ufoathome/{ModelSource-e1H5fakM.js → ModelSource-LY5T91ay.js} +1 -1
- package/dist-embed-ufoathome/{ModelThumbnails-dwtruG9P.js → ModelThumbnails-C25E4WMl.js} +1 -1
- package/dist-embed-ufoathome/{ModelViewer-Bdq3NE7p.js → ModelViewer-D6JaOQS7.js} +1 -1
- package/dist-embed-ufoathome/{ModuleConformance-CN7lupZ1.js → ModuleConformance-DGjaEwAM.js} +2 -2
- package/dist-embed-ufoathome/{ModuleSession-BshbxVX3.js → ModuleSession-pXE1aOJF.js} +3 -3
- package/dist-embed-ufoathome/{ModuleThree-DQ4bHp-X.js → ModuleThree-xQDeVLs0.js} +1 -1
- package/dist-embed-ufoathome/{ModulesPanelElement-D61cIZwP.js → ModulesPanelElement-Bio6lzC6.js} +3 -3
- package/dist-embed-ufoathome/{NearestApproach-B3CqS1jH.js → NearestApproach-DAiByBN2.js} +1 -1
- package/dist-embed-ufoathome/{PictureRegistration-CZ492OOl.js → PictureRegistration-Dbr0O7NF.js} +1 -1
- package/dist-embed-ufoathome/{PoherAssessor-Dv1s4fcC.js → PoherAssessor-C7NN73NP.js} +1 -1
- package/dist-embed-ufoathome/{RailwaySystem-BSs9b1KD.js → RailwaySystem-D3u3j_tw.js} +1 -1
- package/dist-embed-ufoathome/{ReentryEditor-BWSBjO1R.js → ReentryEditor-s-AkSgbU.js} +1 -1
- package/dist-embed-ufoathome/{ReentrySimulation-4AUOI89f.js → ReentrySimulation-2UWwXU7K.js} +1 -1
- package/dist-embed-ufoathome/{ReferenceSystem-BaTjDk6q.js → ReferenceSystem-BhEFpIis.js} +1 -1
- package/dist-embed-ufoathome/{ShareDialogElement-D1HrbISX.js → ShareDialogElement-C9Uiwt0F.js} +11 -11
- package/dist-embed-ufoathome/{SightingElement-BjCYx1jB.js → SightingElement-DTADTDwh.js} +3 -3
- package/dist-embed-ufoathome/{TraceSystem-biwbeyV9.js → TraceSystem-BcWYbjQM.js} +1 -1
- package/dist-embed-ufoathome/{VideoButton-PZ_bcxZ1.js → VideoButton-CgfBskVu.js} +1 -1
- package/dist-embed-ufoathome/{WaterSystem-BYiCoSsh.js → WaterSystem-BsGtTimO.js} +1 -1
- package/dist-embed-ufoathome/rr0-ufoathome.mjs +3 -3
- package/dist-embed-ufoathome/{surroundingsSources-D7LUMOfo.js → surroundingsSources-B--F7TR5.js} +1 -1
- package/dist-embed-ufoathome/{trafficRuntime-CKruJehW.js → trafficRuntime-B97u9ZY_.js} +1 -1
- package/package.json +1 -1
- package/dist-embed-sighting/CaseMessages_en-G5J5w1_d.js +0 -1
- package/dist-embed-sighting/CaseMessages_es-D7Rp1_1K.js +0 -1
- package/dist-embed-sighting/CaseMessages_fr-B8eZ1NIJ.js +0 -1
- package/dist-embed-sighting/CaseMessages_it-Cu02nVVo.js +0 -1
- package/dist-embed-sighting-editor/CaseElement-BcqtqvK7.js +0 -118
- package/dist-embed-sighting-editor/CaseMessages_en-G5J5w1_d.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_es-D7Rp1_1K.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_fr-B8eZ1NIJ.js +0 -1
- package/dist-embed-sighting-editor/CaseMessages_it-Cu02nVVo.js +0 -1
- package/dist-embed-ufoathome/CaseElement-D5mH2-s-.js +0 -118
- package/dist-embed-ufoathome/CaseMessages_en-G5J5w1_d.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_es-D7Rp1_1K.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_fr-B8eZ1NIJ.js +0 -1
- package/dist-embed-ufoathome/CaseMessages_it-Cu02nVVo.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",kindObservations:"Observations",kindReadings:"Readings",kindInterviews:"Interviews",linkAnd:"and",byAuthor:"by",kindReading:"Reading",readingsCount:"{n} reading(s)",readingVerdict:{incompatible:"Contradicts what is established",unsettled:"Not settled",compatible:"Compatible"},findingOutcome:{holds:"Holds",fails:"Fails",untested:"Could not be tested"},findingAgainst:{established:"against what is established",supposed:"against a supposition"},untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",cloneEvent:"Copy this event: the copy is what you carry on with",freezeEvent:"Freeze this event, so that work resting on it stays true",unfreezeEvent:"Thaw this event, to edit it again",sealedChip:"Frozen",deleteFrozen:"Frozen: thaw it to delete it",frozenNote:"This event is frozen: nothing can be edited in it, so that an interview or a hypothesis resting on it is not invalidated. Copy it to carry on, or thaw it.",thawButton:"Thaw",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is read by {n} reading(s): delete them first.",titleField:"Title of the reading",authorField:"Author",investigatorField:"Investigator",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Reading of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",groupReadings:"Group the readings under their observation",resizeColumns:"Resize the history column (double-click: back to its width)",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",exportButton:"Save",readButton:"Read",readTitle:"Read what is edited, as a reader sees it",exportTitle:"Save the case",exportAlso:"Also save the observations",saveOptions:"Save options",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
|
|
1
|
+
const e={event:"Event",accountOf:"Observation of",passagesHeading:"Reported in",interviewOf:"Interview of",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Delete this interview from the case? Nothing is written until the case is saved.",untitledReading:"Reading {n}",eventsInTime:"Events · in the order of time",citedMoment:"Moment {k}, quoted in {title}: “{quote}”",backToInterview:"Back to the interview",openEvent:"Open",kindObservations:"Observations",kindReadings:"Readings",kindInterviews:"Interviews",linkAnd:"and",byAuthor:"by",kindReading:"Reading",readingsCount:"{n} reading(s)",readingVerdict:{incompatible:"Contradicts what is established",unsettled:"Not settled",compatible:"Compatible"},findingOutcome:{holds:"Holds",fails:"Fails",untested:"Could not be tested"},findingAgainst:{established:"against what is established",supposed:"against a supposition"},untitledObservation:"Observation {n}",deleteRecording:"Delete this recording from the case",cloneEvent:"Copy this event: the copy is what you carry on with",freezeEvent:"Freeze this event, so that work resting on it stays true",unfreezeEvent:"Thaw this event, to edit it again",sealedChip:"Frozen",deleteFrozen:"Frozen: thaw it to delete it",frozenNote:"This event is frozen: nothing can be edited in it, so that an interview or a hypothesis resting on it is not invalidated. Copy it to carry on, or thaw it.",thawButton:"Thaw",deleteReadingQuestion:"Delete this reading? Nothing is written until the case is saved.",deleteObservationQuestion:"Delete this observation from the case? Nothing is written until the case is saved.",deleteRefused:"This observation is read by {n} reading(s): delete them first.",titleField:"Title of the reading",authorField:"Author",investigatorField:"Investigator",addTitle:"Add an event",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Witness",mediumField:"Medium",interviewerField:"Interviewer",plainTitleField:"Title",sourceField:"Source",sourceBlank:"A blank recording",sourceFile:"An existing recording",observerField:"Witness",fileField:"File",loadFailed:"That recording could not be read.",isACase:"That is a case, not a recording.",ok:"OK",cancel:"Cancel",caseHeading:"Case",caseId:"ID",idDuplicated:"Two events of the case have the ID “{id}”: a reading that names it is ambiguous.",readingUnresolved:"A reading names “{id}”, which no event of the case has as its ID, nor any recording it lists.",caseTitle:"Title",caseTime:"When",eventsTab:"Events",fileTab:"File",importFile:"Load case file",inputFileFromFile:"from your disk",inputFileFromUrl:"from an address",inputFileModeHint:"Click to give it the other way: a file of yours, or an address",inputFileLoad:"Load",fileNotACase:"That file is not a case (it has no events).",formatVersionError:"This file states version {found} of its format; this UFO@home reads up to version {supported}. Open it with a newer UFO@home.",fileInvalid:"This text is not valid JSON yet, or not a case: the case keeps what it last understood.",fileLoading:"Loading the editor…",add:"Add",addHint:"Add an event",interpretationOf:"Reading of",colon:": ",quoted:"“{text}”",interpretationOfNone:"—",searchEvents:"Search the events",noEventFound:"No event matches",groupReadings:"Group the readings under their observation",resizeColumns:"Resize the history column (double-click: back to its width)",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",exportButton:"Save",readButton:"Read",readTitle:"Read what is edited, as a reader sees it",exportTitle:"Save the case",exportAlso:"Also save the observations",saveOptions:"Save options",addToCase:"Add to a case",unsavedChanges:"Changes not saved",discardQuestion:"Some changes are not saved yet. Load anyway and lose them?",discardTitle:"Unsaved changes",discardOk:"Load anyway",leaveQuestion:"Some changes are not saved yet. Leave anyway and lose them?",leaveOk:"Leave anyway"};export{e as caseEditorMessages_en};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={event:"Evento",accountOf:"Observación de",passagesHeading:"Relatado en",interviewOf:"Entrevista a",untitledInterview:"Entrevista {n}",deleteInterviewQuestion:"¿Eliminar esta entrevista del caso? Nada se escribe hasta guardar el caso.",untitledReading:"Lectura {n}",eventsInTime:"Eventos · en orden cronológico",citedMoment:"Momento {k}, citado en {title}: «{quote}»",backToInterview:"Volver a la entrevista",openEvent:"Abrir",kindObservations:"Observaciones",kindReadings:"Lecturas",kindInterviews:"Entrevistas",linkAnd:"y",byAuthor:"por",kindReading:"Lectura",readingsCount:"{n} lectura(s)",readingVerdict:{incompatible:"Contradice lo establecido",unsettled:"Sin resolver",compatible:"Compatible"},findingOutcome:{holds:"Se sostiene",fails:"Falla",untested:"No se pudo probar"},findingAgainst:{established:"contra un elemento establecido",supposed:"contra una suposición"},untitledObservation:"Observación {n}",deleteRecording:"Quitar esta grabación del caso",cloneEvent:"Clonar este evento: el clon es lo que continúas",freezeEvent:"Congelar este evento, para que lo que se apoya en él siga siendo cierto",unfreezeEvent:"Descongelar este evento, para volver a editarlo",sealedChip:"Congelado",deleteFrozen:"Congelado: descongélalo para quitarlo",frozenNote:"Este evento está congelado: nada se edita en él, para que una entrevista o una hipótesis que se apoye en él no quede invalidada. Clónalo para continuar, o descongélalo.",thawButton:"Descongelar",deleteReadingQuestion:"¿Eliminar esta lectura? Nada se escribe hasta guardar el caso.",deleteObservationQuestion:"¿Eliminar esta observación del caso? Nada se escribe hasta guardar el caso.",deleteRefused:"Esta observación es leída por {n} lectura(s): elimínelas primero.",titleField:"Título de la lectura",authorField:"Autor",investigatorField:"Investigador",addTitle:"Añadir un evento",kindField:"Tipo",kindObservation:"Observación",kindInterview:"Entrevista",witnessField:"Testigo",mediumField:"Medio",interviewerField:"Entrevistador",plainTitleField:"Título",sourceField:"Origen",sourceBlank:"Una grabación en blanco",sourceFile:"Un registro existente",observerField:"Testigo",fileField:"Archivo",loadFailed:"No se pudo leer esa grabación.",isACase:"Eso es un caso, no una grabación.",ok:"Aceptar",cancel:"Cancelar",caseHeading:"Caso",caseId:"Identificador",idDuplicated:"Dos eventos del caso tienen el identificador «{id}»: una lectura que lo designa es ambigua.",readingUnresolved:"Una lectura designa «{id}», que ningún evento del caso tiene como identificador, ni ninguna grabación que enumera.",caseTitle:"Título",caseTime:"Fecha",eventsTab:"Eventos",fileTab:"Archivo",importFile:"Cargar un archivo de caso",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",fileNotACase:"Ese archivo no es un caso (no tiene eventos).",formatVersionError:"Este archivo indica la versión {found} de su formato; este UFO@home lee hasta la versión {supported}. Ábralo con un UFO@home más reciente.",fileInvalid:"Este texto aún no es JSON válido, o no es un caso: el caso conserva lo último que entendió.",fileLoading:"Cargando el editor…",add:"Añadir",addHint:"Añadir un evento",interpretationOf:"Lectura de",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Agrupar las lecturas por observación",resizeColumns:"Cambiar el ancho de la columna del historial (doble clic: ancho por defecto)",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",exportButton:"Guardar",readButton:"Leer",readTitle:"Leer lo que se edita, tal como lo ve un lector",exportTitle:"Guardar el caso",exportAlso:"Guardar también las observaciones",saveOptions:"Opciones de guardado",addToCase:"Añadir a un caso",unsavedChanges:"Cambios sin guardar",discardQuestion:"Hay cambios que aún no se han guardado. ¿Cargar de todos modos y perderlos?",discardTitle:"Cambios sin guardar",discardOk:"Cargar de todos modos",leaveQuestion:"Hay cambios que aún no se han guardado. ¿Salir de todos modos y perderlos?",leaveOk:"Salir de todos modos"};export{e as caseEditorMessages_es};
|
|
1
|
+
const e={event:"Evento",accountOf:"Observación de",passagesHeading:"Relatado en",interviewOf:"Entrevista a",untitledInterview:"Entrevista {n}",deleteInterviewQuestion:"¿Eliminar esta entrevista del caso? Nada se escribe hasta guardar el caso.",untitledReading:"Lectura {n}",eventsInTime:"Eventos · en orden cronológico",citedMoment:"Momento {k}, citado en {title}: «{quote}»",backToInterview:"Volver a la entrevista",openEvent:"Abrir",kindObservations:"Observaciones",kindReadings:"Lecturas",kindInterviews:"Entrevistas",linkAnd:"y",byAuthor:"por",kindReading:"Lectura",readingsCount:"{n} lectura(s)",readingVerdict:{incompatible:"Contradice lo establecido",unsettled:"Sin resolver",compatible:"Compatible"},findingOutcome:{holds:"Se sostiene",fails:"Falla",untested:"No se pudo probar"},findingAgainst:{established:"contra un elemento establecido",supposed:"contra una suposición"},untitledObservation:"Observación {n}",deleteRecording:"Quitar esta grabación del caso",cloneEvent:"Clonar este evento: el clon es lo que continúas",freezeEvent:"Congelar este evento, para que lo que se apoya en él siga siendo cierto",unfreezeEvent:"Descongelar este evento, para volver a editarlo",sealedChip:"Congelado",deleteFrozen:"Congelado: descongélalo para quitarlo",frozenNote:"Este evento está congelado: nada se edita en él, para que una entrevista o una hipótesis que se apoye en él no quede invalidada. Clónalo para continuar, o descongélalo.",thawButton:"Descongelar",deleteReadingQuestion:"¿Eliminar esta lectura? Nada se escribe hasta guardar el caso.",deleteObservationQuestion:"¿Eliminar esta observación del caso? Nada se escribe hasta guardar el caso.",deleteRefused:"Esta observación es leída por {n} lectura(s): elimínelas primero.",titleField:"Título de la lectura",authorField:"Autor",investigatorField:"Investigador",addTitle:"Añadir un evento",kindField:"Tipo",kindObservation:"Observación",kindInterview:"Entrevista",witnessField:"Testigo",mediumField:"Medio",interviewerField:"Entrevistador",plainTitleField:"Título",sourceField:"Origen",sourceBlank:"Una grabación en blanco",sourceFile:"Un registro existente",observerField:"Testigo",fileField:"Archivo",loadFailed:"No se pudo leer esa grabación.",isACase:"Eso es un caso, no una grabación.",ok:"Aceptar",cancel:"Cancelar",caseHeading:"Caso",caseId:"Identificador",idDuplicated:"Dos eventos del caso tienen el identificador «{id}»: una lectura que lo designa es ambigua.",readingUnresolved:"Una lectura designa «{id}», que ningún evento del caso tiene como identificador, ni ninguna grabación que enumera.",caseTitle:"Título",caseTime:"Fecha",eventsTab:"Eventos",fileTab:"Archivo",importFile:"Cargar un archivo de caso",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",fileNotACase:"Ese archivo no es un caso (no tiene eventos).",formatVersionError:"Este archivo indica la versión {found} de su formato; este UFO@home lee hasta la versión {supported}. Ábralo con un UFO@home más reciente.",fileInvalid:"Este texto aún no es JSON válido, o no es un caso: el caso conserva lo último que entendió.",fileLoading:"Cargando el editor…",add:"Añadir",addHint:"Añadir un evento",interpretationOf:"Lectura de",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",searchEvents:"Buscar en los eventos",noEventFound:"Ningún evento coincide",groupReadings:"Agrupar las lecturas por observación",resizeColumns:"Cambiar el ancho de la columna del historial (doble clic: ancho por defecto)",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",exportButton:"Guardar",readButton:"Leer",readTitle:"Leer lo que se edita, tal como lo ve un lector",exportTitle:"Guardar el caso",exportAlso:"Guardar también las observaciones",saveOptions:"Opciones de guardado",addToCase:"Añadir a un caso",unsavedChanges:"Cambios sin guardar",discardQuestion:"Hay cambios que aún no se han guardado. ¿Cargar de todos modos y perderlos?",discardTitle:"Cambios sin guardar",discardOk:"Cargar de todos modos",leaveQuestion:"Hay cambios que aún no se han guardado. ¿Salir de todos modos y perderlos?",leaveOk:"Salir de todos modos"};export{e as caseEditorMessages_es};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={event:"Événement",accountOf:"Observation de",passagesHeading:"Relaté dans",interviewOf:"Interview de",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Supprimer cet entretien du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",untitledReading:"Lecture {n}",eventsInTime:"Événements · dans l'ordre du temps",citedMoment:"Moment {k}, cité dans {title} : « {quote} »",backToInterview:"Revenir à l'entretien",openEvent:"Ouvrir",kindObservations:"Observations",kindReadings:"Lectures",kindInterviews:"Interviews",linkAnd:"et",byAuthor:"par",kindReading:"Lecture",readingsCount:"{n} lecture(s)",readingVerdict:{incompatible:"Contredit ce qui est établi",unsettled:"Non tranchée",compatible:"Compatible"},findingOutcome:{holds:"Tient",fails:"Échoue",untested:"Non testable"},findingAgainst:{established:"contre un élément établi",supposed:"contre une supposition"},untitledObservation:"Observation {n}",deleteRecording:"Retirer cet enregistrement du dossier",cloneEvent:"Cloner cet événement : c'est le clone que vous continuez",freezeEvent:"Geler cet événement, pour que ce qui s'appuie dessus reste vrai",unfreezeEvent:"Dégeler cet événement, pour le modifier à nouveau",sealedChip:"Gelé",deleteFrozen:"Gelé : le dégeler pour le retirer",frozenNote:"Cet événement est gelé : rien ne s'y modifie, afin qu'une interview ou une hypothèse qui s'appuie dessus ne soit pas invalidée. Clonez-le pour continuer, ou dégelez-le.",thawButton:"Dégeler",deleteReadingQuestion:"Supprimer cette lecture ? Rien n'est écrit avant la sauvegarde du dossier.",deleteObservationQuestion:"Supprimer cette observation du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",deleteRefused:"Cette observation est lue par {n} lecture(s) : supprimez-les d'abord.",titleField:"Titre de la lecture",authorField:"Auteur",investigatorField:"Enquêteur",addTitle:"Ajouter un événement",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Témoin",mediumField:"Moyen",interviewerField:"Enquêteur",plainTitleField:"Titre",sourceField:"Source",sourceBlank:"Un enregistrement vierge",sourceFile:"Un enregistrement existant",observerField:"Témoin",fileField:"Fichier",loadFailed:"Cet enregistrement n'a pas pu être lu.",isACase:"C'est un dossier, pas un enregistrement.",ok:"OK",cancel:"Annuler",caseHeading:"Dossier",caseId:"Identifiant",idDuplicated:"Deux événements du dossier portent l'identifiant « {id} » : une lecture qui le désigne est ambiguë.",readingUnresolved:"Une lecture désigne « {id} », qu'aucun événement du dossier ne porte comme identifiant, ni aucun enregistrement qu'il liste.",caseTitle:"Titre",caseTime:"Date",eventsTab:"Événements",fileTab:"Fichier",importFile:"Charger un fichier de dossier",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",fileNotACase:"Ce fichier n'est pas un dossier (il n'a pas d'événements).",formatVersionError:"Ce fichier indique la version {found} de son format ; cet UFO@home lit jusqu'à la version {supported}. Ouvrez-le avec un UFO@home plus récent.",fileInvalid:"Ce texte n'est pas encore du JSON valide, ou pas un dossier : le dossier garde ce qu'il a compris en dernier.",fileLoading:"Chargement de l'éditeur…",add:"Ajouter",addHint:"Ajouter un événement",interpretationOf:"Lecture de",colon:" : ",quoted:"« {text} »",interpretationOfNone:"—",groupReadings:"Regrouper les lectures par observation",resizeColumns:"Redimensionner la colonne de l'historique (double-clic : largeur par défaut)",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",exportButton:"Sauver",readButton:"Lire",readTitle:"Lire ce qui est édité, tel qu'un lecteur le voit",exportTitle:"Sauver le dossier",exportAlso:"Sauver aussi les observations",saveOptions:"Options de sauvegarde",addToCase:"Ajouter à un dossier",unsavedChanges:"Modifications non sauvées",discardQuestion:"Des modifications ne sont pas encore sauvées. Charger quand même et les perdre ?",discardTitle:"Modifications non sauvées",discardOk:"Charger quand même",leaveQuestion:"Des modifications ne sont pas encore sauvées. Quitter quand même et les perdre ?",leaveOk:"Quitter quand même"};export{e as caseEditorMessages_fr};
|
|
1
|
+
const e={event:"Événement",accountOf:"Observation de",passagesHeading:"Relaté dans",interviewOf:"Interview de",untitledInterview:"Interview {n}",deleteInterviewQuestion:"Supprimer cet entretien du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",untitledReading:"Lecture {n}",eventsInTime:"Événements · dans l'ordre du temps",citedMoment:"Moment {k}, cité dans {title} : « {quote} »",backToInterview:"Revenir à l'entretien",openEvent:"Ouvrir",kindObservations:"Observations",kindReadings:"Lectures",kindInterviews:"Interviews",linkAnd:"et",byAuthor:"par",kindReading:"Lecture",readingsCount:"{n} lecture(s)",readingVerdict:{incompatible:"Contredit ce qui est établi",unsettled:"Non tranchée",compatible:"Compatible"},findingOutcome:{holds:"Tient",fails:"Échoue",untested:"Non testable"},findingAgainst:{established:"contre un élément établi",supposed:"contre une supposition"},untitledObservation:"Observation {n}",deleteRecording:"Retirer cet enregistrement du dossier",cloneEvent:"Cloner cet événement : c'est le clone que vous continuez",freezeEvent:"Geler cet événement, pour que ce qui s'appuie dessus reste vrai",unfreezeEvent:"Dégeler cet événement, pour le modifier à nouveau",sealedChip:"Gelé",deleteFrozen:"Gelé : le dégeler pour le retirer",frozenNote:"Cet événement est gelé : rien ne s'y modifie, afin qu'une interview ou une hypothèse qui s'appuie dessus ne soit pas invalidée. Clonez-le pour continuer, ou dégelez-le.",thawButton:"Dégeler",deleteReadingQuestion:"Supprimer cette lecture ? Rien n'est écrit avant la sauvegarde du dossier.",deleteObservationQuestion:"Supprimer cette observation du dossier ? Rien n'est écrit avant la sauvegarde du dossier.",deleteRefused:"Cette observation est lue par {n} lecture(s) : supprimez-les d'abord.",titleField:"Titre de la lecture",authorField:"Auteur",investigatorField:"Enquêteur",addTitle:"Ajouter un événement",kindField:"Type",kindObservation:"Observation",kindInterview:"Interview",witnessField:"Témoin",mediumField:"Moyen",interviewerField:"Enquêteur",plainTitleField:"Titre",sourceField:"Source",sourceBlank:"Un enregistrement vierge",sourceFile:"Un enregistrement existant",observerField:"Témoin",fileField:"Fichier",loadFailed:"Cet enregistrement n'a pas pu être lu.",isACase:"C'est un dossier, pas un enregistrement.",ok:"OK",cancel:"Annuler",caseHeading:"Dossier",caseId:"Identifiant",idDuplicated:"Deux événements du dossier portent l'identifiant « {id} » : une lecture qui le désigne est ambiguë.",readingUnresolved:"Une lecture désigne « {id} », qu'aucun événement du dossier ne porte comme identifiant, ni aucun enregistrement qu'il liste.",caseTitle:"Titre",caseTime:"Date",eventsTab:"Événements",fileTab:"Fichier",importFile:"Charger un fichier de dossier",inputFileFromFile:"depuis votre disque",inputFileFromUrl:"depuis une adresse",inputFileModeHint:"Cliquer pour le donner autrement : un fichier à vous, ou une adresse",inputFileLoad:"Charger",fileNotACase:"Ce fichier n'est pas un dossier (il n'a pas d'événements).",formatVersionError:"Ce fichier indique la version {found} de son format ; cet UFO@home lit jusqu'à la version {supported}. Ouvrez-le avec un UFO@home plus récent.",fileInvalid:"Ce texte n'est pas encore du JSON valide, ou pas un dossier : le dossier garde ce qu'il a compris en dernier.",fileLoading:"Chargement de l'éditeur…",add:"Ajouter",addHint:"Ajouter un événement",interpretationOf:"Lecture de",colon:" : ",quoted:"« {text} »",interpretationOfNone:"—",searchEvents:"Rechercher dans les événements",noEventFound:"Aucun événement ne correspond",groupReadings:"Regrouper les lectures par observation",resizeColumns:"Redimensionner la colonne de l'historique (double-clic : largeur par défaut)",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",exportButton:"Sauver",readButton:"Lire",readTitle:"Lire ce qui est édité, tel qu'un lecteur le voit",exportTitle:"Sauver le dossier",exportAlso:"Sauver aussi les observations",saveOptions:"Options de sauvegarde",addToCase:"Ajouter à un dossier",unsavedChanges:"Modifications non sauvées",discardQuestion:"Des modifications ne sont pas encore sauvées. Charger quand même et les perdre ?",discardTitle:"Modifications non sauvées",discardOk:"Charger quand même",leaveQuestion:"Des modifications ne sont pas encore sauvées. Quitter quand même et les perdre ?",leaveOk:"Quitter quand même"};export{e as caseEditorMessages_fr};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={event:"Evento",accountOf:"Osservazione di",passagesHeading:"Riportato in",interviewOf:"Intervista a",untitledInterview:"Intervista {n}",deleteInterviewQuestion:"Eliminare questa intervista dal caso? Nulla viene scritto prima del salvataggio del caso.",untitledReading:"Lettura {n}",eventsInTime:"Eventi · in ordine di tempo",citedMoment:"Momento {k}, citato in {title}: «{quote}»",backToInterview:"Torna all'intervista",openEvent:"Apri",kindObservations:"Osservazioni",kindReadings:"Letture",kindInterviews:"Interviste",linkAnd:"e",byAuthor:"di",kindReading:"Lettura",readingsCount:"{n} lettura/e",readingVerdict:{incompatible:"Contraddice ciò che è accertato",unsettled:"Non decisa",compatible:"Compatibile"},findingOutcome:{holds:"Regge",fails:"Fallisce",untested:"Non verificabile"},findingAgainst:{established:"contro un elemento accertato",supposed:"contro una supposizione"},untitledObservation:"Osservazione {n}",deleteRecording:"Togliere questa registrazione dal caso",cloneEvent:"Clonare questo evento: è il clone che continui",freezeEvent:"Congelare questo evento, perché ciò che si basa su di esso resti vero",unfreezeEvent:"Scongelare questo evento, per modificarlo di nuovo",sealedChip:"Congelato",deleteFrozen:"Congelato: scongelalo per toglierlo",frozenNote:"Questo evento è congelato: nulla vi si modifica, perché un'intervista o un'ipotesi che si basa su di esso non sia invalidata. Clonalo per continuare, o scongelalo.",thawButton:"Scongelare",deleteReadingQuestion:"Eliminare questa lettura? Nulla viene scritto prima del salvataggio del caso.",deleteObservationQuestion:"Eliminare questa osservazione dal caso? Nulla viene scritto prima del salvataggio del caso.",deleteRefused:"Questa osservazione è letta da {n} lettura/e: eliminale prima.",titleField:"Titolo della lettura",authorField:"Autore",investigatorField:"Investigatore",addTitle:"Aggiungi un evento",kindField:"Tipo",kindObservation:"Osservazione",kindInterview:"Intervista",witnessField:"Testimone",mediumField:"Mezzo",interviewerField:"Intervistatore",plainTitleField:"Titolo",sourceField:"Origine",sourceBlank:"Una registrazione vuota",sourceFile:"Una registrazione esistente",observerField:"Testimone",fileField:"File",loadFailed:"Impossibile leggere quella registrazione.",isACase:"Questo è un caso, non una registrazione.",ok:"OK",cancel:"Annulla",caseHeading:"Caso",caseId:"Identificativo",idDuplicated:"Due eventi del caso hanno l'identificativo «{id}»: una lettura che lo designa è ambigua.",readingUnresolved:"Una lettura designa «{id}», che nessun evento del caso ha come identificativo, né alcuna registrazione che elenca.",caseTitle:"Titolo",caseTime:"Data",eventsTab:"Eventi",fileTab:"File",importFile:"Carica un file di caso",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",fileNotACase:"Quel file non è un caso (non ha eventi).",formatVersionError:"Questo file indica la versione {found} del suo formato; questo UFO@home legge fino alla versione {supported}. Lo apra con un UFO@home più recente.",fileInvalid:"Questo testo non è ancora JSON valido, o non è un caso: il caso conserva l'ultimo che ha capito.",fileLoading:"Caricamento dell'editor…",add:"Aggiungi",addHint:"Aggiungi un evento",interpretationOf:"Lettura di",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",groupReadings:"Raggruppa le letture per osservazione",resizeColumns:"Ridimensiona la colonna della cronologia (doppio clic: larghezza predefinita)",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",exportButton:"Salva",readButton:"Leggi",readTitle:"Leggere ciò che si modifica, come lo vede un lettore",exportTitle:"Salva il caso",exportAlso:"Salva anche le osservazioni",saveOptions:"Opzioni di salvataggio",addToCase:"Aggiungi a un caso",unsavedChanges:"Modifiche non salvate",discardQuestion:"Alcune modifiche non sono ancora state salvate. Caricare comunque e perderle?",discardTitle:"Modifiche non salvate",discardOk:"Carica comunque",leaveQuestion:"Alcune modifiche non sono ancora state salvate. Uscire comunque e perderle?",leaveOk:"Esci comunque"};export{e as caseEditorMessages_it};
|
|
1
|
+
const e={event:"Evento",accountOf:"Osservazione di",passagesHeading:"Riportato in",interviewOf:"Intervista a",untitledInterview:"Intervista {n}",deleteInterviewQuestion:"Eliminare questa intervista dal caso? Nulla viene scritto prima del salvataggio del caso.",untitledReading:"Lettura {n}",eventsInTime:"Eventi · in ordine di tempo",citedMoment:"Momento {k}, citato in {title}: «{quote}»",backToInterview:"Torna all'intervista",openEvent:"Apri",kindObservations:"Osservazioni",kindReadings:"Letture",kindInterviews:"Interviste",linkAnd:"e",byAuthor:"di",kindReading:"Lettura",readingsCount:"{n} lettura/e",readingVerdict:{incompatible:"Contraddice ciò che è accertato",unsettled:"Non decisa",compatible:"Compatibile"},findingOutcome:{holds:"Regge",fails:"Fallisce",untested:"Non verificabile"},findingAgainst:{established:"contro un elemento accertato",supposed:"contro una supposizione"},untitledObservation:"Osservazione {n}",deleteRecording:"Togliere questa registrazione dal caso",cloneEvent:"Clonare questo evento: è il clone che continui",freezeEvent:"Congelare questo evento, perché ciò che si basa su di esso resti vero",unfreezeEvent:"Scongelare questo evento, per modificarlo di nuovo",sealedChip:"Congelato",deleteFrozen:"Congelato: scongelalo per toglierlo",frozenNote:"Questo evento è congelato: nulla vi si modifica, perché un'intervista o un'ipotesi che si basa su di esso non sia invalidata. Clonalo per continuare, o scongelalo.",thawButton:"Scongelare",deleteReadingQuestion:"Eliminare questa lettura? Nulla viene scritto prima del salvataggio del caso.",deleteObservationQuestion:"Eliminare questa osservazione dal caso? Nulla viene scritto prima del salvataggio del caso.",deleteRefused:"Questa osservazione è letta da {n} lettura/e: eliminale prima.",titleField:"Titolo della lettura",authorField:"Autore",investigatorField:"Investigatore",addTitle:"Aggiungi un evento",kindField:"Tipo",kindObservation:"Osservazione",kindInterview:"Intervista",witnessField:"Testimone",mediumField:"Mezzo",interviewerField:"Intervistatore",plainTitleField:"Titolo",sourceField:"Origine",sourceBlank:"Una registrazione vuota",sourceFile:"Una registrazione esistente",observerField:"Testimone",fileField:"File",loadFailed:"Impossibile leggere quella registrazione.",isACase:"Questo è un caso, non una registrazione.",ok:"OK",cancel:"Annulla",caseHeading:"Caso",caseId:"Identificativo",idDuplicated:"Due eventi del caso hanno l'identificativo «{id}»: una lettura che lo designa è ambigua.",readingUnresolved:"Una lettura designa «{id}», che nessun evento del caso ha come identificativo, né alcuna registrazione che elenca.",caseTitle:"Titolo",caseTime:"Data",eventsTab:"Eventi",fileTab:"File",importFile:"Carica un file di caso",inputFileFromFile:"dal proprio disco",inputFileFromUrl:"da un indirizzo",inputFileModeHint:"Fare clic per darlo nell'altro modo: un proprio file o un indirizzo",inputFileLoad:"Carica",fileNotACase:"Quel file non è un caso (non ha eventi).",formatVersionError:"Questo file indica la versione {found} del suo formato; questo UFO@home legge fino alla versione {supported}. Lo apra con un UFO@home più recente.",fileInvalid:"Questo testo non è ancora JSON valido, o non è un caso: il caso conserva l'ultimo che ha capito.",fileLoading:"Caricamento dell'editor…",add:"Aggiungi",addHint:"Aggiungi un evento",interpretationOf:"Lettura di",colon:": ",quoted:"«{text}»",interpretationOfNone:"—",searchEvents:"Cerca negli eventi",noEventFound:"Nessun evento corrisponde",groupReadings:"Raggruppa le letture per osservazione",resizeColumns:"Ridimensiona la colonna della cronologia (doppio clic: larghezza predefinita)",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",exportButton:"Salva",readButton:"Leggi",readTitle:"Leggere ciò che si modifica, come lo vede un lettore",exportTitle:"Salva il caso",exportAlso:"Salva anche le osservazioni",saveOptions:"Opzioni di salvataggio",addToCase:"Aggiungi a un caso",unsavedChanges:"Modifiche non salvate",discardQuestion:"Alcune modifiche non sono ancora state salvate. Caricare comunque e perderle?",discardTitle:"Modifiche non salvate",discardOk:"Carica comunque",leaveQuestion:"Alcune modifiche non sono ancora state salvate. Uscire comunque e perderle?",leaveOk:"Esci comunque"};export{e as caseEditorMessages_it};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./InterviewElement-B3tm7y49.js","./rr0-sighting-editor.mjs","./interviewJson-CsMHIcZ-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a9 as v,aa as p,a as A,ab as $,ac as U,f as k,i as j,ad as H,ae as q,a6 as P,af as C,ag as V,ah as z,ai as B,s as G,U as D,c as F,aj as K,ak as x,_ as W,I as Y}from"./rr0-sighting-editor.mjs";import{SHOW_INFO_ATTRIBUTE as O,OBSERVER_ATTRIBUTE as m,registerSighting as Z,HIDE_PICKERS_ATTRIBUTE as N,SIGHTING_ELEMENT_NAME as c,INTERPRETATION_ATTRIBUTE as f,CASE_NAMED_ATTRIBUTE as J,OBSERVER_CHANGE_EVENT as R,INTERPRETATION_CHANGE_EVENT as Q}from"./SightingElement-DsR4mBCh.js";const X=`
|
|
3
|
+
<header class="case-head">
|
|
4
|
+
<div class="case-bar">
|
|
5
|
+
<p id="case-kind" class="case-kind"></p>
|
|
6
|
+
<h2 id="case-title" class="case-title"></h2>
|
|
7
|
+
<!-- The same pair the observation carries, for the case: the way into the editor, and what the case says of itself. -->
|
|
8
|
+
<!-- The same three in the same order as an observation carries (see sightingTemplate): the way into the editor, this element's own
|
|
9
|
+
toggle, and what it says of itself. A reader moving between a case and an observation finds the buttons where they were. -->
|
|
10
|
+
<span class="case-actions">
|
|
11
|
+
<!-- Sharing the case: its address and the element that shows it whole (an observation of it is shared from its own player). -->
|
|
12
|
+
<button id="share" type="button" class="icon-btn" aria-haspopup="dialog"></button>
|
|
13
|
+
<rr0-case-export id="export" class="case-export"></rr0-case-export>
|
|
14
|
+
<button id="edit" type="button" class="icon-btn"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><path d="M11.3 1.3a1 1 0 0 1 1.4 0l2 2a1 1 0 0 1 0 1.4l-8.5 8.5-3.4.9.9-3.4 8.6-8.4Zm-7 9.2-.5 1.7 1.7-.5 6.9-6.9-1.2-1.2-6.9 6.9Z" fill="currentColor"/></svg></button>
|
|
15
|
+
<button id="timeline-button" type="button" class="icon-btn" aria-pressed="true"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="8" r="6"/><path d="M8 4.6V8l2.4 1.6"/></svg></button>
|
|
16
|
+
<button id="info" type="button" class="icon-btn" aria-expanded="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true"><circle cx="8" cy="3.6" r="1.4" fill="currentColor"/><path d="M6 6.5h3v6h1.5V14h-4.5v-1.5H7.5V8H6Z" fill="currentColor"/></svg></button>
|
|
17
|
+
</span>
|
|
18
|
+
</div>
|
|
19
|
+
<p id="case-summary" class="case-summary" hidden></p>
|
|
20
|
+
<rr0-share-dialog id="share-dialog"></rr0-share-dialog>
|
|
21
|
+
</header>
|
|
22
|
+
<!-- The chronology and what is open, one above the other; side by side when the case is given the width for both (see .case-layout). -->
|
|
23
|
+
<div class="case-layout">
|
|
24
|
+
<!-- The chronology, in the upper part: choosing an event opens it alone below; its mark on the rail shows it beside what is open, or puts
|
|
25
|
+
it away. Several can be open at once that way. -->
|
|
26
|
+
<section class="case-timeline">
|
|
27
|
+
<div class="events-bar">
|
|
28
|
+
<h3 class="events-heading"><span id="events-icon" class="events-icon" aria-hidden="true"></span><span id="events-heading"></span></h3>
|
|
29
|
+
<!-- Each reading under the observation it reads, or every event in the order of time: the reader's choice, remembered. -->
|
|
30
|
+
<button id="group-readings" type="button" class="icon-btn" aria-pressed="false"><svg viewBox="0 0 16 16" width="14" height="14" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="4" cy="3.5" r="1.6"/><path d="M4 5.1v7.4M4 8.5h3.5M4 12.5h3.5"/><path d="M9.5 8.5h4M9.5 12.5h4"/></svg></button>
|
|
31
|
+
</div>
|
|
32
|
+
<!-- Only the events whose words hold what is typed here (see CaseTimeline.search): the history of a case of fifty events is long. -->
|
|
33
|
+
<input id="events-search" class="events-search" type="search" autocomplete="off" spellcheck="false" hidden>
|
|
34
|
+
<p id="events-none" class="events-none" role="status" hidden></p>
|
|
35
|
+
<ol id="case-events" class="event-list"></ol>
|
|
36
|
+
<rr0-readings-comparison id="readings-comparison" class="readings-comparison"></rr0-readings-comparison>
|
|
37
|
+
</section>
|
|
38
|
+
<!-- The grip between the two, on the history's edge: its width, dragged. -->
|
|
39
|
+
<div id="column-resize" class="column-resize"></div>
|
|
40
|
+
<!-- What is open, in the order of time whatever the order they were opened in. -->
|
|
41
|
+
<div id="open-events" class="open-events"></div>
|
|
42
|
+
</div>
|
|
43
|
+
`,ee=`
|
|
44
|
+
:host { display: block; color: var(--rr0-ink, inherit); container-type: inline-size; }
|
|
45
|
+
/* The buttons' own colours, light and dark, the very ones an observation's popups are drawn with (see sightingTemplate's --pop-*): a page
|
|
46
|
+
that gives its own (--rr0-button-bg, -fg, -border, -hover, -on, -ring, inherited from anywhere, :root included) has them win. */
|
|
47
|
+
:host { --btn-bg: #f2f2f2; --btn-fg: #222; --btn-border: #ccc; --btn-hover: #e4e4e4; --btn-on: #dbe6f7; --btn-ring: #9bb6e0; }
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:host { --btn-bg: #2c2e33; --btn-fg: #e6e6e6; --btn-border: #4a4c52; --btn-hover: #3a3d43; --btn-on: #274066; --btn-ring: #4f7bc4; }
|
|
50
|
+
}
|
|
51
|
+
.case-head { display: grid; gap: 6px; margin: 0 0 12px; }
|
|
52
|
+
.case-bar { display: flex; align-items: baseline; gap: 10px; }
|
|
53
|
+
.case-kind { margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
54
|
+
.case-title { margin: 0; font: 600 24px/1.25 var(--rr0-serif, Georgia, serif); }
|
|
55
|
+
.case-actions { display: flex; gap: 4px; margin-left: auto; }
|
|
56
|
+
/* The very square the observation's own row wears (see sightingTemplate's .edit-link and .info-btn): same size, same border, same
|
|
57
|
+
background, so that the two rows are one set of buttons seen in two places. */
|
|
58
|
+
.icon-btn {
|
|
59
|
+
flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
60
|
+
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
61
|
+
color: var(--rr0-button-fg, var(--btn-fg)); cursor: pointer;
|
|
62
|
+
}
|
|
63
|
+
.icon-btn:hover, .icon-btn:focus-visible { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
64
|
+
/* The report's export wears the same square, its button being its own (see CaseExportElement). */
|
|
65
|
+
.case-export { display: inline-flex; }
|
|
66
|
+
.case-export::part(button) {
|
|
67
|
+
display: inline-flex; align-items: center; justify-content: center; width: 1.8em; height: 1.8em; box-sizing: border-box;
|
|
68
|
+
padding: 0; border: 1px solid var(--rr0-button-border, var(--btn-border)); border-radius: 3px; background: var(--rr0-button-bg, var(--btn-bg));
|
|
69
|
+
color: var(--rr0-button-fg, var(--btn-fg));
|
|
70
|
+
}
|
|
71
|
+
.case-export::part(button):hover { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
72
|
+
.icon-btn[aria-expanded="true"], .icon-btn[aria-pressed="false"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
73
|
+
.case-summary { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
|
|
74
|
+
.case-summary[hidden] { display: none; }
|
|
75
|
+
/* The chronology itself is common to the editor (see CaseTimeline): what cannot be done while reading is absent, not greyed out. */
|
|
76
|
+
.case-timeline { margin: 0 0 14px; }
|
|
77
|
+
.case-timeline[hidden] { display: none; }
|
|
78
|
+
.readings-comparison { margin-top: 12px; }
|
|
79
|
+
.events-bar { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
|
|
80
|
+
.events-bar .icon-btn { margin-left: auto; }
|
|
81
|
+
.events-search { box-sizing: border-box; width: 100%; margin: 0 0 10px; padding: 5px 12px; border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
|
|
82
|
+
border-radius: 999px; background: transparent; color: inherit; font: 13px/1.4 var(--rr0-sans, system-ui, sans-serif); }
|
|
83
|
+
.events-search[hidden], .events-none[hidden] { display: none; }
|
|
84
|
+
.events-none { margin: 0 0 10px; font: 13px/1.4 var(--rr0-sans, system-ui, sans-serif); opacity: .7; }
|
|
85
|
+
/* Lit when grouping, as a switch is: not the history's own button, which is lit when the history is put away. */
|
|
86
|
+
#group-readings[aria-pressed="false"] { background: var(--rr0-button-bg, var(--btn-bg)); }
|
|
87
|
+
#group-readings:is(:hover, :focus-visible) { background: var(--rr0-button-hover, var(--btn-hover)); }
|
|
88
|
+
#group-readings[aria-pressed="true"] { background: var(--rr0-button-on, var(--btn-on)); }
|
|
89
|
+
#group-readings[hidden], #share[hidden] { display: none; }
|
|
90
|
+
.events-heading { display: flex; align-items: center; gap: 6px; margin: 0; font: 600 12px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
|
|
91
|
+
.events-icon { display: inline-flex; }
|
|
92
|
+
.events-icon svg { width: 14px; height: 14px; }
|
|
93
|
+
/* What is open: one block per event, each saying which it is, in the order of time. */
|
|
94
|
+
/* One column as wide as the case, never as wide as what is in it: an implicit "auto" column grew to the player's own widest content,
|
|
95
|
+
McMinnville's longest reading in its choice (228 letters), and the stage, 16:9 of that, put the photograph beyond the case's edge. */
|
|
96
|
+
.open-events { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
|
|
97
|
+
/* Given the width (the app on a computer), the chronology in a column of its own beside what is open, kept in view as that scrolls; the
|
|
98
|
+
whole width to what is open when the chronology is put away. The width the case is given, never the window's. */
|
|
99
|
+
@container (min-width: 760px) {
|
|
100
|
+
.case-layout { display: grid; grid-template-columns: var(${v.PROPERTY}, minmax(16rem, 1fr)) minmax(0, 2.6fr); gap: 20px; align-items: start; }
|
|
101
|
+
.case-layout > .case-timeline { grid-column: 1; grid-row: 1; }
|
|
102
|
+
.case-layout > .open-events { grid-column: 2; grid-row: 1; }
|
|
103
|
+
.case-layout > .column-resize { display: block; grid-column: 1; grid-row: 1; margin-right: -16px; }
|
|
104
|
+
.case-layout:has(> .case-timeline[hidden]) { grid-template-columns: minmax(0, 1fr); }
|
|
105
|
+
.case-layout:has(> .case-timeline[hidden]) > :is(.open-events, .column-resize) { grid-column: 1; }
|
|
106
|
+
.case-layout:has(> .case-timeline[hidden]) > .column-resize { display: none; }
|
|
107
|
+
/* Narrower than its cards, the history is its events' marks alone (see CaseTimeline.CSS). */
|
|
108
|
+
.case-layout > .case-timeline { container: case-history / inline-size; }
|
|
109
|
+
.case-layout > .case-timeline { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; margin: 0; }
|
|
110
|
+
/* A dialogue open alone beside the chronology has the height the chronology has (dicté : « toute la hauteur »), not the 22 lines kept
|
|
111
|
+
under a player when they are one above the other; kept in view as the page scrolls, as the chronology is. */
|
|
112
|
+
.case-layout > .open-events:has(> .open-event:only-child rr0-interview) { position: sticky; top: 0; }
|
|
113
|
+
.open-event:only-child rr0-interview { max-height: calc(var(--rr0-editor-height, 100dvh) - 3rem); }
|
|
114
|
+
}
|
|
115
|
+
.open-event { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
|
|
116
|
+
.open-event > .open-title { margin: 0; font: 600 13px/1.4 var(--rr0-sans, system-ui, sans-serif); letter-spacing: .04em; text-transform: uppercase; opacity: .7; }
|
|
117
|
+
.open-event rr0-interview { padding: 10px 12px; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); border-radius: 10px;
|
|
118
|
+
font-size: 14px; line-height: 1.5; max-height: 22em; overflow-y: auto; }
|
|
119
|
+
${p.CSS}
|
|
120
|
+
${v.CSS}
|
|
121
|
+
/* The history in a column of its own scrolls, and a column that scrolls clips what passes its edge: the marks on the rail stand half outside
|
|
122
|
+
the list, so the list is set in by as much as they and their ring stick out (as in the case editor). Asked of the column itself, the one
|
|
123
|
+
container it is in: a query on the case's width, which is not its container, was never true for it. */
|
|
124
|
+
@container case-history (min-width: 0) {
|
|
125
|
+
.case-timeline > .event-list { padding-left: 30px; }
|
|
126
|
+
}
|
|
127
|
+
@container case-history (max-width: 6rem) {
|
|
128
|
+
.case-timeline > :not(.event-list) { display: none !important; }
|
|
129
|
+
.case-timeline > .event-list { padding-left: 30px; }
|
|
130
|
+
}
|
|
131
|
+
`,g="rr0-case",w="show-timeline",y="open-events",te="openchange";class u extends HTMLElement{static get observedAttributes(){return["src","show-labels",O,w,y,m]}static PASSED_ON=["show-labels"];shadow;openEvents;timeline;shown=new Map;messages;said=new A(["en"]);json;url;shareMessages;entries=[];grouping=!1;query="";folded=new Set;columns;constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=ee;const s=document.createElement("div");s.innerHTML=X,this.shadow.append(e,s),Z(),this.timeline=new p(this.byId("case-events"),n=>void this.only(n),n=>void this.only(n),n=>void this.toggle(n),n=>{this.folded.delete(n)||this.folded.add(n),this.draw()}),this.grouping=p.groupingRemembered(),this.columns=new v(this.byId("column-resize"),this.shadow.querySelector(".case-layout"),()=>this.shadow.querySelector(".case-timeline"),v.CASE_HISTORY_KEY,v.PROPERTY,44),this.byId("events-search").addEventListener("input",n=>{this.query=n.target.value,this.draw()}),this.byId("group-readings").addEventListener("click",()=>{this.grouping=!this.grouping,p.rememberGrouping(this.grouping),this.order(),this.draw()}),$.register(),U.register(),this.byId("export").source=async()=>{const n=this.json,o=new Map;return await Promise.all(this.entries.filter(a=>a.kind!=="interview"&&a.url).map(async a=>{try{o.set(a.url,await k.recording(a.url))}catch{}})),{caseJson:n,caseUrl:this.url,recordings:o}},this.openEvents=this.byId("open-events"),this.openEvents.addEventListener(j,n=>{const{at:o,sighting:a}=n.detail;this.seekObservation(o,a)}),this.openEvents.addEventListener(H,n=>{const o=n.target?.closest?.(".open-event");this.followReplay(o??void 0)}),q.register();const t=this.byId("share");t.innerHTML=P.SHARE;const i=this.byId("share-dialog");i.subject=this.shareSubject,t.addEventListener("click",()=>{this.url&&(i.note=C.changed(this.url,...this.entries.map(n=>n.url))?this.shareMessages?.unsaved:void 0,i.open())}),this.byId("edit").addEventListener("click",()=>{if(this.url&&V.ask(this,z,{src:this.url}))return;const n=this.editorUrl();n&&window.open(n,"_blank","noopener")}),this.byId("info").addEventListener("click",()=>this.showSummary(this.byId("case-summary").hidden)),this.byId("timeline-button").addEventListener("click",()=>{this.showTimeline(this.byId("case-events").parentElement.hidden)})}shareSubject={module:"rr0-sighting",link:()=>{const e=this.openKeys();return`${B.home()}/play/?file=${encodeURIComponent(this.url??"")}${e?`&events=${encodeURIComponent(e)}`:""}`+(this.timelineShown()?"":"&timeline=0")},element:()=>{const e=this.openKeys();return`<${g} src="${this.url??""}"${e?` ${y}="${e}"`:""}${this.timelineShown()?"":` ${w}="false"`}></${g}>`}};timelineShown(){return!this.byId("case-events").parentElement.hidden}openKeys(){const e=[...this.shown.keys()].sort((s,t)=>s-t);return e.length===1&&e[0]===this.firstObservation()?"":e.map(s=>u.keyOf(this.entries[s])).join(",")}static keyOf(e){return e.event.id??u.fileNameOf(e)}static fileNameOf(e){return(e.url??"").split("/").pop().replace(/[.]json$/i,"")}asked(e){if(e===null)return[];if(e.trim()==="all")return this.entries.map((t,i)=>i);const s=e.split(",").map(t=>t.trim().replace(/[.]json$/i,"")).filter(t=>t!=="");return this.entries.map((t,i)=>({entry:t,at:i})).filter(({entry:t})=>s.some(i=>i===t.event.id||i===u.fileNameOf(t))).map(({at:t})=>t)}firstObservation(){return this.entries.findIndex(e=>e.kind!=="interview")}byId(e){return this.shadow.getElementById(e)}showSummary(e){this.byId("case-summary").hidden=!e,this.byId("info").setAttribute("aria-expanded",String(e))}showTimeline(e){this.byId("case-events").parentElement.hidden=!e,this.byId("timeline-button").setAttribute("aria-pressed",String(e));for(const s of this.players())s.toggleAttribute(N,e)}connectedCallback(){this.loadMessages(),this.showTimeline(this.getAttribute(w)!=="false"),this.showSummary(this.hasAttribute(O));const e=this.getAttribute("src");e&&this.load(e).catch(s=>console.warn(`<${g}> could not read ${e}:`,s))}attributeChangedCallback(e,s,t){if(!(!this.isConnected||t===s))if(e==="src"&&t)this.load(t);else if(e===w)this.showTimeline(t!=="false");else if(e===y)for(const i of this.asked(t))this.open(i);else for(const i of this.players())t===null?i.removeAttribute(e):i.setAttribute(e,t)}async loadMessages(){const e=G(F.preferencesFor(this),D);this.said=new A([e,"en"]),this.messages=await K(e),this.shareMessages=await this.byId("share-dialog").useLanguage(e),this.draw()}async load(e){this.url=new URL(e,location.href).href;const s=await k.recording(this.url);if(!x.isCase(s))throw new Error(`${e} is not a case: <${g}> reads a case.json`);this.json=s,this.byId("share").hidden=C.local(this.url),this.entries=u.inTime((s.events??[]).map(r=>this.entryOf(r)).filter(r=>r!==void 0)),this.shown.clear(),this.folded.clear(),this.openEvents.replaceChildren(),this.draw(),this.compareReadings();const t=this.asked(this.getAttribute(y));if(t.length>0){for(const r of t)await this.open(r);return}const i=this.firstObservation();i>=0&&this.open(i)}static inTime(e){const s=new Map(e.filter(t=>t.event.id!==void 0).map(t=>[t.event.id,t]));return p.inTime(e,{when:t=>t.when,kind:t=>t.kind,read:t=>[t.event.interpretationOf].flat().map(i=>i===void 0?void 0:s.get(i)).filter(i=>i!==void 0)}).map(({item:t})=>t)}entryOf(e){if(typeof e.url!="string"||e.url==="")return;const s=e.eventType===x.INTERVIEW_EVENT?"interview":e.eventType===x.SIGHTING_EVENT?e.interpretationOf===void 0?"observation":"reading":void 0;if(s)return{event:e,kind:s,url:new URL(e.url,this.url??location.href).href,title:this.said.read(e.title)??e.id??"",when:String(e.time??"")}}compareReadings(){const e=this.byId("readings-comparison"),s=new Map,t=r=>{let n=s.get(r);return n||(n=k.recording(r).then(o=>o,()=>{}),s.set(r,n)),n},i=async r=>Promise.all(this.entries.flatMap((n,o)=>{if(n.kind!=="reading")return[];const a=this.accountOf(n);return[(async()=>({title:n.title,witness:a?.title??"",...r&&a?.url&&n.url?{account:await t(a.url),reading:await t(n.url)}:{},open:()=>void this.only(o).then(()=>this.shown.get(o)?.scrollIntoView({block:"start",behavior:"smooth"}))}))()]}));i(!1).then(r=>e.show(r,()=>i(!0)))}accountOf(e){return this.accountsOf(e)[0]}accountsOf(e){const s=[e.event.interpretationOf].flat().filter(t=>t!==void 0);return this.entries.filter(t=>t.kind==="observation"&&s.includes(t.event.id??""))}editorUrl(){if(!this.url)return;const e=new URL("/edit/",location.href);return e.searchParams.set("file",this.url),e.href}async only(e){const s=this.turn(e);for(const t of[...this.shown.keys()])t!==e&&this.shut(t);s||await this.open(e)}turn(e){const s=this.entries[e];if(!s?.url||this.shown.has(e)||s.kind!=="observation"&&s.kind!=="reading")return!1;const[t,i]=[...this.shown.entries()].find(([n,o])=>{const a=this.entries[n]?.kind;return(a==="observation"||a==="reading")&&o.querySelector(c)})??[],r=i?.querySelector(c);return t===void 0||!i||!r?!1:(this.shown.delete(t),this.shown.set(e,i),i.dataset.at=String(e),s.kind==="reading"?(r.setAttribute(f,s.url),r.setAttribute(m,this.accountOf(s)?.url??s.url)):(r.setAttribute(m,s.url),r.removeAttribute(f)),this.order(),this.draw(),window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen(),!0)}async toggle(e){this.shown.has(e)?this.shut(e):await this.open(e)}async open(e){const s=this.entries[e];if(!s||!s.url||this.shown.has(e))return;const t=document.createElement("section");if(t.className="open-event",t.dataset.at=String(e),s.kind==="interview"){const i=document.createElement("p");i.className="open-title",i.textContent=s.title,t.append(i)}if(s.kind==="interview"){const{register:i}=await W(async()=>{const{register:n}=await import("./InterviewElement-B3tm7y49.js");return{register:n}},__vite__mapDeps([0,1,2]),import.meta.url);i();const r=document.createElement("rr0-interview");r.setAttribute("src",s.url),t.append(r),window.setTimeout(()=>{this.followReplay(),this.markCitedMoments()},300)}else{const i=document.createElement(c);i.setAttribute(J,""),i.toggleAttribute(N,!this.byId("case-events").parentElement.hidden),i.setAttribute("src",this.url??"");const r=s.kind==="reading"?this.accountOf(s):void 0;i.setAttribute(m,(r??s).url??""),s.kind==="reading"&&i.setAttribute(f,s.url),queueMicrotask(()=>{for(const n of u.PASSED_ON){const o=this.getAttribute(n);o!==null&&i.setAttribute(n,o)}}),i.addEventListener(R,n=>{this.dispatchEvent(new CustomEvent(R,{detail:n.detail})),this.follow(t,i)}),i.addEventListener(Q,()=>this.follow(t,i)),t.append(i)}this.shown.set(e,t),this.order(),this.draw(),s.kind!=="interview"&&window.setTimeout(()=>this.markCitedMoments(),300),this.announceOpen()}follow(e,s){const t=Number(e.dataset.at),i=s.shownReadingUrl,r=s.shownRecordingUrl,n=(h,b)=>h!==void 0&&b!==void 0&&new URL(h,this.url??location.href).href===new URL(b,this.url??location.href).href,o=i?this.entries.findIndex(h=>h.kind==="reading"&&n(h.url,i)):this.entries.findIndex(h=>h.kind==="observation"&&n(h.url,r));if(o<0||o===t||this.shown.get(t)!==e||this.shown.has(o))return;this.shown.delete(t),this.shown.set(o,e),e.dataset.at=String(o);const a=this.entries[o];a.kind==="reading"?s.setAttribute(f,a.url):(s.removeAttribute(f),a.url&&s.setAttribute(m,a.url)),this.order(),this.draw(),this.announceOpen()}announceOpen(){this.dispatchEvent(new CustomEvent(te,{detail:{events:this.openKeys()}}))}followReplay(e){const s=e??[...this.shown.values()].find(n=>n.querySelector(c)),t=s?Number(s.dataset.at):NaN,i=Number.isNaN(t)?void 0:this.entries[t],r=s?.querySelector(c);if(!(!i||!r)){for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;o.querySelector("rr0-interview")?.revealAt?.(r.playedSeconds,i.event.id)}return s}}markCitedMoments(){for(const[e,s]of this.shown){const t=this.entries[e],i=s.querySelector(c);if(!t||!i)continue;const r=[];for(const[n,o]of this.shown){if(this.entries[n]?.kind!=="interview")continue;const a=o.querySelector("rr0-interview");r.push(...a?.momentsCited?.(t.event.id)??[])}i.citedMoments=r.sort((n,o)=>n.at-o.at)}}shut(e){this.shown.get(e)?.remove(),this.shown.delete(e),this.markCitedMoments(),this.draw(),this.announceOpen()}order(){const e=new Map(this.listed().map(({index:t},i)=>[t,i])),s=[...this.shown.entries()].sort(([t],[i])=>(e.get(t)??t)-(e.get(i)??i)).map(([,t])=>t);s.length===this.openEvents.children.length&&s.every((t,i)=>this.openEvents.children[i]===t)||this.openEvents.replaceChildren(...s)}listed(){const e=this.entries.map((s,t)=>({item:s,index:t}));return this.grouping?p.grouped(e,{kind:s=>s.kind,read:s=>this.accountsOf(s)}):e}async seekObservation(e,s){const t=this.entries.findIndex(n=>n.kind!=="interview"&&(n.event.id===s||s!==void 0&&n.url?.endsWith(`/${s}.json`))),i=t>=0?t:this.entries.findIndex(n=>n.kind!=="interview");if(i<0)return;this.shown.has(i)||await this.open(i),this.shown.get(i)?.querySelector(c)?.seekTo(e,s),this.shown.get(i)?.scrollIntoView({block:"nearest",behavior:"smooth"})}authors(e){const s=this.messages,t=(e??[]).map(i=>"people"in i?i.people:"org"in i?i.org:this.said.read(i.title)??"").filter(i=>i!=="");return t.length<2||!s?t.join(", "):`${t.slice(0,-1).join(", ")} ${s.linkAnd} ${t[t.length-1]}`}linkedTo(e){const s=this.messages;if(s){if(e.kind==="reading"){const t=[e.event.interpretationOf].flat().filter(r=>r!==void 0),i=this.entries.map((r,n)=>t.includes(r.event.id??"")?n:-1).filter(r=>r>=0);return i.length>0?{heading:s.interpretationOf,to:i}:void 0}if(e.kind==="observation"){const t=this.entries.map((i,r)=>i.kind==="interview"&&[i.event.interviewOf].flat().includes(e.event.id)?r:-1).filter(i=>i>=0);return t.length>0?{heading:s.passagesHeading,to:t}:void 0}}}draw(){const e=this.messages,s=this.json;if(!e||!s)return;this.byId("case-kind").textContent=e.caseHeading,this.byId("case-title").textContent=this.said.read(s.title)??s.id??"";const t=this.said.read(s.summary)??"",i=this.byId("case-summary");i.textContent=t;const r=this.byId("info");r.hidden=t==="",r.title=e.caseSummary,r.setAttribute("aria-label",e.caseSummary),t===""&&this.showSummary(!1),this.byId("events-heading").textContent=e.eventsHeading,this.byId("events-icon").innerHTML=Y.CLOCK;const n=this.byId("share");n.title=e.shareCase,n.setAttribute("aria-label",e.shareCase);const o=this.byId("edit");o.title=e.editCase,o.setAttribute("aria-label",e.editCase);const a=this.byId("group-readings");a.title=e.groupReadings,a.setAttribute("aria-label",e.groupReadings),this.columns.label(e.resizeColumns),a.setAttribute("aria-pressed",String(this.grouping)),a.hidden=!this.entries.some(d=>d.kind==="reading");const h=this.listed(),b=d=>h.filter(({under:l})=>l===d).length,M=new Map(this.entries.map((d,l)=>[d,l]));this.timeline.render(h.filter(({index:d,under:l})=>l===void 0||this.query.trim()!==""||!this.folded.has(M.get(l))||this.shown.has(d)).map(({item:d,index:l,under:L})=>{const I=this.card(d,l,L),S=this.grouping&&d.kind==="observation"?b(d):0;return S>0?{...I,readings:{count:S,folded:this.folded.has(l)}}:I}),e);const E=this.byId("events-search");E.placeholder=e.searchEvents,E.setAttribute("aria-label",e.searchEvents),E.hidden=this.entries.length<5;const _=this.timeline.search(this.query),T=this.byId("events-none");T.textContent=e.noEventFound,T.hidden=this.query.trim()===""||_>0}card(e,s,t){const i=this.linkedTo(e),r=(i?.to??[]).filter(o=>this.entries[o]!==t),n=t?this.messages.alsoAbout:i?.heading??"";return{at:s,kind:e.kind,title:e.title,meta:e.when.replace("T"," "),open:this.shown.has(s),...r.length>0?{links:{heading:n,to:r.map(o=>({at:o,title:this.entries[o].title}))}}:{},by:e.kind==="observation"?"":this.authors(e.event.by),...t?{nested:!0}:{}}}async loadFromSrc(e){await this.load(e),await this.player?.loaded}get scene(){return this.players()[0]?.scene}players(){return[...this.shown.entries()].sort(([e],[s])=>e-s).map(([,e])=>e.querySelector(c)).filter(e=>e!==null)}get sightingData(){return this.players()[0]?.sightingData}get player(){return this.players()[0]}}function ne(){customElements.get(g)||customElements.define(g,u)}export{g as CASE_ELEMENT_NAME,u as CaseElement,te as OPEN_CHANGE_EVENT,y as OPEN_EVENTS_ATTRIBUTE,w as SHOW_TIMELINE_ATTRIBUTE,ne as register};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={caseHeading:"Case",eventsHeading:"History",kindObservation:"Observation",kindReading:"Reading",kindInterview:"Interview",openEvent:"Open this event alone",toggleEvent:"Show beside the others, or put away",searchEvents:"Search the history",noEventFound:"No event matches",groupReadings:"Group the readings under their observation",resizeColumns:"Resize the history column (double-click: back to its width)",alsoAbout:"Also about",foldReadings:"Fold its readings away",unfoldReadings:"Unfold its readings",interpretationOf:"Reading of",passagesHeading:"Told in",byAuthor:"by",linkAnd:"and",caseSummary:"What this case says of itself",editCase:"Edit this case",shareCase:"Share this case"};export{e as caseMessages_en};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={caseHeading:"Caso",eventsHeading:"Historial",kindObservation:"Observación",kindReading:"Lectura",kindInterview:"Entrevista",openEvent:"Abrir solo este evento",toggleEvent:"Mostrar junto a los demás, o quitar",searchEvents:"Buscar en el historial",noEventFound:"Ningún evento coincide",groupReadings:"Agrupar las lecturas por observación",resizeColumns:"Cambiar el ancho de la columna del historial (doble clic: ancho por defecto)",alsoAbout:"También trata de",foldReadings:"Plegar sus lecturas",unfoldReadings:"Desplegar sus lecturas",interpretationOf:"Lectura de",passagesHeading:"Relatado en",byAuthor:"por",linkAnd:"y",caseSummary:"Lo que este caso dice de sí mismo",editCase:"Editar este caso",shareCase:"Compartir este caso"};export{e as caseMessages_es};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={caseHeading:"Dossier",eventsHeading:"Historique",kindObservation:"Observation",kindReading:"Lecture",kindInterview:"Interview",openEvent:"Ouvrir cet événement seul",toggleEvent:"Afficher à côté des autres, ou retirer",searchEvents:"Rechercher dans l'historique",noEventFound:"Aucun événement ne correspond",groupReadings:"Regrouper les lectures par observation",resizeColumns:"Redimensionner la colonne de l'historique (double-clic : largeur par défaut)",alsoAbout:"Porte aussi sur",foldReadings:"Replier ses lectures",unfoldReadings:"Déplier ses lectures",interpretationOf:"Lecture de",passagesHeading:"Relaté dans",byAuthor:"par",linkAnd:"et",caseSummary:"Ce que ce dossier dit de lui-même",editCase:"Modifier ce dossier",shareCase:"Partager ce dossier"};export{e as caseMessages_fr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={caseHeading:"Caso",eventsHeading:"Cronologia",kindObservation:"Osservazione",kindReading:"Lettura",kindInterview:"Intervista",openEvent:"Apri solo questo evento",toggleEvent:"Mostra accanto agli altri, o togli",searchEvents:"Cerca nella cronologia",noEventFound:"Nessun evento corrisponde",groupReadings:"Raggruppa le letture per osservazione",resizeColumns:"Ridimensiona la colonna della cronologia (doppio clic: larghezza predefinita)",alsoAbout:"Riguarda anche",foldReadings:"Chiudi le sue letture",unfoldReadings:"Apri le sue letture",interpretationOf:"Lettura di",passagesHeading:"Raccontato in",byAuthor:"di",linkAnd:"e",caseSummary:"Ciò che questo caso dice di sé",editCase:"Modificare questo caso",shareCase:"Condividi questo caso"};export{e as caseMessages_it};
|
package/dist-embed-sighting-editor/{CaseReportExport-KT66dpR3.js → CaseReportExport-nFM_7lq4.js}
RENAMED
|
@@ -62,4 +62,4 @@ ${o.join(`
|
|
|
62
62
|
`)}
|
|
63
63
|
</body>
|
|
64
64
|
</html>
|
|
65
|
-
`}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}const _=P.catalog({en:()=>B(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>B(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>B(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>B(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),J.load(a)]),o=j.of(n.caseJson,n.caseUrl,n.recordings,new C([...s]),new F(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.
|
|
65
|
+
`}static comparedTable(t,n){const a=n.texts.columns,s=z.escape;return z.table([a.reading,a.reads,a.reproduced,a.gap,a.robustness,a.supposedCount],t.readings.map(i=>{const e=n.robustness(i.sensitivity);return[s(i.title),s(i.reads),`<span class="n">${n.reproduced(i.sensitivity)}</span>`,n.degrees(i.sensitivity?.medianSeparationDeg),`<span class="${e.kind}">${s(e.text)}</span>`,String(i.supposed.length)]}),[2,3,5])}static witness(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h3>${e(a.fill(s.witnessHeading,{witness:t.title}))}</h3>`],o=[[s.columns.time,t.time??""],[s.place,t.place??""],[s.duration,t.durationSeconds!==void 0?a.instant(t.durationSeconds*1e3):""],[s.instrument,t.instrument??""]].filter(([,m])=>m!=="");o.length&&r.push(`<dl class="facts">${o.map(([m,d])=>`<dt>${e(m)}</dt><dd>${e(d)}</dd>`).join("")}</dl>`),t.description&&r.push(`<h4>${e(s.account)}</h4>`,`<blockquote>${e(t.description)}</blockquote>`),t.sources.length&&r.push(`<h4>${e(s.sources)}</h4>`,`<ul class="sources">${t.sources.map(m=>`<li>${[m.authors?.join(", "),m.title?`<em>${e(m.title)}</em>`:"",m.publisher,m.time,m.index].filter(Boolean).map(g=>g.startsWith("<em>")?g:e(g)).join(", ")}${m.url?` <a href="${e(m.url)}">${e(m.url)}</a>`:""}</li>`).join("")}</ul>`);const u=S.svg(t,a);u&&r.push(`<figure>${u}<figcaption>${e(s.timelineCaption)}</figcaption></figure>`),n=n.filter(m=>m.comparisons.length>0);const p=D.svg(t,n,a);if(p){const m=[`<li><svg viewBox="0 0 14 14" width="14" height="14" aria-hidden="true"><circle cx="7" cy="7" r="4" fill="#111827"/></svg>${e(s.saidLegend)}</li>`,...n.map((d,g)=>`<li>${D.legendMark(g)}${e(d.title)}</li>`)];r.push(`<figure>${p}<ul class="legend">${m.join("")}</ul><figcaption>${e(s.figureCaption)}</figcaption></figure>`)}if(t.pictures?.length){const m=t.pictures[0].views.map(d=>d.label);r.push(`<h4>${e(s.pictures)}</h4>`,`<div class="scroll"><table class="pictures"><thead><tr><th scope="col">${e(s.columns.instant)}</th>${m.map(d=>`<th scope="col">${e(d)}</th>`).join("")}</tr></thead><tbody>${t.pictures.map(d=>`<tr><td class="n">${a.instant(d.t)}</td>${d.views.map(g=>`<td>${g.image?`<img src="${g.image}" alt="${e(g.label)}, ${a.instant(d.t)}">`:`<span class="nothing">${e(s.noPicture)}</span>`}</td>`).join("")}</tr>`).join("")}</tbody></table></div>`,`<p class="caption">${e(s.picturesCaption)}</p>`)}r.push(`<h4>${e(s.indications)}</h4>`),t.indications.length===0?r.push(`<p>${e(s.noIndication)}</p>`):r.push(z.table([i.instant,i.phenomenon,i.azimuth,i.altitude,i.uncertainty,i.size,i.basis,i.rests],t.indications.map(m=>{const d=m.uncertainty;return[a.instant(m.t),e(m.phenomenon??m.sourceId),m.directionSaid?a.azimuth(m.aim?.azimuthDeg):"",m.directionSaid?a.degrees(m.aim?.altitudeDeg):"",d?`${a.azimuth(d.azimuthDeg[0])} … ${a.azimuth(d.azimuthDeg[1])} ; ${a.degrees(d.altitudeDeg[0])} … ${a.degrees(d.altitudeDeg[1])}`:"",m.sizeSaid?a.degrees(m.angular?.widthDeg):"",m.basis?e(s.bases[m.basis]):"",e(a.rests(m))]}),[0,2,3,5]));const l=t.values.filter(m=>!/^timeline\.keyframes\.\d+\.shapes\.\d+\.shape\.(aim|angular)/.test(m.path));return l.length>0&&r.push(`<h4>${e(s.values)}</h4>`,z.valuesTable(l,a)),r}static reading(t,n,a){const s=a.texts,i=s.columns,e=z.escape,r=[`<h2>${e(a.fill(s.readingHeading,{title:t.title,witness:t.reads}))}</h2>`],c=[t.by.length?a.fill(s.by,{names:t.by.join(", ")}):"",t.time?a.fill(s.made,{time:t.time}):""].filter(Boolean).join(" ");c&&r.push(`<p class="meta">${e(c)}</p>`),t.description&&r.push(`<blockquote>${e(t.description)}</blockquote>`),r.push(`<h4>${e(s.supposed)}</h4>`,t.supposed.length?z.valuesTable(t.supposed,a):`<p>${e(s.noneSupposed)}</p>`),r.push(`<h4>${e(s.findings)}</h4>`),r.push(t.findings.length?z.table([i.finding,i.outcome,i.against,i.origin],t.findings.map(u=>[e(u.text),`<span class="${u.outcome}">${e(s.outcomes[u.outcome])}</span>`,u.outcome==="fails"?e(s.grounds[u.against??"established"]):"",e(s.origins[u.written?"written":"computed"])])):`<p>${e(s.noFinding)}</p>`);const o=t.sensitivity;if(o){const u=a.robustness(o);if(r.push(`<h4>${e(s.sensitivity)}</h4>`,`<p>${e(i.reproduced)} : ${a.reproduced(o)||"–"} · ${e(i.gap)} : ${a.degrees(o.medianSeparationDeg)||"–"} · <span class="${u.kind}">${e(u.text)}</span></p>`),u.kind!=="too-few"&&u.kind!=="nothing"&&o.margins.length>0&&r.push(z.table([i.knob,i.from,i.to,i.reference,i.covered],o.margins.map(p=>{const l=a.ends(p),m=p.reference?`${a.amount(p.knob,p.reference.lower)} … ${a.amount(p.knob,p.reference.upper)}`:s.noLaw;return[e(s.knobs[p.knob]),l.from,l.to,e(m),p.coverage===void 0?"":`${Math.round(p.coverage*100)} %`]}),[1,2,4])),o.better){const{knob:p,amount:l,agreement:m}=o.better;r.push(`<p class="fine-tuned">${e(a.fill(s.better,{knob:s.knobs[p],amount:a.amount(p,l),agreed:String(Math.round(m*o.compared)),compared:String(o.compared)}))}</p>`)}}return t.comparisons.length>0&&r.push(`<h4>${e(s.comparisons)}</h4>`,z.table([i.instant,i.phenomenon,`${i.said} (${i.azimuth}, ${i.altitude})`,`${i.read} (${i.azimuth}, ${i.altitude})`,i.separation,i.agrees],t.comparisons.map(u=>[a.instant(u.t),e(n?.phenomena?.[u.sourceId]??u.sourceId),u.said?`${a.azimuth(u.said.azimuthDeg)}, ${a.degrees(u.said.altitudeDeg)}`:"",`${a.azimuth(u.predicted.azimuthDeg)}, ${a.degrees(u.predicted.altitudeDeg)}`,a.degrees(u.separationDeg),`<span class="${u.agrees?"holds":"fails"}">${e(u.agrees?s.yes:s.no)}</span>`]),[0,4])),r}static valuesTable(t,n){const a=n.texts,s=a.columns,i=z.escape;return z.table([s.path,s.value,s.basis,s.rests],t.map(e=>[`<code>${i(e.path)}</code>`,i(n.value(e)),i(a.bases[e.basis]),i(n.rests(e))]))}static table(t,n,a=[]){const s=z.escape,i=`<tr>${t.map(r=>`<th scope="col">${s(r)}</th>`).join("")}</tr>`,e=n.map(r=>`<tr>${r.map((c,o)=>`<td${a.includes(o)?' class="n"':""}>${c}</td>`).join("")}</tr>`);return`<div class="scroll"><table><thead>${i}</thead><tbody>${e.join("")}</tbody></table></div>`}static escape(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}}const _=P.catalog({en:()=>B(()=>import("./CaseReportTexts_en-DlN7p1pC.js"),[],import.meta.url).then(N=>N.caseReportTexts_en),fr:()=>B(()=>import("./CaseReportTexts_fr-B5nP6RlP.js"),[],import.meta.url).then(N=>N.caseReportTexts_fr),es:()=>B(()=>import("./CaseReportTexts_es-CncAEaey.js"),[],import.meta.url).then(N=>N.caseReportTexts_es),it:()=>B(()=>import("./CaseReportTexts_it-Dc-oPmXB.js"),[],import.meta.url).then(N=>N.caseReportTexts_it)});class U{static async make(t,n,a,s,i=!1,e){const[r,c]=await Promise.all([_.load(a),J.load(a)]),o=j.of(n.caseJson,n.caseUrl,n.recordings,new C([...s]),new F(c));i&&t!=="csv"&&await U.pictures(o,n,r,e);const u=`${n.caseJson.id??"case"}-report`;switch(t){case"html":U.download(new Blob([z.of(o,r,a,"0.199.0")],{type:"text/html"}),`${u}.html`);return;case"print":U.print(z.of(o,r,a,"0.199.0"));return;case"json":U.download(new Blob([T.json(o,"0.199.0")],{type:"application/json"}),`${u}.json`);return;case"csv":{const{zipSync:p,strToU8:l}=await B(async()=>{const{zipSync:d,strToU8:g}=await import("./browser-CltifEM0.js");return{zipSync:d,strToU8:g}},[],import.meta.url),m=Object.fromEntries(Object.entries(T.csv(o,r,a)).map(([d,g])=>[d,l(`\uFEFF${g}`)]));U.download(new Blob([p(m)],{type:"application/zip"}),`${u}-tables.zip`)}}}static PICTURED_INSTANTS=3;static async pictures(t,n,a,s){const{registerScene:i,SCENE_ELEMENT_NAME:e}=await B(async()=>{const{registerScene:p,SCENE_ELEMENT_NAME:l}=await import("./rr0-sighting-editor.mjs").then(m=>m.c_);return{registerScene:p,SCENE_ELEMENT_NAME:l}},[],import.meta.url);i();const r=t.witnesses.map(p=>{const l=p.indications.filter(f=>f.directionSaid).map(f=>f.t),m=l.length<=U.PICTURED_INSTANTS?l:[l[0],l[Math.floor(l.length/2)],l[l.length-1]],d=t.readings.filter(f=>f.reads===p.title&&f.comparisons.length>0),g=[{label:a.accountView,url:p.url,reading:void 0},...d.map(f=>({label:f.title,url:p.url,reading:f.url}))];return{witness:p,instants:[...new Set(m)],recordings:g}}).filter(p=>p.instants.length>0),c=r.reduce((p,l)=>p+l.instants.length*l.recordings.length,0);if(c===0)return;const o=document.createElement(e);o.setAttribute("max-pixel-ratio","1"),o.setAttribute("always-live",""),Object.assign(o.style,{position:"fixed",left:"-10000px",top:"0",width:"640px",height:"360px",visibility:"hidden",pointerEvents:"none"}),document.body.appendChild(o);let u=0;s?.(u,c);try{for(const p of r){const l=p.instants.map(d=>({t:d,views:[]})),m=n.recordings.get(p.witness.url);m&&(o.documentUrl=p.witness.url,o.sightingData=m);for(const d of p.recordings){const g=m,f=d.reading?n.recordings.get(d.reading):void 0;for(const w of l){let b;g&&(!d.reading||f)&&(w===l[0]&&(o.interpretation=U.bodiesOf(f??g,d.reading??p.witness.url)),b=await o.pictureAt(w.t,480).catch(()=>{})),w.views.push({label:d.label,...b?{image:b}:{}}),s?.(++u,c)}}p.witness.pictures=l}}finally{o.remove()}}static bodiesOf(t,n){const a=W.strip(t).recording.interpretation;if(a)return{...a,bodies:a.bodies.map(s=>s.model?.url?{...s,model:{...s.model,url:new URL(s.model.url,n).href}}:s)}}static print(t){const n=document.createElement("iframe");n.setAttribute("aria-hidden","true"),n.style.cssText="position: fixed; right: 0; bottom: 0; width: 0; height: 0; border: 0",n.addEventListener("load",()=>{const a=n.contentWindow;a&&(a.addEventListener("afterprint",()=>n.remove()),a.focus(),a.print(),window.setTimeout(()=>n.remove(),6e4))},{once:!0}),n.srcdoc=t,document.body.append(n)}static download(t,n){const a=URL.createObjectURL(t),s=document.createElement("a");s.href=a,s.download=n,s.click(),window.setTimeout(()=>URL.revokeObjectURL(a),1e3)}}export{U as CaseReportExport};
|
package/dist-embed-sighting-editor/{SightingElement-BeSLIyc4.js → SightingElement-DsR4mBCh.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{al as _,am as G,an as y,ao as E,ap as q,a6 as W,aq as N,ar as K,ag as Z,ah as J,c as U,s as Q,U as X,as as Y,at as ee,au as te,o as se,p as ie,av as ne,aw as $,a as D,ax as oe,ay as ae,f as S,ak as m,a5 as P,af as M,az as re,aA as j,aB as he,P as le,aC as
|
|
1
|
+
import{al as _,am as G,an as y,ao as E,ap as q,a6 as W,aq as N,ar as K,ag as Z,ah as J,c as U,s as Q,U as X,as as Y,at as ee,au as te,o as se,p as ie,av as ne,aw as $,a as D,ax as oe,ay as ae,f as S,ak as m,a5 as P,af as M,az as re,aA as j,aB as he,P as le,aC as ce,aD as de,aE as z,ae as V,ai as pe}from"./rr0-sighting-editor.mjs";const ue=`
|
|
2
2
|
<div class="toolbar" id="toolbar" hidden>
|
|
3
3
|
<!-- The case this account belongs to, when it was read from one: an observation of a case is shown in its frame, not as a lone
|
|
4
4
|
recording (the info panel also lists it, but behind a button nobody opens to find out where they are). -->
|
|
@@ -688,6 +688,6 @@ ${_.CSS}
|
|
|
688
688
|
margin: 0.4em 0 0;
|
|
689
689
|
padding-left: 1.2em;
|
|
690
690
|
}
|
|
691
|
-
`;class u{static PLAIN=/^\d+(?:[.,]\d+)?$/;static COLONS=/^(?:(\d+):)?(\d{1,2}):(\d{1,2}(?:[.,]\d+)?)$/;static UNITS=/^(?:(\d+(?:[.,]\d+)?)h)?(?:(\d+(?:[.,]\d+)?)m)?(?:(\d+(?:[.,]\d+)?)s)?$/i;static CLOCK=/^(?:(\d{4})-(\d{2})-(\d{2})[T ])?T?(\d{1,2}):(\d{2})(?::(\d{2}(?:[.,]\d+)?))?$/;static num(e){return e===void 0?0:Number(e.replace(",","."))}static delta(e){const t=(e??"").trim();if(t==="")return;if(u.PLAIN.test(t))return u.num(t);const i=u.COLONS.exec(t);if(i){const[,n,o,a]=i;return Number(o)>=60||u.num(a)>=60?void 0:u.num(n)*3600+Number(o)*60+u.num(a)}const s=u.UNITS.exec(t);return s&&(s[1]!==void 0||s[2]!==void 0||s[3]!==void 0)?u.num(s[1])*3600+u.num(s[2])*60+u.num(s[3]):/^P/i.test(t)?G.seconds(t.toUpperCase()):void 0}static isClock(e){return u.clock(e)!==void 0}static clock(e){const t=u.CLOCK.exec((e??"").trim());if(!t)return;const[,i,s,n,o,a,r]=t,h={hour:Number(o),minute:Number(a),second:u.num(r)};if(!(h.hour>=24||h.minute>=60||h.second>=60)){if(i!==void 0){const c={year:Number(i),month:Number(s),day:Number(n)};if(c.month<1||c.month>12||c.day<1||c.day>31)return;h.date=c}return h}}static elapsedSince(e,t){if(!e||e.hour===void 0||e.minute===void 0)return;const i=e.hour*3600+e.minute*60+(e.second??0),s=t.hour*3600+t.minute*60+t.second;if(t.date){if(e.year===void 0||e.month===void 0||e.day===void 0)return;const o=Date.UTC(t.date.year,t.date.month-1,t.date.day)/1e3+s,a=Date.UTC(e.year,e.month-1,e.day)/1e3+i;return Math.max(0,o-a)}let n=s-i;return n<=-43200&&(n+=86400),Math.max(0,n)}}z();V.register();const T=pe.home(),k="compare-account",I="start-time",H="start-clock",w="observer",A="case-named",L="show-info",B="interpretation",x="hide-pickers",C="case",g="account",O="variant-",R=`${T}/edit/`;class v extends HTMLElement{static get observedAttributes(){return["src","show-labels",L,x,B,A,I,H,w,y,E,k]}shadow;sceneElement;toolbarElement;accountElement;accountPrefix;caseOfElement;observerText;observerSelect;infoButton;infoPanel;infoAppLink;editLink;readingFindingsElement;readingSensible=!1;readingCheck;bestCases;readingScene=!1;readingEntry;static VERDICT_COLOURS={incompatible:"#e04848",unsettled:"#e08a2c",compatible:"#2e9d5b"};infoObservationHeading;infoObservationList;infoCreditsToggle;infoCreditsList;infoCloseButton;shareButton;shareMessages;shareDialog;shareStartOn;shareStart;shareScopeRow;shareScopeLabel;shareScope;shareOpensRow;shareOpensLabel;shareOpens;shareStartLabel;shareOptions;labelsToggle;paramSummary;summaryBuilder;summarySignature="";assessmentEntries=[];assessmentToken=0;supportsPopover=typeof HTMLElement.prototype.showPopover=="function";entries=[];caseSource;interpretationChoice;interpretationLabel;interpretationSelect;confrontationElement;confrontationHeading;confrontationList;compareButton;variantChips;variantMoved;interpretationLoaders=new Map;interpretationToken=0;shownInterpretation;offeredFor;currentSrc;infoOpen=!1;creditsOpen=!1;labelsShown=!1;language="en";messages;ready=Promise.resolve();constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("template");e.innerHTML=`<style>${me}</style>${ue}`,this.shadow.appendChild(e.content.cloneNode(!0)),customElements.upgrade(this.shadow),this.sceneElement=document.createElement(q),this.forwardPlayerAttributes(),this.sceneElement.ufoElement.creditShownExternally=!0,this.sceneElement.ownCredits=!1,this.shadow.getElementById("ufo-slot").replaceWith(this.sceneElement),this.toolbarElement=this.shadow.getElementById("toolbar"),this.accountElement=this.shadow.getElementById("account"),this.accountPrefix=this.shadow.getElementById("account-prefix"),this.caseOfElement=this.shadow.getElementById("case-of"),this.observerText=this.shadow.getElementById("observer-text"),this.observerSelect=this.shadow.getElementById("observer"),this.infoButton=this.shadow.getElementById("info-button"),this.infoPanel=this.shadow.getElementById("info-panel"),this.infoAppLink=this.shadow.getElementById("info-app-link"),this.editLink=this.shadow.getElementById("edit-link"),this.infoObservationHeading=this.shadow.getElementById("info-observation-heading"),this.infoObservationList=this.shadow.getElementById("info-observation-list"),this.infoCreditsToggle=this.shadow.getElementById("info-credits-toggle"),this.infoCreditsList=this.shadow.getElementById("info-credits-list"),this.infoCloseButton=this.shadow.getElementById("info-close"),this.labelsToggle=this.shadow.getElementById("labels-button"),this.paramSummary=this.shadow.getElementById("param-summary"),this.labelsToggle.addEventListener("click",()=>{this.showLabels=!this.showLabels}),this.shareButton=document.createElement("button"),this.shareButton.type="button",this.shareButton.id="share-button",this.shareButton.setAttribute("aria-haspopup","dialog"),this.shareButton.innerHTML=W.SHARE,this.sceneElement.ufoElement.addControl(this.shareButton),this.shareDialog=this.shadow.getElementById("share-dialog"),this.shareDialog.subject=this.shareSubject,this.shareStartOn=this.shadow.getElementById("share-start-on"),this.shareStart=this.shadow.getElementById("share-start"),this.shareStartLabel=this.shadow.getElementById("share-start-label"),this.shareScopeRow=this.shadow.getElementById("share-scope-row"),this.shareScopeLabel=this.shadow.getElementById("share-scope-label"),this.shareScope=this.shadow.getElementById("share-scope"),this.shareOpensRow=this.shadow.getElementById("share-opens-row"),this.shareOpensLabel=this.shadow.getElementById("share-opens-label"),this.shareOpens=this.shadow.getElementById("share-opens");const t=s=>({input:this.shadow.getElementById(`share-opt-${s}`),label:this.shadow.getElementById(`share-opt-${s}-label`)});this.shareOptions={labels:t("labels"),map:t("map"),milestones:t("milestones"),compare:t("compare")},this.interpretationChoice=this.shadow.getElementById("interpretation-choice"),this.interpretationLabel=this.shadow.getElementById("interpretation-label"),this.interpretationSelect=this.shadow.getElementById("interpretation"),this.confrontationElement=this.shadow.getElementById("confrontation"),this.confrontationHeading=this.shadow.getElementById("confrontation-heading"),this.confrontationList=this.shadow.getElementById("confrontation-list"),N.register(),this.readingFindingsElement=this.shadow.getElementById("reading-findings");const i=this.shadow.getElementById("reading-chip");i.addEventListener("click",()=>{const s=i.getAttribute("aria-expanded")!=="true";i.setAttribute("aria-expanded",String(s)),this.shadow.getElementById("reading-findings-list").hidden=!s}),this.compareButton=this.shadow.getElementById("compare-account"),this.variantChips=this.shadow.getElementById("variant-chips"),this.variantMoved=this.shadow.getElementById("variant-moved"),this.compareButton.addEventListener("click",()=>this.setComparing(!this.sceneElement.compareAccount)),this.observerSelect.addEventListener("change",()=>this.selectObserver(this.observerSelect.value)),this.interpretationSelect.addEventListener("change",()=>void this.chooseInterpretation(this.interpretationSelect.value)),this.sceneElement.addEventListener(K,s=>this.showConfrontation(s.detail)),this.sceneElement.ufoElement.addEventListener("timeupdate",()=>this.refreshParamSummary()),this.supportsPopover?(this.infoPanel.setAttribute("popover","auto"),this.infoPanel.removeAttribute("hidden"),this.infoButton.setAttribute("popovertarget","info-panel"),this.infoPanel.addEventListener("beforetoggle",s=>{s.newState==="open"&&(this.populateInfoPanel(),this.bringInfoButtonIntoView())}),this.infoPanel.addEventListener("toggle",s=>this.syncInfoOpen(s.newState==="open"))):this.infoButton.addEventListener("click",()=>this.toggleInfoPanel()),this.infoCloseButton.addEventListener("click",()=>this.toggleInfoPanel()),this.infoCreditsToggle.addEventListener("click",()=>this.toggleCredits()),this.shareButton.addEventListener("click",()=>this.openShare()),this.editLink.addEventListener("click",s=>{const n=this.editDetail();n&&Z.ask(this,J,n)&&s.preventDefault()});for(const s of[this.shareStartOn,this.shareStart,...Object.values(this.shareOptions).map(n=>n.input)])s.addEventListener("input",()=>this.refreshShareLinks());for(const s of[this.shareScope,this.shareOpens])s.addEventListener("change",()=>this.refreshShareLinks());this.isConnected&&(this.ready=this.loadLocaleMessages())}get scene(){return this.sceneElement}async loadLocaleMessages(){const e=++this.localeToken,t=U.preferencesFor(this);this.preferences=t;const i=Q(t,X),[s,n,o,a]=await Promise.all([Y.load(i),ee(i),te(i),se.load(i)]);if(e!==this.localeToken)return;const r=i!==this.language||this.messages===void 0;this.language=i,this.messages=s,this.readingCheck=new ie(a),this.bestCases=new ne(a),this.tags=new $(n),this.said=new D(t),this.summaryBuilder=new oe(this.messages,new ae(o),this.said,this.tags,{messages:this.messages,locale:i}),this.accountPrefix.textContent=this.messages?.accountBy??"",this.interpretationLabel.textContent=this.messages?.interpretation??"",this.confrontationHeading.textContent=this.messages?.confrontation??"";const h=this.entries.find(c=>c.src===this.currentSrc);h&&this.offerInterpretations(h),this.updateCompareButton(),this.infoButton.title=this.messages?.about??"",this.infoButton.setAttribute("aria-label",this.messages?.about??""),this.editLink.title=this.messages?.editThisObservation??"",this.editLink.setAttribute("aria-label",this.messages?.editThisObservation??""),this.infoCloseButton.setAttribute("aria-label",this.messages?.close??""),this.infoObservationHeading.textContent=this.messages?.observation??"",this.infoCreditsToggle.textContent=this.messages?.credits??"",this.syncLabelsToggle(),this.refreshParamSummary(),r&&this.currentSrc&&this.runAssessments(),this.shareButton.title=this.messages?.share??"",this.shareButton.setAttribute("aria-label",this.messages?.share??""),this.shareStartLabel.textContent=this.messages?.shareStartAt??"",this.shareScopeLabel.textContent=this.messages?.shareScope??"",this.shareOpensLabel.textContent=this.messages?.shareOpensOn??"",this.shareOptions.labels.label.textContent=this.messages?.shareOptionLabels??"",this.shareOptions.map.label.textContent=this.messages?.shareOptionMap??"",this.shareOptions.milestones.label.textContent=this.messages?.shareOptionMilestones??"",this.shareOptions.compare.label.textContent=this.messages?.shareOptionCompare??"",this.shareStart.setAttribute("aria-label",this.messages?.shareStartAt??""),this.shareDialog.useLanguage(i).then(c=>{c&&(this.shareMessages=c)}),this.infoOpen&&this.populateInfoPanel(),this.updateAccountLine()}preferences=[];localeToken=0;said=new D(["en"]);tags=new $({});connectedCallback(){U.preferencesFor(this).join()!==this.preferences.join()&&(this.ready=this.loadLocaleMessages()),this.applyAskedInfo();const e=this.getAttribute("src");e&&this.loadFromSrc(e)}applyAskedInfo(){this.isConnected&&this.hasAttribute(L)!==this.infoOpen&&this.toggleInfoPanel()}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}attributeChangedCallback(e,t,i){if(e==="src"&&i&&i!==t&&this.isConnected&&this.loadFromSrc(i),e===B){const s=this.entries.find(n=>n.src===this.currentSrc);s&&i===null&&t!==null&&this.interpretationSelect.value!==g?(this.interpretationSelect.value=g,this.chooseInterpretation(g)):s&&this.offerInterpretations(s)}if(e===x){const s=this.entries.find(n=>n.src===this.currentSrc);this.setEntries(this.entries,this.caseSource),s&&this.offerInterpretations(s)}if(e===L&&this.applyAskedInfo(),e==="show-labels"&&this.applyLabels(this.hasAttribute("show-labels")),(e===y||e===E)&&this.forwardPlayerAttributes(),e===w&&this.entries.length>1){const s=this.entryAsked(this.entries);s&&s.src!==this.currentSrc&&this.selectObserver(s.src)}e===k&&this.setComparing(this.hasAttribute(k))}forwardPlayerAttributes(){for(const e of[y,E]){const t=this.getAttribute(e);t===null?this.sceneElement.removeAttribute(e):this.sceneElement.setAttribute(e,t)}}get loaded(){return this.loading??Promise.resolve()}loading;loadFromSrc(e){const t=this.readFromSrc(e);return this.loading=t.catch(()=>{}),t}async readFromSrc(e){this.startPending=!0;const t=S.recording(e);this.sceneElement.holdForNewScene(t);const i=await t;if(Array.isArray(i))throw new Error(`${e} is a bare list of recordings, which is no longer read: list them as the sighting events of a case.json`);if(m.isCase(i)){m.check(i);const s=m.sightingUrls(i,new URL(e,location.href).href);if(s.length===0)throw new Error(`${e} is a case with no sighting event: no recording to show`);await this.loadObserverUrls(s,{json:i,url:new URL(e,location.href).href})}else this.setEntries([{src:e,sighting:i}],void 0)}get sightingData(){return this.entries.find(e=>e.src===this.currentSrc)?.sighting}set sightingData(e){const t=P.recording(e);this.startPending=!0,this.currentSrc="",this.setEntries([{src:"",sighting:t}],void 0)}seekTo(e,t){const i=this.caseSource,s=t===void 0?void 0:this.entries.find(n=>{const o=this.plain(n).id;return(i?m.accountIds(i.json,i.url,n.src,o):[o]).includes(t)});s&&s.src!==this.currentSrc&&this.selectObserver(s.src),this.sceneElement.ufoElement.currentTime=Math.max(0,e)*1e3}set citedMoments(e){this.sceneElement.ufoElement.citedMoments=e}get playedSeconds(){return this.sceneElement.ufoElement.currentTime/1e3}get observerUrls(){return this.entries.map(e=>e.src)}set observerUrls(e){this.loadObserverUrls(e)}async loadObserverUrls(e,t){const i=await Promise.all(e.map(async s=>({src:s,sighting:await S.recording(s)})));this.setEntries(i,t)}reportCaseProblems(e,t){const{duplicateIds:i,unresolved:s}=m.problems(e,t.map(n=>this.plain(n).id).filter(n=>n!==void 0));for(const n of i)console.warn(`The case ${e.id??""} gives the id "${n}" to more than one event: a reference to it is ambiguous.`);for(const{reading:n,reference:o}of s)console.warn(`The reading ${n} of the case ${e.id??""} is "interpretationOf" "${o}", which no event of the case has as its id, nor any recording it lists.`)}setEntries(e,t){this.entries=e.map(o=>({...o,sighting:P.recording(o.sighting)})),this.caseSource=t,t&&this.reportCaseProblems(t.json,e),this.toolbarElement.hidden=e.length===0;const i=e.length>1&&!this.hasAttribute(x);this.observerSelect.hidden=!i,this.observerText.hidden=i,this.observerSelect.innerHTML="";const s=e.map((o,a)=>this.observerDisplayName(this.plain(o).observer)??this.caseTitleOf(o)??(this.messages?.unnamedObserver??"").replace("{n}",String(a+1)));for(const[o,a]of e.entries()){const r=document.createElement("option");r.value=a.src;const h=s.filter(c=>c===s[o]).length>1;r.textContent=(h?this.caseTitleOf(a):void 0)??s[o],this.observerSelect.appendChild(r)}const n=e.find(o=>o.src===this.currentSrc)??this.entryAsked(e)??e[0];n?this.selectObserver(n.src):this.updateAccountLine()}entryAsked(e){const t=this.getAttribute(w)?.trim();if(!t)return;const i=e.find(o=>this.plain(o).observer?.id===t);if(i)return i;const s=this.caseSource;if(s){const o=e.find(a=>m.accountIds(s.json,s.url,a.src,this.plain(a).id).includes(t));if(o)return o}const n=e.find(o=>o.src.split("/").pop()===t.split("/").pop());return n||(/^\d+$/.test(t)?e[Number(t)-1]:void 0)}observerKeyOf(e){return this.plain(e).observer?.id??String(this.entries.indexOf(e)+1)}sharedEntry(){const e=this.shareScope.value;if(!(!this.caseSource||e===C))return this.entries.find(t=>t.src===e)}get sharesCase(){return this.caseSource!==void 0&&!this.shareScopeRow.hidden&&this.shareScope.value===C}editorUrl(){if(!this.currentSrc)return R;const e=new URL(this.currentSrc,location.href),t=this.caseSource;return t?`${R}?file=${encodeURIComponent(t.url)}&track=${encodeURIComponent(this.shownTrackUrl()??e.href)}`:`${R}?file=${encodeURIComponent(e.href)}`}editDetail(){if(!this.currentSrc)return;const e=new URL(this.currentSrc,location.href).href,t=this.caseSource;return t?{src:t.url,track:this.shownTrackUrl()??e}:{src:e}}get editorHref(){return this.editorUrl()}get shownRecordingUrl(){return this.currentSrc?new URL(this.currentSrc,location.href).href:void 0}get shownReadingUrl(){return this.shownTrackUrl()}shownTrackUrl(){return this.readingUrlOf(this.interpretationSelect.value)}shareSubject={module:"rr0-sighting",link:()=>this.playUrl(),element:()=>this.replayElement()};replayElement(){const e=this.sharedAddress(),i=[...e.observer?[[w,e.observer]]:[],...this.replayAttributes()].map(([s,n])=>n===""?` ${s}`:` ${s}="${n}"`).join("");return`<rr0-sighting src="${e.src}"${i}></rr0-sighting>`}playUrl(){const e=this.sharedAddress(),t=[...e.observer?[`${w}=${encodeURIComponent(e.observer)}`]:[],...this.replayQuery()].join("&");return e.src?`${T}/play/?file=${encodeURIComponent(e.src)}${t&&"&"+t}`:`${T}/play/${t&&"?"+t}`}sharedAddress(){const e=t=>t?new URL(t,location.href).href:"";if(this.sharesCase){const t=this.entries.find(i=>i.src===this.shareOpens.value)??this.entries.find(i=>i.src===this.currentSrc);return{src:e(this.caseSource.url),observer:t?this.observerKeyOf(t):void 0}}return{src:e(this.sharedEntry()?.src??this.currentSrc??"")}}replayAttributes(){const e=this.shareOptions,t=[];return this.shareStartSeconds!==void 0&&t.push([I,String(this.shareStartSeconds)]),e.labels.input.checked&&t.push(["show-labels",""]),e.map.input.checked&&t.push([y,""]),e.milestones.input.checked||t.push([E,""]),e.compare.input.checked&&t.push([k,""]),t}replayQuery(){const e=this.shareOptions,t=[];return this.shareStartSeconds!==void 0&&t.push(`d=${this.shareStartSeconds}`),e.labels.input.checked||t.push("labels=0"),e.map.input.checked&&t.push("map=1"),e.milestones.input.checked||t.push("moments=0"),e.compare.input.checked&&t.push("compare=1"),t}get shareStartSeconds(){const e=Math.floor(Number(this.shareStart.value));return this.shareStartOn.checked&&Number.isFinite(e)&&e>=0?e:void 0}refreshShareLinks(){this.shareOpensRow.hidden=!this.sharesCase,this.shareDialog.refresh()}openShare(){const e=this.sceneElement.ufoElement;this.shareStart.max=String(Math.floor(e.seekableDuration/1e3)),this.shareStart.value=String(Math.floor(e.currentTime/1e3)),this.shareStartOn.checked=!1,this.shareOptions.labels.input.checked=this.labelsShown,this.shareOptions.map.input.checked=e.observerMapOpen,this.shareOptions.milestones.input.checked=e.milestonesVisible,this.shareOptions.compare.input.checked=this.sceneElement.compareAccount,this.offerShareScope(),this.shareOpensRow.hidden=!this.sharesCase;const t=[this.caseSource?.url,this.currentSrc,this.shownTrackUrl(),...this.entries.map(i=>i.src)];this.shareDialog.note=M.changed(...t)?this.shareMessages?.unsaved:void 0,this.shareDialog.open()}offerShareScope(){const e=this.caseSource!==void 0&&this.entries.length>1&&!this.hasAttribute(A);if(this.shareScopeRow.hidden=!e,this.shareScope.innerHTML="",this.shareOpens.innerHTML="",!e)return;const t=(i,s,n)=>{const o=document.createElement("option");o.value=s,o.textContent=n,i.appendChild(o)};t(this.shareScope,C,this.messages?.shareScopeCase??"");for(const i of this.entries){const s=this.observerDisplayName(this.plain(i).observer)??this.caseTitleOf(i)??(this.messages?.unnamedObserver??"").replace("{n}",String(this.entries.indexOf(i)+1));t(this.shareScope,i.src,s),t(this.shareOpens,i.src,s)}this.shareScope.value=C,this.shareOpens.value=this.currentSrc??this.entries[0].src}offerInterpretations(e){const t=this.offeredFor===e.sighting,i=this.interpretationSelect.value;this.offeredFor=e.sighting,this.interpretationToken++,this.interpretationLoaders=new Map,this.interpretationSelect.innerHTML="";const s=(d,l,p)=>{const f=document.createElement("option");f.value=d,f.textContent=l,this.interpretationSelect.appendChild(f),this.interpretationLoaders.set(d,p)},n=e===this.entries.find(d=>d.src===this.currentSrc),o=n?this.sceneElement.ufoElement.sighting.interpretation:void 0;s(g,this.messages?.account??"",()=>Promise.resolve(o));const a=this.caseSource;a&&m.interpretationEvents(a.json,m.accountIds(a.json,a.url,e.src,this.plain(e).id)).forEach((d,l)=>{const p=this.said.read(d.title)??`#${l+1}`,f=(d.by??[]).map(b=>this.agentName(b)).filter(Boolean).join(", ");s(`case-${l}`,f?(this.messages?.interpretationBy??"").replace("{title}",p).replace("{by}",f):p,()=>m.interpretationOf(d,a.url,b=>S.recording(b)))});const r=n?this.keptVariants(e):[];for(const{index:d,kept:l}of r)s(`${O}${d}`,`${this.variantLabel(l)} (${this.messages?.verdicts[l.variant.verdict]??""})`,()=>Promise.resolve(l.bodies.length>0?l:void 0));const h=t&&[...this.interpretationSelect.options].some(d=>d.value===i),c=this.askedInterpretation()??(h?i:g);this.interpretationSelect.value=c,c===g?(this.sceneElement.interpretation!==o&&(this.sceneElement.interpretation=o),this.shownInterpretation=g):(!this.sceneElement.interpretation||this.shownInterpretation!==c)&&this.chooseInterpretation(c),this.interpretationChoice.hidden=this.interpretationSelect.options.length<2||this.hasAttribute(x),this.showConfrontation(this.sceneElement.confrontation),this.updateCompareButton(),this.showVariants(r)}keptVariants(e){const t={consolidated:0,contested:1,incompatible:2};return(e.sighting.variants??[]).map((i,s)=>({index:s,kept:i})).filter(({kept:i})=>i.variant).sort((i,s)=>t[i.kept.variant.verdict]-t[s.kept.variant.verdict]||i.kept.variant.cost-s.kept.variant.cost)}variantLabel(e){return(this.messages?.variant??"").replace("{name}",e.variant.label??e.variant.candidate)}showVariants(e){if(!this.messages)return;if(this.variantChips.innerHTML="",this.variantChips.hidden=e.length===0,e.length===0){this.showVariantMoved();return}const t=(i,s,n)=>{const o=document.createElement("button");o.type="button",o.dataset.value=i,n&&(o.dataset.verdict=n,o.title=this.messages.verdicts[n],o.append(Object.assign(document.createElement("span"),{className:"dot"}))),o.append(s),o.addEventListener("click",()=>{this.interpretationSelect.value!==i&&(this.interpretationSelect.value=i,this.chooseInterpretation(i))}),this.variantChips.append(o)};t(g,this.messages?.account??"");for(const{index:i,kept:s}of e)t(`${O}${i}`,s.variant.label??s.variant.candidate,s.variant.verdict);this.showVariantMoved()}showVariantMoved(){if(!this.messages)return;const e=this.interpretationSelect.value;for(const n of this.variantChips.querySelectorAll("button"))n.setAttribute("aria-pressed",String(n.dataset.value===e));this.variantMoved.innerHTML="";const t=e.startsWith(O)?Number(e.slice(O.length)):-1,i=this.sceneElement.ufoElement.sighting.variants?.[t]?.variant;if(this.variantMoved.hidden=!i||i.moved.length+(i.readings?.length??0)===0,!i)return;const s=new Intl.NumberFormat(this.language,{maximumFractionDigits:1});for(const n of i.moved){const[o,a]=n.field==="time"?["0 min",`${n.variant>0?"+":""}${s.format(n.variant)} min`]:n.field==="duration"?[`${s.format(n.stated)} s`,`${s.format(n.variant)} s`]:[`${s.format(n.stated)}°`,`${s.format(n.variant)}°`],r=document.createElement("span");r.append(`${this.messages.variantFields[n.field]}${this.colon}`,Object.assign(document.createElement("s"),{textContent:o})," → ",Object.assign(document.createElement("b"),{textContent:a})),this.variantMoved.append(r)}for(const n of i.readings??[]){const o=this.messages.variantReadings[n.reading];o&&this.variantMoved.append(Object.assign(document.createElement("span"),{className:"reading",textContent:o}))}}setComparing(e){this.sceneElement.compareAccount=e,this.updateCompareButton(),this.showConfrontation(this.sceneElement.confrontation)}updateCompareButton(){const e=this.sceneElement.compareAccount;this.compareButton.hidden=!this.sceneElement.interpretation,this.compareButton.setAttribute("aria-pressed",String(e));const t=e?this.messages?.hideComparison??"":this.messages?.showComparison??"";this.compareButton.title=t,this.compareButton.setAttribute("aria-label",t)}get colon(){return this.language==="fr"?" : ":": "}askedInterpretation(){const e=this.getAttribute(B)?.trim(),t=this.caseSource;if(!e||!t)return;const i=this.entries.find(o=>o.src===this.currentSrc);if(!i)return;const n=m.interpretationEvents(t.json,m.accountIds(t.json,t.url,i.src,this.plain(i).id)).findIndex(o=>o.id===e||typeof o.url=="string"&&new URL(o.url,t.url).href===new URL(e,location.href).href);return n>=0?`case-${n}`:void 0}async chooseInterpretation(e){const t=++this.interpretationToken,i=this.interpretationLoaders.get(e),s=i?await i().catch(l=>{console.warn(`<rr0-sighting>: could not read interpretation "${e}":`,l)}):void 0,n=this.readingUrlOf(e),o=n?await S.recording(n).catch(()=>{}):void 0;if(t!==this.interpretationToken)return;const a=this.entries.find(l=>l.src===this.currentSrc),r=a&&o&&"timeline"in o?this.bestCases?.bestSceneOf(a.sighting,o):void 0,h=r??o,c=r?.interpretation&&s?{...s,bodies:[...s.bodies.map(l=>{const p=r.interpretation.bodies.find(f=>f.id===l.id);return p?{...l,track:p.track}:l}),...r.interpretation.bodies.filter(l=>!s.bodies.some(p=>p.id===l.id))]}:s,d=a&&h&&"timeline"in h&&v.changesTheScene(a.sighting,h)?{...h,timeline:h.timeline.keyframes?.length?h.timeline:a.sighting.timeline}:void 0;if(d&&n)this.showScene(d,n);else if(this.readingScene&&a)this.showScene(a.sighting,a.src,!0);else if(a){const l=!this.sceneElement.ufoElement.playRequested;n?this.sceneElement.showPoster(o?.image,n,l):a.sighting.image?this.sceneElement.showPoster(a.sighting.image,a.src?new URL(a.src,location.href).href:void 0,l):this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,l)}this.readingScene=d!==void 0,this.sceneElement.interpretation=c,this.shownInterpretation=e,this.showReadingFindings(a,h),this.editLink.href=this.editorUrl(),this.dispatchEvent(new CustomEvent(ge,{detail:{track:this.shownTrackUrl()}})),this.updateCompareButton(),this.showConfrontation(this.sceneElement.confrontation),this.showVariantMoved()}readingUrlOf(e){const t=this.caseSource,i=this.entries.find(o=>o.src===this.currentSrc),s=/^case-(\d+)$/.exec(e);if(!t||!i||!s)return;const n=m.interpretationEvents(t.json,m.accountIds(t.json,t.url,i.src,this.plain(i).id))[Number(s[1])];return n?.url?new URL(n.url,t.url).href:void 0}static SCENE_FIELDS=["time","utcOffsetHours","place","observerTrack","weatherTrack","decor","instrument","lens","film","exposureSeconds","iso","references","lighting","lightPollution","vehicle"];static changesTheScene(e,t){const i=s=>JSON.stringify(v.SCENE_FIELDS.map(n=>s[n]));return i(e)!==i(t)}showScene(e,t,i=!1){const s=this.sceneElement.ufoElement.currentTime;this.sceneElement.documentUrl=t?new URL(t,location.href).href:void 0;const n=!this.sceneElement.ufoElement.playRequested,o=t?new URL(t,location.href).href:void 0;e.image?this.sceneElement.showPoster(e.image,o,n):i?this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,n):this.sceneElement.showPoster(void 0,void 0,n),this.sceneElement.sightingData=e,this.sceneElement.ufoElement.currentTime=s}showReadingFindings(e,t){const i=this.readingFindingsElement,s=this.messages,n=t?.interpretation?.findings??[],o=e&&t&&this.readingCheck?this.readingCheck.findingsOf(e.sighting,t):[],a=[...n,...o],r=re.of(a);this.readingEntry=s&&r?{group:"summary",field:"reading",label:s.readingLabel,unit:"",fromSource:!1,value:(a.length===1?s.readingChipOne:s.readingChip).replace("{verdict}",s.readingVerdict[r]).replace("{n}",String(a.length)),color:v.VERDICT_COLOURS[r],full:a.map(d=>`${{holds:"✓",fails:"✗",untested:"?"}[d.outcome]} ${this.said.read(d.text)??""}`+(d.outcome==="fails"?` (${s.findingAgainst[d.against??"established"]})`:"")).join(`
|
|
692
|
-
`)}:void 0,this.summarySignature="\0",this.refreshParamSummary();const h=i.querySelector("#reading-sensitivity");if(this.readingSensible=e&&t?N.resultOf(e.sighting,t)!==void 0:!1,h.show(e?.sighting,t),this.showReadingBox(),!s||!r){i.querySelector("#reading-findings-list").hidden=!0,delete i.dataset.verdict;return}i.dataset.verdict=r,i.querySelector("#reading-verdict").textContent=(a.length===1?s.readingChipOne:s.readingChip).replace("{verdict}",s.readingVerdict[r]).replace("{n}",String(a.length));const c=i.querySelector("#reading-findings-list");i.querySelector("#reading-chip").setAttribute("aria-expanded","false"),c.hidden=!0,c.replaceChildren(...a.map(d=>{const l=document.createElement("li");l.dataset.outcome=d.outcome;const p=document.createElement("span");p.className="finding-mark",p.textContent={holds:"✓",fails:"✗",untested:"?"}[d.outcome],p.title=s.findingOutcome[d.outcome],p.setAttribute("aria-label",s.findingOutcome[d.outcome]);const f=document.createElement("span");if(f.textContent=this.said.read(d.text)??"",l.append(p,f),d.outcome==="fails"){const b=document.createElement("span");b.className="finding-against",b.textContent=`(${s.findingAgainst[d.against??"established"]})`,l.append(b)}return l}))}agentName(e){if("people"in e){const[t,...i]=e.people.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ");return[...i,t].join(" ")}return"org"in e?e.org.replace(/([a-z])([A-Z])/g,"$1 $2"):this.observerDisplayName(e)??""}showConfrontation(e){this.confrontationList.innerHTML="",this.confrontationElement.hidden=!this.sceneElement.interpretation||!this.sceneElement.compareAccount;const t=new Intl.NumberFormat(this.language,{maximumFractionDigits:1,minimumFractionDigits:1}),i=new Intl.NumberFormat(this.language,{maximumFractionDigits:2,minimumFractionDigits:2});for(const s of e){const n=document.createElement("li");n.append(`${this.said.read(s.title)??s.sourceId}${this.colon}`);const o=[];s.separationDeg!==void 0&&o.push([(this.messages?.confrontationDirection??"").replace("{deg}",t.format(s.separationDeg)),s.disagreements.includes("direction")]),s.widthRatio!==void 0&&o.push([(this.messages?.confrontationWidth??"").replace("{ratio}",i.format(s.widthRatio)),s.disagreements.includes("width")]),s.heightRatio!==void 0&&o.push([(this.messages?.confrontationHeight??"").replace("{ratio}",i.format(s.heightRatio)),s.disagreements.includes("height")]),o.forEach(([a,r],h)=>{h>0&&n.append(" · ");const c=document.createElement("span");c.textContent=a,r&&(c.className="disagrees"),n.append(c)}),this.confrontationList.appendChild(n)}}startPending=!1;startSeconds(e){const t=u.clock(this.getAttribute(H)),i=this.plain(e).time;return(t?u.elapsedSince(i===void 0?void 0:j(i),t):void 0)??u.delta(this.getAttribute(I))}selectObserver(e){const t=this.entries.find(s=>s.src===e);if(!t)return;this.currentSrc=e,this.observerSelect.value=e,this.sceneElement.documentUrl=t.src?new URL(t.src,location.href).href:void 0;const i=!this.sceneElement.ufoElement.playRequested;if(this.askedInterpretation()||(t.sighting.image?this.sceneElement.showPoster(t.sighting.image,t.src?new URL(t.src,location.href).href:void 0,i):this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,i)),this.sceneElement.holdForNewScene(),this.sceneElement.sightingData=t.sighting,this.readingScene=!1,this.startPending){this.startPending=!1;const s=this.startSeconds(t);s!==void 0&&(this.sceneElement.ufoElement.currentTime=Math.max(0,s)*1e3)}this.offerInterpretations(t),this.updateAccountLine(),this.refreshParamSummary(),this.runAssessments(),this.infoOpen&&this.populateInfoPanel(),this.dispatchEvent(new CustomEvent(fe,{detail:{src:e}}))}async runAssessments(){if(!this.messages)return;const e=++this.assessmentToken,t=await new he(this.messages).read(this.sceneElement.ufoElement.sighting);e===this.assessmentToken&&(this.assessmentEntries=t.entries,this.refreshParamSummary())}updateAccountLine(){const e=this.entries.find(a=>a.src===this.currentSrc),t=e?this.observerDisplayName(this.plain(e).observer):void 0,i=t!==void 0||this.entries.length>1;this.accountElement.hidden=!i,this.observerText.textContent=t??"";const n=!this.hasAttribute(A)&&this.caseSource&&(this.said.read(this.caseSource.json.title)??this.caseSource.json.id);this.caseOfElement.hidden=!n,this.caseOfElement.textContent=n?`${this.messages?.case??""} ${n}`:"";const o=t!==void 0?`${this.messages?.accountBy??""} ${t}`.trim():void 0;this.sceneElement.filmName=[n||void 0,o].filter(Boolean).join(" - ")||void 0,this.editLink.hidden=!this.currentSrc,this.editLink.href=this.editorUrl(),this.shareButton.hidden=M.local(this.caseSource?.url??this.currentSrc),this.editLink.title=this.messages?.editThisObservation??"",this.editLink.setAttribute("aria-label",this.messages?.editThisObservation??"")}caseTitleOf(e){const t=this.caseSource;if(!t)return;const i=t.json.events?.find(s=>s.url!==void 0&&!s.interpretationOf&&new URL(s.url,t.url).href===new URL(e.src,location.href).href);return i?this.said.read(i.title):void 0}observerDisplayName(e){if(!e)return;const t=[...e.firstNames??[],e.lastName].filter(Boolean).join(" ");return this.said.read(e.title)||t||e.id}plainRecordings=new WeakMap;plain(e){return this.stripped(e).recording}stripped(e){let t=this.plainRecordings.get(e.sighting);return t||(t=le.strip(e.sighting),this.plainRecordings.set(e.sighting,t)),t}basisOf(e,t){const i=this.stripped(e).provenance,s={established:-2,measured:-1,stated:0,derived:1,assumed:2,fitted:3},n=i.paths().filter(r=>t.some(h=>r===h||r.startsWith(`${h}.`))).map(r=>i.at(r)),o=n.reduce((r,h)=>s[h.basis]>s[r]?h.basis:r,"stated"),a=n.filter(r=>r.basis===o&&r.rationale).map(r=>this.said.read(r.rationale)??"").filter(r=>r!=="");return{basis:o,rationales:a}}formatDate(e){const t=e.place?.locations?.[0],i=de((e.time?j(e.time):void 0)??{},t?.lng??0,e.utcOffsetHours);if(!i)return;const s=i.getTime()+this.utcOffsetHoursOf(e,t?.lng??0)*36e5;if(Number.isFinite(s))return new Intl.DateTimeFormat(this.language,{dateStyle:"long",timeStyle:"short",timeZone:"UTC"}).format(new Date(s))}utcOffsetHoursOf(e,t){return e.utcOffsetHours??Math.round(t/15)}formatLocation(e){const t=e.place?.locations?.[0];if(t)return`${t.lat.toFixed(4)}, ${t.lng.toFixed(4)}`}toggleInfoPanel(){const e=!this.infoOpen;if(this.supportsPopover){const t=this.infoPanel.matches(":popover-open");e&&!t?this.infoPanel.showPopover():!e&&t&&this.infoPanel.hidePopover();return}e&&this.bringInfoButtonIntoView(),this.syncInfoOpen(e),this.infoPanel.hidden=!e,e?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}bringInfoButtonIntoView(){const e=this.infoButton.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight;e.top>=0&&e.bottom<=t||this.infoButton.scrollIntoView({block:"center"})}syncInfoOpen(e){e!==this.infoOpen&&(this.infoOpen=e,this.infoButton.setAttribute("aria-expanded",String(e)),e?this.supportsPopover||this.populateInfoPanel():(this.creditsOpen=!1,this.infoCreditsList.hidden=!0,this.infoCreditsToggle.setAttribute("aria-expanded","false")))}handleOutsideClick=e=>{const t=e.composedPath();!t.includes(this.infoPanel)&&!t.includes(this.infoButton)&&this.toggleInfoPanel()};toggleCredits(){this.creditsOpen=!this.creditsOpen,this.infoCreditsList.hidden=!this.creditsOpen,this.infoCreditsToggle.setAttribute("aria-expanded",String(this.creditsOpen)),this.creditsOpen&&this.revealInPanel(this.infoCreditsList)}revealInPanel(e){e.scrollIntoView?.({block:"nearest"})}get showLabels(){return this.labelsShown}set showLabels(e){this.toggleAttribute("show-labels",e)}applyLabels(e){this.labelsShown=e,this.syncLabelsToggle(),this.refreshParamSummary(),this.populateInfoPanel()}syncLabelsToggle(){const e=this.labelsShown?this.messages?.hideLabels??"":this.messages?.showLabels??"";this.labelsToggle.title=e,this.labelsToggle.setAttribute("aria-label",e),this.labelsToggle.setAttribute("aria-pressed",String(this.labelsShown))}showReadingBox(){const e=this.readingFindingsElement,t=this.readingEntry!==void 0&&!this.labelsShown;e.hidden=!t&&!this.readingSensible,e.querySelector("#reading-chip").hidden=!t,t||(e.querySelector("#reading-findings-list").hidden=!0)}refreshParamSummary(){if(this.paramSummary.hidden=!this.labelsShown,this.showReadingBox(),!this.labelsShown){this.paramSummary.replaceChildren(),this.summarySignature="";return}const e=this.sceneElement.ufoElement.sighting,t=this.summaryBuilder?.entriesFor(e,this.sceneElement.ufoElement.currentTime,{roadGradeDeg:this.sceneElement.roadGradeDeg})??[],i=t.map(h=>h.group).lastIndexOf("summary"),s=this.readingEntry?[this.readingEntry]:[],n=[...t.slice(0,i+1),...s,...t.slice(i+1),...this.assessmentEntries],o=n.map(h=>`${h.field}=${h.label}=${h.value}${h.unit}${h.full??""}${h.fromSource?"*":""}`).join("|");if(o===this.summarySignature)return;this.summarySignature=o;const a=[];let r;for(const h of n){r&&r.group!==h.group&&(r=void 0);const c=h.group==="summary"?this.messages?.summaryGroup??"":h.group==="observer"?this.messages?.observerGroup??"":this.messages&&h.group in this.messages.summaryGroups?this.messages.summaryGroups[h.group]:h.group==="assessment"?this.messages?.assessmentGroup??"":void 0;if(c!==void 0&&!r){const l=document.createElement("span");l.className="param-nest";const p=document.createElement("span");p.className="param-nest-label",p.textContent=c,l.append(p),r={group:h.group,element:l},a.push(l)}const d=this.paramItem(h);r?r.element.append(d):a.push(d)}this.paramSummary.replaceChildren(...a),this.syncDescription(n)}openDescription;openDescriptionTitle;syncDescription(e){this.openDescription!==void 0&&!e.some(t=>t.full===this.openDescription)&&(this.openDescription=void 0),_.sync(this.paramSummary,this.openDescription,this.openDescriptionTitle??this.messages?.summaryDescription??"",this.messages?.closeDescription??"",()=>{this.openDescription=void 0,this.syncDescription(e)})}paramItem(e){const t=document.createElement("span");if(t.className=e.fromSource?"param-label from-source":"param-label",e.detail&&(t.title=e.detail),e.full!==void 0){t.classList.add("describable"),t.tabIndex=0,t.setAttribute("role","button");const n=()=>{this.openDescription=e.full,this.openDescriptionTitle=e.label,this.syncDescription([e])};t.addEventListener("click",n),t.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n())})}const i=document.createElement("span");if(i.className="param-label-label",i.textContent=`${e.label} `,t.append(i),e.color!==void 0){const n=document.createElement("span");n.className="param-label-swatch",n.style.background=e.color,t.append(n)}const s=document.createElement("span");return s.className="param-label-value",s.textContent=e.unit===""?e.value:`${e.value} ${e.unit}`,t.append(s),t}populateInfoPanel(){const e=this.entries.find(t=>t.src===this.currentSrc);if(this.infoObservationList.innerHTML="",e){const t=this.caseSource&&(this.caseSource.json.title??this.caseSource.json.id);if(t&&this.appendInfoRow(this.infoObservationList,this.messages?.case??"",t),!this.labelsShown){const n=this.formatDate(this.plain(e));n&&this.appendInfoRow(this.infoObservationList,this.messages?.date??"",n,this.basisOf(e,v.DATE_PATHS));const o=this.formatLocation(this.plain(e));o&&this.appendInfoRow(this.infoObservationList,this.messages?.location??"",o,this.basisOf(e,v.PLACE_PATHS))}const i=this.said.read(this.plain(e).description);i&&!this.labelsShown&&this.appendInfoRow(this.infoObservationList,this.messages?.description??"",i);for(const n of this.plain(e).sources??[])this.appendInfoSource(this.infoObservationList,this.messages?.source??"",n);const s=this.plain(e).tags;!this.labelsShown&&s&&s.length>0&&this.appendInfoRow(this.infoObservationList,this.messages?.tags??"",s.map(n=>this.tags.name(n)).join(", "))}this.infoAppLink.href=T,this.infoAppLink.textContent="UFO@home v0.198.0",ce.fill(this.infoCreditsList,this.sceneElement)}appendInfoSource(e,t,i){const s=document.createElement("dt");s.textContent=t;const n=document.createElement("dd"),o=this.said.read(i.title)??i.url??"";if(i.url&&/^https?:\/\//i.test(i.url)){const r=document.createElement("a");r.href=i.url,r.target="_blank",r.rel="noopener noreferrer",r.textContent=o,n.appendChild(r)}else n.append(o);const a=[i.authors?.join(", "),i.publication?.publisher,i.publication?.time,i.index].filter(Boolean);a.length>0&&n.append(`, ${a.join(", ")}`),e.append(s,n)}static DATE_PATHS=["time","utcOffsetHours","timeZone"];static PLACE_PATHS=["place"];appendInfoRow(e,t,i,s){if(!this.messages)return;const n=document.createElement("dt");n.textContent=t;const o=document.createElement("dd");if(o.textContent=i,s){const a=document.createElement("span");a.className=`basis basis-${s.basis}`,a.textContent=this.messages.basis[s.basis],s.rationales.length>0&&(a.title=s.rationales.join(`
|
|
691
|
+
`;class u{static PLAIN=/^\d+(?:[.,]\d+)?$/;static COLONS=/^(?:(\d+):)?(\d{1,2}):(\d{1,2}(?:[.,]\d+)?)$/;static UNITS=/^(?:(\d+(?:[.,]\d+)?)h)?(?:(\d+(?:[.,]\d+)?)m)?(?:(\d+(?:[.,]\d+)?)s)?$/i;static CLOCK=/^(?:(\d{4})-(\d{2})-(\d{2})[T ])?T?(\d{1,2}):(\d{2})(?::(\d{2}(?:[.,]\d+)?))?$/;static num(e){return e===void 0?0:Number(e.replace(",","."))}static delta(e){const t=(e??"").trim();if(t==="")return;if(u.PLAIN.test(t))return u.num(t);const i=u.COLONS.exec(t);if(i){const[,n,o,a]=i;return Number(o)>=60||u.num(a)>=60?void 0:u.num(n)*3600+Number(o)*60+u.num(a)}const s=u.UNITS.exec(t);return s&&(s[1]!==void 0||s[2]!==void 0||s[3]!==void 0)?u.num(s[1])*3600+u.num(s[2])*60+u.num(s[3]):/^P/i.test(t)?G.seconds(t.toUpperCase()):void 0}static isClock(e){return u.clock(e)!==void 0}static clock(e){const t=u.CLOCK.exec((e??"").trim());if(!t)return;const[,i,s,n,o,a,r]=t,h={hour:Number(o),minute:Number(a),second:u.num(r)};if(!(h.hour>=24||h.minute>=60||h.second>=60)){if(i!==void 0){const d={year:Number(i),month:Number(s),day:Number(n)};if(d.month<1||d.month>12||d.day<1||d.day>31)return;h.date=d}return h}}static elapsedSince(e,t){if(!e||e.hour===void 0||e.minute===void 0)return;const i=e.hour*3600+e.minute*60+(e.second??0),s=t.hour*3600+t.minute*60+t.second;if(t.date){if(e.year===void 0||e.month===void 0||e.day===void 0)return;const o=Date.UTC(t.date.year,t.date.month-1,t.date.day)/1e3+s,a=Date.UTC(e.year,e.month-1,e.day)/1e3+i;return Math.max(0,o-a)}let n=s-i;return n<=-43200&&(n+=86400),Math.max(0,n)}}z();V.register();const T=pe.home(),k="compare-account",I="start-time",H="start-clock",w="observer",A="case-named",L="show-info",B="interpretation",x="hide-pickers",C="case",g="account",O="variant-",R=`${T}/edit/`;class v extends HTMLElement{static get observedAttributes(){return["src","show-labels",L,x,B,A,I,H,w,y,E,k]}shadow;sceneElement;toolbarElement;accountElement;accountPrefix;caseOfElement;observerText;observerSelect;infoButton;infoPanel;infoAppLink;editLink;readingFindingsElement;readingSensible=!1;readingCheck;bestCases;readingScene=!1;readingEntry;static VERDICT_COLOURS={incompatible:"#e04848",unsettled:"#e08a2c",compatible:"#2e9d5b"};infoObservationHeading;infoObservationList;infoCreditsToggle;infoCreditsList;infoCloseButton;shareButton;shareMessages;shareDialog;shareStartOn;shareStart;shareScopeRow;shareScopeLabel;shareScope;shareOpensRow;shareOpensLabel;shareOpens;shareStartLabel;shareOptions;labelsToggle;paramSummary;summaryBuilder;summarySignature="";assessmentEntries=[];assessmentToken=0;supportsPopover=typeof HTMLElement.prototype.showPopover=="function";entries=[];caseSource;interpretationChoice;interpretationLabel;interpretationSelect;confrontationElement;confrontationHeading;confrontationList;compareButton;variantChips;variantMoved;interpretationLoaders=new Map;interpretationToken=0;shownInterpretation;offeredFor;currentSrc;infoOpen=!1;creditsOpen=!1;labelsShown=!1;language="en";messages;ready=Promise.resolve();constructor(){super(),this.shadow=this.attachShadow({mode:"open"});const e=document.createElement("template");e.innerHTML=`<style>${me}</style>${ue}`,this.shadow.appendChild(e.content.cloneNode(!0)),customElements.upgrade(this.shadow),this.sceneElement=document.createElement(q),this.forwardPlayerAttributes(),this.sceneElement.ufoElement.creditShownExternally=!0,this.sceneElement.ownCredits=!1,this.shadow.getElementById("ufo-slot").replaceWith(this.sceneElement),this.toolbarElement=this.shadow.getElementById("toolbar"),this.accountElement=this.shadow.getElementById("account"),this.accountPrefix=this.shadow.getElementById("account-prefix"),this.caseOfElement=this.shadow.getElementById("case-of"),this.observerText=this.shadow.getElementById("observer-text"),this.observerSelect=this.shadow.getElementById("observer"),this.infoButton=this.shadow.getElementById("info-button"),this.infoPanel=this.shadow.getElementById("info-panel"),this.infoAppLink=this.shadow.getElementById("info-app-link"),this.editLink=this.shadow.getElementById("edit-link"),this.infoObservationHeading=this.shadow.getElementById("info-observation-heading"),this.infoObservationList=this.shadow.getElementById("info-observation-list"),this.infoCreditsToggle=this.shadow.getElementById("info-credits-toggle"),this.infoCreditsList=this.shadow.getElementById("info-credits-list"),this.infoCloseButton=this.shadow.getElementById("info-close"),this.labelsToggle=this.shadow.getElementById("labels-button"),this.paramSummary=this.shadow.getElementById("param-summary"),this.labelsToggle.addEventListener("click",()=>{this.showLabels=!this.showLabels}),this.shareButton=document.createElement("button"),this.shareButton.type="button",this.shareButton.id="share-button",this.shareButton.setAttribute("aria-haspopup","dialog"),this.shareButton.innerHTML=W.SHARE,this.sceneElement.ufoElement.addControl(this.shareButton),this.shareDialog=this.shadow.getElementById("share-dialog"),this.shareDialog.subject=this.shareSubject,this.shareStartOn=this.shadow.getElementById("share-start-on"),this.shareStart=this.shadow.getElementById("share-start"),this.shareStartLabel=this.shadow.getElementById("share-start-label"),this.shareScopeRow=this.shadow.getElementById("share-scope-row"),this.shareScopeLabel=this.shadow.getElementById("share-scope-label"),this.shareScope=this.shadow.getElementById("share-scope"),this.shareOpensRow=this.shadow.getElementById("share-opens-row"),this.shareOpensLabel=this.shadow.getElementById("share-opens-label"),this.shareOpens=this.shadow.getElementById("share-opens");const t=s=>({input:this.shadow.getElementById(`share-opt-${s}`),label:this.shadow.getElementById(`share-opt-${s}-label`)});this.shareOptions={labels:t("labels"),map:t("map"),milestones:t("milestones"),compare:t("compare")},this.interpretationChoice=this.shadow.getElementById("interpretation-choice"),this.interpretationLabel=this.shadow.getElementById("interpretation-label"),this.interpretationSelect=this.shadow.getElementById("interpretation"),this.confrontationElement=this.shadow.getElementById("confrontation"),this.confrontationHeading=this.shadow.getElementById("confrontation-heading"),this.confrontationList=this.shadow.getElementById("confrontation-list"),N.register(),this.readingFindingsElement=this.shadow.getElementById("reading-findings");const i=this.shadow.getElementById("reading-chip");i.addEventListener("click",()=>{const s=i.getAttribute("aria-expanded")!=="true";i.setAttribute("aria-expanded",String(s)),this.shadow.getElementById("reading-findings-list").hidden=!s}),this.compareButton=this.shadow.getElementById("compare-account"),this.variantChips=this.shadow.getElementById("variant-chips"),this.variantMoved=this.shadow.getElementById("variant-moved"),this.compareButton.addEventListener("click",()=>this.setComparing(!this.sceneElement.compareAccount)),this.observerSelect.addEventListener("change",()=>this.selectObserver(this.observerSelect.value)),this.interpretationSelect.addEventListener("change",()=>void this.chooseInterpretation(this.interpretationSelect.value)),this.sceneElement.addEventListener(K,s=>this.showConfrontation(s.detail)),this.sceneElement.ufoElement.addEventListener("timeupdate",()=>this.refreshParamSummary()),this.supportsPopover?(this.infoPanel.setAttribute("popover","auto"),this.infoPanel.removeAttribute("hidden"),this.infoButton.setAttribute("popovertarget","info-panel"),this.infoPanel.addEventListener("beforetoggle",s=>{s.newState==="open"&&(this.populateInfoPanel(),this.bringInfoButtonIntoView())}),this.infoPanel.addEventListener("toggle",s=>this.syncInfoOpen(s.newState==="open"))):this.infoButton.addEventListener("click",()=>this.toggleInfoPanel()),this.infoCloseButton.addEventListener("click",()=>this.toggleInfoPanel()),this.infoCreditsToggle.addEventListener("click",()=>this.toggleCredits()),this.shareButton.addEventListener("click",()=>this.openShare()),this.editLink.addEventListener("click",s=>{const n=this.editDetail();n&&Z.ask(this,J,n)&&s.preventDefault()});for(const s of[this.shareStartOn,this.shareStart,...Object.values(this.shareOptions).map(n=>n.input)])s.addEventListener("input",()=>this.refreshShareLinks());for(const s of[this.shareScope,this.shareOpens])s.addEventListener("change",()=>this.refreshShareLinks());this.isConnected&&(this.ready=this.loadLocaleMessages())}get scene(){return this.sceneElement}async loadLocaleMessages(){const e=++this.localeToken,t=U.preferencesFor(this);this.preferences=t;const i=Q(t,X),[s,n,o,a]=await Promise.all([Y.load(i),ee(i),te(i),se.load(i)]);if(e!==this.localeToken)return;const r=i!==this.language||this.messages===void 0;this.language=i,this.messages=s,this.readingCheck=new ie(a),this.bestCases=new ne(a),this.tags=new $(n),this.said=new D(t),this.summaryBuilder=new oe(this.messages,new ae(o),this.said,this.tags,{messages:this.messages,locale:i}),this.accountPrefix.textContent=this.messages?.accountBy??"",this.interpretationLabel.textContent=this.messages?.interpretation??"",this.confrontationHeading.textContent=this.messages?.confrontation??"";const h=this.entries.find(d=>d.src===this.currentSrc);h&&this.offerInterpretations(h),this.updateCompareButton(),this.infoButton.title=this.messages?.about??"",this.infoButton.setAttribute("aria-label",this.messages?.about??""),this.editLink.title=this.messages?.editThisObservation??"",this.editLink.setAttribute("aria-label",this.messages?.editThisObservation??""),this.infoCloseButton.setAttribute("aria-label",this.messages?.close??""),this.infoObservationHeading.textContent=this.messages?.observation??"",this.infoCreditsToggle.textContent=this.messages?.credits??"",this.syncLabelsToggle(),this.refreshParamSummary(),r&&this.currentSrc&&this.runAssessments(),this.shareButton.title=this.messages?.share??"",this.shareButton.setAttribute("aria-label",this.messages?.share??""),this.shareStartLabel.textContent=this.messages?.shareStartAt??"",this.shareScopeLabel.textContent=this.messages?.shareScope??"",this.shareOpensLabel.textContent=this.messages?.shareOpensOn??"",this.shareOptions.labels.label.textContent=this.messages?.shareOptionLabels??"",this.shareOptions.map.label.textContent=this.messages?.shareOptionMap??"",this.shareOptions.milestones.label.textContent=this.messages?.shareOptionMilestones??"",this.shareOptions.compare.label.textContent=this.messages?.shareOptionCompare??"",this.shareStart.setAttribute("aria-label",this.messages?.shareStartAt??""),this.shareDialog.useLanguage(i).then(d=>{d&&(this.shareMessages=d)}),this.infoOpen&&this.populateInfoPanel(),this.updateAccountLine()}preferences=[];localeToken=0;said=new D(["en"]);tags=new $({});connectedCallback(){U.preferencesFor(this).join()!==this.preferences.join()&&(this.ready=this.loadLocaleMessages()),this.applyAskedInfo();const e=this.getAttribute("src");e&&this.loadFromSrc(e)}applyAskedInfo(){this.isConnected&&this.hasAttribute(L)!==this.infoOpen&&this.toggleInfoPanel()}disconnectedCallback(){document.removeEventListener("click",this.handleOutsideClick)}attributeChangedCallback(e,t,i){if(e==="src"&&i&&i!==t&&this.isConnected&&this.loadFromSrc(i),e===B){const s=this.entries.find(n=>n.src===this.currentSrc);s&&i===null&&t!==null&&this.interpretationSelect.value!==g?(this.interpretationSelect.value=g,this.chooseInterpretation(g)):s&&this.offerInterpretations(s)}if(e===x){const s=this.entries.find(n=>n.src===this.currentSrc);this.setEntries(this.entries,this.caseSource),s&&this.offerInterpretations(s)}if(e===L&&this.applyAskedInfo(),e==="show-labels"&&this.applyLabels(this.hasAttribute("show-labels")),(e===y||e===E)&&this.forwardPlayerAttributes(),e===w&&this.entries.length>1){const s=this.entryAsked(this.entries);s&&s.src!==this.currentSrc&&this.selectObserver(s.src)}e===k&&this.setComparing(this.hasAttribute(k))}forwardPlayerAttributes(){for(const e of[y,E]){const t=this.getAttribute(e);t===null?this.sceneElement.removeAttribute(e):this.sceneElement.setAttribute(e,t)}}get loaded(){return this.loading??Promise.resolve()}loading;loadFromSrc(e){const t=this.readFromSrc(e);return this.loading=t.catch(()=>{}),t}async readFromSrc(e){this.startPending=!0;const t=S.recording(e);this.sceneElement.holdForNewScene(t);const i=await t;if(Array.isArray(i))throw new Error(`${e} is a bare list of recordings, which is no longer read: list them as the sighting events of a case.json`);if(m.isCase(i)){m.check(i);const s=m.sightingUrls(i,new URL(e,location.href).href);if(s.length===0)throw new Error(`${e} is a case with no sighting event: no recording to show`);await this.loadObserverUrls(s,{json:i,url:new URL(e,location.href).href})}else this.setEntries([{src:e,sighting:i}],void 0)}get sightingData(){return this.entries.find(e=>e.src===this.currentSrc)?.sighting}set sightingData(e){const t=P.recording(e);this.startPending=!0,this.currentSrc="",this.setEntries([{src:"",sighting:t}],void 0)}seekTo(e,t){const i=this.caseSource,s=t===void 0?void 0:this.entries.find(n=>{const o=this.plain(n).id;return(i?m.accountIds(i.json,i.url,n.src,o):[o]).includes(t)});s&&s.src!==this.currentSrc&&this.selectObserver(s.src),this.sceneElement.ufoElement.currentTime=Math.max(0,e)*1e3}set citedMoments(e){this.sceneElement.ufoElement.citedMoments=e}get playedSeconds(){return this.sceneElement.ufoElement.currentTime/1e3}get observerUrls(){return this.entries.map(e=>e.src)}set observerUrls(e){this.loadObserverUrls(e)}async loadObserverUrls(e,t){const i=await Promise.all(e.map(async s=>({src:s,sighting:await S.recording(s)})));this.setEntries(i,t)}reportCaseProblems(e,t){const{duplicateIds:i,unresolved:s}=m.problems(e,t.map(n=>this.plain(n).id).filter(n=>n!==void 0));for(const n of i)console.warn(`The case ${e.id??""} gives the id "${n}" to more than one event: a reference to it is ambiguous.`);for(const{reading:n,reference:o}of s)console.warn(`The reading ${n} of the case ${e.id??""} is "interpretationOf" "${o}", which no event of the case has as its id, nor any recording it lists.`)}setEntries(e,t){this.entries=e.map(o=>({...o,sighting:P.recording(o.sighting)})),this.caseSource=t,t&&this.reportCaseProblems(t.json,e),this.toolbarElement.hidden=e.length===0;const i=e.length>1&&!this.hasAttribute(x);this.observerSelect.hidden=!i,this.observerText.hidden=i,this.observerSelect.innerHTML="";const s=e.map((o,a)=>this.observerDisplayName(this.plain(o).observer)??this.caseTitleOf(o)??(this.messages?.unnamedObserver??"").replace("{n}",String(a+1)));for(const[o,a]of e.entries()){const r=document.createElement("option");r.value=a.src;const h=s.filter(d=>d===s[o]).length>1;r.textContent=(h?this.caseTitleOf(a):void 0)??s[o],this.observerSelect.appendChild(r)}const n=e.find(o=>o.src===this.currentSrc)??this.entryAsked(e)??e[0];n?this.selectObserver(n.src):this.updateAccountLine()}entryAsked(e){const t=this.getAttribute(w)?.trim();if(!t)return;const i=e.find(o=>this.plain(o).observer?.id===t);if(i)return i;const s=this.caseSource;if(s){const o=e.find(a=>m.accountIds(s.json,s.url,a.src,this.plain(a).id).includes(t));if(o)return o}const n=e.find(o=>o.src.split("/").pop()===t.split("/").pop());return n||(/^\d+$/.test(t)?e[Number(t)-1]:void 0)}observerKeyOf(e){return this.plain(e).observer?.id??String(this.entries.indexOf(e)+1)}sharedEntry(){const e=this.shareScope.value;if(!(!this.caseSource||e===C))return this.entries.find(t=>t.src===e)}get sharesCase(){return this.caseSource!==void 0&&!this.shareScopeRow.hidden&&this.shareScope.value===C}editorUrl(){if(!this.currentSrc)return R;const e=new URL(this.currentSrc,location.href),t=this.caseSource;return t?`${R}?file=${encodeURIComponent(t.url)}&track=${encodeURIComponent(this.shownTrackUrl()??e.href)}`:`${R}?file=${encodeURIComponent(e.href)}`}editDetail(){if(!this.currentSrc)return;const e=new URL(this.currentSrc,location.href).href,t=this.caseSource;return t?{src:t.url,track:this.shownTrackUrl()??e}:{src:e}}get editorHref(){return this.editorUrl()}get shownRecordingUrl(){return this.currentSrc?new URL(this.currentSrc,location.href).href:void 0}get shownReadingUrl(){return this.shownTrackUrl()}shownTrackUrl(){return this.readingUrlOf(this.interpretationSelect.value)}shareSubject={module:"rr0-sighting",link:()=>this.playUrl(),element:()=>this.replayElement()};replayElement(){const e=this.sharedAddress(),i=[...e.observer?[[w,e.observer]]:[],...this.replayAttributes()].map(([s,n])=>n===""?` ${s}`:` ${s}="${n}"`).join("");return`<rr0-sighting src="${e.src}"${i}></rr0-sighting>`}playUrl(){const e=this.sharedAddress(),t=[...e.observer?[`${w}=${encodeURIComponent(e.observer)}`]:[],...this.replayQuery()].join("&");return e.src?`${T}/play/?file=${encodeURIComponent(e.src)}${t&&"&"+t}`:`${T}/play/${t&&"?"+t}`}sharedAddress(){const e=t=>t?new URL(t,location.href).href:"";if(this.sharesCase){const t=this.entries.find(i=>i.src===this.shareOpens.value)??this.entries.find(i=>i.src===this.currentSrc);return{src:e(this.caseSource.url),observer:t?this.observerKeyOf(t):void 0}}return{src:e(this.sharedEntry()?.src??this.currentSrc??"")}}replayAttributes(){const e=this.shareOptions,t=[];return this.shareStartSeconds!==void 0&&t.push([I,String(this.shareStartSeconds)]),e.labels.input.checked&&t.push(["show-labels",""]),e.map.input.checked&&t.push([y,""]),e.milestones.input.checked||t.push([E,""]),e.compare.input.checked&&t.push([k,""]),t}replayQuery(){const e=this.shareOptions,t=[];return this.shareStartSeconds!==void 0&&t.push(`d=${this.shareStartSeconds}`),e.labels.input.checked||t.push("labels=0"),e.map.input.checked&&t.push("map=1"),e.milestones.input.checked||t.push("moments=0"),e.compare.input.checked&&t.push("compare=1"),t}get shareStartSeconds(){const e=Math.floor(Number(this.shareStart.value));return this.shareStartOn.checked&&Number.isFinite(e)&&e>=0?e:void 0}refreshShareLinks(){this.shareOpensRow.hidden=!this.sharesCase,this.shareDialog.refresh()}openShare(){const e=this.sceneElement.ufoElement;this.shareStart.max=String(Math.floor(e.seekableDuration/1e3)),this.shareStart.value=String(Math.floor(e.currentTime/1e3)),this.shareStartOn.checked=!1,this.shareOptions.labels.input.checked=this.labelsShown,this.shareOptions.map.input.checked=e.observerMapOpen,this.shareOptions.milestones.input.checked=e.milestonesVisible,this.shareOptions.compare.input.checked=this.sceneElement.compareAccount,this.offerShareScope(),this.shareOpensRow.hidden=!this.sharesCase;const t=[this.caseSource?.url,this.currentSrc,this.shownTrackUrl(),...this.entries.map(i=>i.src)];this.shareDialog.note=M.changed(...t)?this.shareMessages?.unsaved:void 0,this.shareDialog.open()}offerShareScope(){const e=this.caseSource!==void 0&&this.entries.length>1&&!this.hasAttribute(A);if(this.shareScopeRow.hidden=!e,this.shareScope.innerHTML="",this.shareOpens.innerHTML="",!e)return;const t=(i,s,n)=>{const o=document.createElement("option");o.value=s,o.textContent=n,i.appendChild(o)};t(this.shareScope,C,this.messages?.shareScopeCase??"");for(const i of this.entries){const s=this.observerDisplayName(this.plain(i).observer)??this.caseTitleOf(i)??(this.messages?.unnamedObserver??"").replace("{n}",String(this.entries.indexOf(i)+1));t(this.shareScope,i.src,s),t(this.shareOpens,i.src,s)}this.shareScope.value=C,this.shareOpens.value=this.currentSrc??this.entries[0].src}offerInterpretations(e){const t=this.offeredFor===e.sighting,i=this.interpretationSelect.value;this.offeredFor=e.sighting,this.interpretationToken++,this.interpretationLoaders=new Map,this.interpretationSelect.innerHTML="";const s=(c,l,p)=>{const f=document.createElement("option");f.value=c,f.textContent=l,this.interpretationSelect.appendChild(f),this.interpretationLoaders.set(c,p)},n=e===this.entries.find(c=>c.src===this.currentSrc),o=n?this.sceneElement.ufoElement.sighting.interpretation:void 0;s(g,this.messages?.account??"",()=>Promise.resolve(o));const a=this.caseSource;a&&m.interpretationEvents(a.json,m.accountIds(a.json,a.url,e.src,this.plain(e).id)).forEach((c,l)=>{const p=this.said.read(c.title)??`#${l+1}`,f=(c.by??[]).map(b=>this.agentName(b)).filter(Boolean).join(", ");s(`case-${l}`,f?(this.messages?.interpretationBy??"").replace("{title}",p).replace("{by}",f):p,()=>m.interpretationOf(c,a.url,b=>S.recording(b)))});const r=n?this.keptVariants(e):[];for(const{index:c,kept:l}of r)s(`${O}${c}`,`${this.variantLabel(l)} (${this.messages?.verdicts[l.variant.verdict]??""})`,()=>Promise.resolve(l.bodies.length>0?l:void 0));const h=t&&[...this.interpretationSelect.options].some(c=>c.value===i),d=this.askedInterpretation()??(h?i:g);this.interpretationSelect.value=d,d===g?(this.sceneElement.interpretation!==o&&(this.sceneElement.interpretation=o),this.shownInterpretation=g):(!this.sceneElement.interpretation||this.shownInterpretation!==d)&&this.chooseInterpretation(d),this.interpretationChoice.hidden=this.interpretationSelect.options.length<2||this.hasAttribute(x),this.showConfrontation(this.sceneElement.confrontation),this.updateCompareButton(),this.showVariants(r)}keptVariants(e){const t={consolidated:0,contested:1,incompatible:2};return(e.sighting.variants??[]).map((i,s)=>({index:s,kept:i})).filter(({kept:i})=>i.variant).sort((i,s)=>t[i.kept.variant.verdict]-t[s.kept.variant.verdict]||i.kept.variant.cost-s.kept.variant.cost)}variantLabel(e){return(this.messages?.variant??"").replace("{name}",e.variant.label??e.variant.candidate)}showVariants(e){if(!this.messages)return;if(this.variantChips.innerHTML="",this.variantChips.hidden=e.length===0,e.length===0){this.showVariantMoved();return}const t=(i,s,n)=>{const o=document.createElement("button");o.type="button",o.dataset.value=i,n&&(o.dataset.verdict=n,o.title=this.messages.verdicts[n],o.append(Object.assign(document.createElement("span"),{className:"dot"}))),o.append(s),o.addEventListener("click",()=>{this.interpretationSelect.value!==i&&(this.interpretationSelect.value=i,this.chooseInterpretation(i))}),this.variantChips.append(o)};t(g,this.messages?.account??"");for(const{index:i,kept:s}of e)t(`${O}${i}`,s.variant.label??s.variant.candidate,s.variant.verdict);this.showVariantMoved()}showVariantMoved(){if(!this.messages)return;const e=this.interpretationSelect.value;for(const n of this.variantChips.querySelectorAll("button"))n.setAttribute("aria-pressed",String(n.dataset.value===e));this.variantMoved.innerHTML="";const t=e.startsWith(O)?Number(e.slice(O.length)):-1,i=this.sceneElement.ufoElement.sighting.variants?.[t]?.variant;if(this.variantMoved.hidden=!i||i.moved.length+(i.readings?.length??0)===0,!i)return;const s=new Intl.NumberFormat(this.language,{maximumFractionDigits:1});for(const n of i.moved){const[o,a]=n.field==="time"?["0 min",`${n.variant>0?"+":""}${s.format(n.variant)} min`]:n.field==="duration"?[`${s.format(n.stated)} s`,`${s.format(n.variant)} s`]:[`${s.format(n.stated)}°`,`${s.format(n.variant)}°`],r=document.createElement("span");r.append(`${this.messages.variantFields[n.field]}${this.colon}`,Object.assign(document.createElement("s"),{textContent:o})," → ",Object.assign(document.createElement("b"),{textContent:a})),this.variantMoved.append(r)}for(const n of i.readings??[]){const o=this.messages.variantReadings[n.reading];o&&this.variantMoved.append(Object.assign(document.createElement("span"),{className:"reading",textContent:o}))}}setComparing(e){this.sceneElement.compareAccount=e,this.updateCompareButton(),this.showConfrontation(this.sceneElement.confrontation)}updateCompareButton(){const e=this.sceneElement.compareAccount;this.compareButton.hidden=!this.sceneElement.interpretation,this.compareButton.setAttribute("aria-pressed",String(e));const t=e?this.messages?.hideComparison??"":this.messages?.showComparison??"";this.compareButton.title=t,this.compareButton.setAttribute("aria-label",t)}get colon(){return this.language==="fr"?" : ":": "}askedInterpretation(){const e=this.getAttribute(B)?.trim(),t=this.caseSource;if(!e||!t)return;const i=this.entries.find(o=>o.src===this.currentSrc);if(!i)return;const n=m.interpretationEvents(t.json,m.accountIds(t.json,t.url,i.src,this.plain(i).id)).findIndex(o=>o.id===e||typeof o.url=="string"&&new URL(o.url,t.url).href===new URL(e,location.href).href);return n>=0?`case-${n}`:void 0}async chooseInterpretation(e){const t=++this.interpretationToken,i=this.interpretationLoaders.get(e),s=i?await i().catch(l=>{console.warn(`<rr0-sighting>: could not read interpretation "${e}":`,l)}):void 0,n=this.readingUrlOf(e),o=n?await S.recording(n).catch(()=>{}):void 0;if(t!==this.interpretationToken)return;const a=this.entries.find(l=>l.src===this.currentSrc),r=a&&o&&"timeline"in o?this.bestCases?.bestSceneOf(a.sighting,o):void 0,h=r??o,d=r?.interpretation&&s?{...s,bodies:[...s.bodies.map(l=>{const p=r.interpretation.bodies.find(f=>f.id===l.id);return p?{...l,track:p.track}:l}),...r.interpretation.bodies.filter(l=>!s.bodies.some(p=>p.id===l.id))]}:s,c=a&&h&&"timeline"in h&&v.changesTheScene(a.sighting,h)?{...h,timeline:h.timeline.keyframes?.length?h.timeline:a.sighting.timeline}:void 0;if(c&&n)this.showScene(c,n);else if(this.readingScene&&a)this.showScene(a.sighting,a.src,!0);else if(a){const l=!this.sceneElement.ufoElement.playRequested;n?this.sceneElement.showPoster(this.ownCover(o?.image,n),n,l):a.sighting.image?this.sceneElement.showPoster(a.sighting.image,a.src?new URL(a.src,location.href).href:void 0,l):this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,l)}this.readingScene=c!==void 0,this.sceneElement.interpretation=d,this.shownInterpretation=e,this.showReadingFindings(a,h),this.editLink.href=this.editorUrl(),this.dispatchEvent(new CustomEvent(ge,{detail:{track:this.shownTrackUrl()}})),this.updateCompareButton(),this.showConfrontation(this.sceneElement.confrontation),this.showVariantMoved()}readingUrlOf(e){const t=this.caseSource,i=this.entries.find(o=>o.src===this.currentSrc),s=/^case-(\d+)$/.exec(e);if(!t||!i||!s)return;const n=m.interpretationEvents(t.json,m.accountIds(t.json,t.url,i.src,this.plain(i).id))[Number(s[1])];return n?.url?new URL(n.url,t.url).href:void 0}static SCENE_FIELDS=["time","utcOffsetHours","place","observerTrack","weatherTrack","decor","instrument","lens","film","exposureSeconds","iso","references","lighting","lightPollution","vehicle"];static changesTheScene(e,t){const i=s=>JSON.stringify(v.SCENE_FIELDS.map(n=>s[n]));return i(e)!==i(t)}ownCover(e,t){const i=this.entries.find(a=>a.src===this.currentSrc),s=i?.sighting.image;if(!e||!s)return e;const n=(a,r)=>{try{return new URL(a,r??location.href).href}catch{return a}},o=i.src?new URL(i.src,location.href).href:void 0;return n(e,t)===n(s,o)?void 0:e}showScene(e,t,i=!1){const s=this.sceneElement.ufoElement.currentTime;this.sceneElement.documentUrl=t?new URL(t,location.href).href:void 0;const n=!this.sceneElement.ufoElement.playRequested,o=t?new URL(t,location.href).href:void 0,a=i?e.image:this.ownCover(e.image,o);a?this.sceneElement.showPoster(a,o,n):i?this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,n):this.sceneElement.showPoster(void 0,void 0,n),this.sceneElement.sightingData=e,this.sceneElement.ufoElement.currentTime=s}showReadingFindings(e,t){const i=this.readingFindingsElement,s=this.messages,n=t?.interpretation?.findings??[],o=e&&t&&this.readingCheck?this.readingCheck.findingsOf(e.sighting,t):[],a=[...n,...o],r=re.of(a);this.readingEntry=s&&r?{group:"summary",field:"reading",label:s.readingLabel,unit:"",fromSource:!1,value:(a.length===1?s.readingChipOne:s.readingChip).replace("{verdict}",s.readingVerdict[r]).replace("{n}",String(a.length)),color:v.VERDICT_COLOURS[r],full:a.map(c=>`${{holds:"✓",fails:"✗",untested:"?"}[c.outcome]} ${this.said.read(c.text)??""}`+(c.outcome==="fails"?` (${s.findingAgainst[c.against??"established"]})`:"")).join(`
|
|
692
|
+
`)}:void 0,this.summarySignature="\0",this.refreshParamSummary();const h=i.querySelector("#reading-sensitivity");if(this.readingSensible=e&&t?N.resultOf(e.sighting,t)!==void 0:!1,h.show(e?.sighting,t),this.showReadingBox(),!s||!r){i.querySelector("#reading-findings-list").hidden=!0,delete i.dataset.verdict;return}i.dataset.verdict=r,i.querySelector("#reading-verdict").textContent=(a.length===1?s.readingChipOne:s.readingChip).replace("{verdict}",s.readingVerdict[r]).replace("{n}",String(a.length));const d=i.querySelector("#reading-findings-list");i.querySelector("#reading-chip").setAttribute("aria-expanded","false"),d.hidden=!0,d.replaceChildren(...a.map(c=>{const l=document.createElement("li");l.dataset.outcome=c.outcome;const p=document.createElement("span");p.className="finding-mark",p.textContent={holds:"✓",fails:"✗",untested:"?"}[c.outcome],p.title=s.findingOutcome[c.outcome],p.setAttribute("aria-label",s.findingOutcome[c.outcome]);const f=document.createElement("span");if(f.textContent=this.said.read(c.text)??"",l.append(p,f),c.outcome==="fails"){const b=document.createElement("span");b.className="finding-against",b.textContent=`(${s.findingAgainst[c.against??"established"]})`,l.append(b)}return l}))}agentName(e){if("people"in e){const[t,...i]=e.people.replace(/([a-z])([A-Z])/g,"$1 $2").split(" ");return[...i,t].join(" ")}return"org"in e?e.org.replace(/([a-z])([A-Z])/g,"$1 $2"):this.observerDisplayName(e)??""}showConfrontation(e){this.confrontationList.innerHTML="",this.confrontationElement.hidden=!this.sceneElement.interpretation||!this.sceneElement.compareAccount;const t=new Intl.NumberFormat(this.language,{maximumFractionDigits:1,minimumFractionDigits:1}),i=new Intl.NumberFormat(this.language,{maximumFractionDigits:2,minimumFractionDigits:2});for(const s of e){const n=document.createElement("li");n.append(`${this.said.read(s.title)??s.sourceId}${this.colon}`);const o=[];s.separationDeg!==void 0&&o.push([(this.messages?.confrontationDirection??"").replace("{deg}",t.format(s.separationDeg)),s.disagreements.includes("direction")]),s.widthRatio!==void 0&&o.push([(this.messages?.confrontationWidth??"").replace("{ratio}",i.format(s.widthRatio)),s.disagreements.includes("width")]),s.heightRatio!==void 0&&o.push([(this.messages?.confrontationHeight??"").replace("{ratio}",i.format(s.heightRatio)),s.disagreements.includes("height")]),o.forEach(([a,r],h)=>{h>0&&n.append(" · ");const d=document.createElement("span");d.textContent=a,r&&(d.className="disagrees"),n.append(d)}),this.confrontationList.appendChild(n)}}startPending=!1;startSeconds(e){const t=u.clock(this.getAttribute(H)),i=this.plain(e).time;return(t?u.elapsedSince(i===void 0?void 0:j(i),t):void 0)??u.delta(this.getAttribute(I))}selectObserver(e){const t=this.entries.find(s=>s.src===e);if(!t)return;this.currentSrc=e,this.observerSelect.value=e,this.sceneElement.documentUrl=t.src?new URL(t.src,location.href).href:void 0;const i=!this.sceneElement.ufoElement.playRequested;if(this.askedInterpretation()||(t.sighting.image?this.sceneElement.showPoster(t.sighting.image,t.src?new URL(t.src,location.href).href:void 0,i):this.sceneElement.showPoster(this.caseSource?.json.image,this.caseSource?.url,i)),this.sceneElement.holdForNewScene(),this.sceneElement.sightingData=t.sighting,this.readingScene=!1,this.startPending){this.startPending=!1;const s=this.startSeconds(t);s!==void 0&&(this.sceneElement.ufoElement.currentTime=Math.max(0,s)*1e3)}this.offerInterpretations(t),this.updateAccountLine(),this.refreshParamSummary(),this.runAssessments(),this.infoOpen&&this.populateInfoPanel(),this.dispatchEvent(new CustomEvent(fe,{detail:{src:e}}))}async runAssessments(){if(!this.messages)return;const e=++this.assessmentToken,t=await new he(this.messages).read(this.sceneElement.ufoElement.sighting);e===this.assessmentToken&&(this.assessmentEntries=t.entries,this.refreshParamSummary())}updateAccountLine(){const e=this.entries.find(a=>a.src===this.currentSrc),t=e?this.observerDisplayName(this.plain(e).observer):void 0,i=t!==void 0||this.entries.length>1;this.accountElement.hidden=!i,this.observerText.textContent=t??"";const n=!this.hasAttribute(A)&&this.caseSource&&(this.said.read(this.caseSource.json.title)??this.caseSource.json.id);this.caseOfElement.hidden=!n,this.caseOfElement.textContent=n?`${this.messages?.case??""} ${n}`:"";const o=t!==void 0?`${this.messages?.accountBy??""} ${t}`.trim():void 0;this.sceneElement.filmName=[n||void 0,o].filter(Boolean).join(" - ")||void 0,this.editLink.hidden=!this.currentSrc,this.editLink.href=this.editorUrl(),this.shareButton.hidden=M.local(this.caseSource?.url??this.currentSrc),this.editLink.title=this.messages?.editThisObservation??"",this.editLink.setAttribute("aria-label",this.messages?.editThisObservation??"")}caseTitleOf(e){const t=this.caseSource;if(!t)return;const i=t.json.events?.find(s=>s.url!==void 0&&!s.interpretationOf&&new URL(s.url,t.url).href===new URL(e.src,location.href).href);return i?this.said.read(i.title):void 0}observerDisplayName(e){if(!e)return;const t=[...e.firstNames??[],e.lastName].filter(Boolean).join(" ");return this.said.read(e.title)||t||e.id}plainRecordings=new WeakMap;plain(e){return this.stripped(e).recording}stripped(e){let t=this.plainRecordings.get(e.sighting);return t||(t=le.strip(e.sighting),this.plainRecordings.set(e.sighting,t)),t}basisOf(e,t){const i=this.stripped(e).provenance,s={established:-2,measured:-1,stated:0,derived:1,assumed:2,fitted:3},n=i.paths().filter(r=>t.some(h=>r===h||r.startsWith(`${h}.`))).map(r=>i.at(r)),o=n.reduce((r,h)=>s[h.basis]>s[r]?h.basis:r,"stated"),a=n.filter(r=>r.basis===o&&r.rationale).map(r=>this.said.read(r.rationale)??"").filter(r=>r!=="");return{basis:o,rationales:a}}formatDate(e){const t=e.place?.locations?.[0],i=ce((e.time?j(e.time):void 0)??{},t?.lng??0,e.utcOffsetHours);if(!i)return;const s=i.getTime()+this.utcOffsetHoursOf(e,t?.lng??0)*36e5;if(Number.isFinite(s))return new Intl.DateTimeFormat(this.language,{dateStyle:"long",timeStyle:"short",timeZone:"UTC"}).format(new Date(s))}utcOffsetHoursOf(e,t){return e.utcOffsetHours??Math.round(t/15)}formatLocation(e){const t=e.place?.locations?.[0];if(t)return`${t.lat.toFixed(4)}, ${t.lng.toFixed(4)}`}toggleInfoPanel(){const e=!this.infoOpen;if(this.supportsPopover){const t=this.infoPanel.matches(":popover-open");e&&!t?this.infoPanel.showPopover():!e&&t&&this.infoPanel.hidePopover();return}e&&this.bringInfoButtonIntoView(),this.syncInfoOpen(e),this.infoPanel.hidden=!e,e?document.addEventListener("click",this.handleOutsideClick):document.removeEventListener("click",this.handleOutsideClick)}bringInfoButtonIntoView(){const e=this.infoButton.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight;e.top>=0&&e.bottom<=t||this.infoButton.scrollIntoView({block:"center"})}syncInfoOpen(e){e!==this.infoOpen&&(this.infoOpen=e,this.infoButton.setAttribute("aria-expanded",String(e)),e?this.supportsPopover||this.populateInfoPanel():(this.creditsOpen=!1,this.infoCreditsList.hidden=!0,this.infoCreditsToggle.setAttribute("aria-expanded","false")))}handleOutsideClick=e=>{const t=e.composedPath();!t.includes(this.infoPanel)&&!t.includes(this.infoButton)&&this.toggleInfoPanel()};toggleCredits(){this.creditsOpen=!this.creditsOpen,this.infoCreditsList.hidden=!this.creditsOpen,this.infoCreditsToggle.setAttribute("aria-expanded",String(this.creditsOpen)),this.creditsOpen&&this.revealInPanel(this.infoCreditsList)}revealInPanel(e){e.scrollIntoView?.({block:"nearest"})}get showLabels(){return this.labelsShown}set showLabels(e){this.toggleAttribute("show-labels",e)}applyLabels(e){this.labelsShown=e,this.syncLabelsToggle(),this.refreshParamSummary(),this.populateInfoPanel()}syncLabelsToggle(){const e=this.labelsShown?this.messages?.hideLabels??"":this.messages?.showLabels??"";this.labelsToggle.title=e,this.labelsToggle.setAttribute("aria-label",e),this.labelsToggle.setAttribute("aria-pressed",String(this.labelsShown))}showReadingBox(){const e=this.readingFindingsElement,t=this.readingEntry!==void 0&&!this.labelsShown;e.hidden=!t&&!this.readingSensible,e.querySelector("#reading-chip").hidden=!t,t||(e.querySelector("#reading-findings-list").hidden=!0)}refreshParamSummary(){if(this.paramSummary.hidden=!this.labelsShown,this.showReadingBox(),!this.labelsShown){this.paramSummary.replaceChildren(),this.summarySignature="";return}const e=this.sceneElement.ufoElement.sighting,t=this.summaryBuilder?.entriesFor(e,this.sceneElement.ufoElement.currentTime,{roadGradeDeg:this.sceneElement.roadGradeDeg})??[],i=t.map(h=>h.group).lastIndexOf("summary"),s=this.readingEntry?[this.readingEntry]:[],n=[...t.slice(0,i+1),...s,...t.slice(i+1),...this.assessmentEntries],o=n.map(h=>`${h.field}=${h.label}=${h.value}${h.unit}${h.full??""}${h.fromSource?"*":""}`).join("|");if(o===this.summarySignature)return;this.summarySignature=o;const a=[];let r;for(const h of n){r&&r.group!==h.group&&(r=void 0);const d=h.group==="summary"?this.messages?.summaryGroup??"":h.group==="observer"?this.messages?.observerGroup??"":this.messages&&h.group in this.messages.summaryGroups?this.messages.summaryGroups[h.group]:h.group==="assessment"?this.messages?.assessmentGroup??"":void 0;if(d!==void 0&&!r){const l=document.createElement("span");l.className="param-nest";const p=document.createElement("span");p.className="param-nest-label",p.textContent=d,l.append(p),r={group:h.group,element:l},a.push(l)}const c=this.paramItem(h);r?r.element.append(c):a.push(c)}this.paramSummary.replaceChildren(...a),this.syncDescription(n)}openDescription;openDescriptionTitle;syncDescription(e){this.openDescription!==void 0&&!e.some(t=>t.full===this.openDescription)&&(this.openDescription=void 0),_.sync(this.paramSummary,this.openDescription,this.openDescriptionTitle??this.messages?.summaryDescription??"",this.messages?.closeDescription??"",()=>{this.openDescription=void 0,this.syncDescription(e)})}paramItem(e){const t=document.createElement("span");if(t.className=e.fromSource?"param-label from-source":"param-label",e.detail&&(t.title=e.detail),e.full!==void 0){t.classList.add("describable"),t.tabIndex=0,t.setAttribute("role","button");const n=()=>{this.openDescription=e.full,this.openDescriptionTitle=e.label,this.syncDescription([e])};t.addEventListener("click",n),t.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n())})}const i=document.createElement("span");if(i.className="param-label-label",i.textContent=`${e.label} `,t.append(i),e.color!==void 0){const n=document.createElement("span");n.className="param-label-swatch",n.style.background=e.color,t.append(n)}const s=document.createElement("span");return s.className="param-label-value",s.textContent=e.unit===""?e.value:`${e.value} ${e.unit}`,t.append(s),t}populateInfoPanel(){const e=this.entries.find(t=>t.src===this.currentSrc);if(this.infoObservationList.innerHTML="",e){const t=this.caseSource&&(this.caseSource.json.title??this.caseSource.json.id);if(t&&this.appendInfoRow(this.infoObservationList,this.messages?.case??"",t),!this.labelsShown){const n=this.formatDate(this.plain(e));n&&this.appendInfoRow(this.infoObservationList,this.messages?.date??"",n,this.basisOf(e,v.DATE_PATHS));const o=this.formatLocation(this.plain(e));o&&this.appendInfoRow(this.infoObservationList,this.messages?.location??"",o,this.basisOf(e,v.PLACE_PATHS))}const i=this.said.read(this.plain(e).description);i&&!this.labelsShown&&this.appendInfoRow(this.infoObservationList,this.messages?.description??"",i);for(const n of this.plain(e).sources??[])this.appendInfoSource(this.infoObservationList,this.messages?.source??"",n);const s=this.plain(e).tags;!this.labelsShown&&s&&s.length>0&&this.appendInfoRow(this.infoObservationList,this.messages?.tags??"",s.map(n=>this.tags.name(n)).join(", "))}this.infoAppLink.href=T,this.infoAppLink.textContent="UFO@home v0.199.0",de.fill(this.infoCreditsList,this.sceneElement)}appendInfoSource(e,t,i){const s=document.createElement("dt");s.textContent=t;const n=document.createElement("dd"),o=this.said.read(i.title)??i.url??"";if(i.url&&/^https?:\/\//i.test(i.url)){const r=document.createElement("a");r.href=i.url,r.target="_blank",r.rel="noopener noreferrer",r.textContent=o,n.appendChild(r)}else n.append(o);const a=[i.authors?.join(", "),i.publication?.publisher,i.publication?.time,i.index].filter(Boolean);a.length>0&&n.append(`, ${a.join(", ")}`),e.append(s,n)}static DATE_PATHS=["time","utcOffsetHours","timeZone"];static PLACE_PATHS=["place"];appendInfoRow(e,t,i,s){if(!this.messages)return;const n=document.createElement("dt");n.textContent=t;const o=document.createElement("dd");if(o.textContent=i,s){const a=document.createElement("span");a.className=`basis basis-${s.basis}`,a.textContent=this.messages.basis[s.basis],s.rationales.length>0&&(a.title=s.rationales.join(`
|
|
693
693
|
`)),o.append(" ",a)}e.appendChild(n),e.appendChild(o)}}const F="rr0-sighting",fe="observerchange",ge="interpretationchange";function ve(){z(),V.register(),customElements.get(F)||customElements.define(F,v)}export{A as CASE_NAMED_ATTRIBUTE,k as COMPARE_ACCOUNT_ATTRIBUTE,x as HIDE_PICKERS_ATTRIBUTE,B as INTERPRETATION_ATTRIBUTE,ge as INTERPRETATION_CHANGE_EVENT,w as OBSERVER_ATTRIBUTE,fe as OBSERVER_CHANGE_EVENT,L as SHOW_INFO_ATTRIBUTE,F as SIGHTING_ELEMENT_NAME,H as START_CLOCK_ATTRIBUTE,I as START_TIME_ATTRIBUTE,v as SightingElement,ve as registerSighting};
|