@ovok/native 1.16.1-rc.5 → 1.16.1-rc.7

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 (712) hide show
  1. package/lib/commonjs/modules/auth/google-return-page/index.js +24 -0
  2. package/lib/commonjs/modules/auth/google-return-page/index.js.map +1 -0
  3. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js +15 -0
  4. package/lib/commonjs/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  5. package/lib/commonjs/modules/auth/index.js +21 -10
  6. package/lib/commonjs/modules/auth/index.js.map +1 -1
  7. package/lib/commonjs/modules/auth/session/logout-session.js +1 -1
  8. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +73 -0
  9. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  10. package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  11. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js +73 -0
  12. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  13. package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  14. package/lib/commonjs/modules/auth/sign-in/index.js +24 -0
  15. package/lib/commonjs/modules/auth/sign-in/index.js.map +1 -1
  16. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js +90 -0
  17. package/lib/commonjs/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  18. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js +89 -0
  19. package/lib/commonjs/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  20. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js +21 -0
  21. package/lib/commonjs/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  22. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js +10 -0
  23. package/lib/commonjs/modules/auth/utils/sign-out-google.web.js.map +1 -0
  24. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
  25. package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  26. package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
  27. package/lib/commonjs/modules/bt-management/index.js +12 -0
  28. package/lib/commonjs/modules/bt-management/index.js.map +1 -1
  29. package/lib/commonjs/modules/bt-management/services/bt-manager.js +27 -1
  30. package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
  31. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
  32. package/lib/commonjs/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  33. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  34. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  35. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +98 -0
  36. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  37. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +127 -0
  38. package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  39. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
  40. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  41. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -2
  42. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  43. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +78 -19
  44. package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  45. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js +30 -2
  46. package/lib/commonjs/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  47. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +11 -3
  48. package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  49. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +48 -3
  50. package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  51. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  52. package/lib/commonjs/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  53. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
  54. package/lib/commonjs/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  55. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +115 -26
  56. package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  57. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js +19 -2
  58. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
  59. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +32 -0
  60. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
  61. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +73 -0
  62. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
  63. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +130 -30
  64. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
  65. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +103 -0
  66. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
  67. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
  68. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  69. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
  70. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
  71. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
  72. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  73. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +75 -0
  74. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
  75. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +113 -0
  76. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
  77. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +67 -0
  78. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
  79. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js +55 -0
  80. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
  81. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +57 -0
  82. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
  83. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js +49 -0
  84. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
  85. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js +46 -0
  86. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
  87. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
  88. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  89. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js +27 -0
  90. package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
  91. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
  92. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  93. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -20
  94. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  95. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
  96. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  97. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +47 -0
  98. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
  99. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
  100. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  101. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  102. package/lib/commonjs/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  103. package/lib/commonjs/modules/bt-management/services/series-recorder.js +27 -5
  104. package/lib/commonjs/modules/bt-management/services/series-recorder.js.map +1 -1
  105. package/lib/commonjs/modules/bt-management/types/device-waveform.js +6 -0
  106. package/lib/commonjs/modules/bt-management/types/device-waveform.js.map +1 -0
  107. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js +23 -0
  108. package/lib/commonjs/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  109. package/lib/commonjs/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
  110. package/lib/commonjs/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
  111. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +13 -0
  112. package/lib/commonjs/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  113. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js +15 -8
  114. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  115. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js +1 -1
  116. package/lib/commonjs/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
  117. package/lib/commonjs/modules/data-sync/constants.js +4 -1
  118. package/lib/commonjs/modules/data-sync/constants.js.map +1 -1
  119. package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js +6 -9
  120. package/lib/commonjs/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  121. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +8 -7
  122. package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
  123. package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +13 -0
  124. package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
  125. package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js +47 -0
  126. package/lib/commonjs/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
  127. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +14 -6
  128. package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  129. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
  130. package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  131. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js +68 -0
  132. package/lib/commonjs/modules/data-sync/utils/default-health-coding.js.map +1 -0
  133. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
  134. package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  135. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +43 -86
  136. package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  137. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +6 -5
  138. package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  139. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js +15 -15
  140. package/lib/commonjs/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  141. package/lib/commonjs/modules/data-sync/utils/health-units.js +11 -1
  142. package/lib/commonjs/modules/data-sync/utils/health-units.js.map +1 -1
  143. package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js +64 -0
  144. package/lib/commonjs/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
  145. package/lib/commonjs/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  146. package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js +20 -0
  147. package/lib/commonjs/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
  148. package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js +21 -0
  149. package/lib/commonjs/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
  150. package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js +59 -0
  151. package/lib/commonjs/modules/data-sync/utils/healthkit-samples.js.map +1 -0
  152. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js +20 -11
  153. package/lib/commonjs/modules/data-sync/utils/healthkit-series.js.map +1 -1
  154. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
  155. package/lib/commonjs/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
  156. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
  157. package/lib/commonjs/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  158. package/lib/commonjs/modules/next/bluetooth/connections.js +45 -2
  159. package/lib/commonjs/modules/next/bluetooth/connections.js.map +1 -1
  160. package/lib/commonjs/modules/next/bluetooth/driver.js.map +1 -1
  161. package/lib/commonjs/modules/next/bluetooth/errors.js.map +1 -1
  162. package/lib/commonjs/modules/next/bluetooth/index.js.map +1 -1
  163. package/lib/commonjs/modules/next/bluetooth/readings.js +10 -2
  164. package/lib/commonjs/modules/next/bluetooth/readings.js.map +1 -1
  165. package/lib/commonjs/modules/next/bluetooth/runtime.js +37 -1
  166. package/lib/commonjs/modules/next/bluetooth/runtime.js.map +1 -1
  167. package/lib/commonjs/modules/next/bluetooth/web/index.js.map +1 -1
  168. package/lib/module/modules/auth/google-return-page/index.js +21 -0
  169. package/lib/module/modules/auth/google-return-page/index.js.map +1 -0
  170. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js +10 -0
  171. package/lib/module/modules/auth/hooks/use-social-sign-in.web.js.map +1 -0
  172. package/lib/module/modules/auth/index.js +2 -1
  173. package/lib/module/modules/auth/index.js.map +1 -1
  174. package/lib/module/modules/auth/session/logout-session.js +1 -1
  175. package/lib/module/modules/auth/session/logout-session.js.map +1 -1
  176. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js +67 -0
  177. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-button.web.js.map +1 -0
  178. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js +1 -1
  179. package/lib/module/modules/auth/sign-in/components/social-logins/apple-login.js.map +1 -1
  180. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js +68 -0
  181. package/lib/module/modules/auth/sign-in/components/social-logins/google-login-button.web.js.map +1 -0
  182. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js +1 -1
  183. package/lib/module/modules/auth/sign-in/components/social-logins/google-login.js.map +1 -1
  184. package/lib/module/modules/auth/sign-in/index.js +2 -0
  185. package/lib/module/modules/auth/sign-in/index.js.map +1 -1
  186. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js +84 -0
  187. package/lib/module/modules/auth/sign-in/utils/apple-web-sign-in.js.map +1 -0
  188. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js +84 -0
  189. package/lib/module/modules/auth/sign-in/utils/google-redirect-sign-in.js.map +1 -0
  190. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js +17 -0
  191. package/lib/module/modules/auth/sign-in/utils/jwt-claims.js.map +1 -0
  192. package/lib/module/modules/auth/utils/sign-out-google.web.js +5 -0
  193. package/lib/module/modules/auth/utils/sign-out-google.web.js.map +1 -0
  194. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +19 -7
  195. package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
  196. package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
  197. package/lib/module/modules/bt-management/index.js +1 -0
  198. package/lib/module/modules/bt-management/index.js.map +1 -1
  199. package/lib/module/modules/bt-management/services/bt-manager.js +27 -1
  200. package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
  201. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js +42 -2
  202. package/lib/module/modules/bt-management/services/custom/compile-custom-lepu.js.map +1 -1
  203. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +64 -44
  204. package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
  205. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js +91 -0
  206. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.js.map +1 -0
  207. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js +123 -0
  208. package/lib/module/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.js.map +1 -0
  209. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +48 -17
  210. package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
  211. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js +2 -3
  212. package/lib/module/modules/bt-management/services/devices/bp2/bp2.frame-reader.js.map +1 -1
  213. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +77 -19
  214. package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -1
  215. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js +30 -2
  216. package/lib/module/modules/bt-management/services/devices/bt-command-writer.js.map +1 -1
  217. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +11 -3
  218. package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
  219. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +48 -3
  220. package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
  221. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js +2 -7
  222. package/lib/module/modules/bt-management/services/devices/cofoe/cofoe.records.js.map +1 -1
  223. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js +6 -2
  224. package/lib/module/modules/bt-management/services/devices/custom/custom-lepu-sequencer.js.map +1 -1
  225. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +115 -26
  226. package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
  227. package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js +17 -1
  228. package/lib/module/modules/bt-management/services/devices/lepu/lepu.advertisement.js.map +1 -1
  229. package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js +28 -0
  230. package/lib/module/modules/bt-management/services/devices/lepu/lepu.connect-retry.js.map +1 -0
  231. package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js +69 -0
  232. package/lib/module/modules/bt-management/services/devices/lepu/lepu.delivered-files.js.map +1 -0
  233. package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js +129 -30
  234. package/lib/module/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.js.map +1 -1
  235. package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js +99 -0
  236. package/lib/module/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.js.map +1 -0
  237. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +20 -14
  238. package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
  239. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js +4 -2
  240. package/lib/module/modules/bt-management/services/devices/lepu/lepu.frame-reader.js.map +1 -1
  241. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js +94 -10
  242. package/lib/module/modules/bt-management/services/devices/lepu/lepu.identity-gate.js.map +1 -1
  243. package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js +72 -0
  244. package/lib/module/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.js.map +1 -0
  245. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js +109 -0
  246. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.js.map +1 -0
  247. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js +64 -0
  248. package/lib/module/modules/bt-management/services/devices/lepu/lepu.pulse-wave.js.map +1 -0
  249. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js +51 -0
  250. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recorder.js.map +1 -0
  251. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js +53 -0
  252. package/lib/module/modules/bt-management/services/devices/lepu/lepu.recording-watch.js.map +1 -0
  253. package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js +45 -0
  254. package/lib/module/modules/bt-management/services/devices/lepu/lepu.session.js.map +1 -0
  255. package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js +42 -0
  256. package/lib/module/modules/bt-management/services/devices/lepu/lepu.stored-files.js.map +1 -0
  257. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js +10 -4
  258. package/lib/module/modules/bt-management/services/devices/lepu/lepu.transports.js.map +1 -1
  259. package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js +22 -0
  260. package/lib/module/modules/bt-management/services/devices/lepu/lepu.waveform.js.map +1 -0
  261. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js +0 -1
  262. package/lib/module/modules/bt-management/services/devices/viatom/viatom.bp-monitors.js.map +1 -1
  263. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js +75 -21
  264. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-files.js.map +1 -1
  265. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js +21 -12
  266. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.js.map +1 -1
  267. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js +44 -0
  268. package/lib/module/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.js.map +1 -0
  269. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js +58 -32
  270. package/lib/module/modules/bt-management/services/devices/viatom/viatom.oximeters.js.map +1 -1
  271. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js +3 -7
  272. package/lib/module/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.js.map +1 -1
  273. package/lib/module/modules/bt-management/services/series-recorder.js +27 -5
  274. package/lib/module/modules/bt-management/services/series-recorder.js.map +1 -1
  275. package/lib/module/modules/bt-management/types/device-waveform.js +4 -0
  276. package/lib/module/modules/bt-management/types/device-waveform.js.map +1 -0
  277. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js +18 -0
  278. package/lib/module/modules/bt-management/utils/calculate-crc-16-modbus.js.map +1 -0
  279. package/lib/module/modules/bt-management/utils/i-16-from-hex.js.map +1 -1
  280. package/lib/module/modules/bt-management/utils/le-32-from-hex.js.map +1 -1
  281. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js +8 -0
  282. package/lib/module/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.js.map +1 -0
  283. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js +16 -9
  284. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-provider.js.map +1 -1
  285. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js +2 -2
  286. package/lib/module/modules/data-sync/components/apple/apple-health-authorization-utils.js.map +1 -1
  287. package/lib/module/modules/data-sync/constants.js +4 -1
  288. package/lib/module/modules/data-sync/constants.js.map +1 -1
  289. package/lib/module/modules/data-sync/hooks/use-listen-changes.js +7 -10
  290. package/lib/module/modules/data-sync/hooks/use-listen-changes.js.map +1 -1
  291. package/lib/module/modules/data-sync/services/managers/data-processor.js +8 -7
  292. package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
  293. package/lib/module/modules/data-sync/types/health-sync-keys.js +13 -0
  294. package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
  295. package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js +43 -0
  296. package/lib/module/modules/data-sync/utils/convert-ecg-samples-to-observation.js.map +1 -0
  297. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +14 -6
  298. package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -1
  299. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +7 -15
  300. package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
  301. package/lib/module/modules/data-sync/utils/default-health-coding.js +65 -0
  302. package/lib/module/modules/data-sync/utils/default-health-coding.js.map +1 -0
  303. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +20 -4
  304. package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
  305. package/lib/module/modules/data-sync/utils/get-samples-from-health.js +44 -87
  306. package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
  307. package/lib/module/modules/data-sync/utils/get-total-samples-count.js +5 -4
  308. package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
  309. package/lib/module/modules/data-sync/utils/health-data-catalog.js +15 -15
  310. package/lib/module/modules/data-sync/utils/health-data-catalog.js.map +1 -1
  311. package/lib/module/modules/data-sync/utils/health-units.js +11 -1
  312. package/lib/module/modules/data-sync/utils/health-units.js.map +1 -1
  313. package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js +59 -0
  314. package/lib/module/modules/data-sync/utils/healthkit-daily-statistics.js.map +1 -0
  315. package/lib/module/modules/data-sync/utils/healthkit-data-types.js.map +1 -1
  316. package/lib/module/modules/data-sync/utils/healthkit-query-options.js +16 -0
  317. package/lib/module/modules/data-sync/utils/healthkit-query-options.js.map +1 -0
  318. package/lib/module/modules/data-sync/utils/healthkit-sample-source.js +17 -0
  319. package/lib/module/modules/data-sync/utils/healthkit-sample-source.js.map +1 -0
  320. package/lib/module/modules/data-sync/utils/healthkit-samples.js +52 -0
  321. package/lib/module/modules/data-sync/utils/healthkit-samples.js.map +1 -0
  322. package/lib/module/modules/data-sync/utils/healthkit-series.js +19 -10
  323. package/lib/module/modules/data-sync/utils/healthkit-series.js.map +1 -1
  324. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js +12 -2
  325. package/lib/module/modules/next/bluetooth/ble-plx/built-in-devices.js.map +1 -1
  326. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js +39 -5
  327. package/lib/module/modules/next/bluetooth/ble-plx/legacy-driver.js.map +1 -1
  328. package/lib/module/modules/next/bluetooth/connections.js +45 -2
  329. package/lib/module/modules/next/bluetooth/connections.js.map +1 -1
  330. package/lib/module/modules/next/bluetooth/driver.js.map +1 -1
  331. package/lib/module/modules/next/bluetooth/errors.js.map +1 -1
  332. package/lib/module/modules/next/bluetooth/index.js.map +1 -1
  333. package/lib/module/modules/next/bluetooth/readings.js +10 -2
  334. package/lib/module/modules/next/bluetooth/readings.js.map +1 -1
  335. package/lib/module/modules/next/bluetooth/runtime.js +37 -1
  336. package/lib/module/modules/next/bluetooth/runtime.js.map +1 -1
  337. package/lib/module/modules/next/bluetooth/web/index.js.map +1 -1
  338. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts +8 -0
  339. package/lib/typescript/commonjs/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  341. package/lib/typescript/commonjs/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
  343. package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/src/modules/auth/register/components/register.d.ts +2 -2
  345. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  346. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  347. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  349. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  350. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  352. package/lib/typescript/commonjs/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  353. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts +2 -0
  354. package/lib/typescript/commonjs/src/modules/auth/sign-in/index.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  356. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  358. package/lib/typescript/commonjs/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  360. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  362. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  364. package/lib/typescript/commonjs/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  366. package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
  369. package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  370. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
  371. package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +21 -5
  373. package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  377. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  378. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  379. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  380. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
  381. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
  383. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  384. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
  385. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
  387. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  388. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  389. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
  391. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
  394. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  395. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
  396. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  397. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
  398. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
  399. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
  400. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
  401. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
  402. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
  403. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
  404. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
  405. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
  406. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
  407. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
  408. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  409. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
  410. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
  411. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
  412. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  413. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
  414. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
  415. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
  416. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
  417. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
  418. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
  419. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
  420. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
  421. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
  422. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
  423. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
  424. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
  425. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
  426. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
  427. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
  428. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  429. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
  430. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
  431. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  432. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  433. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  434. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  435. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
  436. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
  437. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  438. package/lib/typescript/commonjs/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  439. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts +6 -1
  440. package/lib/typescript/commonjs/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
  441. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts +7 -1
  442. package/lib/typescript/commonjs/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  443. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
  444. package/lib/typescript/commonjs/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  445. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
  446. package/lib/typescript/commonjs/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
  447. package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts +15 -0
  448. package/lib/typescript/commonjs/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
  449. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  450. package/lib/typescript/commonjs/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  451. package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
  452. package/lib/typescript/commonjs/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
  453. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
  454. package/lib/typescript/commonjs/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
  455. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  456. package/lib/typescript/commonjs/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  457. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  458. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
  459. package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
  460. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts +3 -1
  461. package/lib/typescript/commonjs/src/modules/data-sync/constants.d.ts.map +1 -1
  462. package/lib/typescript/commonjs/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  463. package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  464. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
  465. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  466. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
  467. package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  468. package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
  469. package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
  470. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
  471. package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  472. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
  473. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  474. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  475. package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  476. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
  477. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
  478. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
  479. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  480. package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  481. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  482. package/lib/typescript/commonjs/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  483. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
  484. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  485. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
  486. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  487. package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  488. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  489. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts +2 -2
  490. package/lib/typescript/commonjs/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  491. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
  492. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
  493. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
  494. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  495. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
  496. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
  497. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
  498. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
  499. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
  500. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
  501. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
  502. package/lib/typescript/commonjs/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  503. package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
  504. package/lib/typescript/commonjs/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
  505. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
  506. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
  507. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
  508. package/lib/typescript/commonjs/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
  509. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts +13 -1
  510. package/lib/typescript/commonjs/src/modules/next/bluetooth/connections.d.ts.map +1 -1
  511. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts +20 -0
  512. package/lib/typescript/commonjs/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  513. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts +1 -1
  514. package/lib/typescript/commonjs/src/modules/next/bluetooth/errors.d.ts.map +1 -1
  515. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts +2 -1
  516. package/lib/typescript/commonjs/src/modules/next/bluetooth/index.d.ts.map +1 -1
  517. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts +3 -2
  518. package/lib/typescript/commonjs/src/modules/next/bluetooth/readings.d.ts.map +1 -1
  519. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts +19 -1
  520. package/lib/typescript/commonjs/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
  521. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts +33 -1
  522. package/lib/typescript/commonjs/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
  523. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts +1 -0
  524. package/lib/typescript/commonjs/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
  525. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts +8 -0
  526. package/lib/typescript/module/src/modules/auth/google-return-page/index.d.ts.map +1 -0
  527. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts +7 -0
  528. package/lib/typescript/module/src/modules/auth/hooks/use-social-sign-in.web.d.ts.map +1 -0
  529. package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
  530. package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
  531. package/lib/typescript/module/src/modules/auth/register/components/register.d.ts +2 -2
  532. package/lib/typescript/module/src/modules/auth/sign-in/components/sign-in.d.ts +2 -2
  533. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts +5 -0
  534. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login-button.web.d.ts.map +1 -0
  535. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/apple-login.d.ts +1 -1
  536. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts +5 -0
  537. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login-button.web.d.ts.map +1 -0
  538. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/google-login.d.ts +1 -1
  539. package/lib/typescript/module/src/modules/auth/sign-in/components/social-logins/social-logins.d.ts +2 -2
  540. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts +2 -0
  541. package/lib/typescript/module/src/modules/auth/sign-in/index.d.ts.map +1 -1
  542. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts +13 -0
  543. package/lib/typescript/module/src/modules/auth/sign-in/types/apple-login-props.d.ts.map +1 -1
  544. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts +13 -0
  545. package/lib/typescript/module/src/modules/auth/sign-in/types/google-login-props.d.ts.map +1 -1
  546. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts +17 -0
  547. package/lib/typescript/module/src/modules/auth/sign-in/utils/apple-web-sign-in.d.ts.map +1 -0
  548. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts +14 -0
  549. package/lib/typescript/module/src/modules/auth/sign-in/utils/google-redirect-sign-in.d.ts.map +1 -0
  550. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts +9 -0
  551. package/lib/typescript/module/src/modules/auth/sign-in/utils/jwt-claims.d.ts.map +1 -0
  552. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts +3 -0
  553. package/lib/typescript/module/src/modules/auth/utils/sign-out-google.web.d.ts.map +1 -0
  554. package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
  555. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +4 -1
  556. package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
  557. package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
  558. package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
  559. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +21 -5
  560. package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
  561. package/lib/typescript/module/src/modules/bt-management/services/custom/compile-custom-lepu.d.ts.map +1 -1
  562. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
  563. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts +34 -0
  564. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.protocol.d.ts.map +1 -0
  565. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts +32 -0
  566. package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/telebgm.sequencer.d.ts.map +1 -0
  567. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +4 -0
  568. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
  569. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts +2 -1
  570. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.frame-reader.d.ts.map +1 -1
  571. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +29 -3
  572. package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -1
  573. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts +6 -1
  574. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-command-writer.d.ts.map +1 -1
  575. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +2 -0
  576. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
  577. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +23 -3
  578. package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
  579. package/lib/typescript/module/src/modules/bt-management/services/devices/cofoe/cofoe.records.d.ts.map +1 -1
  580. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts +6 -3
  581. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom-lepu-sequencer.d.ts.map +1 -1
  582. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +20 -0
  583. package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
  584. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts +8 -1
  585. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.advertisement.d.ts.map +1 -1
  586. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts +12 -0
  587. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.connect-retry.d.ts.map +1 -0
  588. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts +24 -0
  589. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.delivered-files.d.ts.map +1 -0
  590. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts +40 -5
  591. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.ecg-transfer.d.ts.map +1 -1
  592. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts +20 -0
  593. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.encryption-handshake.d.ts.map +1 -0
  594. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts +6 -3
  595. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.file-transfer.d.ts.map +1 -1
  596. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts +3 -1
  597. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.frame-reader.d.ts.map +1 -1
  598. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts +26 -1
  599. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.identity-gate.d.ts.map +1 -1
  600. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts +42 -0
  601. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.live-ecg-chunks.d.ts.map +1 -0
  602. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts +28 -0
  603. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave-chunks.d.ts.map +1 -0
  604. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts +16 -0
  605. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.pulse-wave.d.ts.map +1 -0
  606. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts +32 -0
  607. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recorder.d.ts.map +1 -0
  608. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts +28 -0
  609. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.recording-watch.d.ts.map +1 -0
  610. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts +17 -0
  611. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.session.d.ts.map +1 -0
  612. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts +33 -0
  613. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.stored-files.d.ts.map +1 -0
  614. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts +6 -1
  615. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.transports.d.ts.map +1 -1
  616. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts +9 -0
  617. package/lib/typescript/module/src/modules/bt-management/services/devices/lepu/lepu.waveform.d.ts.map +1 -0
  618. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.bp-monitors.d.ts.map +1 -1
  619. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts +9 -3
  620. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-files.d.ts.map +1 -1
  621. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recorders.d.ts.map +1 -1
  622. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts +8 -0
  623. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.ecg-recording-status.d.ts.map +1 -0
  624. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.oximeters.d.ts.map +1 -1
  625. package/lib/typescript/module/src/modules/bt-management/services/devices/viatom/viatom.wbp02.protocol.d.ts.map +1 -1
  626. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts +6 -1
  627. package/lib/typescript/module/src/modules/bt-management/services/series-recorder.d.ts.map +1 -1
  628. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts +7 -1
  629. package/lib/typescript/module/src/modules/bt-management/types/create-device-params.d.ts.map +1 -1
  630. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts +47 -3
  631. package/lib/typescript/module/src/modules/bt-management/types/custom-lepu-spec.d.ts.map +1 -1
  632. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts +17 -1
  633. package/lib/typescript/module/src/modules/bt-management/types/device-connection-event.d.ts.map +1 -1
  634. package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts +15 -0
  635. package/lib/typescript/module/src/modules/bt-management/types/device-waveform.d.ts.map +1 -0
  636. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts +3 -0
  637. package/lib/typescript/module/src/modules/bt-management/utils/calculate-crc-16-modbus.d.ts.map +1 -0
  638. package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts +1 -1
  639. package/lib/typescript/module/src/modules/bt-management/utils/i-16-from-hex.d.ts.map +1 -1
  640. package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts +1 -1
  641. package/lib/typescript/module/src/modules/bt-management/utils/le-32-from-hex.d.ts.map +1 -1
  642. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts +3 -0
  643. package/lib/typescript/module/src/modules/bt-management/utils/tenths-mmol-to-mg-per-dl.d.ts.map +1 -0
  644. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-provider.d.ts.map +1 -1
  645. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts +2 -2
  646. package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-authorization-utils.d.ts.map +1 -1
  647. package/lib/typescript/module/src/modules/data-sync/constants.d.ts +3 -1
  648. package/lib/typescript/module/src/modules/data-sync/constants.d.ts.map +1 -1
  649. package/lib/typescript/module/src/modules/data-sync/hooks/use-listen-changes.d.ts.map +1 -1
  650. package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
  651. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
  652. package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
  653. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +4 -7
  654. package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
  655. package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +3 -1
  656. package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
  657. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +2 -2
  658. package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
  659. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +11 -1
  660. package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
  661. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +1 -1
  662. package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
  663. package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts +6 -0
  664. package/lib/typescript/module/src/modules/data-sync/utils/convert-ecg-samples-to-observation.d.ts.map +1 -0
  665. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +1 -1
  666. package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -1
  667. package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
  668. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts +10 -0
  669. package/lib/typescript/module/src/modules/data-sync/utils/default-health-coding.d.ts.map +1 -0
  670. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +1 -1
  671. package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
  672. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +12 -46
  673. package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
  674. package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
  675. package/lib/typescript/module/src/modules/data-sync/utils/health-data-catalog.d.ts.map +1 -1
  676. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts +2 -2
  677. package/lib/typescript/module/src/modules/data-sync/utils/health-units.d.ts.map +1 -1
  678. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts +10 -0
  679. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-daily-statistics.d.ts.map +1 -0
  680. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts +5 -5
  681. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-data-types.d.ts.map +1 -1
  682. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts +7 -0
  683. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-query-options.d.ts.map +1 -0
  684. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts +8 -0
  685. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-sample-source.d.ts.map +1 -0
  686. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts +30 -0
  687. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-samples.d.ts.map +1 -0
  688. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts +2 -2
  689. package/lib/typescript/module/src/modules/data-sync/utils/healthkit-series.d.ts.map +1 -1
  690. package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts +1 -0
  691. package/lib/typescript/module/src/modules/data-sync/utils/to-core-health-observations.d.ts.map +1 -1
  692. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts +12 -1
  693. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/built-in-devices.d.ts.map +1 -1
  694. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts +2 -1
  695. package/lib/typescript/module/src/modules/next/bluetooth/ble-plx/legacy-driver.d.ts.map +1 -1
  696. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts +13 -1
  697. package/lib/typescript/module/src/modules/next/bluetooth/connections.d.ts.map +1 -1
  698. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts +20 -0
  699. package/lib/typescript/module/src/modules/next/bluetooth/driver.d.ts.map +1 -1
  700. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts +1 -1
  701. package/lib/typescript/module/src/modules/next/bluetooth/errors.d.ts.map +1 -1
  702. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts +2 -1
  703. package/lib/typescript/module/src/modules/next/bluetooth/index.d.ts.map +1 -1
  704. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts +3 -2
  705. package/lib/typescript/module/src/modules/next/bluetooth/readings.d.ts.map +1 -1
  706. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts +19 -1
  707. package/lib/typescript/module/src/modules/next/bluetooth/runtime.d.ts.map +1 -1
  708. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts +33 -1
  709. package/lib/typescript/module/src/modules/next/bluetooth/snapshot.d.ts.map +1 -1
  710. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts +1 -0
  711. package/lib/typescript/module/src/modules/next/bluetooth/web/index.d.ts.map +1 -1
  712. package/package.json +8 -3
@@ -16,7 +16,7 @@ const STATUSES = {
16
16
  };
17
17
 
18
18
  /** Runs a device class from `@ovok/native/bt-management` until its protocol moves to a `DeviceProtocol`. */
19
- const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
19
+ const legacyDriver = (creator, deviceName, recordCursorStorage) => (peripheral, signal) => {
20
20
  const stop = () => events.end();
21
21
  const events = new _channel.Channel(() => {
22
22
  signal.removeEventListener("abort", stop);
@@ -25,17 +25,19 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
25
25
  const managed = creator.createDevice({
26
26
  device: (0, _blePeripheral.bleDeviceOf)(peripheral),
27
27
  deviceName,
28
+ recordCursorStorage,
28
29
  onResult: ({
29
30
  id,
30
31
  data
31
- }) => {
32
+ }) => new Promise(delivered => {
32
33
  const reading = data;
33
34
  events.push({
34
35
  kind: "reading",
35
36
  id: (0, _driver.isTimestamped)(reading) ? id : null,
36
- reading
37
+ reading,
38
+ delivered
37
39
  });
38
- },
40
+ }),
39
41
  onDeviceStatusChanged: ({
40
42
  status
41
43
  }) => {
@@ -55,8 +57,40 @@ const legacyDriver = (creator, deviceName) => (peripheral, signal) => {
55
57
  }) => events.push({
56
58
  kind: "error",
57
59
  error: (0, _bleErrors.fromBleError)(error)
58
- })
60
+ }),
61
+ onWaveform: ({
62
+ samples,
63
+ sampleRateHz,
64
+ millivoltsPerCount,
65
+ at
66
+ }) => events.push({
67
+ kind: "waveform",
68
+ waveform: {
69
+ samples,
70
+ sampleRateHz,
71
+ millivoltsPerCount,
72
+ at
73
+ }
74
+ }),
75
+ onConnectionEvent: ({
76
+ kind,
77
+ recording
78
+ }) => {
79
+ if (kind === "recording") {
80
+ events.push({
81
+ kind: "recording",
82
+ recording: recording ?? null,
83
+ stop: () => managed.stopRecording()
84
+ });
85
+ }
86
+ }
59
87
  });
88
+ if (managed.readsHistoryOnRequest) {
89
+ events.push({
90
+ kind: "history",
91
+ sync: () => managed.syncHistory()
92
+ });
93
+ }
60
94
  signal.addEventListener("abort", stop, {
61
95
  once: true
62
96
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_blePeripheral","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;AAKA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,MAAMK,QAAmF,GAAG;EAC1F,CAACC,0BAAY,CAACC,SAAS,GAAG,WAAW;EACrC,CAACD,0BAAY,CAACE,SAAS,GAAG,WAAW;EACrC,CAACF,0BAAY,CAACG,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CAACC,OAAiD,EAAEC,UAAqB,KAC5F,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAIE,gBAAO,CAAc,MAAM;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AAC,IAAAL,uBAAY,EAACD,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOpB,MAAM;AACf,CAAC;AAAC2B,OAAA,CAAAjC,YAAA,GAAAA,YAAA","ignoreList":[]}
1
+ {"version":3,"names":["_deviceStatus","require","_channel","_driver","_bleErrors","_blePeripheral","STATUSES","DeviceStatus","CONNECTED","MEASURING","DISCONNECTED","legacyDriver","creator","deviceName","recordCursorStorage","peripheral","signal","stop","events","end","Channel","removeEventListener","managed","disconnect","createDevice","device","bleDeviceOf","onResult","id","data","Promise","delivered","reading","push","kind","isTimestamped","onDeviceStatusChanged","status","mapped","onError","error","fromBleError","onWaveform","samples","sampleRateHz","millivoltsPerCount","at","waveform","onConnectionEvent","recording","stopRecording","readsHistoryOnRequest","sync","syncHistory","addEventListener","once","connect","catch","fail","exports"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/ble-plx/legacy-driver.ts"],"mappings":";;;;;;AAMA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,MAAMK,QAAmF,GAAG;EAC1F,CAACC,0BAAY,CAACC,SAAS,GAAG,WAAW;EACrC,CAACD,0BAAY,CAACE,SAAS,GAAG,WAAW;EACrC,CAACF,0BAAY,CAACG,YAAY,GAAG;AAC/B,CAAC;;AAED;AACA,MAAMC,YAAY,GAAGA,CACnBC,OAAiD,EACjDC,UAAqB,EACrBC,mBAA2C,KAE3C,CAACC,UAAU,EAAEC,MAAM,KAAK;EACtB,MAAMC,IAAI,GAAGA,CAAA,KAAMC,MAAM,CAACC,GAAG,CAAC,CAAC;EAE/B,MAAMD,MAAM,GAAG,IAAIE,gBAAO,CAAc,MAAM;IAC5CJ,MAAM,CAACK,mBAAmB,CAAC,OAAO,EAAEJ,IAAI,CAAC;IACzC,KAAKK,OAAO,CAACC,U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CAAC,CAAC;IAChGE,iBAAiB,EAAEA,CAAC;MAAEd,IAAI;MAAEe;IAAU,CAAC,KAAK;MAC1C,IAAIf,IAAI,KAAK,WAAW,EAAE;QACxBhB,MAAM,CAACe,IAAI,CAAC;UAAEC,IAAI,EAAE,WAAW;UAAEe,SAAS,EAAEA,SAAS,IAAI,IAAI;UAAEhC,IAAI,EAAEA,CAAA,KAAMK,OAAO,CAAC4B,aAAa,CAAC;QAAE,CAAC,CAAC;MACvG;IACF;EACF,CAAC,CAAC;EAEF,IAAI5B,OAAO,CAAC6B,qBAAqB,EAAE;IACjCjC,MAAM,CAACe,IAAI,CAAC;MAAEC,IAAI,EAAE,SAAS;MAAEkB,IAAI,EAAEA,CAAA,KAAM9B,OAAO,CAAC+B,WAAW,CAAC;IAAE,CAAC,CAAC;EACrE;EAEArC,MAAM,CAACsC,gBAAgB,CAAC,OAAO,EAAErC,IAAI,EAAE;IAAEsC,IAAI,EAAE;EAAK,CAAC,CAAC;EACtDjC,OAAO,CAACkC,OAAO,CAAC,CAAC,CAACC,KAAK,CAAEjB,KAAc,IAAKtB,MAAM,CAACwC,IAAI,CAAC,IAAAjB,uBAAY,EAACD,KAAK,CAAC,CAAC,CAAC;EAE7E,OAAOtB,MAAM;AACf,CAAC;AAACyC,OAAA,CAAAhD,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -11,11 +11,14 @@ const endedBeforeConnecting = () => new _errors.BluetoothError("connection-faile
11
11
  /** One driver run per connected device, its events folded into the snapshot. */
12
12
  class Connections {
13
13
  sessions = new Map();
14
- constructor(store, readings, policy, onEnded) {
14
+ recordingStops = new Map();
15
+ historySyncs = new Map();
16
+ constructor(store, readings, policy, onEnded, onWaveform) {
15
17
  this.store = store;
16
18
  this.readings = readings;
17
19
  this.policy = policy;
18
20
  this.onEnded = onEnded;
21
+ this.onWaveform = onWaveform;
19
22
  }
20
23
  isActive(id) {
21
24
  return this.sessions.has(id);
@@ -36,6 +39,26 @@ class Connections {
36
39
  await session?.ended;
37
40
  }
38
41
 
42
+ /**
43
+ * Stops the recording a connected device holds open.
44
+ *
45
+ * @throws BluetoothError `no-open-recording` when the device holds none.
46
+ */
47
+ async stopRecording(id) {
48
+ const stop = this.recordingStops.get(id);
49
+ if (!stop || !this.store.device(id)?.recording) {
50
+ throw new _errors.BluetoothError("no-open-recording", "The device holds no open recording to stop");
51
+ }
52
+ await stop().catch(error => {
53
+ throw (0, _errors.asBluetoothError)(error, "no-open-recording");
54
+ });
55
+ }
56
+
57
+ /** Reads the records a connected device stored, when it keeps them until asked. */
58
+ async syncHistory(id) {
59
+ await this.historySyncs.get(id)?.();
60
+ }
61
+
39
62
  /** Disconnects every device; resolves once every connection has ended. */
40
63
  async disconnectAll() {
41
64
  await Promise.all([...this.sessions.keys()].map(id => this.disconnect(id)));
@@ -71,6 +94,11 @@ class Connections {
71
94
  failConnecting(failure);
72
95
  }).finally(() => {
73
96
  this.sessions.delete(id);
97
+ this.recordingStops.delete(id);
98
+ this.historySyncs.delete(id);
99
+ this.store.updateDevice(id, {
100
+ recording: undefined
101
+ });
74
102
  this.onEnded(id);
75
103
  });
76
104
  const session = {
@@ -98,10 +126,25 @@ class Connections {
98
126
  this.store.updateDevice(id, {
99
127
  information: event.information
100
128
  });
129
+ } else if (event.kind === "waveform") {
130
+ this.onWaveform({
131
+ deviceId: id,
132
+ ...event.waveform
133
+ });
134
+ } else if (event.kind === "recording") {
135
+ this.recordingStops.set(id, event.stop);
136
+ this.store.updateDevice(id, {
137
+ recording: event.recording ?? undefined
138
+ });
139
+ } else if (event.kind === "history") {
140
+ this.historySyncs.set(id, event.sync);
141
+ this.store.updateDevice(id, {
142
+ readsHistoryOnRequest: true
143
+ });
101
144
  } else if (event.kind === "reading") {
102
145
  const device = this.store.device(id);
103
146
  if (device) {
104
- this.readings.receive(device, event.id, event.reading);
147
+ this.readings.receive(device, event.id, event.reading, event.delivered);
105
148
  }
106
149
  } else {
107
150
  this.store.updateDevice(id, {
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","_resultPolicy","endedBeforeConnecting","BluetoothError","Connections","sessions","Map","constructor","store","readings","policy","onEnded","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","error","run","then","catch","failure","asBluetoothError","finally","delete","set","event","keepReadings","apply","kind","status","information","device","receive","reading","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/connections.ts"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAMA,MAAME,qBAAqB,GAAGA,CAAA,KAC5B,IAAIC,sBAAc,CAAC,mBAAmB,EAAE,6CAA6C,CAAC;;AAExF;AACA,MAAMC,WAAW,CAAC;EACCC,QAAQ,GAAG,IAAIC,GAAG,CAAkB,CAAC;EAE/CC,WAAWA,CACCC,KAAoB,EACpBC,QAAoB,EACpBC,MAAoB,EACpBC,OAA6B,EAC9C;IAAA,KAJiBH,KAAoB,GAApBA,KAAoB;IAAA,KACpBC,QAAoB,GAApBA,QAAoB;IAAA,KACpBC,MAAoB,GAApBA,MAAoB;IAAA,KACpBC,OAA6B,GAA7BA,OAA6B;EAC7C;EAEIC,QAAQA,CAACC,EAAU,EAAW;IACnC,OAAO,IAAI,CAACR,QAAQ,CAACS,GAAG,CAACD,EAAE,CAAC;EAC9B;;EAEA;EACA,MAAaE,OAAOA,CAACC,UAAsB,EAAEC,MAAc,EAAiB;IAC1E,MAAMC,OAAO,GAAG,IAAI,CAACb,QAAQ,CAACc,GAAG,CAACH,UAAU,CAACH,EAAE,CAAC;IAEhD,IAAIK,OAAO,EAAEE,UAAU,CAACC,MAAM,CAACC,OAAO,EAAE;MACtC,MAAMJ,OAAO,CAACK,KAAK;MAEnB,OAAO,IAAI,CAACR,OAAO,CAACC,UAAU,EAAEC,MAAM,CAAC;IACzC;IAEA,OAAO,CAACC,O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,EAAE;MAC3B,IAAIH,KAAK,CAACI,MAAM,KAAK,cAAc,EAAE;QACnC9B,SAAS,CAAC,CAAC;MACb;MACA,IAAI,CAACjB,KAAK,CAACgC,YAAY,CAAC3B,EAAE,EAAE;QAAE4B,UAAU,EAAEU,KAAK,CAACI;MAAO,CAAC,CAAC;IAC3D,CAAC,MAAM,IAAIJ,KAAK,CAACG,IAAI,KAAK,aAAa,EAAE;MACvC,IAAI,CAAC9C,KAAK,CAACgC,YAAY,CAAC3B,EAAE,EAAE;QAAE2C,WAAW,EAAEL,KAAK,CAACK;MAAY,CAAC,CAAC;IACjE,CAAC,MAAM,IAAIL,KAAK,CAACG,IAAI,KAAK,SAAS,EAAE;MACnC,MAAMG,MAAM,GAAG,IAAI,CAACjD,KAAK,CAACiD,MAAM,CAAC5C,EAAE,CAAC;MAEpC,IAAI4C,MAAM,EAAE;QACV,IAAI,CAAChD,QAAQ,CAACiD,OAAO,CAACD,MAAM,EAAEN,KAAK,CAACtC,EAAE,EAAEsC,KAAK,CAACQ,OAAO,CAAC;MACxD;IACF,CAAC,MAAM;MACL,IAAI,CAACnD,KAAK,CAACgC,YAAY,CAAC3B,EAAE,EAAE;QAAE6B,KAAK,EAAES,KAAK,CAACT;MAAM,CAAC,CAAC;IACrD;EACF;AACF;AAACkB,OAAA,CAAAxD,WAAA,GAAAA,WAAA","ignoreList":[]}
1
+ {"version":3,"names":["_errors","require","_resultPolicy","endedBeforeConnecting","BluetoothError","Connections","sessions","Map","recordingStops","historySyncs","constructor","store","readings","policy","onEnded","onWaveform","isActive","id","has","connect","peripheral","driver","current","get","controller","signal","aborted","ended","start","connected","disconnect","session","abort","stopRecording","stop","device","recording","catch","error","asBluetoothError","syncHistory","disconnectAll","Promise","all","keys","map","AbortController","markConnected","undefined","failConnecting","resolve","reject","updateDevice","connection","run","then","failure","finally","delete","set","event","keepReadings","apply","kind","status","information","deviceId","waveform","sync","readsHistoryOnRequest","receive","reading","delivered","exports"],"sourceRoot":"../../../../../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AACG,IAAI,KAAK,WAAW,EAAE;MACrC,IAAI,CAACvD,cAAc,CAACmD,GAAG,CAAC1C,EAAE,EAAE2C,KAAK,CAAC1B,IAAI,CAAC;MACvC,IAAI,CAACvB,KAAK,CAACyC,YAAY,CAACnC,EAAE,EAAE;QAAEmB,SAAS,EAAEwB,KAAK,CAACxB,SAAS,IAAIY;MAAU,CAAC,CAAC;IAC1E,CAAC,MAAM,IAAIY,KAAK,CAACG,IAAI,KAAK,SAAS,EAAE;MACnC,IAAI,CAACtD,YAAY,CAACkD,GAAG,CAAC1C,EAAE,EAAE2C,KAAK,CAACQ,IAAI,CAAC;MACrC,IAAI,CAACzD,KAAK,CAACyC,YAAY,CAACnC,EAAE,EAAE;QAAEoD,qBAAqB,EAAE;MAAK,CAAC,CAAC;IAC9D,CAAC,MAAM,IAAIT,KAAK,CAACG,IAAI,KAAK,SAAS,EAAE;MACnC,MAAM5B,MAAM,GAAG,IAAI,CAACxB,KAAK,CAACwB,MAAM,CAAClB,EAAE,CAAC;MAEpC,IAAIkB,MAAM,EAAE;QACV,IAAI,CAACvB,QAAQ,CAAC0D,OAAO,CAACnC,MAAM,EAAEyB,KAAK,CAAC3C,EAAE,EAAE2C,KAAK,CAACW,OAAO,EAAEX,KAAK,CAACY,SAAS,CAAC;MACzE;IACF,CAAC,MAAM;MACL,IAAI,CAAC7D,KAAK,CAACyC,YAAY,CAACnC,EAAE,EAAE;QAAEqB,KAAK,EAAEsB,KAAK,CAACtB;MAAM,CAAC,CAAC;IACrD;EACF;AACF;AAACmC,OAAA,CAAApE,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_stableHash","require","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","exports","readingId","key","peripheral","stableHash","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;;;;;AAIA,IAAAA,WAAA,GAAAC,O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MH,IAAI,CAACM,KAAK,CAAC,CAAC;EACpB;AACF,CAAC;AAACf,OAAA,CAAAM,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_stableHash","require","isTimestamped","reading","temporal","recordedAt","start","end","some","value","Date","exports","readingId","key","peripheral","stableHash","id","gattDriver","protocol","signal","link","openLink","kind","status","deviceInformation","information","close"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/driver.ts"],"mappings":";;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AAGA;;AAoEA;;AAGA;;AAGA;AACA,MAAMC,aAAa,GAAIC,OAAoB,IAAc;EACvD,MAAMC,QAAQ,GAAGD,OAAmE;EAEpF,OAAO,CAACC,QAAQ,CAACC,UAAU,EAAED,QAAQ,CAACE,KAAK,EAAEF,QAAQ,CAACG,GAAG,CAAC,CAACC,IAAI,CAAEC,KAAK,IAAKA,KAAK,YAAYC,IAAI,CAAC;AACnG,CAAC;;AAED;AAAAC,OAAA,CAAAT,aAAA,GAAAA,aAAA;AACA,MAAMU,SAAS,GAAGA,CAACC,GAAW,EAAEC,UAAsB,EAAEX,OAAoB,KAC1ED,aAAa,CAACC,OAAO,CAAC,GAAG,QAAQ,IAAAY,sBAAU,EAAC;EAAEF,GAAG;EAAEC,UAAU,EAAEA,UAAU,CAACE,EAAE;EAAEb;AAAQ,CAAC,CAAC,EAAE,GAAG,IAAI;;AAEnG;AACA,MAAMc,UAAU,GAAGA,CAACJ,GAAW,EAAEK,QAAwB,KACvD,iBAAiBJ,UAAU,EAAEK,MAAM,EAAE;EACnC,MAAMC,IAAI,GAAG,MAAMN,UAAU,CAACO,QAAQ,CAACF,MAAM,CAAC;EAE9C,IAAI;IACF,MAAM;MAAEG,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAY,CAAC;IAC7C,IAAIH,IAAI,CAACI,iBAAiB,EAAE;MAC1B,MAAM;QAAEF,IAAI,EAAE,aAAa;QAAEG,WAAW,EAAEL,IAAI,CAACI;MAAkB,CAAC;IACpE;IACA,WAAW,MAAMrB,OAAO,IAAIe,QAAQ,CAACE,IAAI,CAAC,EAAE;MAC1C,MAAM;QAAEE,IAAI,EAAE,SAAS;QAAEN,EAAE,EAAEJ,SAAS,CAACC,GAAG,EAAEC,UAAU,EAAEX,OAAO,CAAC;QAAEA;MAAQ,CAAC;IAC7E;IACA,MAAM;MAAEmB,IAAI,EAAE,QAAQ;MAAEC,MAAM,EAAE;IAAe,CAAC;EAClD,CAAC,SAAS;IACR,MAAMH,IAAI,CAACM,KAAK,CAAC,CAAC;EACpB;AACF,CAAC;AAACf,OAAA,CAAAM,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","exports","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;;;;;AAAA;;AAiBA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EACjC;EACgBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CAEhB;EACgBC,IAAwB,EACxCC,OAAe,EACfC,KAAe,EACf;IACA,KAAK,CAACD,OAAO,EAAE;MAAEC;IAAM,CAAC,CAAC;IAAC,KAJVF,IAAwB,GAAxBA,IAAwB;EAK1C;AACF;;AAEA;AAAAG,OAAA,CAAAP,cAAA,GAAAA,cAAA;AACA,MAAMQ,gBAAgB,GAAGA,CAACC,KAAc,EAAEL,IAAwB,KAChEK,KAAK,YAAYT,cAAc,GAC3BS,KAAK,GACL,IAAIT,cAAc,CAACI,IAAI,EAAEK,KAAK,YAAYR,KAAK,GAAGQ,KAAK,CAACJ,OAAO,GAAGK,MAAM,CAACD,KAAK,CAAC,EAAEA,KAAK,CAAC;AAACF,OAAA,CAAAC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["BluetoothError","Error","name","constructor","code","message","cause","exports","asBluetoothError","error","String"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/errors.ts"],"mappings":";;;;;;AAAA;;AAkBA;AACA,MAAMA,cAAc,SAASC,KAAK,CAAC;EACjC;EACgBC,IAAI,GAAG,gBAAgB;EAEhCC,WAAWA,CAEhB;EACgBC,IAAwB,EACxCC,OAAe,EACfC,KAAe,EACf;IACA,KAAK,CAACD,OAAO,EAAE;MAAEC;IAAM,CAAC,CAAC;IAAC,KAJVF,IAAwB,GAAxBA,IAAwB;EAK1C;AACF;;AAEA;AAAAG,OAAA,CAAAP,cAAA,GAAAA,cAAA;AACA,MAAMQ,gBAAgB,GAAGA,CAACC,KAAc,EAAEL,IAAwB,KAChEK,KAAK,YAAYT,cAAc,GAC3BS,KAAK,GACL,IAAIT,cAAc,CAACI,IAAI,EAAEK,KAAK,YAAYR,KAAK,GAAGQ,KAAK,CAACJ,OAAO,GAAGK,MAAM,CAACD,KAAK,CAAC,EAAEA,KAAK,CAAC;AAACF,OAAA,CAAAC,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_runtime","require","_errors","_devices","_resultPolicy","_sigProfiles","_bleScanner","_builtInDevices","_integratedDevices","_osPermissions","_ovokSink","_createBluetoothRuntime","_context","_hooks","_bluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AASA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AAGA,IAAAW,QAAA,GAAAX,OAAA;AAEA,IAAAY,MAAA,GAAAZ,OAAA;AASA,IAAAa,sBAAA,GAAAb,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_runtime","require","_errors","_devices","_resultPolicy","_sigProfiles","_bleScanner","_builtInDevices","_integratedDevices","_osPermissions","_ovokSink","_createBluetoothRuntime","_context","_hooks","_bluetoothDevicePicker"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAOA,IAAAE,QAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AASA,IAAAI,YAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAN,OAAA;AAEA,IAAAO,kBAAA,GAAAP,OAAA;AAEA,IAAAQ,cAAA,GAAAR,OAAA;AACA,IAAAS,SAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AAGA,IAAAW,QAAA,GAAAX,OAAA;AAEA,IAAAY,MAAA,GAAAZ,OAAA;AASA,IAAAa,sBAAA,GAAAb,OAAA","ignoreList":[]}
@@ -14,14 +14,15 @@ const saveFailed = error => new _errors.BluetoothError("save-failed", error inst
14
14
  /** Keeps the recent readings, each resend once, and saves every new one through the sink. */
15
15
  class ReadingLog {
16
16
  recent = new Set();
17
+ awaitingDelivery = new Map();
17
18
  sequence = 0;
18
19
  constructor(store, sink) {
19
20
  this.store = store;
20
21
  this.sink = sink;
21
22
  }
22
23
 
23
- /** `id` is `null` for a reading that cannot be recognised when resent. */
24
- receive(device, id, measurement) {
24
+ /** `id` is `null` for a reading that cannot be recognised when resent; `delivered` is called once it is saved or queued. */
25
+ receive(device, id, measurement, delivered) {
25
26
  if (id !== null && !this.remember(id)) {
26
27
  return;
27
28
  }
@@ -43,6 +44,9 @@ class ReadingLog {
43
44
  this.store.set({
44
45
  readings: [...this.store.get().readings, reading].slice(-KEPT_READINGS)
45
46
  });
47
+ if (delivered) {
48
+ this.awaitingDelivery.set(reading.id, delivered);
49
+ }
46
50
  void this.save(reading);
47
51
  }
48
52
 
@@ -83,6 +87,10 @@ class ReadingLog {
83
87
  status: "failed",
84
88
  error: saveFailed(error)
85
89
  }));
90
+ if (save.status !== "failed") {
91
+ this.awaitingDelivery.get(reading.id)?.();
92
+ this.awaitingDelivery.delete(reading.id);
93
+ }
86
94
  this.store.updateReadings(current => current.id === reading.id ? {
87
95
  ...current,
88
96
  save
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","BluetoothError","Error","message","String","ReadingLog","recent","Set","sequence","constructor","store","sink","receive","device","id","measurement","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAKA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIC,sBAAc,CAAC,aAAa,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAA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AC,CAAC,CAACC,KAAe,CAAC;IACjE;IAEA,OAAO,IAAI;EACb;EAEA,MAAcvB,IAAIA,CAACL,OAAsB,EAAiB;IACxD,MAAMK,IAAe,GAAG,MAAM,IAAI,CAACb,IAAI,CAACa,IAAI,CAACL,OAAO,CAAC,CAAC6B,IAAI,CACvDC,MAAkB,IAAgBA,MAAM,EACxCjD,KAAc,KAAiB;MAAEyB,MAAM,EAAE,QAAQ;MAAEzB,KAAK,EAAED,UAAU,CAACC,KAAK;IAAE,CAAC,CAChF,CAAC;IAED,IAAI,CAACU,KAAK,CAACuB,cAAc,CAAEiB,OAAO,IAAMA,OAAO,CAACpC,EAAE,KAAKK,OAAO,CAACL,EAAE,GAAG;MAAE,GAAGoC,OAAO;MAAE1B;IAAK,CAAC,GAAG0B,OAAQ,CAAC;EACtG;AACF;AAACC,OAAA,CAAA9C,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_errors","require","KEPT_READINGS","RECOGNISED_READINGS","saveFailed","error","BluetoothError","Error","message","String","ReadingLog","recent","Set","awaitingDelivery","Map","sequence","constructor","store","sink","receive","device","id","measurement","delivered","remember","receivedAt","Date","reading","getTime","key","name","information","save","status","set","readings","get","slice","retrySaves","failed","filter","updateReadings","includes","Promise","all","map","flushed","flushQueued","has","queueId","add","size","delete","values","next","value","then","result","current","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/readings.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AAKA,MAAMC,aAAa,GAAG,GAAG;;AAEzB;AACA,MAAMC,mBAAmB,GAAG,KAAK;AAEjC,MAAMC,UAAU,GAAIC,KAAc,IAChC,IAAIC,sBAAc,CAAC,aAAa,EAAED,KAAK,YAAYE,KAAK,GAAGF,KAAK,CAACG,OAAO,GAAGC,MAAM,CAACJ,KAAK,CAAC,EAAEA,KAAK,CAAC;;AAElG;AACA,MAAMK,UAAU,CAAC;EACEC,MAAM,GAAG,IAAIC,GAAG,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M,CAAC,IAAI,CAACzC,MAAM,CAAC0C,MAAM,CAAC,CAAC,CAACC,IAAI,CAAC,CAAC,CAACC,KAAe,CAAC;IACjE;IAEA,OAAO,IAAI;EACb;EAEA,MAAcvB,IAAIA,CAACL,OAAsB,EAAiB;IACxD,MAAMK,IAAe,GAAG,MAAM,IAAI,CAACd,IAAI,CAACc,IAAI,CAACL,OAAO,CAAC,CAAC6B,IAAI,CACvDC,MAAkB,IAAgBA,MAAM,EACxCpD,KAAc,KAAiB;MAAE4B,MAAM,EAAE,QAAQ;MAAE5B,KAAK,EAAED,UAAU,CAACC,KAAK;IAAE,CAAC,CAChF,CAAC;IAED,IAAI2B,IAAI,CAACC,MAAM,KAAK,QAAQ,EAAE;MAC5B,IAAI,CAACpB,gBAAgB,CAACuB,GAAG,CAACT,OAAO,CAACN,EAAE,CAAC,GAAG,CAAC;MACzC,IAAI,CAACR,gBAAgB,CAACuC,MAAM,CAACzB,OAAO,CAACN,EAAE,CAAC;IAC1C;IAEA,IAAI,CAACJ,KAAK,CAACwB,cAAc,CAAEiB,OAAO,IAAMA,OAAO,CAACrC,EAAE,KAAKM,OAAO,CAACN,EAAE,GAAG;MAAE,GAAGqC,OAAO;MAAE1B;IAAK,CAAC,GAAG0B,OAAQ,CAAC;EACtG;AACF;AAACC,OAAA,CAAAjD,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -13,6 +13,8 @@ var _readings = require("./readings.js");
13
13
  var _resultPolicy = require("./result-policy.js");
14
14
  var _scanLoop = require("./scan-loop.js");
15
15
  var _store = require("./store.js");
16
+ /* eslint-disable max-lines */
17
+
16
18
  /** What a `BluetoothRuntime` is built from. */
17
19
 
18
20
  /**
@@ -25,12 +27,13 @@ class BluetoothRuntime {
25
27
  held = new Set();
26
28
  backoff = new _autoConnect.AutoConnectBackoff();
27
29
  retryTimers = new Set();
30
+ waveformListeners = new Set();
28
31
  scanRequest = 0;
29
32
  disposed = false;
30
33
  constructor(options) {
31
34
  this.options = options;
32
35
  this.readings = new _readings.ReadingLog(this.store, options.sink);
33
- this.connections = new _connections.Connections(this.store, this.readings, options.resultPolicy ?? _resultPolicy.everyReading, id => this.connectionEnded(id));
36
+ this.connections = new _connections.Connections(this.store, this.readings, options.resultPolicy ?? _resultPolicy.everyReading, id => this.connectionEnded(id), waveform => this.waveformListeners.forEach(listener => listener(waveform)));
34
37
  this.paired = new _paired.PairedDevices(paired => this.store.set({
35
38
  paired
36
39
  }), options.pairedStorage);
@@ -50,6 +53,12 @@ class BluetoothRuntime {
50
53
  /** Calls `listener` after every state change; returns the unsubscribe. */
51
54
  subscribe = listener => this.store.subscribe(listener);
52
55
 
56
+ /** Calls `listener` with the live ECG samples of recording devices, for display; returns the unsubscribe. */
57
+ subscribeWaveform = listener => {
58
+ this.waveformListeners.add(listener);
59
+ return () => this.waveformListeners.delete(listener);
60
+ };
61
+
53
62
  /** Reads the permission without prompting. */
54
63
  async checkPermission() {
55
64
  return this.recordPermission(await this.options.permissions.check());
@@ -109,6 +118,33 @@ class BluetoothRuntime {
109
118
  await this.connections.connect(peripheral, match.driver);
110
119
  }
111
120
 
121
+ /**
122
+ * Stops the recording a connected recorder holds open, for instance once the user confirms it while
123
+ * its `recording.leadOffSince` is set. The stored recording then arrives as a reading.
124
+ *
125
+ * @throws BluetoothError `no-open-recording` when the device holds none; `runtime-disposed` after `dispose`.
126
+ */
127
+ async stopRecording(deviceId) {
128
+ this.assertLive();
129
+ await this.connections.stopRecording(deviceId);
130
+ }
131
+
132
+ /**
133
+ * Reads the records a device stored, connecting it first when it is not connected. One that
134
+ * `readsHistoryOnRequest` reads them over its connection, even while it measures; any other is
135
+ * reconnected, since it reads them each time it connects.
136
+ *
137
+ * @throws BluetoothError as `connect` does; `runtime-disposed` after `dispose`.
138
+ */
139
+ async syncHistory(deviceId) {
140
+ this.assertLive();
141
+ if (this.connections.isActive(deviceId) && !this.store.device(deviceId)?.readsHistoryOnRequest) {
142
+ await this.disconnect(deviceId);
143
+ }
144
+ await this.connect(deviceId);
145
+ await this.connections.syncHistory(deviceId);
146
+ }
147
+
112
148
  /** Disconnects a device; a paired one stays disconnected until `connect` or `pair` is called again. */
113
149
  async disconnect(deviceId) {
114
150
  this.held.add(deviceId);
@@ -1 +1 @@
1
- {"version":3,"names":["_autoConnect","require","_connections","_devices","_errors","_paired","_readings","_resultPolicy","_scanLoop","_store","BluetoothRuntime","store","SnapshotStore","known","Map","held","Set","backoff","AutoConnectBackoff","retryTimers","scanRequest","disposed","constructor","options","readings","ReadingLog","sink","connections","Connections","resultPolicy","everyReading","id","connectionEnded","paired","PairedDevices","set","pairedStorage","scan","ScanLoop","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","listener","recordPermission","permissions","check","requestPermission","request","openPermissionSettings","openSettings","startScan","assertLive","permission","BluetoothError","scanning","stopScan","connect","deviceId","match","delete","driver","disconnect","add","pair","forget","remove","retrySaves","dispose","close","forEach","clearTimeout","disconnectAll","matchDevice","devices","advertisement","device","key","name","connection","error","connectIfPaired","waiting","has","isActive","allows","succeeded","restartScan","timer","setTimeout","failed","running","restart","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/runtime.ts"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAGA,IAAAQ,MAAA,GAAAR,OAAA;AAGA;;AAwBA;AACA;AACA;AACA;AACA,MAAMS,gBAAgB,CAAC;EACJC,KAAK,GAAG,IAAIC,oBAAa,CAAC,CAAC;EAC3BC,KAAK,GAAG,IAAIC,GAAG,CAAsB,CAAC;EACtCC,IAAI,GAAG,IAAIC,GAAG,CA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AAE,CAAC,CAAC;IAE3B,IAAI,CAACZ,WAAW,CAACqD,GAAG,CAACyB,KAAK,CAAC;EAC7B;EAEQD,WAAWA,CAAA,EAAS;IAC1B,IAAI,IAAI,CAAC3D,IAAI,CAAC+D,OAAO,EAAE;MACrB,IAAI,CAAC/D,IAAI,CAACgE,OAAO,CAAC,CAAC;IACrB;EACF;EAEQpG,OAAOA,CAACkE,QAAgB,EAAe;IAC7C,MAAMkB,MAAM,GAAG,IAAI,CAACxE,KAAK,CAACqC,GAAG,CAACiB,QAAQ,CAAC;IAEvC,IAAI,CAACkB,MAAM,EAAE;MACX,MAAM,IAAItB,sBAAc,CAAC,kBAAkB,EAAE,aAAaI,QAAQ,wBAAwB,CAAC;IAC7F;IAEA,OAAOkB,MAAM;EACf;EAEQxB,UAAUA,CAAA,EAAS;IACzB,IAAI,IAAI,CAACxC,QAAQ,EAAE;MACjB,MAAM,IAAI0C,sBAAc,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;IACpF;EACF;AACF;AAACuC,OAAA,CAAA5F,gBAAA,GAAAA,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_autoConnect","require","_connections","_devices","_errors","_paired","_readings","_resultPolicy","_scanLoop","_store","BluetoothRuntime","store","SnapshotStore","known","Map","held","Set","backoff","AutoConnectBackoff","retryTimers","waveformListeners","scanRequest","disposed","constructor","options","readings","ReadingLog","sink","connections","Connections","resultPolicy","everyReading","id","connectionEnded","waveform","forEach","listener","paired","PairedDevices","set","pairedStorage","scan","ScanLoop","scanner","peripheral","found","unwatchAdapter","watchState","adapter","sync","checkPermission","catch","undefined","getSnapshot","get","subscribe","subscribeWaveform","add","delete","recordPermission","permissions","check","requestPermission","request","openPermissionSettings","openSettings","startScan","assertLive","permission","BluetoothError","scanning","stopScan","connect","deviceId","match","driver","stopRecording","syncHistory","isActive","device","readsHistoryOnRequest","disconnect","pair","forget","remove","retrySaves","dispose","close","clearTimeout","disconnectAll","matchDevice","devices","advertisement","key","name","connection","error","connectIfPaired","waiting","has","allows","succeeded","restartScan","timer","setTimeout","failed","running","restart","exports"],"sourceRoot":"../../../../../src","sources":["modules/next/bluetooth/runtime.ts"],"mappings":";;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAGA,IAAAQ,MAAA,GAAAR,OAAA;AAdA;;AAiBA;;AAwBA;AACA;AACA;AACA;AACA,MAAMS,gBAAgB,CAAC;EACJC,KAAK,GAAG,IAAIC,oBAAa,CAAC,CAAC;EAC3BC,KAAK,GAAG,IAAIC,GAAG,CAAsB,CAAC;EACtCC,IAAI,GAAG,IAAIC,GAAG,CAAS,CAAC;EACxBC,OAAO,GAAG,IAAIC,+BAAkB,CAAC,CAAC;EAClCC,WAAW,GAAG,IAAIH,GAAG,CAAgC,CAAC;EACtDI,iBAAiB,GAAG,IAAIJ,GAAG,CAAqC,CAAC;EAM1EK,WAAW,GAAG,CAAC;EACfC,QAAQ,GAAG,KAAK;EAEjBC,WAAWA,CAAkBC,OAAgC,EAAE;IAAA,KAAlCA,OAAgC,GAAhCA,OAAgC;IAClE,IAAI,CAACC,QAAQ,GAAG,IAAIC,oBAAU,CAAC,IAAI,CAACf,KAAK,EAAEa,OAAO,CAACG,IAAI,CAAC;IACxD,IAAI,CAACC,WAAW,GAAG,IAAIC,wBAAW,CAChC,IAAI,CAAClB,KAAK,EACV,IAAI,CAACc,QAAQ,EACbD,OAAO,CAACM,YAAY,IAAIC,0BAAY,EACnCC,EAAE,IAAK,IAAI,CAACC,eAAe,CAACD,EAAE,CAAC,EAC/BE,QAAQ,IAAK,IAAI,CAACd,iBAAiB,CAACe,OAAO,CAAEC,QAAQ,IA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EAAE,CAAC,EAAE+D,UAAU,KAAK,QAAQ,EAAE;MAClD,IAAI,CAAC9E,OAAO,CAACoF,SAAS,CAACrE,EAAE,CAAC;MAC1B,IAAI,CAACsE,WAAW,CAAC,CAAC;MAElB;IACF;IAEA,MAAMC,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC7B,IAAI,CAACrF,WAAW,CAACuC,MAAM,CAAC6C,KAAK,CAAC;MAC9B,IAAI,CAACD,WAAW,CAAC,CAAC;IACpB,CAAC,EAAE,IAAI,CAACrF,OAAO,CAACwF,MAAM,CAACzE,EAAE,CAAC,CAAC;IAE3B,IAAI,CAACb,WAAW,CAACsC,GAAG,CAAC8C,KAAK,CAAC;EAC7B;EAEQD,WAAWA,CAAA,EAAS;IAC1B,IAAI,IAAI,CAAC7D,IAAI,CAACiE,OAAO,EAAE;MACrB,IAAI,CAACjE,IAAI,CAACkE,OAAO,CAAC,CAAC;IACrB;EACF;EAEQ1G,OAAOA,CAACwE,QAAgB,EAAe;IAC7C,MAAMM,MAAM,GAAG,IAAI,CAAClE,KAAK,CAACyC,GAAG,CAACmB,QAAQ,CAAC;IAEvC,IAAI,CAACM,MAAM,EAAE;MACX,MAAM,IAAIV,sBAAc,CAAC,kBAAkB,EAAE,aAAaI,QAAQ,wBAAwB,CAAC;IAC7F;IAEA,OAAOM,MAAM;EACf;EAEQZ,UAAUA,CAAA,EAAS;IACzB,IAAI,IAAI,CAAC7C,QAAQ,EAAE;MACjB,MAAM,IAAI+C,sBAAc,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;IACpF;EACF;AACF;AAACuC,OAAA,CAAAlG,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_createWebBluetoothRuntime","require","_webBluetoothScanner","_webBluetoothPermissions","_webBluetoothServices","_runtime","_errors","_devices","_resultPolicy","_sigProfiles","_builtInDevices","_integratedDevices","_supportedDevices","_deviceQuery","_ovokSink","_context","_hooks"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,0BAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AACA,IAAAU,kBAAA,GAAAV,OAAA;AAEA,IAAAW,iBAAA,GAAAX,OAAA;AAEA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AAEA,IAAAe,MAAA,GAAAf,OAAA","ignoreList":[]}
1
+ {"version":3,"names":["_createWebBluetoothRuntime","require","_webBluetoothScanner","_webBluetoothPermissions","_webBluetoothServices","_runtime","_errors","_devices","_resultPolicy","_sigProfiles","_builtInDevices","_integratedDevices","_supportedDevices","_deviceQuery","_ovokSink","_context","_hooks"],"sourceRoot":"../../../../../../src","sources":["modules/next/bluetooth/web/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAAA,0BAAA,GAAAC,OAAA;AAEA,IAAAC,oBAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAEA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AAMA,IAAAM,QAAA,GAAAN,OAAA;AAIA,IAAAO,aAAA,GAAAP,OAAA;AASA,IAAAQ,YAAA,GAAAR,OAAA;AACA,IAAAS,eAAA,GAAAT,OAAA;AAEA,IAAAU,kBAAA,GAAAV,OAAA;AAEA,IAAAW,iBAAA,GAAAX,OAAA;AAEA,IAAAY,YAAA,GAAAZ,OAAA;AACA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,QAAA,GAAAd,OAAA;AAEA,IAAAe,MAAA,GAAAf,OAAA","ignoreList":[]}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ import { GOOGLE_ANSWER_KEY, GOOGLE_REQUEST_KEY } from "../sign-in/utils/google-redirect-sign-in.js";
4
+
5
+ /**
6
+ * The page Google returns to when `GoogleLogin` signs in on the web.
7
+ *
8
+ * Serve it as a static file at the redirect URI, by default `/oauth/google.html`. It keeps Google's answer
9
+ * for this tab and sends the tab back to the sign-in screen, so the token never stays in the address.
10
+ */
11
+ export const GOOGLE_RETURN_PAGE_HTML = `<!doctype html>
12
+ <meta charset="utf-8">
13
+ <title>Signing in</title>
14
+ <script>
15
+ var request = JSON.parse(sessionStorage.getItem("${GOOGLE_REQUEST_KEY}") || "{}");
16
+ var target = new URL(request.returnTo || "/", location.origin);
17
+ sessionStorage.setItem("${GOOGLE_ANSWER_KEY}", location.hash.slice(1));
18
+ location.replace(target.origin === location.origin ? target.href : "/");
19
+ </script>
20
+ `;
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GOOGLE_ANSWER_KEY","GOOGLE_REQUEST_KEY","GOOGLE_RETURN_PAGE_HTML"],"sourceRoot":"../../../../../src","sources":["modules/auth/google-return-page/index.ts"],"mappings":";;AAAA,SACEA,iBAAiB,EACjBC,kBAAkB,QACb,6CAA0C;;AAEjD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,uBAA+B,GAAG;AAC/C;AACA;AACA;AACA,qDAAqDD,kBAAkB;AACvE;AACA,4BAA4BD,iBAAiB;AAC7C;AACA;AACA,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ import { useAuthAction } from "./use-auth-action.js";
4
+ const NOT_ON_THE_WEB = "useSocialSignIn is not available on the web; render SignIn.SocialLogins.GoogleLogin or AppleLogin instead";
5
+
6
+ /** Rejects: the web signs in through the `SignIn.SocialLogins` buttons, which leave and return to the page. */
7
+ export const useSocialSignIn = _options => useAuthAction(async () => {
8
+ throw new Error(NOT_ON_THE_WEB);
9
+ });
10
+ //# sourceMappingURL=use-social-sign-in.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useAuthAction","NOT_ON_THE_WEB","useSocialSignIn","_options","Error"],"sourceRoot":"../../../../../src","sources":["modules/auth/hooks/use-social-sign-in.web.ts"],"mappings":";;AAGA,SAASA,aAAa,QAAQ,sBAAmB;AAEjD,MAAMC,cAAc,GAClB,2GAA2G;;AAE7G;AACA,OAAO,MAAMC,eAAe,GAAIC,QAA6B,IAC3DH,aAAa,CAAC,YAA8B;EAC1C,MAAM,IAAII,KAAK,CAACH,cAAc,CAAC;AACjC,CAAC,CAAC","ignoreList":[]}
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import "./default-translation.js";
11
11
  export * from "./sign-in/index.js";
12
+ export * from "./google-return-page/index.js";
12
13
  export * from "./register/index.js";
13
14
  export * from "./profile/index.js";
14
15
  export * from "./delete-account-button/index.js";
@@ -18,7 +19,7 @@ export * from "./hooks/use-rate-limit-cooldown.js";
18
19
  export * from "./hooks/use-auth-action.js";
19
20
  export * from "./hooks/use-sign-in.js";
20
21
  export * from "./hooks/use-accept-invite-link.js";
21
- export * from "./hooks/use-social-sign-in.js";
22
+ export * from "./hooks/use-social-sign-in";
22
23
  export * from "./hooks/use-sign-out.js";
23
24
  export * from "./hooks/use-delete-account.js";
24
25
  export * from "./utils/rate-limit.js";
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,+BAA4B;AAC1C,cAAc,yBAAsB;AACpC,cAAc,+BAA4B;AAC1C,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,oBAAW","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["modules/auth/index.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,0BAAuB;AAE9B,cAAc,oBAAW;AACzB,cAAc,+BAAsB;AACpC,cAAc,qBAAY;AAC1B,cAAc,oBAAW;AACzB,cAAc,kCAAyB;AACvC,cAAc,0BAAiB;AAC/B,cAAc,2BAAkB;AAChC,cAAc,oCAAiC;AAC/C,cAAc,4BAAyB;AACvC,cAAc,wBAAqB;AACnC,cAAc,mCAAgC;AAC9C,cAAc,4BAA4B;AAC1C,cAAc,yBAAsB;AACpC,cAAc,+BAA4B;AAC1C,cAAc,uBAAoB;AAClC,cAAc,0BAAuB;AACrC,cAAc,wBAAqB;AACnC,cAAc,oBAAW","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { signOutGoogleIfNeeded } from "../utils/sign-out-google.js";
3
+ import { signOutGoogleIfNeeded } from "../utils/sign-out-google";
4
4
  const logoutRequests = new WeakMap();
5
5
  const logoutInProgress = new WeakSet();
6
6
  const isLogoutInProgress = client => logoutInProgress.has(client);
@@ -1 +1 @@
1
- {"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,6BAA0B;AAEhE,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAAY,IAAoB;EACrD,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,IAAI,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,cAAc,CAACgB,MAAM,CAACR,GAAG,CAAC;IAC1BN,gBAAgB,CAACc,MAAM,CAACR,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACiB,GAAG,CAACT,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["signOutGoogleIfNeeded","logoutRequests","WeakMap","logoutInProgress","WeakSet","isLogoutInProgress","client","has","logoutSession","key","pending","get","add","request","auth","logout","finally","delete","set"],"sourceRoot":"../../../../../src","sources":["modules/auth/session/logout-session.ts"],"mappings":";;AAEA,SAASA,qBAAqB,QAAQ,0BAA0B;AAEhE,MAAMC,cAAc,GAAG,IAAIC,OAAO,CAAwB,CAAC;AAC3D,MAAMC,gBAAgB,GAAG,IAAIC,OAAO,CAAS,CAAC;AAE9C,MAAMC,kBAAkB,GAAIC,MAAc,IACxCH,gBAAgB,CAACI,GAAG,CAACD,MAAM,CAAC;;AAE9B;AACA,MAAME,aAAa,GAAIF,MAAY,IAAoB;EACrD,MAAMG,GAAG,GAAGH,MAAgB;EAC5B,MAAMI,OAAO,GAAGT,cAAc,CAACU,GAAG,CAACF,GAAG,CAAC;EAEvC,IAAIC,OAAO,EAAE;IACX,OAAOA,OAAO;EAChB;EAEAP,gBAAgB,CAACS,GAAG,CAACH,GAAG,CAAC;EAEzB,MAAMI,OAAO,GAAG,CAAC,YAAY;IAC3B,IAAI;MACF,MAAMP,MAAM,CAACQ,IAAI,CAACC,MAAM,CAAC,CAAC;IAC5B,CAAC,SAAS;MACR,MAAMf,qBAAqB,CAAC,CAAC;IAC/B;EACF,CAAC,EAAE,CAAC,CAACgB,OAAO,CAAC,MAAM;IACjBf,cAAc,CAACgB,MAAM,CAACR,GAAG,CAAC;IAC1BN,gBAAgB,CAACc,MAAM,CAACR,GAAG,CAAC;EAC9B,CAAC,CAAC;EAEFR,cAAc,CAACiB,GAAG,CAACT,GAAG,EAAEI,OAAO,CAAC;EAEhC,OAAOA,OAAO;AAChB,CAAC;AAED,SAASR,kBAAkB,EAAEG,aAAa","ignoreList":[]}
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+
3
+ import { useOvok } from "@ovok/core/next/react";
4
+ import * as React from "react";
5
+ import { parseSignInError } from "../../../utils/sign-in-error.js";
6
+ import { isAppleCancel, loadAppleScript, signInWithApple } from "../../utils/apple-web-sign-in.js";
7
+ import { SocialLoginButton } from "./social-login-button.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const AppleServicesLoginButton = ({
10
+ appleServicesId,
11
+ appleRedirectUri,
12
+ internalId,
13
+ onSuccess,
14
+ onError,
15
+ testID,
16
+ style,
17
+ disabled,
18
+ children,
19
+ ...props
20
+ }) => {
21
+ const client = useOvok();
22
+ const [isLoading, setIsLoading] = React.useState(false);
23
+ const handleAppleLogin = React.useCallback(async () => {
24
+ try {
25
+ setIsLoading(true);
26
+ const credentials = await signInWithApple({
27
+ servicesId: appleServicesId,
28
+ redirectUri: appleRedirectUri
29
+ });
30
+ const loginResponse = await client.auth.socialLogin("apple", {
31
+ ...credentials,
32
+ internalId
33
+ });
34
+ onSuccess?.(loginResponse);
35
+ } catch (cause) {
36
+ if (!isAppleCancel(cause)) {
37
+ onError?.(parseSignInError(cause).error);
38
+ }
39
+ } finally {
40
+ setIsLoading(false);
41
+ }
42
+ }, [appleRedirectUri, appleServicesId, client, internalId, onError, onSuccess]);
43
+
44
+ // Browsers only open the popup right after a tap, so Apple's script is loaded before one.
45
+ React.useEffect(() => {
46
+ loadAppleScript().catch(() => undefined);
47
+ }, []);
48
+ return /*#__PURE__*/_jsx(SocialLoginButton, {
49
+ ...props,
50
+ backgroundColor: "#000",
51
+ style: style,
52
+ disabled: disabled || isLoading,
53
+ onPress: handleAppleLogin,
54
+ testID: testID,
55
+ children: children
56
+ });
57
+ };
58
+
59
+ /** Sign in with Apple in a popup, for the Services ID registered for this site; renders nothing without one. */
60
+ export const AppleLoginButton = ({
61
+ appleServicesId,
62
+ ...props
63
+ }) => appleServicesId ? /*#__PURE__*/_jsx(AppleServicesLoginButton, {
64
+ ...props,
65
+ appleServicesId: appleServicesId
66
+ }) : null;
67
+ //# sourceMappingURL=apple-login-button.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useOvok","React","parseSignInError","isAppleCancel","loadAppleScript","signInWithApple","SocialLoginButton","jsx","_jsx","AppleServicesLoginButton","appleServicesId","appleRedirectUri","internalId","onSuccess","onError","testID","style","disabled","children","props","client","isLoading","setIsLoading","useState","handleAppleLogin","useCallback","credentials","servicesId","redirectUri","loginResponse","auth","socialLogin","cause","error","useEffect","catch","undefined","backgroundColor","onPress","AppleLoginButton"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login-button.web.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,uBAAuB;AAC/C,OAAO,KAAKC,KAAK,MAAM,OAAO;AAE9B,SAASC,gBAAgB,QAAQ,iCAA8B;AAE/D,SACEC,aAAa,EACbC,eAAe,EACfC,eAAe,QACV,kCAA+B;AAEtC,SAASC,iBAAiB,QAAQ,0BAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM1D,MAAMC,wBAAwB,GAAGA,CAAC;EAChCC,eAAe;EACfC,gBAAgB;EAChBC,UAAU;EACVC,SAAS;EACTC,OAAO;EACPC,MAAM;EACNC,KAAK;EACLC,QAAQ;EACRC,QAAQ;EACR,GAAGC;AAC6C,CAAC,KAAK;EACtD,MAAMC,MAAM,GAAGpB,OAAO,CAAC,CAAC;EAExB,MAAM,CAACqB,SAAS,EAAEC,YAAY,CAAC,GAAGrB,KAAK,CAACsB,QAAQ,CAAC,KAAK,CAAC;EAEvD,MAAMC,gBAAgB,GAAGvB,KAAK,CAACwB,WAAW,CAAC,YAAY;IACrD,IAAI;MACFH,YAAY,CAAC,IAAI,CAAC;MAElB,MAAMI,WAAW,GAAG,MAAMrB,eAAe,CAAC;QACxCsB,UAAU,EAAEjB,eAAe;QAC3BkB,WAAW,EAAEjB;MACf,CAAC,CAAC;MAEF,MAAMkB,aAAa,GAAG,MAAMT,MAAM,CAACU,IAAI,CAACC,WAAW,CAAC,OAAO,EAAE;QAAE,GAAGL,WAAW;QAAEd;MAAW,CAAC,CAAC;MAE5FC,SAAS,GAAGgB,aAAa,CAAC;IAC5B,CAAC,CAAC,OAAOG,KAAK,EAAE;MACd,IAAI,CAAC7B,aAAa,CAAC6B,KAAK,CAAC,EAAE;QACzBlB,OAAO,GAAGZ,gBAAgB,CAAC8B,KAAK,CAAC,CAACC,KAAK,CAAC;MAC1C;IACF,CAAC,SAAS;MACRX,YAAY,CAAC,KAAK,CAAC;IACrB;EACF,CAAC,EAAE,CAACX,gBAAgB,EAAED,eAAe,EAAEU,MAAM,EAAER,UAAU,EAAEE,OAAO,EAAED,SAAS,CAAC,CAAC;;EAE/E;EACAZ,KAAK,CAACiC,SAAS,CAAC,MAAM;IACpB9B,eAAe,CAAC,CAAC,CAAC+B,KAAK,CAAC,MAAMC,SAAS,CAAC;EAC1C,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE5B,IAAA,CAACF,iBAAiB;IAAA,GACZa,KAAK;IACTkB,eAAe,EAAC,MAAM;IACtBrB,KAAK,EAAEA,KAAM;IACbC,QAAQ,EAAEA,QAAQ,IAAII,SAAU;IAChCiB,OAAO,EAAEd,gBAAiB;IAC1BT,MAAM,EAAEA,MAAO;IAAAG,QAAA,EAEdA;EAAQ,CACQ,CAAC;AAExB,CAAC;;AAED;AACA,OAAO,MAAMqB,gBAAgB,GAAGA,CAAC;EAC/B7B,eAAe;EACf,GAAGS;AACqC,CAAC,KACzCT,eAAe,gBACbF,IAAA,CAACC,wBAAwB;EAAA,GAAKU,KAAK;EAAET,eAAe,EAAEA;AAAgB,CAAE,CAAC,GACvE,IAAI","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- import { AppleLoginButton } from "./apple-login-button.js";
3
+ import { AppleLoginButton } from "./apple-login-button";
4
4
  import { AppleLoginIcon } from "./apple-login-icon.js";
5
5
  import { AppleLoginText } from "./apple-login-text.js";
6
6
 
@@ -1 +1 @@
1
- {"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,yBAAsB;AACvD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,cAAc,QAAQ,uBAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACL,gBAAgB,EAAE;EACxD;EACAM,IAAI,EAAEL,cAAc;EAEpB;EACAM,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["AppleLoginButton","AppleLoginIcon","AppleLoginText","AppleLogin","Object","assign","Icon","Text"],"sourceRoot":"../../../../../../../src","sources":["modules/auth/sign-in/components/social-logins/apple-login.tsx"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,sBAAsB;AACvD,SAASC,cAAc,QAAQ,uBAAoB;AACnD,SAASC,cAAc,QAAQ,uBAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACL,gBAAgB,EAAE;EACxD;EACAM,IAAI,EAAEL,cAAc;EAEpB;EACAM,IAAI,EAAEL;AACR,CAAC,CAAC","ignoreList":[]}