@rr0/ufoathome 0.178.3 → 0.179.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.
Files changed (106) hide show
  1. package/dist-embed-interview/InterviewMessages_en-ru7GkZlQ.js +1 -0
  2. package/dist-embed-interview/InterviewMessages_es-DkJurNrG.js +1 -0
  3. package/dist-embed-interview/InterviewMessages_fr-DAYgf8Ms.js +1 -0
  4. package/dist-embed-interview/InterviewMessages_it-6lenkmSg.js +1 -0
  5. package/dist-embed-interview/rr0-interview.mjs +2 -2
  6. package/dist-embed-scene/{BeamEditor-DFGRzRny.js → BeamEditor-DXIKipID.js} +1 -1
  7. package/dist-embed-scene/{LanternEditor-H8VYYbRn.js → LanternEditor-JvQQ8GOQ.js} +1 -1
  8. package/dist-embed-scene/LaunchEditor-DIxYPs4d.js +22 -0
  9. package/dist-embed-scene/{LaunchPlume-eEIp7_hM.js → LaunchPlume-FP3Yk-8B.js} +1 -1
  10. package/dist-embed-scene/{LaunchSimulation-DNNEzmzs.js → LaunchSimulation-v4khqz4r.js} +1 -1
  11. package/dist-embed-scene/{ModuleSession-DLoAutYP.js → ModuleSession-CLUE46BO.js} +2 -2
  12. package/dist-embed-scene/{ModuleThree-R2LhnY95.js → ModuleThree-DQfMGMDy.js} +1 -1
  13. package/dist-embed-scene/{ParameterForm-ez-n_0Dw.js → ParameterForm-BFp5BoHL.js} +9 -12
  14. package/dist-embed-scene/{ReentryEditor-CwY4oANp.js → ReentryEditor-ByVtt--5.js} +6 -6
  15. package/dist-embed-scene/{ReentrySimulation-BDgEPekW.js → ReentrySimulation-nzg5V3kJ.js} +1 -1
  16. package/dist-embed-scene/{TimelineTracks-BQXJMJaJ.js → TimelineTracks-BOjTfdGu.js} +2 -2
  17. package/dist-embed-scene/rr0-scene.mjs +333 -322
  18. package/dist-embed-sighting/{CaseReportExport-ByLXCo0I.js → CaseReportExport-C30Foqx0.js} +1 -1
  19. package/dist-embed-sighting/{InterviewElement-Byb_sxbO.js → InterviewElement-BduwyUn5.js} +2 -2
  20. package/dist-embed-sighting/InterviewMessages_en-ru7GkZlQ.js +1 -0
  21. package/dist-embed-sighting/InterviewMessages_es-DkJurNrG.js +1 -0
  22. package/dist-embed-sighting/InterviewMessages_fr-DAYgf8Ms.js +1 -0
  23. package/dist-embed-sighting/InterviewMessages_it-6lenkmSg.js +1 -0
  24. package/dist-embed-sighting/rr0-sighting.mjs +36 -28
  25. package/dist-embed-sighting-editor/{AdsbLolArchiveProvider-fZkxLAHp.js → AdsbLolArchiveProvider-DEqEth50.js} +1 -1
  26. package/dist-embed-sighting-editor/AssemblyAiTranscriptionProvider-o2kkPD5o.js +1 -0
  27. package/dist-embed-sighting-editor/{BallesterGuaspAssessor-DASadJjI.js → BallesterGuaspAssessor-ClwhCo4B.js} +1 -1
  28. package/dist-embed-sighting-editor/{BeamEditor-B2diaX_e.js → BeamEditor-vxinYAhV.js} +1 -1
  29. package/dist-embed-sighting-editor/{BeamSystem-BfNJfayv.js → BeamSystem-BMyP16H9.js} +1 -1
  30. package/dist-embed-sighting-editor/{BodyEditor-CCBXFuuL.js → BodyEditor-Dn5HrH2t.js} +1 -1
  31. package/dist-embed-sighting-editor/BrowserWhisperProvider-Dn44ZE45.js +1 -0
  32. package/dist-embed-sighting-editor/{CaseReportExport-DBSSDC9F.js → CaseReportExport-Ct_2DUSO.js} +2 -2
  33. package/dist-embed-sighting-editor/{ContrailSystem-BWvO9taK.js → ContrailSystem-Y75rFfLJ.js} +1 -1
  34. package/dist-embed-sighting-editor/{ControlPasses-BQ_DUxa_.js → ControlPasses-oqSnNDq6.js} +1 -1
  35. package/dist-embed-sighting-editor/{CoverageAssessor-CSktyUlP.js → CoverageAssessor-CN-3cMS9.js} +1 -1
  36. package/dist-embed-sighting-editor/{Flightradar24Provider-OvRZWZWj.js → Flightradar24Provider-D3bM2ckV.js} +1 -1
  37. package/dist-embed-sighting-editor/GLTFLoader-CJy8wjmO.js +1 -0
  38. package/dist-embed-sighting-editor/{GenerativeKitMessages-BtNG1usJ.js → GenerativeKitMessages-I8xH2ec9.js} +1 -1
  39. package/dist-embed-sighting-editor/{GeoExportTexts-DBGGdRnP.js → GeoExportTexts-DAllttgw.js} +1 -1
  40. package/dist-embed-sighting-editor/{GeoJsonExport-BZ-0v8fM.js → GeoJsonExport-_yjIEd4F.js} +1 -1
  41. package/dist-embed-sighting-editor/GeographicFigures-DC6Tw3ja.js +1 -0
  42. package/dist-embed-sighting-editor/{HeadlightSystem-C-8Gl3vu.js → HeadlightSystem-DZN_EX7x.js} +1 -1
  43. package/dist-embed-sighting-editor/{HynekAssessor-CH2E88xV.js → HynekAssessor-CKjvYcVe.js} +1 -1
  44. package/dist-embed-sighting-editor/InterviewEditorElement-C7eNBUfn.js +270 -0
  45. package/dist-embed-sighting-editor/InterviewMessages_en-ru7GkZlQ.js +1 -0
  46. package/dist-embed-sighting-editor/InterviewMessages_es-DkJurNrG.js +1 -0
  47. package/dist-embed-sighting-editor/InterviewMessages_fr-DAYgf8Ms.js +1 -0
  48. package/dist-embed-sighting-editor/InterviewMessages_it-6lenkmSg.js +1 -0
  49. package/dist-embed-sighting-editor/{KmlExport-Bh4eTycx.js → KmlExport-dpml2tIJ.js} +1 -1
  50. package/dist-embed-sighting-editor/LanternEditor-CKKUIplQ.js +9 -0
  51. package/dist-embed-sighting-editor/{LaserBeam-CtogDP38.js → LaserBeam-Ct6opxMs.js} +1 -1
  52. package/dist-embed-sighting-editor/LaunchEditor-BfggZKq5.js +22 -0
  53. package/dist-embed-sighting-editor/{LaunchPlume-BtRrJTP9.js → LaunchPlume-CT777Ivp.js} +1 -1
  54. package/dist-embed-sighting-editor/{LaunchSimulation-xKwguVJt.js → LaunchSimulation-BSlF3Uq4.js} +1 -1
  55. package/dist-embed-sighting-editor/{ModelSource-CnKzaNDn.js → ModelSource-BQm0eN7H.js} +1 -1
  56. package/dist-embed-sighting-editor/{ModelThumbnails-UE_Er5EW.js → ModelThumbnails-Bwh2px6A.js} +1 -1
  57. package/dist-embed-sighting-editor/{ModelViewer-DoCshJc6.js → ModelViewer-Dl5ichWV.js} +1 -1
  58. package/dist-embed-sighting-editor/ModuleConformance-B8OYKQop.js +2 -0
  59. package/dist-embed-sighting-editor/{ModuleSession-CJstaNEN.js → ModuleSession-BQSTCqob.js} +3 -3
  60. package/dist-embed-sighting-editor/ModuleThree-DwGM2nF4.js +1 -0
  61. package/dist-embed-sighting-editor/{ModulesPanelElement-DdGqqdn4.js → ModulesPanelElement-CZcbo6lq.js} +3 -3
  62. package/dist-embed-sighting-editor/{NearestApproach-BH3Yw8Qz.js → NearestApproach-DkpM-8sl.js} +1 -1
  63. package/dist-embed-sighting-editor/OpenAiTranscriptionProvider-DDW446tK.js +1 -0
  64. package/dist-embed-sighting-editor/{PictureRegistration-B9C6iY17.js → PictureRegistration-CbfytwCX.js} +1 -1
  65. package/dist-embed-sighting-editor/{PoherAssessor-DWcCWUfa.js → PoherAssessor-C5-F9VMn.js} +1 -1
  66. package/dist-embed-sighting-editor/{RailwaySystem-D3VBmx1X.js → RailwaySystem-BxHS7Jka.js} +1 -1
  67. package/dist-embed-sighting-editor/{ReentryEditor-BDyG-48K.js → ReentryEditor-BgpCftyc.js} +2 -2
  68. package/dist-embed-sighting-editor/{ReentrySimulation-BQj0wWXW.js → ReentrySimulation-BHjJYTL1.js} +1 -1
  69. package/dist-embed-sighting-editor/{ReferenceSystem-C9NRL7UY.js → ReferenceSystem-BxKEbMVI.js} +1 -1
  70. package/dist-embed-sighting-editor/{RoadMarkings-ByQL2MTo.js → RoadMarkings-D9-6Cy9S.js} +1 -1
  71. package/dist-embed-sighting-editor/{SceneNames_en-BdRB6cjg.js → SceneNames_en-09L_ZfER.js} +1 -1
  72. package/dist-embed-sighting-editor/{SceneNames_es-Dk0UmXHp.js → SceneNames_es-C4PEieol.js} +1 -1
  73. package/dist-embed-sighting-editor/{SceneNames_fr-_z2iZ8Bm.js → SceneNames_fr-BGTFI_pF.js} +1 -1
  74. package/dist-embed-sighting-editor/{SceneNames_it-CE7fanb3.js → SceneNames_it-DHk5C-uS.js} +1 -1
  75. package/dist-embed-sighting-editor/{TraceSystem-g262KZ3G.js → TraceSystem-DAa5Lzof.js} +2 -2
  76. package/dist-embed-sighting-editor/TranscriptionAudio-C_xvRUv2.js +5 -0
  77. package/dist-embed-sighting-editor/TranscriptionError-D_TCbYbt.js +1 -0
  78. package/dist-embed-sighting-editor/{UfoMessages_en-JeMK-39o.js → UfoMessages_en-FAvzKxmR.js} +1 -1
  79. package/dist-embed-sighting-editor/{WaterSystem-CIbQPMqE.js → WaterSystem-C7hE-tnY.js} +1 -1
  80. package/dist-embed-sighting-editor/interviewImport-CgWyTdKb.js +4 -0
  81. package/dist-embed-sighting-editor/{interviewJson-DXD8FSBX.js → interviewJson-iURHP4Zk.js} +1 -1
  82. package/dist-embed-sighting-editor/rr0-sighting-editor.mjs +30 -22
  83. package/dist-embed-sighting-editor/{surroundingsSources-BExFsNzP.js → surroundingsSources-YIawBCws.js} +1 -1
  84. package/dist-embed-sighting-editor/{trafficRuntime-CPRQW0Ho.js → trafficRuntime-j8tnHTec.js} +1 -1
  85. package/package.json +1 -1
  86. package/dist-embed-interview/InterviewMessages_en-BNau2xU8.js +0 -1
  87. package/dist-embed-interview/InterviewMessages_es-ypa0EDh9.js +0 -1
  88. package/dist-embed-interview/InterviewMessages_fr-OCQdwn9j.js +0 -1
  89. package/dist-embed-interview/InterviewMessages_it-awuOqf5v.js +0 -1
  90. package/dist-embed-scene/LaunchEditor-CIYcS0Y-.js +0 -22
  91. package/dist-embed-sighting/InterviewMessages_en-BNau2xU8.js +0 -1
  92. package/dist-embed-sighting/InterviewMessages_es-ypa0EDh9.js +0 -1
  93. package/dist-embed-sighting/InterviewMessages_fr-OCQdwn9j.js +0 -1
  94. package/dist-embed-sighting/InterviewMessages_it-awuOqf5v.js +0 -1
  95. package/dist-embed-sighting-editor/GLTFLoader-CM7Uk25s.js +0 -1
  96. package/dist-embed-sighting-editor/GeographicFigures-DqhWddS9.js +0 -1
  97. package/dist-embed-sighting-editor/InterviewEditorElement-Bz3hyZ-m.js +0 -234
  98. package/dist-embed-sighting-editor/InterviewMessages_en-BNau2xU8.js +0 -1
  99. package/dist-embed-sighting-editor/InterviewMessages_es-ypa0EDh9.js +0 -1
  100. package/dist-embed-sighting-editor/InterviewMessages_fr-OCQdwn9j.js +0 -1
  101. package/dist-embed-sighting-editor/InterviewMessages_it-awuOqf5v.js +0 -1
  102. package/dist-embed-sighting-editor/LanternEditor-tTk1vUZm.js +0 -9
  103. package/dist-embed-sighting-editor/LaunchEditor-CteAalch.js +0 -22
  104. package/dist-embed-sighting-editor/ModuleConformance-BKvZnuw9.js +0 -2
  105. package/dist-embed-sighting-editor/ModuleThree-1hxqvWFa.js +0 -1
  106. package/dist-embed-sighting-editor/interviewImport-C-TiARLK.js +0 -4
@@ -1,22 +0,0 @@
1
- import{k as y,_ as d,ax as b,$ as x,a0 as E,c as g,Y as k,Z as w,a1 as v,aG as j}from"./rr0-sighting-editor.mjs";import{S as I}from"./SkyEventEditorStyle-CvY_AhbI.js";import{L as T}from"./LaunchPlume-BtRrJTP9.js";const S=y.catalog({en:()=>d(()=>import("./LaunchParameterTexts_en-DvrCwbDM.js"),[],import.meta.url).then(r=>r.launchParameterTexts_en),fr:()=>d(()=>import("./LaunchParameterTexts_fr-Bh_1zVzy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_fr),es:()=>d(()=>import("./LaunchParameterTexts_es--RUAegVp.js"),[],import.meta.url).then(r=>r.launchParameterTexts_es),it:()=>d(()=>import("./LaunchParameterTexts_it-CWDx9nJy.js"),[],import.meta.url).then(r=>r.launchParameterTexts_it)});class n{static plumeValue(e){return t=>T.plumeOf(t)[e]}static plume(e,t){return{type:"number",key:`plume.${e}`,effective:n.plumeValue(e),...t}}static burn(e,t){return{type:"number",key:e,min:-3600,max:36e3,step:.1,unit:"s",scale:.001,label:t.label,hint:t.hint,group:"engine",effective:i=>t.ends(i.track??[])?.t}}static placeAt(e,t){if(e.length===0)return{t,lat:0,lng:0,altitudeKm:0};if(e.length===1)return{t,lat:e[0].lat,lng:e[0].lng,altitudeKm:e[0].altitudeKm};let i=0;for(;i<e.length-2&&e[i+1].t<t;)i++;const s=e[i],a=e[i+1],l=a.t===s.t?0:(t-s.t)/(a.t-s.t),o=(m,h)=>m+(h-m)*l;return{t,lat:o(s.lat,a.lat),lng:o(s.lng,a.lng),altitudeKm:Math.max(0,o(s.altitudeKm,a.altitudeKm))}}static instantsOf(e){return[...e.track.map(t=>t.t),...[e.burnFromT,e.burnUntilT].filter(t=>t!==void 0),...(e.jets??[]).flatMap(t=>[t.fromT,t.untilT])]}static SET={kind:"launch",title:"launch",parameters:[{type:"said",key:"title",label:"name",group:"vehicle"},{type:"text",key:"vehicle.mission",label:"mission",placeholder:"Starlink Group 10-49",group:"vehicle"},{type:"number",key:"vehicle.engine.thrustKN",min:1,max:1e5,step:1,unit:"kN",label:"thrustVacuum",hint:"merlinVacuum934Rl10110A",group:"engine"},{type:"number",key:"vehicle.engine.specificImpulseS",min:100,max:500,step:1,unit:"s",label:"specificImpulseVacuum",hint:"times981MSIt",group:"engine"},{type:"choice",key:"vehicle.engine.propellant",label:"propellant",hint:"whatTheExhaustIsMadeOf",choices:[{value:"rp1-lox",label:"keroseneAndOxygen"},{value:"methane-lox",label:"methaneAndOxygen"},{value:"hydrogen-lox",label:"hydrogenAndOxygen"},{value:"hypergolic",label:"hypergolic"},{value:"solid",label:"solid"}],group:"engine"},n.burn("burnFromT",{label:"engineStart",hint:"whenTheEngineStartedInSeconds",ends:e=>e[0]}),n.burn("burnUntilT",{label:"engineCutOff",hint:"whenTheEngineStoppedInSeconds",ends:e=>e[e.length-1]}),n.plume("exhaustKgPerS",{min:.1,max:1e5,step:.1,unit:"kg/s",label:"exhaustFlow",hint:"howMuchExhaustLeavesTheEngine",group:"plume"}),n.plume("condensedShare",{min:0,max:1,step:.01,label:"shareThatScatters",hint:"theShareOfTheExhaustThat",group:"plume"}),n.plume("particleRadiusUm",{min:.05,max:5,step:.05,unit:"µm",label:"particleRadius",group:"plume"}),n.plume("lifetimeS",{min:10,max:3600,step:10,unit:"s",label:"trailLifetime",hint:"howLongTheNarrowTrailLasts",group:"plume"}),n.plume("expansionKmPerS",{min:0,max:5,step:.01,unit:"km/s",label:"trailSpreading",group:"plume"}),n.plume("initialRadiusKm",{min:0,max:50,step:.1,unit:"km",label:"radiusAtRelease",group:"plume"}),n.plume("collarShare",{min:0,max:1,step:.01,label:"shareInTheCollar",hint:"theCollarIsTheExhaustJust",group:"collar"}),n.plume("collarExpansionKmPerS",{min:0,max:10,step:.05,unit:"km/s",label:"collarSpreading",hint:"howFastTheCollarWidensThree",group:"collar"}),n.plume("collarLifetimeS",{min:1,max:300,step:1,unit:"s",label:"collarLifetime",group:"collar"})]};static PLACE={kind:"launch-place",title:"placeOfThePath",parameters:[{type:"number",key:"t",min:-3600,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"time",hint:"secondsOfTheRecordingNegativeBefore"},{type:"position",key:"lat",secondKey:"lng",saidKey:"saidPosition",native:"geo",step:1,label:"position"},{type:"number",key:"altitudeKm",min:0,max:2e3,step:.1,unit:"km",required:!0,label:"altitude"}]};static jetContext(e,t){return{launch:e,index:t}}static jetValue(e){return(t,i)=>{const{launch:s,index:a}=i??{};return s?e(T.releaseOf(s,t,a)):void 0}}static JET_GROUP="jet";static JET={kind:"launch-jet",title:"jet",parameters:[{type:"choice",key:"kind",required:!0,label:"what",choices:[{value:"burn",label:"engineBurn"},{value:"vent",label:"propellantVented"}],group:n.JET_GROUP},{type:"number",key:"fromT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"from",hint:"secondsOfTheRecordingNegativeBefore2",group:n.JET_GROUP},{type:"number",key:"untilT",min:-36e3,max:36e3,step:.1,unit:"s",scale:.001,required:!0,label:"until",group:n.JET_GROUP},{type:"number",key:"angleDeg",min:0,max:180,step:1,unit:"°",effective:()=>0,label:"directionFromAft",hint:"t0StraightBackAlongTheStage",group:n.JET_GROUP},{type:"number",key:"azimuthDeg",min:-360,max:360,step:1,unit:"°",effective:()=>0,label:"side",hint:"roundTheLineOfMotionWhich",group:n.JET_GROUP},{type:"number",key:"spinPeriodS",min:-3600,max:3600,step:.1,unit:"s",label:"spinPeriod",hint:"howLongTheStageTakesTo",group:n.JET_GROUP},{type:"number",key:"speedKmPerS",min:0,max:10,step:.01,unit:"km/s",effective:n.jetValue(e=>e.speedKmPerS),label:"speed",hint:"howFastItLeavesTheStage",group:n.JET_GROUP},{type:"number",key:"massKgPerS",min:0,max:1e5,step:.1,unit:"kg/s",effective:n.jetValue(e=>e.massKgPerS),label:"flow",group:n.JET_GROUP},{type:"number",key:"condensedShare",min:0,max:1,step:.01,effective:n.jetValue(e=>e.condensedShare),label:"shareThatScatters",group:n.JET_GROUP},{type:"number",key:"particleRadiusUm",min:.05,max:5,step:.05,unit:"µm",effective:n.jetValue(e=>e.particleRadiusUm),label:"particleRadius",group:n.JET_GROUP},{type:"number",key:"expansionKmPerS",min:0,max:5,step:.01,unit:"km/s",effective:n.jetValue(e=>e.populations[0].expansionKmPerS),label:"spreading",hint:"howFastEachPuffOfIt",group:n.JET_GROUP},{type:"number",key:"initialRadiusKm",min:0,max:50,step:.1,unit:"km",effective:n.jetValue(e=>e.initialRadiusKm),label:"radiusAtRelease",group:n.JET_GROUP},{type:"number",key:"lifetimeS",min:1,max:7200,step:1,unit:"s",effective:n.jetValue(e=>e.populations[0].lifetimeS),label:"lifetime",group:n.JET_GROUP}]};static publish(){b.publish(n.SET)}}const O=y.catalog({en:()=>d(()=>import("./LaunchEditorMessages_en-BnzNAYW9.js"),[],import.meta.url).then(r=>r.launchEditorMessages_en),fr:()=>d(()=>import("./LaunchEditorMessages_fr-Ds_VOB8c.js"),[],import.meta.url).then(r=>r.launchEditorMessages_fr),es:()=>d(()=>import("./LaunchEditorMessages_es-BE0dEl7I.js"),[],import.meta.url).then(r=>r.launchEditorMessages_es),it:()=>d(()=>import("./LaunchEditorMessages_it-DPQaR8HY.js"),[],import.meta.url).then(r=>r.launchEditorMessages_it)});class u{constructor(e,t,i){this.container=e,this.host=t,I.attach(e,"launch-editor-part",u.STYLE),this.language=i,b.of("launch")||n.publish(),this.ready=this.setLanguage(i)}messages;ready;parameterTexts;languageToken=0;currentId;form;list;timeline;row="path";placeForm;placeIndex=0;jetForm;jetIndex=0;language;shown=[];static STYLE='.launch-editor-part { flex-basis: 100%; min-width: 0; } .launch-editor-part #launch-timeline { flex-basis: 100%; min-width: 0; padding: 4px 0; } .launch-editor-part .launch-path > .icon-btn { align-self: flex-end; } .launch-editor-part #launch-list, .launch-editor-part #launch-places { flex-basis: 100%; min-width: 0; } .launch-editor-part .launch-editor, .launch-editor-part .launch-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; } .launch-editor-part .launch-fields { flex-basis: 100%; min-width: 0; } .launch-editor-part [hidden] { display: none !important; } .launch-editor-part select { min-width: 0; width: 100%; } .launch-editor-part .launch-intro { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-track { flex-basis: 100%; margin: 0; } .launch-editor-part .launch-parameters { flex-basis: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; } .launch-editor-part .parameter-group { flex: 1 1 14em; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; align-content: flex-start; } .launch-editor-part input, .launch-editor-part select { max-width: 100%; box-sizing: border-box; } .launch-editor-part input[type="text"] { width: 12em; } .launch-editor-part #launch-title { width: 18em; } .launch-editor-part label { min-width: 0; max-width: 100%; } .launch-editor-part input.parameter-derived::placeholder { opacity: .65; } .launch-editor-part .launch-path { flex: 1 1 100%; min-width: 0; box-sizing: border-box; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: flex-start; }';async setLanguage(e){const t=++this.languageToken;this.language=e;const[i,s]=await Promise.all([O.load(e),S.load(e)]);t===this.languageToken&&(this.messages=i,this.parameterTexts=s,this.render(),this.sync())}sync(){if(!this.messages)return;const e=this.launches;this.shown=[...e],e.some(s=>s.id===this.currentId)||(this.currentId=e[0]?.id),this.list?.setItems(e.map(s=>({id:s.id,label:this.labelOf(s)})),this.currentId),this.syncAddState();const t=this.current;if(this.element("launch-fields").hidden=t===void 0,!t)return;this.syncPlace(!0),this.syncJet(!0);const i=this.resolved(b.of("launch"));this.form??=new x(this.element("launch-parameters"),this.language,"",{said:()=>this.host.said(),writingLanguage:()=>this.host.writingLanguage()}),this.form.show(i,t,()=>this.written())}refresh(){if(!this.messages)return;this.syncAddState();const e=this.launches;if(e.length===this.shown.length&&e.every((t,i)=>t===this.shown[i])){this.syncTimeline();return}this.sync()}setTime(e){this.messages&&this.timeline?.setTime(e)}syncAddState(){const e=this.startOfNew()!==void 0;this.list?.setAddState(e,e?void 0:this.messages.addLaunchNowhere)}get current(){return this.launches.find(e=>e.id===this.currentId)}show(e){this.messages&&(this.currentId=e,this.row="path",this.placeIndex=0,this.jetIndex=0,this.sync())}resolved(e){return E.resolve(e,this.parameterTexts)}render(){if(!this.messages)return;const e=this.messages;this.form=void 0,this.container.innerHTML=`<div class="launch-editor">
2
- <p class="launch-intro">${e.intro}</p>
3
- <div id="launch-list"></div>
4
- <div id="launch-fields" class="launch-fields">
5
- <div id="launch-parameters" class="launch-parameters"></div>
6
- <div id="launch-timeline" class="launch-timeline"></div>
7
- <button id="launch-jet-add-burn" type="button" title="${e.addJet}">${g.PLUS} ${e.jetBurn}</button>
8
- <button id="launch-jet-add-vent" type="button" title="${e.addJet}">${g.PLUS} ${e.jetVent}</button>
9
- <p class="launch-intro">${e.timelineNote}</p>
10
- <fieldset id="launch-path" class="launch-path">
11
- <legend>${e.path}</legend>
12
- <div id="launch-place-parameters" class="launch-parameters"></div>
13
- <button id="launch-place-delete" class="icon-btn" type="button" title="${e.deletePlace}" aria-label="${e.deletePlace}">${g.TRASH}</button>
14
- </fieldset>
15
- <fieldset id="launch-jets" class="launch-path">
16
- <legend id="launch-jet-legend">${e.jet}</legend>
17
- <div id="launch-jet-parameters" class="launch-parameters"></div>
18
- <button id="launch-jet-delete" class="icon-btn" type="button" title="${e.deleteJet}" aria-label="${e.deleteJet}">${g.TRASH}</button>
19
- </fieldset>
20
- <p class="launch-intro">${e.derivedNote}</p>
21
- </div>
22
- </div>`;const t=this.element("launch-list");this.list=new k({header:t,body:this.element("launch-fields"),ids:{list:"launch-select",remove:"launch-delete",add:"launch-add",kinds:"launch-add-kind",kind:i=>`launch-add-${i}`},onSelect:i=>this.show(i),onAdd:i=>this.addLaunch(i??u.VEHICLES[0].id),onRemove:()=>this.deleteCurrent()}),this.list.setLabels({list:e.launch,remove:e.deleteLaunch,add:e.addLaunch,empty:e.none}),this.list.setKinds(u.VEHICLES.map(i=>({value:i.id,label:i.vehicle.name??i.id}))),this.timeline=new w(this.element("launch-timeline"),i=>this.host.seekTo(i),{addKeyframeHere:e.addHere,keyframeHere:e.here,zoomHint:e.zoomHint}),this.element("launch-jet-add-burn").addEventListener("click",()=>this.addJet("burn",this.host.currentTime())),this.element("launch-jet-add-vent").addEventListener("click",()=>this.addJet("vent",this.host.currentTime())),this.element("launch-place-delete").addEventListener("click",()=>this.removePlace()),this.element("launch-jet-delete").addEventListener("click",()=>this.removeJet()),this.placeForm=void 0,this.jetForm=void 0}written(){this.host.changed();const e=this.current;e&&(this.list?.rename(e.id,this.labelOf(e)),this.syncTimeline())}static PATH_COLOR="#e08a1e";static JET_COLOR="#4f8fd6";jetLabel(e,t){return`${e.kind==="vent"?this.messages.jetVent:this.messages.jetBurn} ${t+1}`}syncTimeline(){const e=this.current;if(!this.timeline||!e)return;const i={id:"path",label:this.messages.path,color:u.PATH_COLOR,times:e.track.map(h=>h.t),active:this.row==="path",selectedTime:this.row==="path"?e.track[this.placeIndex]?.t:void 0,open:()=>this.selectPlace(this.placeIndex),pressed:(h,c)=>{const p=c===void 0?-1:(this.current?.track??[]).findIndex(f=>f.t===c);this.selectPlace(p>=0?p:this.placeIndex)},move:(h,c)=>this.movePlace(h,c),add:()=>this.addPlaceAt(this.host.currentTime())},s=(e.jets??[]).map((h,c)=>({id:`jet-${c}`,label:this.jetLabel(h,c),color:u.JET_COLOR,times:[h.fromT,h.untilT],spans:[{t:h.fromT,until:h.untilT,label:""}],active:this.row==="jet"&&c===this.jetIndex,open:()=>this.selectJet(c),pressed:()=>this.selectJet(c),move:(p,f)=>this.moveJetEnd(c,p,f),add:()=>this.addJet(h.kind??"burn",this.host.currentTime())})),a=n.instantsOf(e),l=Math.min(...a),o=Math.max(...a),m=Math.max(500,(o-l)/10);this.timeline.show([i,...s],this.host.duration(),this.host.currentTime(),{from:l-m,to:o+m})}syncDetail(){const t=this.current?.jets?.[this.jetIndex];this.row==="jet"&&!t&&(this.row="path"),this.element("launch-path").hidden=this.row!=="path",this.element("launch-jets").hidden=this.row!=="jet",this.element("launch-jet-legend").textContent=t?this.jetLabel(t,this.jetIndex):this.messages.jet}static MIN_PLACES=2;syncPlace(e=!1){const t=this.current?.track??[];this.placeIndex=Math.max(0,Math.min(this.placeIndex,t.length-1)),this.element("launch-place-delete").disabled=t.length<=u.MIN_PLACES,this.placeForm?this.placeForm.sync(e):(this.placeForm=new x(this.element("launch-place-parameters"),this.language,"launchPlace."),this.placeForm.show(this.resolved(n.PLACE),new v(()=>this.current?.track[this.placeIndex],i=>this.editPlace(this.placeIndex,i),void 0,this.host.positionPlace?.()),()=>{})),this.syncDetail(),this.syncTimeline()}selectPlace(e){this.row="path",this.placeIndex=e,this.syncPlace(!0)}editPlace(e,t){const i=this.current;if(!i)return;const s={...i.track[e]};t(s),i.track=i.track.map((a,l)=>l===e?s:a).sort((a,l)=>a.t-l.t),this.placeIndex=i.track.indexOf(s),this.syncPlace(),this.written()}movePlace(e,t){const i=this.current?.track.findIndex(s=>s.t===e)??-1;i<0||(this.editPlace(i,s=>{s.t=t}),this.syncPlace(!0))}addPlaceAt(e){const t=this.current;if(!t)return;const i=t.track.findIndex(s=>Math.abs(s.t-e)<1);if(i<0){const s=n.placeAt(t.track,Math.round(e));t.track=[...t.track,s].sort((a,l)=>a.t-l.t),this.host.changed(),this.selectPlace(t.track.indexOf(s));return}this.selectPlace(i)}removePlace(){const e=this.current;!e||e.track.length<=u.MIN_PLACES||(e.track=e.track.filter((t,i)=>i!==this.placeIndex),this.syncPlace(!0),this.host.changed())}syncJet(e=!1){const t=this.current?.jets??[];this.jetIndex=Math.max(0,Math.min(this.jetIndex,t.length-1)),this.jetForm?this.jetForm.sync(e):(this.jetForm=new x(this.element("launch-jet-parameters"),this.language,"launchJet."),this.jetForm.show(this.resolved(n.JET),new v(()=>this.current?.jets?.[this.jetIndex],i=>this.editJet(this.jetIndex,i),()=>this.current?n.jetContext(this.current,this.jetIndex):void 0),()=>{})),this.syncDetail(),this.syncTimeline()}selectJet(e){this.row="jet",this.jetIndex=e,this.syncJet(!0)}editJet(e,t){const i=this.current;if(!i?.jets)return;const s={...i.jets[e]};t(s),i.jets=i.jets.map((a,l)=>l===e?s:a),this.written()}moveJetEnd(e,t,i){const s=this.current?.jets?.[e];s&&(this.editJet(e,a=>{const l=t===s.fromT?[i,s.untilT]:[s.fromT,i];a.fromT=Math.min(l[0],l[1]),a.untilT=Math.max(l[0],l[1])}),this.selectJet(e))}addJet(e,t){const i=this.current;if(!i)return;const s=i.track,a=Math.round(t),l=e==="vent"?{kind:e,fromT:a,untilT:a+3e4,angleDeg:90}:{kind:e,fromT:a,untilT:a+3e4};!i.jets?.length&&i.burnFromT===void 0&&i.burnUntilT===void 0&&(i.burnFromT=s[0].t,i.burnUntilT=s[s.length-1].t),i.jets=[...i.jets??[],l],this.form?.sync(!0),this.host.changed(),this.selectJet(i.jets.length-1)}removeJet(){const e=this.current;if(!e?.jets?.length)return;const t=e.jets.filter((i,s)=>s!==this.jetIndex);t.length?e.jets=t:delete e.jets,this.host.changed(),t.length?this.selectJet(Math.min(this.jetIndex,t.length-1)):this.selectPlace(this.placeIndex)}startOfNew(){const e=this.host.sighting(),t=e.event?.place?.[0];if(t?.lat===void 0||t.lng===void 0)return;const i=(e.observerTrack?.getInterpolatedPoseAt(0)?.headingDeg??0)*Math.PI/180,s=a=>({lat:t.lat+a*Math.cos(i)/111.32,lng:t.lng+a*Math.sin(i)/(111.32*Math.max(.05,Math.cos(t.lat*Math.PI/180)))});return[{t:0,...s(300),altitudeKm:80},{t:6e4,...s(450),altitudeKm:160}]}static VEHICLES=[{id:"falcon-9",vehicle:{name:"Falcon 9"}}];addLaunch(e){const t=this.startOfNew();if(!t)return;const i=u.VEHICLES.find(o=>o.id===e)??u.VEHICLES[0];let s=this.launches.length+1;for(;this.launches.some(o=>o.id===`launch-${s}`);)s++;const a={id:`launch-${s}`,vehicle:{...i.vehicle},track:t},l=this.host.sighting();l.skyEvents={...l.skyEvents,launches:[...this.launches,a]},this.currentId=a.id,this.row="path",this.placeIndex=0,this.host.changed(),this.sync()}deleteCurrent(){const e=this.current;if(!e)return;this.currentId=void 0;const t=this.host.sighting();t.skyEvents=j.written({...t.skyEvents,launches:this.launches.filter(i=>i!==e)}),this.host.changed(),this.sync()}labelOf(e){const t=this.host.said().read(e.title)??e.vehicle?.mission??e.vehicle?.name;return t?`${t} (${e.id})`:e.id}get launches(){return this.host.sighting().skyEvents?.launches??[]}element(e){return this.container.querySelector(`#${e}`)}}export{u as LaunchEditor};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ModuleThree-1hxqvWFa.js","./rr0-sighting-editor.mjs"])))=>i.map(i=>d[i]);
2
- import{_ as w}from"./rr0-sighting-editor.mjs";class n{static MEMBERS={weather:["getWeather"],place:["attribution","search","reverse"],timeZone:["zoneAt"],narrative:["settings","draft"],assessment:["assess"],lightPollution:["year","citation","lookUp"],aircraft:["citation","between"],upperAir:["between"],elevation:["getElevationGrid"],imagery:["attribution","getImageryTexture"],surroundings:["id","name","attribution","creditUrl","contemporary","covers","getSurroundings"],decorModels:["attribution","entries","entry"],skyEvents:["key","messages","simulation"],interpretations:["key","messages","bodiesOf"],perception:["id","messages","sources","settings","perceive"]};static WEATHER_SHARES=["cloudCover","cloudDarkness","precipitationIntensity","highCloudCover","lowerCloudCover","iceCrystalAlignment","rareIceCrystals","relativeHumidity"];static WEATHER_REQUIRED=["cloudCover","cloudDarkness","precipitationIntensity"];static PRECIPITATIONS=["none","rain","snow","hail"];static HIGH_WIND_MS=60;static TIMEOUT_MS=3e4;static async check(e,a={}){const s=[];e.hasScript&&!e.scriptRun&&s.push({level:"note",code:"scriptNotRun"});for(const[t,r]of Object.entries(e.module.contributes))Object.hasOwn(n.MEMBERS,t)?Array.isArray(r)?await n.checkPoint(t,r,a,s):s.push({level:"failed",code:"notAList",point:t}):s.push({level:"failed",code:"unknownPoint",point:t});return s}static async checkPoint(e,a,s,t){const r=new Set;for(const i of a){const c=(l,d,g="failed")=>{t.push({level:g,code:l,point:e,source:typeof i?.id=="string"?i.id:void 0,detail:d})};if(r.has(i?.id)&&c("duplicateId"),r.add(i?.id),n.checkEntry(i,c),typeof i?.create!="function"){c("createMissing");continue}const o=n.build(i,c);if(o===void 0)continue;const h=n.MEMBERS[e].filter(l=>o[l]===void 0);for(const l of h)c("missingMember",l);h.length>0||(e==="weather"&&await n.checkWeather(i.id,o,s,c),e==="skyEvents"&&await n.checkSkyEventKind(i.id,o,s,c),e==="interpretations"&&await n.checkInterpretationKind(i.id,o,s,c))}}static checkEntry(e,a){for(const s of["id","name","credit","creditUrl"]){const t=e?.[s];(typeof t!="string"||t.trim()==="")&&a("entryField",s)}typeof e?.creditUrl=="string"&&e.creditUrl!==""&&!URL.canParse(e.creditUrl)&&a("entryField","creditUrl")}static build(e,a){let s=!1;const t=(async()=>(s=!0,new Response("",{status:503}))),r=globalThis.fetch;globalThis.fetch=t;try{const i=e.create(t);if(s&&a("createAsked"),i==null){a("createEmpty");return}return i}catch(i){a("createThrew",n.told(i));return}finally{globalThis.fetch=r}}static async checkWeather(e,a,s,t){const r=s.weatherQuery;if(!r){t("weatherNotAsked",void 0,"note");return}let i;try{i=await n.within(a.getWeather(r),s)}catch(l){t("weatherThrew",n.told(l));return}if(i===void 0){t("weatherNoRecord",void 0,"note");return}const c=i?.samples;if(!Array.isArray(c)||c.length!==r.points.length){t("weatherSamples",`${Array.isArray(c)?c.length:0}/${r.points.length}`);return}c.some((l,d)=>l?.time?.getTime?.()!==r.points[d].time.getTime())&&t("weatherOrder");const o=new Set;let h=!1;for(const l of c){const d=l?.weather??{};for(const g of n.WEATHER_SHARES){const u=d[g],p=n.WEATHER_REQUIRED.includes(g);(u!==void 0||p)&&!n.between(u,0,1)&&o.add(`${g} = ${String(u)}`)}n.between(d.windDirectionDeg,0,360)||o.add(`windDirectionDeg = ${String(d.windDirectionDeg)}`),n.between(d.windSpeed,0,1/0)?d.windSpeed>n.HIGH_WIND_MS&&(h=!0):o.add(`windSpeed = ${String(d.windSpeed)}`),n.PRECIPITATIONS.includes(d.precipitationType)||o.add(`precipitationType = ${String(d.precipitationType)}`),typeof d.storm!="boolean"&&o.add(`storm = ${String(d.storm)}`)}for(const l of o)t("weatherValue",l);h&&t("weatherWindHigh",void 0,"note"),i.source?.id!==e&&t("weatherSource","id"),(typeof i.source?.name!="string"||i.source.name==="")&&t("weatherSource","name"),(typeof i.source?.url!="string"||i.source.url==="")&&t("weatherSource","url")}static async checkSkyEventKind(e,a,s,t){a.key!==e&&t("kindKey",String(a.key)),await n.checkTexts(a.messages,["title","name"],s,t);let r;try{r=(await n.within(a.simulation(),s))()}catch(o){t("simulationFailed",n.told(o));return}const{MODULE_THREE:i}=await w(async()=>{const{MODULE_THREE:o}=await import("./ModuleThree-1hxqvWFa.js");return{MODULE_THREE:o}},__vite__mapDeps([0,1]),import.meta.url);if(!(r?.object instanceof i.Object3D)){t("secondThree");return}try{r.update([],0,n.frame(new i.Vector3)),r.drawnCount!==0&&t("drawnWithoutEvents",String(r.drawnCount))}catch(o){t("updateThrew",n.told(o))}const c=new i.Group;c.add(r.object);try{r.dispose(),r.object.parent===c&&t("disposeLeft")}catch(o){t("disposeThrew",n.told(o))}}static async checkInterpretationKind(e,a,s,t){a.key!==e&&t("kindKey",String(a.key)),await n.checkTexts(a.messages,["title"],s,t);const r=s.interpretation?.[a.key];if(!Array.isArray(r)||r.length===0){t("readingNotTried",void 0,"note");return}for(const i of r)try{const c=a.bodiesOf(i);Array.isArray(c)||t("readingNotAList")}catch(c){t("readingThrew",n.told(c))}}static async checkTexts(e,a,s,t){for(const r of["en","fr"])try{const i=await n.within(e.load(r),s);for(const c of a)(typeof i?.[c]!="string"||i[c]==="")&&t("kindMessages",`${r}: ${c}`)}catch(i){t("kindMessages",`${r}: ${n.told(i)}`)}}static frame(e){return{reference:{lat:0,lng:0},origin:{x:0,z:0},eastScale:1,siteElevationM:0,eye:e,pixelRad:.001,relativeScale:1,air:{},transmittanceTo:()=>[1,1,1],groundYAt:()=>0,wind:{eastMS:0,northMS:0},observer:{lat:0,lng:0,heightM:0},date:new Date(0),magnitudeLimit:6,cloudTransmission:()=>1,arrivingIlluminance:()=>[0,0,0],transmittanceFromSpace:()=>[1,1,1],lightFrom:()=>{},glareFrom:()=>{}}}static between(e,a,s){return typeof e=="number"&&!Number.isNaN(e)&&e>=a&&e<=s}static told(e){return e instanceof Error?e.message:String(e)}static within(e,a){const s=a.timeoutMs??n.TIMEOUT_MS;let t;const r=new Promise((i,c)=>{t=setTimeout(()=>c(new Error(`> ${s/1e3} s`)),s)});return Promise.race([e,r]).finally(()=>clearTimeout(t))}}export{n as ModuleConformance};
@@ -1 +0,0 @@
1
- import{V as a,a$ as e,ca as s,bg as t,bi as r,bw as i,b7 as o,Q as n,bf as b,aO as c,bF as l,bx as d,C as u,cb as m,ap as M,aB as B,an as f,G,bW as S,bT as y,bX as h,ak as p,c8 as x,b1 as C,D,aC as g,cc as L,cd as T,ce as A,aQ as E,bh as P,az as v,aA as F,cf as O,bv as Q,aD as V}from"./rr0-sighting-editor.mjs";const j={AdditiveBlending:V,BackSide:Q,BoxGeometry:O,BufferAttribute:F,BufferGeometry:v,CanvasTexture:P,Color:E,ConeGeometry:A,CylinderGeometry:T,DataTexture:L,DoubleSide:g,Euler:D,Float32BufferAttribute:C,FrontSide:x,Group:p,Line:h,LineBasicMaterial:y,LineSegments:S,Matrix4:G,Mesh:f,MeshBasicMaterial:B,MeshStandardMaterial:M,NormalBlending:m,Object3D:u,PlaneGeometry:d,PointLight:l,Points:c,PointsMaterial:b,Quaternion:n,ShaderMaterial:o,SphereGeometry:i,Sprite:r,SpriteMaterial:t,TorusGeometry:s,Vector2:e,Vector3:a};export{j as MODULE_THREE};
@@ -1,4 +0,0 @@
1
- class r{static ASKS=/^(q|question|pregunta|domanda|interviewer|enquêteur|enqueteur|intervieweur|entrevistador|intervistatore)$/i;static ANSWERS=/^(r|a|réponse|reponse|answer|respuesta|risposta|témoin|temoin|witness|testigo|testimone)$/i;static seconds(o){const t=/^(?:(\d{1,2}):)?(\d{1,3}):(\d{1,2})(?:[.,](\d{1,3}))?$/.exec(o.trim());if(!t)return;const[,n,i,e,c]=t;return Number(n??0)*3600+Number(i)*60+Number(e)+(c?+`0.${c}`:0)}static parse(o,t={}){const n=o.replace(/^/,"").replace(/\r\n?/g,`
2
- `).trim();if(n==="")return;const i=/-->/.test(n)?r.cues(n):r.labelled(n)??r.paragraphs(n);if(i.length!==0)return r.build(i,t)}static cues(o){const t=[];for(const n of o.split(/\n{2,}/)){const i=n.split(`
3
- `),e=i.findIndex(g=>g.includes("-->"));if(e<0)continue;const c=r.seconds(i[e].split("-->")[0].trim().split(/\s+/)[0]),d=i.slice(e+1).join(" ").trim(),a=/^<v(?:\.[^\s>]*)?\s+([^>]+)>/.exec(d),l=d.replace(/<\/?[^>]+>/g,"").replace(/\s+/g," ").trim();if(l==="")continue;if(a){t.push({label:a[1].trim(),start:c,text:l});continue}const p=r.label(l);t.push(p?{label:p.label,start:c,text:p.text}:{start:c,text:l})}return r.joined(t)}static labelled(o){const t=[];let n=0,i=0;for(const a of o.split(`
4
- `)){const l=a.trim();if(l==="")continue;i++;const p=r.label(l);p?(n++,t.push(p)):t.length>0?t[t.length-1].text+=` ${l}`:t.push({text:l})}const e=new Set(t.map(a=>a.label).filter(a=>a!==void 0)),c=new Map;for(const a of t)a.label!==void 0&&c.set(a.label,(c.get(a.label)??0)+1);const d=[...c.values()].some(a=>a>=2)||[...e].every(a=>r.ASKS.test(a)||r.ANSWERS.test(a));if(!(n<2||e.size>10||n/i<.3||!d))return r.joined(t)}static label(o){const t=String.raw`(?:\d{1,2}:)?\d{1,3}:\d{1,2}(?:[.,]\d{1,3})?`,n=String.raw`[\p{L}][\p{L}\p{N} .'’\-]{0,38}?`,i=[[new RegExp(String.raw`^[\[(]?(${t})[\])]?\s*[-–]?\s*(${n})\s*:\s*(.+)$`,"u"),e=>({label:e[2].trim(),start:r.seconds(e[1]),text:e[3].trim()})],[new RegExp(String.raw`^(${n})\s*[\[(](${t})[\])]\s*:?\s*(.+)$`,"u"),e=>({label:e[1].trim(),start:r.seconds(e[2]),text:e[3].trim()})],[new RegExp(String.raw`^(${n})\s*:\s*(.+)$`,"u"),e=>({label:e[1].trim(),text:e[2].trim()})]];for(const[e,c]of i){const d=e.exec(o);if(d)return c(d)}}static paragraphs(o){return o.split(/\n{2,}/).map(t=>t.replace(/\s+/g," ").trim()).filter(t=>t!=="").map(t=>({text:t}))}static joined(o){const t=[];for(const n of o){const i=t[t.length-1];i&&i.label===n.label&&n.label!==void 0?i.text+=` ${n.text}`:t.push({...n})}return t}static same(o,t){const n=c=>c.normalize("NFD").replace(/[̀-ͯ]/g,"").toLowerCase().replace(/[^a-z0-9]/g,""),i=n(o),e=n(t);return i!==""&&e!==""&&(i===e||i.includes(e)||e.includes(i))}static build(o,t){const n=[...new Set(o.map(s=>s.label??""))],i={},e=new Map,c={interviewer:0,witness:0,other:0},d=(s,u)=>{const f=c[s]++,b=f===0?s:`${s}${f+1}`;return i[b]={...u,role:s},b},a=t.by??[];let l=!0;for(const s of n){const u=a.find(b=>s!==""&&r.same(s,b)),f=t.witnesses?.find(b=>s!==""&&r.same(s,b.label));s===""?e.set(s,d(l?"interviewer":"witness",{})):u!==void 0||r.ASKS.test(s)?e.set(s,d("interviewer",u!==void 0?{by:{people:u}}:{})):f||r.ANSWERS.test(s)?e.set(s,d("witness",f?{title:f.label,of:f.id}:{})):e.set(s,d(l&&a.length===0?"interviewer":"witness",{})),l=!1}n.forEach(s=>{const u=i[e.get(s)];s!==""&&!r.ASKS.test(s)&&!r.ANSWERS.test(s)&&u.title===void 0&&u.by===void 0&&(u.title=s)});const p=o.map((s,u)=>{const f=o.slice(u+1).find(b=>b.start!==void 0);return{speaker:e.get(s.label??""),...s.start!==void 0?{start:s.start}:{},...s.start!==void 0&&f?.start!==void 0&&f.start>=s.start?{end:f.start}:{},text:s.text}}),g=Object.fromEntries(Object.keys(i).map(s=>[s,{status:"pending"}]));return{version:1,speakers:i,proofreading:g,segments:p}}}export{r as InterviewImport};