@abi-software/mapintegratedvuer 1.21.1 → 1.21.2

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 (68) hide show
  1. package/README.md +23 -5
  2. package/assets/location-icon.html +33 -1
  3. package/assets/styleguide.css +18 -18
  4. package/cypress.config.js +7 -9
  5. package/dist/{ConnectivityGraph-CZMROk9r.js → ConnectivityGraph-DrSaFEDd.js} +3 -3
  6. package/dist/{ContentMixin-Vn34n5t2.js → ContentMixin-Xg0PjBqG.js} +2 -2
  7. package/dist/{DynamicMarkerMixin-BS6t7w_i.js → DynamicMarkerMixin-D5Ruu_hd.js} +1 -1
  8. package/dist/{Flatmap-BejxA0uz.js → Flatmap-CxN8TbnS.js} +4 -4
  9. package/dist/{Iframe-BWbhTjCR.js → Iframe-CkgbLfJt.js} +4 -4
  10. package/dist/{MultiFlatmap-nlmsH-Ib.js → MultiFlatmap-CkejvAJe.js} +4 -4
  11. package/dist/{Plot-ChbPsDZX.js → Plot-BfwoipSl.js} +2 -2
  12. package/dist/{Scaffold-C6f7c7Ha.js → Scaffold-DCqsTKpg.js} +4 -4
  13. package/dist/{Simulation-DcJScRYo.js → Simulation-BOtU3kTT.js} +2 -2
  14. package/dist/{connectivities-UXTqf7_0.js → connectivities-DyeS8w0c.js} +126 -95
  15. package/dist/index.html +9 -6
  16. package/dist/mapintegratedvuer.js +5489 -5578
  17. package/dist/mapintegratedvuer.umd.cjs +196 -196
  18. package/dist/style.css +1 -1
  19. package/eslint.config.js +39 -15
  20. package/package.json +11 -5
  21. package/public/index.html +9 -6
  22. package/src/App.vue +234 -249
  23. package/src/assets/_variables.scss +12 -10
  24. package/src/assets/header-icon.scss +8 -9
  25. package/src/assets/mapicon-species-style.css +10 -8
  26. package/src/assets/styles.scss +1 -1
  27. package/src/components/ContentBar.vue +98 -106
  28. package/src/components/ContentVuer.vue +36 -39
  29. package/src/components/ContextCard.vue +238 -199
  30. package/src/components/ContextHelp.vue +22 -26
  31. package/src/components/CustomSplitter.vue +32 -43
  32. package/src/components/DatasetHeader.vue +37 -41
  33. package/src/components/DialogToolbarContent.vue +292 -256
  34. package/src/components/FlatmapContextCard.vue +52 -57
  35. package/src/components/MapContent.vue +90 -86
  36. package/src/components/ResizeSensor.vue +8 -13
  37. package/src/components/SearchControls.vue +26 -35
  38. package/src/components/SimulatedData.js +196 -219
  39. package/src/components/SplitDialog.vue +139 -129
  40. package/src/components/SplitFlow.vue +421 -237
  41. package/src/components/index.js +1 -3
  42. package/src/components/scripts/simulation_data.js +393 -397
  43. package/src/components/scripts/utilities.js +108 -78
  44. package/src/components/viewers/CellDLViewer.vue +9 -9
  45. package/src/components/viewers/ConnectivityGraph.vue +9 -12
  46. package/src/components/viewers/Flatmap.vue +23 -25
  47. package/src/components/viewers/Iframe.vue +8 -10
  48. package/src/components/viewers/MultiFlatmap.vue +59 -69
  49. package/src/components/viewers/Plot.vue +6 -7
  50. package/src/components/viewers/Scaffold.vue +73 -63
  51. package/src/components/viewers/Simulation.vue +10 -15
  52. package/src/main.js +16 -21
  53. package/src/mixins/ContentMixin.js +208 -178
  54. package/src/mixins/DynamicMarkerMixin.js +14 -18
  55. package/src/mixins/RetrieveContextCardMixin.js +35 -30
  56. package/src/mixins/S3Bucket.vue +10 -13
  57. package/src/services/knowledgeMapping.js +53 -53
  58. package/src/services/tagging.js +4 -4
  59. package/src/stores/connectivities.js +46 -8
  60. package/src/stores/entries.js +7 -9
  61. package/src/stores/index.js +7 -7
  62. package/src/stores/settings.js +23 -31
  63. package/src/stores/splitFlow.js +364 -298
  64. package/vite.bundle-build.js +24 -26
  65. package/vite.config.js +22 -21
  66. package/vite.static-build.js +4 -4
  67. package/vitest.workspace.js +1 -3
  68. package/vuese-generator.js +47 -55
@@ -4,426 +4,426 @@ let minVol = undefined;
4
4
  let maxVol = undefined;
5
5
 
6
6
  const fvData = {
7
- "compartments": [
8
- {
9
- "flow": 0.049699,
10
- "name": "RUL Anterior",
11
- "number": 1,
12
- "volumes": [
13
- {
14
- "time": 1.0,
15
- "volume": 181987.21791976015
16
- },
17
- {
18
- "time": 3.0,
19
- "volume": 190654.20796455297
20
- },
21
- {
22
- "time": 5.0,
23
- "volume": 197903.5873118482
24
- }
25
- ]
26
- },
27
- {
28
- "flow": 0.0612,
29
- "name": "RUL Posterior",
30
- "number": 2,
31
- "volumes": [
32
- {
33
- "time": 1.0,
34
- "volume": 201042.2999957783
35
- },
36
- {
37
- "time": 3.0,
38
- "volume": 223166.3550326552
39
- },
40
- {
41
- "time": 5.0,
42
- "volume": 224107.48977724495
43
- }
44
- ]
45
- },
46
- {
47
- "flow": 0.082407,
48
- "name": "RUL Apical",
49
- "number": 3,
50
- "volumes": [
51
- {
52
- "time": 1.0,
53
- "volume": 245471.83628595909
54
- },
55
- {
56
- "time": 3.0,
57
- "volume": 257765.65591976934
58
- },
59
- {
60
- "time": 5.0,
61
- "volume": 268162.69688902283
62
- }
63
- ]
64
- },
65
- {
66
- "flow": 0.046921,
67
- "name": "RML Lateral",
68
- "number": 4,
69
- "volumes": [
70
- {
71
- "time": 1.0,
72
- "volume": 136749.2302777965
73
- },
74
- {
75
- "time": 3.0,
76
- "volume": 142354.54619401656
77
- },
78
- {
79
- "time": 5.0,
80
- "volume": 144871.90605963918
81
- }
82
- ]
83
- },
84
- {
85
- "flow": 0.041519,
86
- "name": "RML Medial",
87
- "number": 5,
88
- "volumes": [
89
- {
90
- "time": 1.0,
91
- "volume": 149373.3982901215
92
- },
93
- {
94
- "time": 3.0,
95
- "volume": 157328.6444732329
96
- },
97
- {
98
- "time": 5.0,
99
- "volume": 158140.25438088493
100
- }
101
- ]
102
- },
103
- {
104
- "flow": 0.063307,
105
- "name": "RLL Posterior",
106
- "number": 6,
107
- "volumes": [
108
- {
109
- "time": 1.0,
110
- "volume": 186775.46800209297
111
- },
112
- {
113
- "time": 3.0,
114
- "volume": 192966.52104661157
115
- },
116
- {
117
- "time": 5.0,
118
- "volume": 205857.97557974615
119
- }
120
- ]
121
- },
122
- {
123
- "flow": 0.065394,
124
- "name": "RLL Medial",
125
- "number": 7,
126
- "volumes": [
127
- {
128
- "time": 1.0,
129
- "volume": 194824.7466953374
130
- },
131
- {
132
- "time": 3.0,
133
- "volume": 217874.6619392152
134
- },
135
- {
136
- "time": 5.0,
137
- "volume": 217381.52321902165
138
- }
139
- ]
140
- },
141
- {
142
- "flow": 0.056798,
143
- "name": "RLL Anterior",
144
- "number": 8,
145
- "volumes": [
146
- {
147
- "time": 1.0,
148
- "volume": 215680.0182455645
149
- },
150
- {
151
- "time": 3.0,
152
- "volume": 219453.77944698493
153
- },
154
- {
155
- "time": 5.0,
156
- "volume": 231581.60138050313
157
- }
158
- ]
159
- },
160
- {
161
- "flow": 0.081373,
162
- "name": "RLL Superior",
163
- "number": 9,
164
- "volumes": [
165
- {
166
- "time": 1.0,
167
- "volume": 244625.5581985565
168
- },
169
- {
170
- "time": 3.0,
171
- "volume": 266792.0850557373
172
- },
173
- {
174
- "time": 5.0,
175
- "volume": 284087.3333850801
176
- }
177
- ]
178
- },
179
- {
180
- "flow": 0.056684,
181
- "name": "LUL Posterior",
182
- "number": 10,
183
- "volumes": [
184
- {
185
- "time": 1.0,
186
- "volume": 172196.7437707655
187
- },
188
- {
189
- "time": 3.0,
190
- "volume": 181443.25253755006
191
- },
192
- {
193
- "time": 5.0,
194
- "volume": 191012.60480114556
195
- }
196
- ]
197
- },
198
- {
199
- "flow": 0.038741,
200
- "name": "LUL Anterior",
201
- "number": 11,
202
- "volumes": [
203
- {
204
- "time": 1.0,
205
- "volume": 167290.43470213015
206
- },
207
- {
208
- "time": 3.0,
209
- "volume": 181601.44836610503
210
- },
211
- {
212
- "time": 5.0,
213
- "volume": 186127.32231959977
214
- }
215
- ]
216
- },
7
+ compartments: [
8
+ {
9
+ flow: 0.049699,
10
+ name: 'RUL Anterior',
11
+ number: 1,
12
+ volumes: [
13
+ {
14
+ time: 1.0,
15
+ volume: 181987.21791976015,
16
+ },
17
+ {
18
+ time: 3.0,
19
+ volume: 190654.20796455297,
20
+ },
21
+ {
22
+ time: 5.0,
23
+ volume: 197903.5873118482,
24
+ },
25
+ ],
26
+ },
27
+ {
28
+ flow: 0.0612,
29
+ name: 'RUL Posterior',
30
+ number: 2,
31
+ volumes: [
32
+ {
33
+ time: 1.0,
34
+ volume: 201042.2999957783,
35
+ },
36
+ {
37
+ time: 3.0,
38
+ volume: 223166.3550326552,
39
+ },
40
+ {
41
+ time: 5.0,
42
+ volume: 224107.48977724495,
43
+ },
44
+ ],
45
+ },
46
+ {
47
+ flow: 0.082407,
48
+ name: 'RUL Apical',
49
+ number: 3,
50
+ volumes: [
51
+ {
52
+ time: 1.0,
53
+ volume: 245471.83628595909,
54
+ },
55
+ {
56
+ time: 3.0,
57
+ volume: 257765.65591976934,
58
+ },
59
+ {
60
+ time: 5.0,
61
+ volume: 268162.69688902283,
62
+ },
63
+ ],
64
+ },
65
+ {
66
+ flow: 0.046921,
67
+ name: 'RML Lateral',
68
+ number: 4,
69
+ volumes: [
70
+ {
71
+ time: 1.0,
72
+ volume: 136749.2302777965,
73
+ },
74
+ {
75
+ time: 3.0,
76
+ volume: 142354.54619401656,
77
+ },
78
+ {
79
+ time: 5.0,
80
+ volume: 144871.90605963918,
81
+ },
82
+ ],
83
+ },
84
+ {
85
+ flow: 0.041519,
86
+ name: 'RML Medial',
87
+ number: 5,
88
+ volumes: [
89
+ {
90
+ time: 1.0,
91
+ volume: 149373.3982901215,
92
+ },
93
+ {
94
+ time: 3.0,
95
+ volume: 157328.6444732329,
96
+ },
97
+ {
98
+ time: 5.0,
99
+ volume: 158140.25438088493,
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ flow: 0.063307,
105
+ name: 'RLL Posterior',
106
+ number: 6,
107
+ volumes: [
108
+ {
109
+ time: 1.0,
110
+ volume: 186775.46800209297,
111
+ },
112
+ {
113
+ time: 3.0,
114
+ volume: 192966.52104661157,
115
+ },
116
+ {
117
+ time: 5.0,
118
+ volume: 205857.97557974615,
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ flow: 0.065394,
124
+ name: 'RLL Medial',
125
+ number: 7,
126
+ volumes: [
127
+ {
128
+ time: 1.0,
129
+ volume: 194824.7466953374,
130
+ },
131
+ {
132
+ time: 3.0,
133
+ volume: 217874.6619392152,
134
+ },
135
+ {
136
+ time: 5.0,
137
+ volume: 217381.52321902165,
138
+ },
139
+ ],
140
+ },
141
+ {
142
+ flow: 0.056798,
143
+ name: 'RLL Anterior',
144
+ number: 8,
145
+ volumes: [
146
+ {
147
+ time: 1.0,
148
+ volume: 215680.0182455645,
149
+ },
150
+ {
151
+ time: 3.0,
152
+ volume: 219453.77944698493,
153
+ },
154
+ {
155
+ time: 5.0,
156
+ volume: 231581.60138050313,
157
+ },
158
+ ],
159
+ },
160
+ {
161
+ flow: 0.081373,
162
+ name: 'RLL Superior',
163
+ number: 9,
164
+ volumes: [
165
+ {
166
+ time: 1.0,
167
+ volume: 244625.5581985565,
168
+ },
169
+ {
170
+ time: 3.0,
171
+ volume: 266792.0850557373,
172
+ },
173
+ {
174
+ time: 5.0,
175
+ volume: 284087.3333850801,
176
+ },
177
+ ],
178
+ },
179
+ {
180
+ flow: 0.056684,
181
+ name: 'LUL Posterior',
182
+ number: 10,
183
+ volumes: [
184
+ {
185
+ time: 1.0,
186
+ volume: 172196.7437707655,
187
+ },
188
+ {
189
+ time: 3.0,
190
+ volume: 181443.25253755006,
191
+ },
192
+ {
193
+ time: 5.0,
194
+ volume: 191012.60480114556,
195
+ },
196
+ ],
197
+ },
198
+ {
199
+ flow: 0.038741,
200
+ name: 'LUL Anterior',
201
+ number: 11,
202
+ volumes: [
203
+ {
204
+ time: 1.0,
205
+ volume: 167290.43470213015,
206
+ },
207
+ {
208
+ time: 3.0,
209
+ volume: 181601.44836610503,
210
+ },
211
+ {
212
+ time: 5.0,
213
+ volume: 186127.32231959977,
214
+ },
215
+ ],
216
+ },
217
+ {
218
+ flow: 0.038449,
219
+ name: 'LUL Lingular',
220
+ number: 12,
221
+ volumes: [
222
+ {
223
+ time: 1.0,
224
+ volume: 141906.787889736,
225
+ },
226
+ {
227
+ time: 3.0,
228
+ volume: 141671.55047498783,
229
+ },
230
+ {
231
+ time: 5.0,
232
+ volume: 152307.21920357717,
233
+ },
234
+ ],
235
+ },
236
+ {
237
+ flow: 0.055762,
238
+ name: 'LUL Apical',
239
+ number: 13,
240
+ volumes: [
241
+ {
242
+ time: 1.0,
243
+ volume: 218466.22444789423,
244
+ },
245
+ {
246
+ time: 3.0,
247
+ volume: 251686.08493242075,
248
+ },
249
+ {
250
+ time: 5.0,
251
+ volume: 250175.1790429858,
252
+ },
253
+ ],
254
+ },
255
+ {
256
+ flow: 0.045985,
257
+ name: 'LLL Posterior',
258
+ number: 14,
259
+ volumes: [
260
+ {
261
+ time: 1.0,
262
+ volume: 138039.9756600753,
263
+ },
264
+ {
265
+ time: 3.0,
266
+ volume: 137909.5791278306,
267
+ },
268
+ {
269
+ time: 5.0,
270
+ volume: 160653.0149818861,
271
+ },
272
+ ],
273
+ },
274
+ {
275
+ flow: 0.057459,
276
+ name: 'LLL Superior',
277
+ number: 15,
278
+ volumes: [
279
+ {
280
+ time: 1.0,
281
+ volume: 193934.96452631807,
282
+ },
283
+ {
284
+ time: 3.0,
285
+ volume: 218445.44410386705,
286
+ },
287
+ {
288
+ time: 5.0,
289
+ volume: 220963.58880308812,
290
+ },
291
+ ],
292
+ },
293
+ {
294
+ flow: 0.053836,
295
+ name: 'LLL Medial',
296
+ number: 16,
297
+ volumes: [
298
+ {
299
+ time: 1.0,
300
+ volume: 201521.12178046367,
301
+ },
302
+ {
303
+ time: 3.0,
304
+ volume: 233287.44183763085,
305
+ },
306
+ {
307
+ time: 5.0,
308
+ volume: 203887.33003463238,
309
+ },
310
+ ],
311
+ },
312
+ {
313
+ flow: 0.051704,
314
+ name: 'LLL Anterior',
315
+ number: 17,
316
+ volumes: [
317
+ {
318
+ time: 1.0,
319
+ volume: 188226.65055088204,
320
+ },
321
+ {
322
+ time: 3.0,
323
+ volume: 189234.8102624248,
324
+ },
325
+ {
326
+ time: 5.0,
327
+ volume: 211763.78024920568,
328
+ },
329
+ ],
330
+ },
331
+ {
332
+ flow: 0.052762,
333
+ name: 'LLL Lateral',
334
+ number: 18,
335
+ volumes: [
336
+ {
337
+ time: 1.0,
338
+ volume: 157340.55375980627,
339
+ },
340
+ {
341
+ time: 3.0,
342
+ volume: 160912.90618797182,
343
+ },
344
+ {
345
+ time: 5.0,
346
+ volume: 193000.8440869187,
347
+ },
348
+ ],
349
+ },
350
+ ],
351
+ 'left lung': {
352
+ flow: 0.45138,
353
+ 'sum compartment flow': 0.45138199999999995,
354
+ volumes: [
217
355
  {
218
- "flow": 0.038449,
219
- "name": "LUL Lingular",
220
- "number": 12,
221
- "volumes": [
222
- {
223
- "time": 1.0,
224
- "volume": 141906.787889736
225
- },
226
- {
227
- "time": 3.0,
228
- "volume": 141671.55047498783
229
- },
230
- {
231
- "time": 5.0,
232
- "volume": 152307.21920357717
233
- }
234
- ]
356
+ 'sum compartment volume': 1578923.4570880714,
357
+ time: 1.0,
358
+ volume: 3335453.2309989794,
235
359
  },
236
360
  {
237
- "flow": 0.055762,
238
- "name": "LUL Apical",
239
- "number": 13,
240
- "volumes": [
241
- {
242
- "time": 1.0,
243
- "volume": 218466.22444789423
244
- },
245
- {
246
- "time": 3.0,
247
- "volume": 251686.08493242075
248
- },
249
- {
250
- "time": 5.0,
251
- "volume": 250175.1790429858
252
- }
253
- ]
361
+ 'sum compartment volume': 1696192.517830789,
362
+ time: 3.0,
363
+ volume: 3564548.974903552,
254
364
  },
255
365
  {
256
- "flow": 0.045985,
257
- "name": "LLL Posterior",
258
- "number": 14,
259
- "volumes": [
260
- {
261
- "time": 1.0,
262
- "volume": 138039.9756600753
263
- },
264
- {
265
- "time": 3.0,
266
- "volume": 137909.5791278306
267
- },
268
- {
269
- "time": 5.0,
270
- "volume": 160653.0149818861
271
- }
272
- ]
366
+ 'sum compartment volume': 1769890.8835230393,
367
+ time: 5.0,
368
+ volume: 3701985.251506051,
273
369
  },
370
+ ],
371
+ },
372
+ 'right lung': {
373
+ flow: 0.54862,
374
+ 'sum compartment flow': 0.5486179999999999,
375
+ volumes: [
274
376
  {
275
- "flow": 0.057459,
276
- "name": "LLL Superior",
277
- "number": 15,
278
- "volumes": [
279
- {
280
- "time": 1.0,
281
- "volume": 193934.96452631807
282
- },
283
- {
284
- "time": 3.0,
285
- "volume": 218445.44410386705
286
- },
287
- {
288
- "time": 5.0,
289
- "volume": 220963.58880308812
290
- }
291
- ]
377
+ 'sum compartment volume': 1756529.773910967,
378
+ time: 1.0,
379
+ volume: 3335453.2309989794,
292
380
  },
293
381
  {
294
- "flow": 0.053836,
295
- "name": "LLL Medial",
296
- "number": 16,
297
- "volumes": [
298
- {
299
- "time": 1.0,
300
- "volume": 201521.12178046367
301
- },
302
- {
303
- "time": 3.0,
304
- "volume": 233287.44183763085
305
- },
306
- {
307
- "time": 5.0,
308
- "volume": 203887.33003463238
309
- }
310
- ]
382
+ 'sum compartment volume': 1868356.4570727758,
383
+ time: 3.0,
384
+ volume: 3564548.974903552,
311
385
  },
312
386
  {
313
- "flow": 0.051704,
314
- "name": "LLL Anterior",
315
- "number": 17,
316
- "volumes": [
317
- {
318
- "time": 1.0,
319
- "volume": 188226.65055088204
320
- },
321
- {
322
- "time": 3.0,
323
- "volume": 189234.8102624248
324
- },
325
- {
326
- "time": 5.0,
327
- "volume": 211763.78024920568
328
- }
329
- ]
387
+ 'sum compartment volume': 1932094.367982991,
388
+ time: 5.0,
389
+ volume: 3701985.251506051,
330
390
  },
331
- {
332
- "flow": 0.052762,
333
- "name": "LLL Lateral",
334
- "number": 18,
335
- "volumes": [
336
- {
337
- "time": 1.0,
338
- "volume": 157340.55375980627
339
- },
340
- {
341
- "time": 3.0,
342
- "volume": 160912.90618797182
343
- },
344
- {
345
- "time": 5.0,
346
- "volume": 193000.8440869187
347
- }
348
- ]
349
- }
350
- ],
351
- "left lung": {
352
- "flow": 0.45138,
353
- "sum compartment flow": 0.45138199999999995,
354
- "volumes": [
355
- {
356
- "sum compartment volume": 1578923.4570880714,
357
- "time": 1.0,
358
- "volume": 3335453.2309989794
359
- },
360
- {
361
- "sum compartment volume": 1696192.517830789,
362
- "time": 3.0,
363
- "volume": 3564548.974903552
364
- },
365
- {
366
- "sum compartment volume": 1769890.8835230393,
367
- "time": 5.0,
368
- "volume": 3701985.251506051
369
- }
370
- ]
391
+ ],
371
392
  },
372
- "right lung": {
373
- "flow": 0.54862,
374
- "sum compartment flow": 0.5486179999999999,
375
- "volumes": [
376
- {
377
- "sum compartment volume": 1756529.773910967,
378
- "time": 1.0,
379
- "volume": 3335453.2309989794
380
- },
381
- {
382
- "sum compartment volume": 1868356.4570727758,
383
- "time": 3.0,
384
- "volume": 3564548.974903552
385
- },
386
- {
387
- "sum compartment volume": 1932094.367982991,
388
- "time": 5.0,
389
- "volume": 3701985.251506051
390
- }
391
- ]
392
- }
393
- }
393
+ };
394
394
 
395
395
  const getFlowAndVolume = (compartment, time) => {
396
396
  if (compartment) {
397
- const entry = fvData.compartments.find(
398
- element => element.name === compartment);
397
+ const entry = fvData.compartments.find((element) => element.name === compartment);
399
398
  if (!entry) return {};
400
399
 
401
- const min = 1.0, max = 5.0;
400
+ const min = 1.0,
401
+ max = 5.0;
402
402
  const range = max - min;
403
- const nT = time / 100.0 * range + min;
404
- const v3 = entry.volumes.find(element => element.time === 3.0);
403
+ const nT = (time / 100.0) * range + min;
404
+ const v3 = entry.volumes.find((element) => element.time === 3.0);
405
405
  let volume = 0;
406
406
  const flow = entry.flow;
407
407
  if (1.0 <= nT && nT <= 3.0) {
408
- const v1 = entry.volumes.find(element => element.time === 1.0);
408
+ const v1 = entry.volumes.find((element) => element.time === 1.0);
409
409
  const ratio = (nT - 1.0) / 2.0;
410
410
  volume = (1.0 - ratio) * v1.volume + ratio * v3.volume;
411
411
  } else {
412
- const v5 = entry.volumes.find(element => element.time === 5.0);
412
+ const v5 = entry.volumes.find((element) => element.time === 5.0);
413
413
  const ratio = (nT - 3.0) / 2.0;
414
414
  volume = (1.0 - ratio) * v3.volume + ratio * v5.volume;
415
415
  }
416
416
 
417
417
  return { flow, volume };
418
418
  }
419
- }
419
+ };
420
420
 
421
421
  const calculateMinMax = () => {
422
422
  if (minVol === undefined) {
423
423
  fvData.compartments.forEach((ele) => {
424
- const vol = ele.volumes.find(v => v.time === 1.0).volume;
424
+ const vol = ele.volumes.find((v) => v.time === 1.0).volume;
425
425
  const flow = ele.flow;
426
- console.log(vol, flow)
426
+ console.log(vol, flow);
427
427
  if (minVol === undefined || vol < minVol) {
428
428
  minVol = vol;
429
429
  }
@@ -436,26 +436,22 @@ const calculateMinMax = () => {
436
436
  if (maxF === undefined || flow > maxF) {
437
437
  maxF = flow;
438
438
  }
439
- })
439
+ });
440
440
  }
441
- }
441
+ };
442
442
 
443
443
  const getMockData = (compartment) => {
444
444
  if (compartment) {
445
- const entry = fvData.compartments.find(
446
- element => element.name === compartment);
445
+ const entry = fvData.compartments.find((element) => element.name === compartment);
447
446
  if (!entry) return undefined;
448
447
  calculateMinMax();
449
- const vol = entry.volumes.find(v => v.time === 1.0).volume;
448
+ const vol = entry.volumes.find((v) => v.time === 1.0).volume;
450
449
  const flow = entry.flow;
451
- const i = (vol - minVol) / (maxVol - minVol) * 9 + 1;
452
- const e = (flow - minF) / (maxF - minF) * 9 + 1;
450
+ const i = ((vol - minVol) / (maxVol - minVol)) * 9 + 1;
451
+ const e = ((flow - minF) / (maxF - minF)) * 9 + 1;
453
452
 
454
- return { "Inspiration time": i, "Expiration time": e };
453
+ return { 'Inspiration time': i, 'Expiration time': e };
455
454
  }
456
- }
455
+ };
457
456
 
458
- export {
459
- getFlowAndVolume,
460
- getMockData,
461
- }
457
+ export { getFlowAndVolume, getMockData };