@ovok/native 0.4.6 → 0.4.8

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 (520) hide show
  1. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +3 -1
  2. package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  3. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +1 -1
  4. package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  5. package/lib/commonjs/modules/bt-management/index.js +220 -0
  6. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  7. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js +49 -0
  8. package/lib/commonjs/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  9. package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js +52 -0
  10. package/lib/commonjs/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
  11. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js +53 -41
  12. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  13. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js +3 -0
  14. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  15. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  16. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  17. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +98 -0
  18. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  19. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +24 -1
  20. package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  21. package/lib/commonjs/modules/bt-management/services/device-creator.js +19 -8
  22. package/lib/commonjs/modules/bt-management/services/device-creator.js.map +1 -1
  23. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js +85 -0
  24. package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  25. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -74
  26. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +155 -0
  28. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  29. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  30. package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  32. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  34. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +55 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +82 -29
  38. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  39. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js +2 -1
  40. package/lib/commonjs/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js +48 -0
  42. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  43. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js +37 -0
  44. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  45. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js +83 -0
  46. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  47. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js +26 -0
  48. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  49. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js +36 -0
  50. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  51. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +155 -0
  52. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  53. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +98 -0
  54. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  55. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js +29 -0
  56. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  57. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +103 -0
  58. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  59. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js +32 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js +64 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +143 -0
  64. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  65. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +38 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js +84 -0
  68. package/lib/commonjs/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
  69. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +130 -0
  70. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  71. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +55 -0
  72. package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
  73. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +43 -0
  74. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +113 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +120 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +92 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +64 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +94 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +124 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +113 -0
  88. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  89. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js +117 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +82 -0
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  93. package/lib/commonjs/modules/bt-management/types/command-sequencer.js +6 -0
  94. package/lib/commonjs/modules/bt-management/types/command-sequencer.js.map +1 -0
  95. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  96. package/lib/commonjs/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  97. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js +6 -0
  98. package/lib/commonjs/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js +2 -0
  100. package/lib/commonjs/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  101. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js +6 -0
  102. package/lib/commonjs/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  103. package/lib/commonjs/modules/bt-management/types/device-command.js +2 -0
  104. package/lib/commonjs/modules/bt-management/types/device-command.js.map +1 -0
  105. package/lib/commonjs/modules/bt-management/types/integrated-devices.js +2 -0
  106. package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
  107. package/lib/commonjs/modules/bt-management/types/measurement-group.js +6 -0
  108. package/lib/commonjs/modules/bt-management/types/measurement-group.js.map +1 -0
  109. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js +49 -0
  110. package/lib/commonjs/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  111. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js +21 -0
  112. package/lib/commonjs/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  113. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js +9 -0
  114. package/lib/commonjs/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  115. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js +19 -0
  116. package/lib/commonjs/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  117. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js +13 -0
  118. package/lib/commonjs/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  119. package/lib/commonjs/modules/bt-management/utils/parse-measurement.js +10 -7
  120. package/lib/commonjs/modules/bt-management/utils/parse-measurement.js.map +1 -1
  121. package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js +34 -0
  122. package/lib/commonjs/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
  123. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js +22 -0
  124. package/lib/commonjs/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  125. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js +18 -0
  126. package/lib/commonjs/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  127. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +3 -1
  128. package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
  129. package/lib/module/modules/bt-management/constants/integrated-devices-map.js +1 -1
  130. package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
  131. package/lib/module/modules/bt-management/index.js +20 -0
  132. package/lib/module/modules/bt-management/index.js.map +1 -1
  133. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js +44 -0
  134. package/lib/module/modules/bt-management/services/custom/compile-case-fields.js.map +1 -0
  135. package/lib/module/modules/bt-management/services/custom/compile-case-shape.js +48 -0
  136. package/lib/module/modules/bt-management/services/custom/compile-case-shape.js.map +1 -0
  137. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js +53 -41
  138. package/lib/module/modules/bt-management/services/custom/compile-custom-case.js.map +1 -1
  139. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js +3 -0
  140. package/lib/module/modules/bt-management/services/custom/compile-custom-field.js.map +1 -1
  141. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js +48 -2
  142. package/lib/module/modules/bt-management/services/custom/compile-custom-frame.js.map +1 -1
  143. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +93 -0
  144. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -0
  145. package/lib/module/modules/bt-management/services/custom/define-custom-device.js +24 -1
  146. package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
  147. package/lib/module/modules/bt-management/services/device-creator.js +20 -8
  148. package/lib/module/modules/bt-management/services/device-creator.js.map +1 -1
  149. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js +81 -0
  150. package/lib/module/modules/bt-management/services/devices/aoj/aoj.thermometers.js.map +1 -0
  151. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +8 -73
  152. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  153. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +150 -0
  154. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -0
  155. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +9 -49
  156. package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
  157. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +17 -6
  158. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  159. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +21 -14
  160. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  161. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +51 -0
  162. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -0
  163. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +82 -29
  164. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  165. package/lib/module/modules/bt-management/services/devices/frame-parser.js +2 -1
  166. package/lib/module/modules/bt-management/services/devices/frame-parser.js.map +1 -1
  167. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js +43 -0
  168. package/lib/module/modules/bt-management/services/devices/lepu/lepu.command-builder.js.map +1 -0
  169. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js +33 -0
  170. package/lib/module/modules/bt-management/services/devices/lepu/lepu.commands.js.map +1 -0
  171. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js +79 -0
  172. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-info.js.map +1 -0
  173. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js +22 -0
  174. package/lib/module/modules/bt-management/services/devices/lepu/lepu.device-names.js.map +1 -0
  175. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js +32 -0
  176. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-names.js.map +1 -0
  177. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +150 -0
  178. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -0
  179. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +93 -0
  180. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -0
  181. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js +24 -0
  182. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame.js.map +1 -0
  183. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +98 -0
  184. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -0
  185. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js +27 -0
  186. package/lib/module/modules/bt-management/services/devices/lepu/lepu.name-match.js.map +1 -0
  187. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js +59 -0
  188. package/lib/module/modules/bt-management/services/devices/lepu/lepu.response-type.js.map +1 -0
  189. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +140 -0
  190. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -0
  191. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +34 -0
  192. package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -0
  193. package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js +79 -0
  194. package/lib/module/modules/bt-management/services/devices/sentinel-frame-reader.js.map +1 -0
  195. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +123 -0
  196. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -0
  197. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js +50 -0
  198. package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.js.map +1 -0
  199. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js +38 -0
  200. package/lib/module/modules/bt-management/services/devices/veroval/veroval.bp-monitors.js.map +1 -0
  201. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js +108 -0
  202. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-device.js.map +1 -0
  203. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js +116 -0
  204. package/lib/module/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.js.map +1 -0
  205. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js +87 -0
  206. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-device.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js +60 -0
  208. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-samples.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js +89 -0
  210. package/lib/module/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.js.map +1 -0
  211. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +118 -0
  212. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -0
  213. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +108 -0
  214. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -0
  215. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js +114 -0
  216. package/lib/module/modules/bt-management/services/devices/viatom/viatom.lepod.js.map +1 -0
  217. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +79 -0
  218. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -0
  219. package/lib/module/modules/bt-management/types/command-sequencer.js +4 -0
  220. package/lib/module/modules/bt-management/types/command-sequencer.js.map +1 -0
  221. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js +2 -0
  222. package/lib/module/modules/bt-management/types/custom-checksum-algorithm.js.map +1 -0
  223. package/lib/module/modules/bt-management/types/custom-checksum-spec.js +4 -0
  224. package/lib/module/modules/bt-management/types/custom-checksum-spec.js.map +1 -0
  225. package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
  226. package/lib/module/modules/bt-management/types/custom-lepu-spec.js +2 -0
  227. package/lib/module/modules/bt-management/types/custom-lepu-spec.js.map +1 -0
  228. package/lib/module/modules/bt-management/types/custom-measurement-spec.js +4 -0
  229. package/lib/module/modules/bt-management/types/custom-measurement-spec.js.map +1 -0
  230. package/lib/module/modules/bt-management/types/device-command.js +2 -0
  231. package/lib/module/modules/bt-management/types/device-command.js.map +1 -0
  232. package/lib/module/modules/bt-management/types/device-measurement-map.js +3 -3
  233. package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
  234. package/lib/module/modules/bt-management/types/integrated-devices.js +2 -0
  235. package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
  236. package/lib/module/modules/bt-management/types/measurement-group.js +4 -0
  237. package/lib/module/modules/bt-management/types/measurement-group.js.map +1 -0
  238. package/lib/module/modules/bt-management/utils/calculate-checksum.js +44 -0
  239. package/lib/module/modules/bt-management/utils/calculate-checksum.js.map +1 -0
  240. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js +21 -0
  241. package/lib/module/modules/bt-management/utils/create-custom-field-parser.js.map +1 -1
  242. package/lib/module/modules/bt-management/utils/create-frame-validator.js +9 -0
  243. package/lib/module/modules/bt-management/utils/create-frame-validator.js.map +1 -1
  244. package/lib/module/modules/bt-management/utils/hex-to-bytes.js +14 -0
  245. package/lib/module/modules/bt-management/utils/hex-to-bytes.js.map +1 -0
  246. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js +8 -0
  247. package/lib/module/modules/bt-management/utils/le-32-to-bytes.js.map +1 -0
  248. package/lib/module/modules/bt-management/utils/parse-measurement.js +10 -7
  249. package/lib/module/modules/bt-management/utils/parse-measurement.js.map +1 -1
  250. package/lib/module/modules/bt-management/utils/reject-custom-reading.js +29 -0
  251. package/lib/module/modules/bt-management/utils/reject-custom-reading.js.map +1 -0
  252. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js +17 -0
  253. package/lib/module/modules/bt-management/utils/summarise-measurement-for-log.js.map +1 -0
  254. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js +13 -0
  255. package/lib/module/modules/bt-management/utils/supported-measurement-type-keys.js.map +1 -0
  256. package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  257. package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  258. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +20 -0
  259. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  261. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
  263. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  266. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  267. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  268. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  270. package/lib/typescript/commonjs/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  271. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  272. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  274. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  275. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
  276. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  278. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  279. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  280. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  281. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  282. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  283. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +30 -0
  284. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
  286. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  287. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  288. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  289. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  291. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  293. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  295. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  297. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  299. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  301. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  303. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  305. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  307. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  309. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  311. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  313. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
  315. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
  317. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
  319. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
  321. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
  323. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
  325. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
  327. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
  329. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
  331. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  333. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  335. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  337. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  339. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  341. package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
  343. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  345. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  347. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  349. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  351. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
  353. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  355. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  357. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  359. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
  361. package/lib/typescript/commonjs/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts +27 -0
  363. package/lib/typescript/commonjs/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  365. package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +3 -1
  367. package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  369. package/lib/typescript/commonjs/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts +17 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  373. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
  381. package/lib/typescript/commonjs/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
  383. package/lib/typescript/commonjs/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  385. package/lib/typescript/commonjs/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  386. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  387. package/lib/typescript/commonjs/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  388. package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
  389. package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
  390. package/lib/typescript/module/src/modules/bt-management/index.d.ts +20 -0
  391. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  392. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts +13 -0
  393. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-fields.d.ts.map +1 -0
  394. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts +19 -0
  395. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-case-shape.d.ts.map +1 -0
  396. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-case.d.ts.map +1 -1
  397. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-field.d.ts.map +1 -1
  398. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-frame.d.ts.map +1 -1
  399. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts +11 -0
  400. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -0
  401. package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
  402. package/lib/typescript/module/src/modules/bt-management/services/device-creator.d.ts.map +1 -1
  403. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts +24 -0
  404. package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj.thermometers.d.ts.map +1 -0
  405. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +5 -8
  406. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  407. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +74 -0
  408. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -0
  409. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +6 -4
  410. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
  411. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +20 -1
  412. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  413. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +12 -1
  414. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  415. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +30 -0
  416. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -0
  417. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +32 -2
  418. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  419. package/lib/typescript/module/src/modules/bt-management/services/devices/frame-parser.d.ts.map +1 -1
  420. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts +24 -0
  421. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.command-builder.d.ts.map +1 -0
  422. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts +32 -0
  423. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.commands.d.ts.map +1 -0
  424. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts +27 -0
  425. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-info.d.ts.map +1 -0
  426. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts +20 -0
  427. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.device-names.d.ts.map +1 -0
  428. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts +14 -0
  429. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-names.d.ts.map +1 -0
  430. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +75 -0
  431. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -0
  432. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +28 -0
  433. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -0
  434. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts +12 -0
  435. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame.d.ts.map +1 -0
  436. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +81 -0
  437. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -0
  438. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts +17 -0
  439. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.name-match.d.ts.map +1 -0
  440. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts +33 -0
  441. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.response-type.d.ts.map +1 -0
  442. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +85 -0
  443. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -0
  444. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +27 -0
  445. package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -0
  446. package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts +52 -0
  447. package/lib/typescript/module/src/modules/bt-management/services/devices/sentinel-frame-reader.d.ts.map +1 -0
  448. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +53 -0
  449. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -0
  450. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts +45 -0
  451. package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.profile.d.ts.map +1 -0
  452. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts +18 -0
  453. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.bp-monitors.d.ts.map +1 -0
  454. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts +19 -0
  455. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-device.d.ts.map +1 -0
  456. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts +45 -0
  457. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.duo-control-sequencer.d.ts.map +1 -0
  458. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts +30 -0
  459. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-device.d.ts.map +1 -0
  460. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts +39 -0
  461. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-samples.d.ts.map +1 -0
  462. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts +35 -0
  463. package/lib/typescript/module/src/modules/bt-management/services/devices/veroval/veroval.ecg-transfer.d.ts.map +1 -0
  464. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts +44 -0
  465. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -0
  466. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts +32 -0
  467. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -0
  468. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts +25 -0
  469. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.lepod.d.ts.map +1 -0
  470. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts +39 -0
  471. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -0
  472. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +26 -0
  473. package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -0
  474. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts +43 -0
  475. package/lib/typescript/module/src/modules/bt-management/types/custom-case-spec.d.ts.map +1 -1
  476. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts +10 -0
  477. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-algorithm.d.ts.map +1 -0
  478. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts +23 -0
  479. package/lib/typescript/module/src/modules/bt-management/types/custom-checksum-spec.d.ts.map +1 -0
  480. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +5 -0
  481. package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
  482. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts +12 -0
  483. package/lib/typescript/module/src/modules/bt-management/types/custom-device-spec.d.ts.map +1 -1
  484. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts +7 -1
  485. package/lib/typescript/module/src/modules/bt-management/types/custom-field-encoding.d.ts.map +1 -1
  486. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts +8 -0
  487. package/lib/typescript/module/src/modules/bt-management/types/custom-frame-spec.d.ts.map +1 -1
  488. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +44 -0
  489. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -0
  490. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts +9 -0
  491. package/lib/typescript/module/src/modules/bt-management/types/custom-measurement-spec.d.ts.map +1 -0
  492. package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts +7 -0
  493. package/lib/typescript/module/src/modules/bt-management/types/dependent-result-handler-params.d.ts.map +1 -1
  494. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts +27 -0
  495. package/lib/typescript/module/src/modules/bt-management/types/device-command.d.ts.map +1 -0
  496. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +2 -0
  497. package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
  498. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +3 -1
  499. package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
  500. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts +14 -0
  501. package/lib/typescript/module/src/modules/bt-management/types/measurement-group.d.ts.map +1 -0
  502. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts +17 -0
  503. package/lib/typescript/module/src/modules/bt-management/types/parsing-case.d.ts.map +1 -1
  504. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts +13 -0
  505. package/lib/typescript/module/src/modules/bt-management/utils/calculate-checksum.d.ts.map +1 -0
  506. package/lib/typescript/module/src/modules/bt-management/utils/create-custom-field-parser.d.ts.map +1 -1
  507. package/lib/typescript/module/src/modules/bt-management/utils/create-frame-validator.d.ts.map +1 -1
  508. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts +10 -0
  509. package/lib/typescript/module/src/modules/bt-management/utils/hex-to-bytes.d.ts.map +1 -0
  510. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts +3 -0
  511. package/lib/typescript/module/src/modules/bt-management/utils/le-32-to-bytes.d.ts.map +1 -0
  512. package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts +4 -1
  513. package/lib/typescript/module/src/modules/bt-management/utils/parse-measurement.d.ts.map +1 -1
  514. package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts +15 -0
  515. package/lib/typescript/module/src/modules/bt-management/utils/reject-custom-reading.d.ts.map +1 -0
  516. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts +9 -0
  517. package/lib/typescript/module/src/modules/bt-management/utils/summarise-measurement-for-log.d.ts.map +1 -0
  518. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts +10 -0
  519. package/lib/typescript/module/src/modules/bt-management/utils/supported-measurement-type-keys.d.ts.map +1 -0
  520. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_lepuNameMatch","_lepuTransports","RT_DATA","ER3_RT_DATA","HEART_RATE_UNIT","ER_HEART_RATE_BYTES","declareRecorder","advertisedName","profile","params","lepuDevice","id","nameMatch","lepuNameMatch","transport","pollCommand","minLengthBytes","heartRateBytes","caseSelectorBytes","cases","selector","toString","padStart","kind","measurementTypeKey","MeasurementTypeKey","heartRate","description","fields","name","byteIndexes","byteOrder","encoding","unit","expectedDeviceTypes","er1Recorder","exports","er2Recorder","er3Recorder","ER1_MODEL_NAMES","ER2_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.ecg-recorders.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.lepodMonitor = exports.LEPOD_MODEL_NAMES = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _lepuNameMatch = require("../lepu/lepu.name-match.js");
9
+ var _lepuTransports = require("../lepu/lepu.transports.js");
10
+ /**
11
+ * The Lepod, a multi-parameter patient monitor.
12
+ *
13
+ * One realtime frame carries a heart rate, an oxygen saturation with its pulse rate, a
14
+ * respiration rate and a body temperature. They are four measurements taken by four
15
+ * instruments that happen to share a frame, so they are declared and reported separately: a
16
+ * temperature probe that is not attached is no reason to withhold the heart rate beside it.
17
+ *
18
+ * The ECG waveform in the same frame is not declared. It is a sample stream assembled across
19
+ * notifications and needs a device class; the recordings the device stores are reachable
20
+ * through the family's generic file opcodes.
21
+ */
22
+
23
+ /**
24
+ * Reads the realtime frame. A read - unlike `START_ECG`, which is `0x08` here and `RT_DATA`
25
+ * on a BP2, and `RT_PARAM`, which is `0x02` here and `CALIBRATION_SLOPE` on a BP2.
26
+ */
27
+ const RT_DATA = 0x03;
28
+
29
+ /** Header plus the parameter block through the temperature, which ends it. */
30
+ const MIN_LENGTH_BYTES = 46;
31
+
32
+ /** Frame offsets: the vendor's parameter block starts at the seven-byte header. */
33
+ const HEART_RATE = [31, 32];
34
+ const RESPIRATION_RATE = 34;
35
+ const BLOOD_OXYGEN = 36;
36
+ const PULSE_RATE = [37, 38];
37
+ const PERFUSION_INDEX = 39;
38
+ const TEMPERATURE = [44, 45];
39
+
40
+ /** The device counts perfusion in tenths of a percent and temperature in hundredths. */
41
+ const PERFUSION_SCALE = 0.1;
42
+ const TEMPERATURE_SCALE = 0.01;
43
+ const littleEndian = (name, byteIndexes, unit) => ({
44
+ name,
45
+ byteIndexes,
46
+ byteOrder: "little",
47
+ encoding: "uint",
48
+ unit
49
+ });
50
+ const LEPOD_MEASUREMENTS = [{
51
+ measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
52
+ fields: [{
53
+ name: "bloodOxygen",
54
+ byteIndexes: [BLOOD_OXYGEN],
55
+ encoding: "uint",
56
+ unit: "%"
57
+ }, littleEndian("pulseRate", PULSE_RATE, "bpm"), {
58
+ name: "perfusionIndex",
59
+ byteIndexes: [PERFUSION_INDEX],
60
+ encoding: "uint",
61
+ unit: "%",
62
+ scale: PERFUSION_SCALE,
63
+ decimals: 1
64
+ }]
65
+ }, {
66
+ measurementTypeKey: _core.MeasurementTypeKey.respiratoryRate,
67
+ fields: [{
68
+ name: "respiratoryRate",
69
+ byteIndexes: [RESPIRATION_RATE],
70
+ encoding: "uint",
71
+ unit: "/min"
72
+ }]
73
+ }, {
74
+ measurementTypeKey: _core.MeasurementTypeKey.temperature,
75
+ fields: [{
76
+ name: "bodyTemp",
77
+ byteIndexes: TEMPERATURE,
78
+ byteOrder: "little",
79
+ encoding: "uint",
80
+ unit: "Cel",
81
+ scale: TEMPERATURE_SCALE,
82
+ decimals: 2
83
+ }]
84
+ }];
85
+ /**
86
+ * Declares a Lepod, reporting every reading its realtime frame carries.
87
+ *
88
+ * An instrument that is not attached reports a value outside the physiological range for
89
+ * what it measures, so that reading is discarded and reported while the others in the same
90
+ * frame are still delivered. The device also marks those conditions in bits of a lead-off
91
+ * byte, which a declaration cannot select on - reading them quietly needs a device class.
92
+ */
93
+ const lepodMonitor = (advertisedName, params) => (0, _lepuTransports.lepuDevice)({
94
+ id: params.id,
95
+ nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)(advertisedName),
96
+ pollCommand: RT_DATA,
97
+ minLengthBytes: MIN_LENGTH_BYTES,
98
+ caseSelectorBytes: [1],
99
+ cases: [{
100
+ selector: "03",
101
+ kind: "result",
102
+ measurementTypeKey: _core.MeasurementTypeKey.heartRate,
103
+ description: "Realtime parameters, waveform and lead state",
104
+ fields: [littleEndian("heartRate", HEART_RATE, "bpm")],
105
+ additionalMeasurements: LEPOD_MEASUREMENTS.map(each => ({
106
+ ...each
107
+ }))
108
+ }],
109
+ ...(params.expectedDeviceTypes ? {
110
+ expectedDeviceTypes: params.expectedDeviceTypes
111
+ } : {})
112
+ });
113
+
114
+ /** The names the Lepod range advertises. */
115
+ exports.lepodMonitor = lepodMonitor;
116
+ const LEPOD_MODEL_NAMES = exports.LEPOD_MODEL_NAMES = ["Lepod", "LepodPro"];
117
+ //# sourceMappingURL=viatom.lepod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_lepuNameMatch","_lepuTransports","RT_DATA","MIN_LENGTH_BYTES","HEART_RATE","RESPIRATION_RATE","BLOOD_OXYGEN","PULSE_RATE","PERFUSION_INDEX","TEMPERATURE","PERFUSION_SCALE","TEMPERATURE_SCALE","littleEndian","name","byteIndexes","unit","byteOrder","encoding","LEPOD_MEASUREMENTS","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","fields","scale","decimals","respiratoryRate","temperature","lepodMonitor","advertisedName","params","lepuDevice","id","nameMatch","lepuNameMatch","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","heartRate","description","additionalMeasurements","map","each","expectedDeviceTypes","exports","LEPOD_MODEL_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.lepod.ts"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.viatomOximeter = exports.VIATOM_OXIMETER_NAMES = void 0;
7
+ var _core = require("@ovok/core");
8
+ var _lepuNameMatch = require("../lepu/lepu.name-match.js");
9
+ var _lepuTransports = require("../lepu/lepu.transports.js");
10
+ /**
11
+ * The Viatom pulse oximeters - the O2Ring, Oxyfit, KidsO2 and BabyO2 ranges.
12
+ *
13
+ * They share the family's framing and characteristics but not its opcodes: this range
14
+ * numbers its own commands, so realtime parameters are `0x17` here rather than the `0x08`
15
+ * the blood-pressure monitors answer, and its stored files are read with `0x03`-`0x05`
16
+ * rather than the generic `0xF1`-`0xF4`. A file transfer written for the rest of the family
17
+ * does not apply to these.
18
+ */
19
+
20
+ /** Realtime parameters. A read: it reports what the sensor sees and starts nothing. */
21
+ const RT_PARAM = 0x17;
22
+
23
+ /** Only the command byte, because what makes a reading valid here is a bit, not a byte. */
24
+ const CASE_SELECTOR_BYTES = [1];
25
+
26
+ /** Header plus the realtime parameters through the pulse rate. */
27
+ const MIN_LENGTH_BYTES = 10;
28
+ const PAYLOAD = 7;
29
+ const SPOT_CHECK_TIMEOUT_MS = 60_000;
30
+ /**
31
+ * Declares one oximeter of the range.
32
+ *
33
+ * **A finger that is not in the sensor yields no reading, reported as an error.** The device
34
+ * answers every poll whether or not it is measuring, and marks an unusable reading in two
35
+ * bits of a status byte - which a declaration cannot read, because a case is selected by
36
+ * whole bytes. What it can do is refuse the number: an oxygen saturation measured off the
37
+ * finger falls outside the physiological range, so it is discarded rather than reported.
38
+ * The reading is therefore never wrong, but a device left connected with nobody wearing it
39
+ * reports a decoding failure on each poll. Reading those bits quietly needs a device class.
40
+ */
41
+ const viatomOximeter = (advertisedName, params) => (0, _lepuTransports.lepuDevice)({
42
+ id: params.id,
43
+ nameMatch: params.nameMatch ?? (0, _lepuNameMatch.lepuNameMatch)(advertisedName),
44
+ stuckDataTimeoutMs: SPOT_CHECK_TIMEOUT_MS,
45
+ pollCommand: RT_PARAM,
46
+ minLengthBytes: MIN_LENGTH_BYTES,
47
+ caseSelectorBytes: CASE_SELECTOR_BYTES,
48
+ cases: [{
49
+ selector: "17",
50
+ kind: "result",
51
+ measurementTypeKey: _core.MeasurementTypeKey.bloodOxygenPulseRate,
52
+ description: "Realtime parameters",
53
+ fields: [{
54
+ name: "bloodOxygen",
55
+ byteIndexes: [PAYLOAD],
56
+ encoding: "uint",
57
+ unit: "%"
58
+ }, {
59
+ name: "pulseRate",
60
+ byteIndexes: [PAYLOAD + 1, PAYLOAD + 2],
61
+ byteOrder: "little",
62
+ encoding: "uint",
63
+ unit: "bpm"
64
+ }]
65
+ }],
66
+ ...(params.expectedDeviceTypes ? {
67
+ expectedDeviceTypes: params.expectedDeviceTypes
68
+ } : {})
69
+ });
70
+
71
+ /**
72
+ * The names the oximeter range advertises.
73
+ *
74
+ * ```typescript
75
+ * const oximeters = VIATOM_OXIMETER_NAMES.map((name) =>
76
+ * viatomOximeter(name, { id: `viatom-${name.toLowerCase()}` }),
77
+ * );
78
+ * ```
79
+ */
80
+ exports.viatomOximeter = viatomOximeter;
81
+ const VIATOM_OXIMETER_NAMES = exports.VIATOM_OXIMETER_NAMES = ["BBSM S1", "BBSM S2", "CMRing", "KidsO2-WPS", "O2 Intg", "O2M-WPS", "O2R WAVE", "O2RMed S", "O2Ring", "O2Ring S", "O2Ring SC", "O2Ring SF", "O2Ring SP", "O2Ring-RE", "O2RingF", "Oxyfit", "Oxyfit-WPS", "OxyU", "OxyU SE", "SI PO2"];
82
+ //# sourceMappingURL=viatom.oximeters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_lepuNameMatch","_lepuTransports","RT_PARAM","CASE_SELECTOR_BYTES","MIN_LENGTH_BYTES","PAYLOAD","SPOT_CHECK_TIMEOUT_MS","viatomOximeter","advertisedName","params","lepuDevice","id","nameMatch","lepuNameMatch","stuckDataTimeoutMs","pollCommand","minLengthBytes","caseSelectorBytes","cases","selector","kind","measurementTypeKey","MeasurementTypeKey","bloodOxygenPulseRate","description","fields","name","byteIndexes","encoding","unit","byteOrder","expectedDeviceTypes","exports","VIATOM_OXIMETER_NAMES"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/viatom/viatom.oximeters.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAMG,QAAQ,GAAG,IAAI;;AAErB;AACA,MAAMC,mBAAmB,GAAG,CAAC,CAAC,CAAC;;AAE/B;AACA,MAAMC,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAAO,GAAG,CAAC;AAEjB,MAAMC,qBAAqB,GAAG,MAAM;AAoBpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAGA,CACrBC,cAAsB,EACtBC,MAA4B,KAE5B,IAAAC,0BAAU,EAAC;EACTC,EAAE,EAAEF,MAAM,CAACE,EAAE;EACbC,SAAS,EAAEH,MAAM,CAACG,SAAS,IAAI,IAAAC,4BAAa,EAACL,cAAc,CAAC;EAC5DM,kBAAkB,EAAER,qBAAqB;EACzCS,WAAW,EAAEb,QAAQ;EACrBc,cAAc,EAAEZ,gBAAgB;EAChCa,iBAAiB,EAAEd,mBAAmB;EACtCe,KAAK,EAAE,CACL;IACEC,QAAQ,EAAE,IAAI;IACdC,IAAI,EAAE,QAAQ;IACdC,kBAAkB,EAAEC,wBAAkB,CAACC,oBAAoB;IAC3DC,WAAW,EAAE,qBAAqB;IAClCC,MAAM,EAAE,CACN;MACEC,IAAI,EAAE,aAAa;MACnBC,WAAW,EAAE,CAACtB,OAAO,CAAC;MACtBuB,QAAQ,EAAE,MAAM;MAChBC,IAAI,EAAE;IACR,CAAC,EACD;MACEH,IAAI,EAAE,WAAW;MACjBC,WAAW,EAAE,CAACtB,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAG,CAAC,CAAC;MACvCyB,SAAS,EAAE,QAAQ;MACnBF,QAAQ,EAAE,MAAM;MAChBC,IAAI,EAAE;IACR,CAAC;EAEL,CAAC,CACF;EACD,IAAIpB,MAAM,CAACsB,mBAAmB,GAC1B;IAAEA,mBAAmB,EAAEtB,MAAM,CAACsB;EAAoB,CAAC,GACnD,CAAC,CAAC;AACR,CAAC,CAAC;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARAC,OAAA,CAAAzB,cAAA,GAAAA,cAAA;AASA,MAAM0B,qBAAwC,GAAAD,OAAA,CAAAC,qBAAA,GAAG,CAC/C,SAAS,EACT,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,WAAW,EACX,WAAW,EACX,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,MAAM,EACN,SAAS,EACT,QAAQ,CACT","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=command-sequencer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/command-sequencer.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=custom-checksum-algorithm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-checksum-algorithm.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=custom-checksum-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-checksum-spec.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=custom-lepu-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-lepu-spec.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=custom-measurement-spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/custom-measurement-spec.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=device-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/device-command.ts"],"mappings":"","ignoreList":[]}
@@ -24,6 +24,8 @@ let IntegratedDevices = exports.IntegratedDevices = /*#__PURE__*/function (Integ
24
24
  IntegratedDevices["S5"] = "Le S5";
25
25
  IntegratedDevices["ALIVE_COR"] = "alivecor";
26
26
  IntegratedDevices["BGM"] = "BGM";
27
+ IntegratedDevices["VEROVAL_DUO_CONTROL"] = "Veroval duo control";
28
+ IntegratedDevices["VEROVAL_ECG"] = "Veroval ECG";
27
29
  return IntegratedDevices;
28
30
  }({});
29
31
  //# sourceMappingURL=integrated-devices.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["IntegratedDevices","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;;;;;IAAYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["IntegratedDevices","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/integrated-devices.ts"],"mappings":";;;;;;IAAYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=measurement-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["modules/bt-management/types/measurement-group.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isChecksumAlgorithm = exports.hasValidChecksum = void 0;
7
+ var _calculateCrc = require("./calculate-crc-8.js");
8
+ var _hexToByte = require("./hex-to-byte.js");
9
+ const BYTE_MASK = 0xff;
10
+ const foldBytes = (covered, combine) => covered.reduce((total, byte) => combine(total, (0, _hexToByte.hexToByte)(byte || "0")) & BYTE_MASK, 0);
11
+
12
+ /**
13
+ * One implementation per algorithm, looked up by name.
14
+ *
15
+ * A map rather than a switch, so adding an algorithm is adding an entry, and so a
16
+ * declaration naming one that does not exist is rejected at registration instead of falling
17
+ * through to a default that would accept every frame.
18
+ */
19
+ const ALGORITHMS = {
20
+ crc8: covered => (0, _calculateCrc.calculateCrc8)(covered, covered.length),
21
+ xor: covered => foldBytes(covered, (total, byte) => total ^ byte),
22
+ sum: covered => foldBytes(covered, (total, byte) => total + byte)
23
+ };
24
+ const isChecksumAlgorithm = candidate => typeof candidate === "string" && candidate in ALGORITHMS;
25
+
26
+ /** The bytes a checksum covers, defaulting to everything between `from` and the checksum. */
27
+ exports.isChecksumAlgorithm = isChecksumAlgorithm;
28
+ const coveredBytes = (pkg, checksum) => {
29
+ const from = checksum.from ?? 0;
30
+ const byteCount = checksum.byteCount ?? checksum.index - from;
31
+ return pkg.slice(from, from + byteCount);
32
+ };
33
+
34
+ /**
35
+ * Whether a buffer's checksum byte matches the bytes it covers.
36
+ *
37
+ * A buffer too short to hold the checksum byte fails rather than reading it as zero: an
38
+ * absent byte is not a matching byte, and treating it as one would let a truncated
39
+ * notification through as a valid reading.
40
+ */
41
+ const hasValidChecksum = (pkg, checksum) => {
42
+ const declared = pkg[checksum.index];
43
+ if (declared === undefined) {
44
+ return false;
45
+ }
46
+ return ALGORITHMS[checksum.algorithm](coveredBytes(pkg, checksum)) === (0, _hexToByte.hexToByte)(declared);
47
+ };
48
+ exports.hasValidChecksum = hasValidChecksum;
49
+ //# sourceMappingURL=calculate-checksum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_calculateCrc","require","_hexToByte","BYTE_MASK","foldBytes","covered","combine","reduce","total","byte","hexToByte","ALGORITHMS","crc8","calculateCrc8","length","xor","sum","isChecksumAlgorithm","candidate","exports","coveredBytes","pkg","checksum","from","byteCount","index","slice","hasValidChecksum","declared","undefined","algorithm"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/calculate-checksum.ts"],"mappings":";;;;;;AAGA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,MAAME,SAAS,GAAG,IAAI;AAEtB,MAAMC,SAAS,GAAGA,CAChBC,OAAiB,EACjBC,OAAgD,KAEhDD,OAAO,CAACE,MAAM,CACZ,CAACC,KAAK,EAAEC,IAAI,KAAKH,OAAO,CAACE,KAAK,EAAE,IAAAE,oBAAS,EAACD,IAAI,IAAI,GAAG,CAAC,CAAC,GAAGN,SAAS,EACnE,CACF,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMQ,UAGL,GAAG;EACFC,IAAI,EAAGP,OAAO,IAAK,IAAAQ,2BAAa,EAACR,OAAO,EAAEA,OAAO,CAACS,MAAM,CAAC;EACzDC,GAAG,EAAGV,OAAO,IAAKD,SAAS,CAACC,OAAO,EAAE,CAACG,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAGC,IAAI,CAAC;EACnEO,GAAG,EAAGX,OAAO,IAAKD,SAAS,CAACC,OAAO,EAAE,CAACG,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAGC,IAAI;AACpE,CAAC;AAED,MAAMQ,mBAAmB,GACvBC,SAAkB,IAElB,OAAOA,SAAS,KAAK,QAAQ,IAAIA,SAAS,IAAIP,UAAU;;AAE1D;AAAAQ,OAAA,CAAAF,mBAAA,GAAAA,mBAAA;AACA,MAAMG,YAAY,GAAGA,CAACC,GAAa,EAAEC,QAA4B,KAAe;EAC9E,MAAMC,IAAI,GAAGD,QAAQ,CAACC,IAAI,IAAI,CAAC;EAC/B,MAAMC,SAAS,GAAGF,QAAQ,CAACE,SAAS,IAAIF,QAAQ,CAACG,KAAK,GAAGF,IAAI;EAE7D,OAAOF,GAAG,CAACK,KAAK,CAACH,IAAI,EAAEA,IAAI,GAAGC,SAAS,CAAC;AAC1C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,gBAAgB,GAAGA,CACvBN,GAAa,EACbC,QAA4B,KAChB;EACZ,MAAMM,QAAQ,GAAGP,GAAG,CAACC,QAAQ,CAACG,KAAK,CAAC;EAEpC,IAAIG,QAAQ,KAAKC,SAAS,EAAE;IAC1B,OAAO,KAAK;EACd;EAEA,OACElB,UAAU,CAACW,QAAQ,CAACQ,SAAS,CAAC,CAACV,YAAY,CAACC,GAAG,EAAEC,QAAQ,CAAC,CAAC,KAC3D,IAAAZ,oBAAS,EAACkB,QAAQ,CAAC;AAEvB,CAAC;AAACT,OAAA,CAAAQ,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -6,7 +6,28 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.createCustomFieldParser = void 0;
7
7
  var _decodeMedicalFloat = require("./decode-medical-float.js");
8
8
  const HEX_ONLY = /^[0-9a-f]+$/;
9
+ const ASCII_ZERO = 0x30;
10
+ const ASCII_NINE = 0x39;
11
+ const HEX_BYTE = /../g;
12
+
13
+ /**
14
+ * Reads bytes that are decimal digits written as characters, not a number.
15
+ *
16
+ * A byte outside "0"-"9" makes the whole field undefined rather than being skipped: these
17
+ * records are fixed width and a non-digit means the field was not what the declaration
18
+ * says it is, so decoding the rest of it would report a number built from part of a value.
19
+ */
20
+ const fromAsciiDigits = hex => {
21
+ const codes = (hex.match(HEX_BYTE) ?? []).map(byte => parseInt(byte, 16));
22
+ if (codes.length === 0 || codes.some(code => code < ASCII_ZERO || code > ASCII_NINE)) {
23
+ return undefined;
24
+ }
25
+ return Number(codes.map(code => code - ASCII_ZERO).join(""));
26
+ };
9
27
  const toRaw = (hex, field) => {
28
+ if (field.encoding === "ascii") {
29
+ return fromAsciiDigits(hex);
30
+ }
10
31
  const raw = parseInt(hex, 16);
11
32
  const bits = hex.length * 4;
12
33
  if (field.encoding === "int") {
@@ -1 +1 @@
1
- {"version":3,"names":["_decodeMedicalFloat","require","HEX_ONLY","toRaw","hex","field","raw","parseInt","bits","length","encoding","sign","decodeMedicalFloat","createCustomFieldParser","assembledHex","toLowerCase","byteIndexes","test","undefined","Number","isFinite","value","scale","offset","decimals","factor","Math","round","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-custom-field-parser.ts"],"mappings":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,MAAMC,QAAQ,GAAG,aAAa;AAE9B,MAAMC,KAAK,GAAGA,CACZC,GAAW,EACXC,KAA0B,KACH;EACvB,MAAMC,GAAG,GAAGC,QAAQ,CAACH,GAAG,EAAE,EAAE,CAAC;EAC7B,MAAMI,IAAI,GAAGJ,GAAG,CAACK,MAAM,GAAG,CAAC;EAE3B,IAAIJ,KAAK,CAACK,QAAQ,KAAK,KAAK,EAAE;IAC5B,MAAMC,IAAI,GAAG,CAAC,KAAKH,IAAI,GAAG,CAAC,CAAC;IAE5B,OAAOF,GAAG,IAAIK,IAAI,GAAGL,GAAG,GAAGK,IAAI,GAAG,CAAC,GAAGL,GAAG;EAC3C;EAEA,IAAID,KAAK,CAACK,QAAQ,KAAK,QAAQ,EAAE;IAC/B,OAAO,IAAAE,sCAAkB,EAACN,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,IAAID,KAAK,CAACK,QAAQ,KAAK,OAAO,EAAE;IAC9B,OAAO,IAAAE,sCAAkB,EAACN,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,OAAOA,GAAG;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMO,uBAAuB,GACjCR,KAA0B,IAC1BS,YAAoB,IAAyB;EAC5C,MAAMV,GAAG,GAAG,CAACU,YAAY,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;EAE9C,IACEX,GAAG,CAACK,MAAM,KAAKJ,KAAK,CAACW,WAAW,CAACP,MAAM,GAAG,CAAC,IAC3C,CAACP,QAAQ,CAACe,IAAI,CAACb,GAAG,CAAC,EACnB;IACA,OAAOc,SAAS;EAClB;EAEA,MAAMZ,GAAG,GAAGH,KAAK,CAACC,GAAG,EAAEC,KAAK,CAAC;EAE7B,IAAIC,GAAG,KAAKY,SAAS,IAAI,CAACC,MAAM,CAACC,QAAQ,CAACd,GAAG,CAAC,EAAE;IAC9C,OAAOY,SAAS;EAClB;EAEA,MAAMG,KAAK,GAAGf,GAAG,GAAGD,KAAK,CAACiB,KAAK,GAAGjB,KAAK,CAACkB,MAAM;EAE9C,IAAI,CAACJ,MAAM,CAACC,QAAQ,CAACC,KAAK,CAAC,EAAE;IAC3B,OAAOH,SAAS;EAClB;EAEA,IAAIb,KAAK,CAACmB,QAAQ,KAAKN,SAAS,EAAE;IAChC,OAAOG,KAAK;EACd;EAEA,MAAMI,MAAM,GAAG,EAAE,IAAIpB,KAAK,CAACmB,QAAQ;EAEnC,OAAOE,IAAI,CAACC,KAAK,CAACN,KAAK,GAAGI,MAAM,CAAC,GAAGA,MAAM;AAC5C,CAAC;AAACG,OAAA,CAAAf,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_decodeMedicalFloat","require","HEX_ONLY","ASCII_ZERO","ASCII_NINE","HEX_BYTE","fromAsciiDigits","hex","codes","match","map","byte","parseInt","length","some","code","undefined","Number","join","toRaw","field","encoding","raw","bits","sign","decodeMedicalFloat","createCustomFieldParser","assembledHex","toLowerCase","byteIndexes","test","isFinite","value","scale","offset","decimals","factor","Math","round","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-custom-field-parser.ts"],"mappings":";;;;;;AAEA,IAAAA,mBAAA,GAAAC,OAAA;AAEA,MAAMC,QAAQ,GAAG,aAAa;AAE9B,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,UAAU,GAAG,IAAI;AACvB,MAAMC,QAAQ,GAAG,KAAK;;AAEtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAIC,GAAW,IAAyB;EAC3D,MAAMC,KAAK,GAAG,CAACD,GAAG,CAACE,KAAK,CAACJ,QAAQ,CAAC,IAAI,EAAE,EAAEK,GAAG,CAAEC,IAAI,IAAKC,QAAQ,CAACD,IAAI,EAAE,EAAE,CAAC,CAAC;EAE3E,IACEH,KAAK,CAACK,MAAM,KAAK,CAAC,IAClBL,KAAK,CAACM,IAAI,CAAEC,IAAI,IAAKA,IAAI,GAAGZ,UAAU,IAAIY,IAAI,GAAGX,UAAU,CAAC,EAC5D;IACA,OAAOY,SAAS;EAClB;EAEA,OAAOC,MAAM,CAACT,KAAK,CAACE,GAAG,CAAEK,IAAI,IAAKA,IAAI,GAAGZ,UAAU,CAAC,CAACe,IAAI,CAAC,EAAE,CAAC,CAAC;AAChE,CAAC;AAED,MAAMC,KAAK,GAAGA,CACZZ,GAAW,EACXa,KAA0B,KACH;EACvB,IAAIA,KAAK,CAACC,QAAQ,KAAK,OAAO,EAAE;IAC9B,OAAOf,eAAe,CAACC,GAAG,CAAC;EAC7B;EAEA,MAAMe,GAAG,GAAGV,QAAQ,CAACL,GAAG,EAAE,EAAE,CAAC;EAC7B,MAAMgB,IAAI,GAAGhB,GAAG,CAACM,MAAM,GAAG,CAAC;EAE3B,IAAIO,KAAK,CAACC,QAAQ,KAAK,KAAK,EAAE;IAC5B,MAAMG,IAAI,GAAG,CAAC,KAAKD,IAAI,GAAG,CAAC,CAAC;IAE5B,OAAOD,GAAG,IAAIE,IAAI,GAAGF,GAAG,GAAGE,IAAI,GAAG,CAAC,GAAGF,GAAG;EAC3C;EAEA,IAAIF,KAAK,CAACC,QAAQ,KAAK,QAAQ,EAAE;IAC/B,OAAO,IAAAI,sCAAkB,EAACH,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,IAAIF,KAAK,CAACC,QAAQ,KAAK,OAAO,EAAE;IAC9B,OAAO,IAAAI,sCAAkB,EAACH,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC;EACvC;EAEA,OAAOA,GAAG;AACZ,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMI,uBAAuB,GACjCN,KAA0B,IAC1BO,YAAoB,IAAyB;EAC5C,MAAMpB,GAAG,GAAG,CAACoB,YAAY,IAAI,EAAE,EAAEC,WAAW,CAAC,CAAC;EAE9C,IACErB,GAAG,CAACM,MAAM,KAAKO,KAAK,CAACS,WAAW,CAAChB,MAAM,GAAG,CAAC,IAC3C,CAACX,QAAQ,CAAC4B,IAAI,CAACvB,GAAG,CAAC,EACnB;IACA,OAAOS,SAAS;EAClB;EAEA,MAAMM,GAAG,GAAGH,KAAK,CAACZ,GAAG,EAAEa,KAAK,CAAC;EAE7B,IAAIE,GAAG,KAAKN,SAAS,IAAI,CAACC,MAAM,CAACc,QAAQ,CAACT,GAAG,CAAC,EAAE;IAC9C,OAAON,SAAS;EAClB;EAEA,MAAMgB,KAAK,GAAGV,GAAG,GAAGF,KAAK,CAACa,KAAK,GAAGb,KAAK,CAACc,MAAM;EAE9C,IAAI,CAACjB,MAAM,CAACc,QAAQ,CAACC,KAAK,CAAC,EAAE;IAC3B,OAAOhB,SAAS;EAClB;EAEA,IAAII,KAAK,CAACe,QAAQ,KAAKnB,SAAS,EAAE;IAChC,OAAOgB,KAAK;EACd;EAEA,MAAMI,MAAM,GAAG,EAAE,IAAIhB,KAAK,CAACe,QAAQ;EAEnC,OAAOE,IAAI,CAACC,KAAK,CAACN,KAAK,GAAGI,MAAM,CAAC,GAAGA,MAAM;AAC5C,CAAC;AAACG,OAAA,CAAAb,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.createFrameValidator = void 0;
7
+ var _calculateChecksum = require("./calculate-checksum.js");
7
8
  const byteAt = (pkg, index) => parseInt(pkg[index] ?? "0", 16);
8
9
  const announcedLength = (pkg, length) => {
9
10
  const bytes = [];
@@ -31,6 +32,14 @@ const createFrameValidator = frame => pkg => {
31
32
  return false;
32
33
  }
33
34
  }
35
+
36
+ /**
37
+ * Checked before the length, because a corrupted buffer can carry a plausible length.
38
+ * A frame that fails here is discarded rather than decoded at a wrong value.
39
+ */
40
+ if (frame.checksum && !(0, _calculateChecksum.hasValidChecksum)(pkg, frame.checksum)) {
41
+ return false;
42
+ }
34
43
  if (!frame.length) {
35
44
  return true;
36
45
  }
@@ -1 +1 @@
1
- {"version":3,"names":["byteAt","pkg","index","parseInt","announcedLength","length","bytes","i","widthBytes","push","ordered","byteOrder","reverse","reduce","total","byte","createFrameValidator","frame","minLengthBytes","header","toLowerCase","overheadBytes","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-frame-validator.ts"],"mappings":";;;;;;AAEA,MAAMA,MAAM,GAAGA,CAACC,GAAa,EAAEC,KAAa,KAC1CC,QAAQ,CAACF,GAAG,CAACC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;AAEjC,MAAME,eAAe,GAAGA,CACtBH,GAAa,EACbI,MAA8C,KACnC;EACX,MAAMC,KAAe,GAAG,EAAE;EAE1B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,UAAU,EAAED,CAAC,EAAE,EAAE;IAC1CD,KAAK,CAACG,IAAI,CAACT,MAAM,CAACC,GAAG,EAAEI,MAAM,CAACH,KAAK,GAAGK,CAAC,CAAC,CAAC;EAC3C;EAEA,MAAMG,OAAO,GAAGL,MAAM,CAACM,SAAS,KAAK,QAAQ,GAAGL,KAAK,CAACM,OAAO,CAAC,CAAC,GAAGN,KAAK;EAEvE,OAAOI,OAAO,CAACG,MAAM,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAG,GAAG,GAAGC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAC9BC,KAAsB,IACtBhB,GAAa,IAAc;EAC1B,IAAIA,GAAG,CAACI,MAAM,GAAGY,KAAK,CAACC,cAAc,EAAE;IACrC,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGF,KAAK,CAACE,MAAM,IAAI,EAAE;EAEjC,KAAK,IAAIZ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGY,MAAM,CAACd,MAAM,EAAEE,CAAC,EAAE,EAAE;IACtC,IAAI,CAACN,GAAG,CAACM,CAAC,CAAC,IAAI,EAAE,EAAEa,WAAW,CAAC,CAAC,KAAKD,MAAM,CAACZ,CAAC,CAAC,EAAE;MAC9C,OAAO,KAAK;IACd;EACF;EAEA,IAAI,CAACU,KAAK,CAACZ,MAAM,EAAE;IACjB,OAAO,IAAI;EACb;EAEA,OACEJ,GAAG,CAACI,MAAM,IACVY,KAAK,CAACZ,MAAM,CAACgB,aAAa,GAAGjB,eAAe,CAACH,GAAG,EAAEgB,KAAK,CAACZ,MAAM,CAAC;AAEnE,CAAC;AAACiB,OAAA,CAAAN,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_calculateChecksum","require","byteAt","pkg","index","parseInt","announcedLength","length","bytes","i","widthBytes","push","ordered","byteOrder","reverse","reduce","total","byte","createFrameValidator","frame","minLengthBytes","header","toLowerCase","checksum","hasValidChecksum","overheadBytes","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/create-frame-validator.ts"],"mappings":";;;;;;AAEA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,MAAMC,MAAM,GAAGA,CAACC,GAAa,EAAEC,KAAa,KAC1CC,QAAQ,CAACF,GAAG,CAACC,KAAK,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;AAEjC,MAAME,eAAe,GAAGA,CACtBH,GAAa,EACbI,MAA8C,KACnC;EACX,MAAMC,KAAe,GAAG,EAAE;EAE1B,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,MAAM,CAACG,UAAU,EAAED,CAAC,EAAE,EAAE;IAC1CD,KAAK,CAACG,IAAI,CAACT,MAAM,CAACC,GAAG,EAAEI,MAAM,CAACH,KAAK,GAAGK,CAAC,CAAC,CAAC;EAC3C;EAEA,MAAMG,OAAO,GAAGL,MAAM,CAACM,SAAS,KAAK,QAAQ,GAAGL,KAAK,CAACM,OAAO,CAAC,CAAC,GAAGN,KAAK;EAEvE,OAAOI,OAAO,CAACG,MAAM,CAAC,CAACC,KAAK,EAAEC,IAAI,KAAKD,KAAK,GAAG,GAAG,GAAGC,IAAI,EAAE,CAAC,CAAC;AAC/D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,oBAAoB,GAC9BC,KAAsB,IACtBhB,GAAa,IAAc;EAC1B,IAAIA,GAAG,CAACI,MAAM,GAAGY,KAAK,CAACC,cAAc,EAAE;IACrC,OAAO,KAAK;EACd;EAEA,MAAMC,MAAM,GAAGF,KAAK,CAACE,MAAM,IAAI,EAAE;EAEjC,KAAK,IAAIZ,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGY,MAAM,CAACd,MAAM,EAAEE,CAAC,EAAE,EAAE;IACtC,IAAI,CAACN,GAAG,CAACM,CAAC,CAAC,IAAI,EAAE,EAAEa,WAAW,CAAC,CAAC,KAAKD,MAAM,CAACZ,CAAC,CAAC,EAAE;MAC9C,OAAO,KAAK;IACd;EACF;;EAEA;AACJ;AACA;AACA;EACI,IAAIU,KAAK,CAACI,QAAQ,IAAI,CAAC,IAAAC,mCAAgB,EAACrB,GAAG,EAAEgB,KAAK,CAACI,QAAQ,CAAC,EAAE;IAC5D,OAAO,KAAK;EACd;EAEA,IAAI,CAACJ,KAAK,CAACZ,MAAM,EAAE;IACjB,OAAO,IAAI;EACb;EAEA,OACEJ,GAAG,CAACI,MAAM,IACVY,KAAK,CAACZ,MAAM,CAACkB,aAAa,GAAGnB,eAAe,CAACH,GAAG,EAAEgB,KAAK,CAACZ,MAAM,CAAC;AAEnE,CAAC;AAACmB,OAAA,CAAAR,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hexToBytes = void 0;
7
+ const HEX_BYTE = /[0-9a-f]{2}/g;
8
+
9
+ /**
10
+ * Splits a hex string into the bytes it spells: "a508f7" -> ["a5","08","f7"].
11
+ *
12
+ * Anything that is not a pair of hex digits is dropped, so a malformed string yields a
13
+ * shorter command rather than a byte that is half a value. Both callers hand it hex that
14
+ * was already validated - a declaration checks it at registration, and a built frame is
15
+ * assembled a byte at a time - so the dropping is a floor, not a path anything relies on.
16
+ */
17
+ const hexToBytes = hex => hex.toLowerCase().match(HEX_BYTE) ?? [];
18
+ exports.hexToBytes = hexToBytes;
19
+ //# sourceMappingURL=hex-to-bytes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["HEX_BYTE","hexToBytes","hex","toLowerCase","match","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/hex-to-bytes.ts"],"mappings":";;;;;;AAAA,MAAMA,QAAQ,GAAG,cAAc;;AAE/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,UAAU,GAAIC,GAAW,IACpCA,GAAG,CAACC,WAAW,CAAC,CAAC,CAACC,KAAK,CAACJ,QAAQ,CAAC,IAAI,EAAE;AAACK,OAAA,CAAAJ,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.le32ToBytes = void 0;
7
+ const BYTE_MASK = 0xff;
8
+ const BYTE_BITS = 8;
9
+
10
+ /** Little-endian unsigned 32-bit: 0x0000000A -> [0x0a, 0x00, 0x00, 0x00]. */
11
+ const le32ToBytes = value => [value & BYTE_MASK, value >> BYTE_BITS & BYTE_MASK, value >> BYTE_BITS * 2 & BYTE_MASK, value >> BYTE_BITS * 3 & BYTE_MASK];
12
+ exports.le32ToBytes = le32ToBytes;
13
+ //# sourceMappingURL=le-32-to-bytes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BYTE_MASK","BYTE_BITS","le32ToBytes","value","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/le-32-to-bytes.ts"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAG,IAAI;AACtB,MAAMC,SAAS,GAAG,CAAC;;AAEnB;AACO,MAAMC,WAAW,GAAIC,KAAa,IAAe,CACtDA,KAAK,GAAGH,SAAS,EAChBG,KAAK,IAAIF,SAAS,GAAID,SAAS,EAC/BG,KAAK,IAAKF,SAAS,GAAG,CAAE,GAAID,SAAS,EACrCG,KAAK,IAAKF,SAAS,GAAG,CAAE,GAAID,SAAS,CACvC;AAACI,OAAA,CAAAF,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -4,10 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.parseMeasurement = void 0;
7
- const parseMeasurement = (measurementInHex, parsingCase) => {
7
+ /**
8
+ * @param byteOffset added to every declared index, for a frame that repeats one record.
9
+ */
10
+ const parseMeasurement = (measurementInHex, parsingCase, byteOffset = 0) => {
8
11
  const parserDefinitions = parsingCase.parseDefinitions;
9
12
  const result = parserDefinitions.reduce((acc, parserDefinition) => {
10
- const parsingValue = getFullValueForMeasurementProperty(measurementInHex, parserDefinition);
13
+ const parsingValue = getFullValueForMeasurementProperty(measurementInHex, parserDefinition, byteOffset);
11
14
  if (parserDefinition.customParserDefinition) {
12
15
  acc[parserDefinition.name] = parserDefinition.customParserDefinition(parsingValue);
13
16
  } else {
@@ -23,15 +26,15 @@ const parseMeasurement = (measurementInHex, parsingCase) => {
23
26
  return measurement;
24
27
  };
25
28
 
26
- /** Example: We received message ["1A","02", "00", "50"]. Value for weight is on indexes 2,3. Which means we need to combine 2nd and 3rd indexes to get result
27
- * This method will combine them and return string "0050".
28
- * Indexes should be written in ParseDeinition
29
+ /** Example: We received message ["1A","02", "00", "50"]. Value for weight is on indexes 2,3. Which means we need to combine 2nd and 3rd indexes to get result
30
+ * This method will combine them and return string "0050".
31
+ * Indexes should be written in ParseDeinition
29
32
  */
30
33
  exports.parseMeasurement = parseMeasurement;
31
- const getFullValueForMeasurementProperty = (messageInHex, parseDefinition) => {
34
+ const getFullValueForMeasurementProperty = (messageInHex, parseDefinition, byteOffset) => {
32
35
  let valuesInString = "";
33
36
  for (let i = 0; i < parseDefinition.byteIndexes.length; i++) {
34
- valuesInString += messageInHex[parseDefinition.byteIndexes[i] || "0"];
37
+ valuesInString += messageInHex[(parseDefinition.byteIndexes[i] ?? 0) + byteOffset];
35
38
  }
36
39
  return valuesInString;
37
40
  };
@@ -1 +1 @@
1
- {"version":3,"names":["parseMeasurement","measurementInHex","parsingCase","parserDefinitions","parseDefinitions","result","reduce","acc","parserDefinition","parsingValue","getFullValueForMeasurementProperty","customParserDefinition","name","parseInt","measurement","measurementTypeKey","caseType","exports","messageInHex","parseDefinition","valuesInString","i","byteIndexes","length"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/parse-measurement.ts"],"mappings":";;;;;;AAMO,MAAMA,gBAAgB,GAAGA,CAC9BC,gBAA0B,EAC1BC,WAAwB,KACiB;EACzC,MAAMC,iBAAiB,GAAGD,WAAW,CAACE,gBAAgB;EAEtD,MAAMC,MAAM,GAAGF,iBAAiB,CAACG,MAAM,CACrC,CAACC,GAAG,EAAEC,gBAAgB,KAAK;IACzB,MAAMC,YAAY,GAAGC,kCAAkC,CACrDT,gBAAgB,EAChBO,gBACF,CAAC;IAED,IAAIA,gBAAgB,CAACG,sBAAsB,EAAE;MAC3CJ,GAAG,CAACC,gBAAgB,CAACI,IAAI,CAAC,GACxBJ,gBAAgB,CAACG,sBAAsB,CAACF,YAAY,CAAC;IACzD,CAAC,MAAM;MACLF,GAAG,CAACC,gBAAgB,CAACI,IAAI,CAAC,GAAGC,QAAQ,CAACJ,YAAY,EAAE,EAAE,CAAC;IACzD;IAEA,OAAOF,GAAG;EACZ,CAAC;EACD;EACA,CAAC,CACH,CAAC;EAED,MAAMO,WAAW,GAAGT,MAA8C;EAElES,WAAW,CAACC,kBAAkB,GAAGb,WAAW,CAACa,kBAAmB;EAChED,WAAW,CAACE,QAAQ,GAAGd,WAAW,CAACc,QAAQ;EAE3C,OAAOF,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA;AAHAG,OAAA,CAAAjB,gBAAA,GAAAA,gBAAA;AAIA,MAAMU,kCAAkC,GAAGA,CACzCQ,YAAsB,EACtBC,eAAiC,KACtB;EACX,IAAIC,cAAc,GAAG,EAAE;EAEvB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,eAAe,CAACG,WAAW,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IAC3DD,cAAc,IAAIF,YAAY,CAACC,eAAe,CAACG,WAAW,CAACD,CAAC,CAAC,IAAI,GAAG,CAAC;EACvE;EAEA,OAAOD,cAAc;AACvB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["parseMeasurement","measurementInHex","parsingCase","byteOffset","parserDefinitions","parseDefinitions","result","reduce","acc","parserDefinition","parsingValue","getFullValueForMeasurementProperty","customParserDefinition","name","parseInt","measurement","measurementTypeKey","caseType","exports","messageInHex","parseDefinition","valuesInString","i","byteIndexes","length"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/parse-measurement.ts"],"mappings":";;;;;;AAMA;AACA;AACA;AACO,MAAMA,gBAAgB,GAAGA,CAC9BC,gBAA0B,EAC1BC,WAAwB,EACxBC,UAAU,GAAG,CAAC,KAC2B;EACzC,MAAMC,iBAAiB,GAAGF,WAAW,CAACG,gBAAgB;EAEtD,MAAMC,MAAM,GAAGF,iBAAiB,CAACG,MAAM,CACrC,CAACC,GAAG,EAAEC,gBAAgB,KAAK;IACzB,MAAMC,YAAY,GAAGC,kCAAkC,CACrDV,gBAAgB,EAChBQ,gBAAgB,EAChBN,UACF,CAAC;IAED,IAAIM,gBAAgB,CAACG,sBAAsB,EAAE;MAC3CJ,GAAG,CAACC,gBAAgB,CAACI,IAAI,CAAC,GACxBJ,gBAAgB,CAACG,sBAAsB,CAACF,YAAY,CAAC;IACzD,CAAC,MAAM;MACLF,GAAG,CAACC,gBAAgB,CAACI,IAAI,CAAC,GAAGC,QAAQ,CAACJ,YAAY,EAAE,EAAE,CAAC;IACzD;IAEA,OAAOF,GAAG;EACZ,CAAC;EACD;EACA,CAAC,CACH,CAAC;EAED,MAAMO,WAAW,GAAGT,MAA8C;EAElES,WAAW,CAACC,kBAAkB,GAAGd,WAAW,CAACc,kBAAmB;EAChED,WAAW,CAACE,QAAQ,GAAGf,WAAW,CAACe,QAAQ;EAE3C,OAAOF,WAAW;AACpB,CAAC;;AAED;AACA;AACA;AACA;AAHAG,OAAA,CAAAlB,gBAAA,GAAAA,gBAAA;AAIA,MAAMW,kCAAkC,GAAGA,CACzCQ,YAAsB,EACtBC,eAAiC,EACjCjB,UAAkB,KACP;EACX,IAAIkB,cAAc,GAAG,EAAE;EAEvB,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,eAAe,CAACG,WAAW,CAACC,MAAM,EAAEF,CAAC,EAAE,EAAE;IAC3DD,cAAc,IACZF,YAAY,CAAC,CAACC,eAAe,CAACG,WAAW,CAACD,CAAC,CAAC,IAAI,CAAC,IAAInB,UAAU,CAAC;EACpE;EAEA,OAAOkB,cAAc;AACvB,CAAC","ignoreList":[]}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.rejectCustomReading = exports.discardedReadingError = void 0;
7
+ /** The reading that was thrown away, and why, so a decoding fault can be diagnosed. */
8
+ const discardedReadingError = (deviceId, reason, parsedData) => new Error(`Custom device "${deviceId}": ${reason}. The reading was discarded (decoded ${JSON.stringify(parsedData)}).`);
9
+
10
+ /**
11
+ * Why a decoded property is not a reading, or nothing when it is.
12
+ *
13
+ * The checks are the last thing between a misread frame and a clinical record, so each one
14
+ * says what was wrong rather than returning a bare false: a property the measurement does
15
+ * not have is a declaration mistake, a value that is not a finite number is a frame shorter
16
+ * than the declaration expects, and a value outside the envelope is a decoding fault
17
+ * wearing the shape of a reading.
18
+ */
19
+ exports.discardedReadingError = discardedReadingError;
20
+ const rejectCustomReading = (fields, measurementTypeKey, name, value) => {
21
+ const field = fields.get(`${measurementTypeKey}:${name}`);
22
+ if (!field) {
23
+ return `decoded "${name}", which is not declared for ${measurementTypeKey}`;
24
+ }
25
+ if (typeof value !== "number" || !Number.isFinite(value)) {
26
+ return `could not decode ${name}; the frame was shorter than the declaration expects`;
27
+ }
28
+ if (value < field.min || value > field.max) {
29
+ return `decoded ${name} = ${value} ${field.unit}, outside the accepted range ${field.min}-${field.max} ${field.unit}`;
30
+ }
31
+ return undefined;
32
+ };
33
+ exports.rejectCustomReading = rejectCustomReading;
34
+ //# sourceMappingURL=reject-custom-reading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["discardedReadingError","deviceId","reason","parsedData","Error","JSON","stringify","exports","rejectCustomReading","fields","measurementTypeKey","name","value","field","get","Number","isFinite","min","max","unit","undefined"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/reject-custom-reading.ts"],"mappings":";;;;;;AAEA;AACA,MAAMA,qBAAqB,GAAGA,CAC5BC,QAAgB,EAChBC,MAAc,EACdC,UAAmB,KAEnB,IAAIC,KAAK,CACP,kBAAkBH,QAAQ,MAAMC,MAAM,wCAAwCG,IAAI,CAACC,SAAS,CAACH,UAAU,CAAC,IAC1G,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARAI,OAAA,CAAAP,qBAAA,GAAAA,qBAAA;AASA,MAAMQ,mBAAmB,GAAGA,CAC1BC,MAAgD,EAChDC,kBAA0B,EAC1BC,IAAY,EACZC,KAAc,KACS;EACvB,MAAMC,KAAK,GAAGJ,MAAM,CAACK,GAAG,CAAC,GAAGJ,kBAAkB,IAAIC,IAAI,EAAE,CAAC;EAEzD,IAAI,CAACE,KAAK,EAAE;IACV,OAAO,YAAYF,IAAI,gCAAgCD,kBAAkB,EAAE;EAC7E;EAEA,IAAI,OAAOE,KAAK,KAAK,QAAQ,IAAI,CAACG,MAAM,CAACC,QAAQ,CAACJ,KAAK,CAAC,EAAE;IACxD,OAAO,oBAAoBD,IAAI,sDAAsD;EACvF;EAEA,IAAIC,KAAK,GAAGC,KAAK,CAACI,GAAG,IAAIL,KAAK,GAAGC,KAAK,CAACK,GAAG,EAAE;IAC1C,OAAO,WAAWP,IAAI,MAAMC,KAAK,IAAIC,KAAK,CAACM,IAAI,gCAAgCN,KAAK,CAACI,GAAG,IAAIJ,KAAK,CAACK,GAAG,IAAIL,KAAK,CAACM,IAAI,EAAE;EACvH;EAEA,OAAOC,SAAS;AAClB,CAAC;AAACb,OAAA,CAAAC,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.summariseMeasurementForLog = void 0;
7
+ /**
8
+ * Shapes a measurement for a log line.
9
+ *
10
+ * An ECG carries thousands of waveform points. Logging them costs more than the reading
11
+ * they describe and buries it, so the count stands in for them - which is the only thing
12
+ * the log is being asked: whether the waveform arrived, not what was in it.
13
+ */
14
+ const summariseMeasurementForLog = data => {
15
+ const points = data.diagramPoints;
16
+ return {
17
+ ...data,
18
+ diagramPoints: Array.isArray(points) ? points.length : undefined
19
+ };
20
+ };
21
+ exports.summariseMeasurementForLog = summariseMeasurementForLog;
22
+ //# sourceMappingURL=summarise-measurement-for-log.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["summariseMeasurementForLog","data","points","diagramPoints","Array","isArray","length","undefined","exports"],"sourceRoot":"../../../../../src","sources":["modules/bt-management/utils/summarise-measurement-for-log.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMA,0BAA0B,GACrCC,IAAO,IACqB;EAC5B,MAAMC,MAAM,GAAID,IAAI,CAAiCE,aAAa;EAElE,OAAO;IACL,GAAGF,IAAI;IACPE,aAAa,EAAEC,KAAK,CAACC,OAAO,CAACH,MAAM,CAAC,GAAGA,MAAM,CAACI,MAAM,GAAGC;EACzD,CAAC;AACH,CAAC;AAACC,OAAA,CAAAR,0BAAA,GAAAA,0BAAA","ignoreList":[]}