@ovok/native 1.10.9 → 1.10.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js +16 -1
- package/lib/commonjs/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-aoj-variants.js +137 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +227 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +95 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +149 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js +1001 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1093 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js +312 -0
- package/lib/commonjs/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +75 -9
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +2 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js +112 -0
- package/lib/commonjs/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js +252 -0
- package/lib/commonjs/modules/bt-management/constants/device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js +190 -0
- package/lib/commonjs/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js +9 -1
- package/lib/commonjs/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js +80 -0
- package/lib/commonjs/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js +115 -0
- package/lib/commonjs/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js +802 -0
- package/lib/commonjs/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js +890 -0
- package/lib/commonjs/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
- package/lib/commonjs/modules/bt-management/index.js +20 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
- package/lib/commonjs/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js +7 -1
- package/lib/commonjs/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js +22 -1
- package/lib/commonjs/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/device-secrets.js +68 -0
- package/lib/commonjs/modules/bt-management/services/device-secrets.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js +41 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js +45 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +140 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +138 -0
- package/lib/commonjs/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
- package/lib/commonjs/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js +4 -4
- package/lib/commonjs/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +12 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +12 -4
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js +49 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +163 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +95 -0
- package/lib/commonjs/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js +40 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js +162 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js +63 -0
- package/lib/commonjs/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js +56 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js +67 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js +60 -0
- package/lib/commonjs/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js +85 -0
- package/lib/commonjs/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
- package/lib/commonjs/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +13 -2
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +153 -0
- package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js +71 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +112 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js +132 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +145 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js +91 -0
- package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js +15 -0
- package/lib/commonjs/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +5 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js +16 -1
- package/lib/module/modules/bt-device/constants/device-instruction-pdfs.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-aoj-variants.js +135 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-aoj-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js +15 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-assets.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js +3 -2
- package/lib/module/modules/bt-device/constants/supported-device-catalog-entries.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js +225 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-famidoc-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js +93 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-joytech-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js +147 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-jumper-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js +999 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-standard-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js +1091 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-transtek-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js +309 -0
- package/lib/module/modules/bt-device/constants/supported-device-catalog-variants.js.map +1 -0
- package/lib/module/modules/bt-device/constants/supported-devices.js +76 -10
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +2 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/aoj-device-variants.js +110 -0
- package/lib/module/modules/bt-management/constants/aoj-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/device-variants.js +249 -0
- package/lib/module/modules/bt-management/constants/device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/famidoc-device-variants.js +188 -0
- package/lib/module/modules/bt-management/constants/famidoc-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js +9 -1
- package/lib/module/modules/bt-management/constants/integrated-devices-map.js.map +1 -1
- package/lib/module/modules/bt-management/constants/joytech-device-variants.js +78 -0
- package/lib/module/modules/bt-management/constants/joytech-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/jumper-device-variants.js +113 -0
- package/lib/module/modules/bt-management/constants/jumper-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js +799 -0
- package/lib/module/modules/bt-management/constants/standard-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/constants/transtek-device-variants.js +888 -0
- package/lib/module/modules/bt-management/constants/transtek-device-variants.js.map +1 -0
- package/lib/module/modules/bt-management/index.js +2 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js +15 -0
- package/lib/module/modules/bt-management/services/background-sync/background-service-uuids.js.map +1 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js +7 -1
- package/lib/module/modules/bt-management/services/custom/define-custom-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-classes.js +22 -1
- package/lib/module/modules/bt-management/services/device-classes.js.map +1 -1
- package/lib/module/modules/bt-management/services/device-secrets.js +59 -0
- package/lib/module/modules/bt-management/services/device-secrets.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js +37 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-70b.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js +41 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js +123 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js +134 -0
- package/lib/module/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js +24 -1
- package/lib/module/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +27 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js +4 -4
- package/lib/module/modules/bt-management/services/devices/bt-data-processor.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +12 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +12 -4
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js +45 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js +149 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js +91 -0
- package/lib/module/modules/bt-management/services/devices/famidoc/famidoc.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js +36 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js +150 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js +60 -0
- package/lib/module/modules/bt-management/services/devices/joytech/joytech.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js +52 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js +62 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js +57 -0
- package/lib/module/modules/bt-management/services/devices/jumper/jumper.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js +79 -0
- package/lib/module/modules/bt-management/services/devices/live-oximeter.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js +22 -8
- package/lib/module/modules/bt-management/services/devices/polling-command-sequencer.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js +6 -2
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js +149 -0
- package/lib/module/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js +67 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.device.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js +94 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.protocol.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js +125 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.records.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js +142 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js +85 -0
- package/lib/module/modules/bt-management/services/devices/transtek/transtek-command.session.js.map +1 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js +2 -0
- package/lib/module/modules/bt-management/types/custom-device-definition.js.map +1 -1
- package/lib/module/modules/bt-management/types/device-measurement-map.js.map +1 -1
- package/lib/module/modules/bt-management/types/integrated-devices.js +15 -0
- package/lib/module/modules/bt-management/types/integrated-devices.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +5 -1
- package/lib/module/modules/bt-management/utils/device-title.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/aoj-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/joytech-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts +7 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts +4 -2
- package/lib/typescript/commonjs/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts +5 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-data.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts +15 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/service.type.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/service.type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +2 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/device-instruction-pdfs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-aoj-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts +15 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-assets.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-entries.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-famidoc-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-joytech-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-jumper-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-standard-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-transtek-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-device-catalog-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/aoj-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/aoj-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/constants/device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/famidoc-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/integrated-devices-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/joytech-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/joytech-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/constants/jumper-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/constants/standard-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts +10 -0
- package/lib/typescript/module/src/modules/bt-management/constants/transtek-device-variants.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-service-uuids.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/custom/define-custom-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/device-classes.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/device-secrets.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-70b.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts +54 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts +36 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/aoj/aoj-bp.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/blood-glucose/blood-glucose.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts +3 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts +3 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts +56 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts +34 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/famidoc/famidoc.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts +16 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts +43 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts +23 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/joytech/joytech.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts +18 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts +32 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts +22 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/jumper/jumper.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/live-oximeter.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts +4 -2
- package/lib/typescript/module/src/modules/bt-management/services/devices/polling-command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts +7 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts +21 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts +51 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts +33 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.records.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts +49 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts +39 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/transtek/transtek-command.session.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts +4 -2
- package/lib/typescript/module/src/modules/bt-management/types/command-sequencer.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-service-spec.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts +5 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-data.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts +15 -0
- package/lib/typescript/module/src/modules/bt-management/types/device-measurement-map.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts +16 -1
- package/lib/typescript/module/src/modules/bt-management/types/integrated-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/service.type.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/types/service.type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/write-characteristic.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +2 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_standardGattProfile","pulseAfterMeanPressure","fields","littleEndian","minLengthBytes","pulseAfterTimestamp","standardBloodPressureDevice","params","declareProfile","decorateReading","reading","frame","recordOffset","decorated","decorateBloodPressureReading","service","characteristic","measurementTypeKey","MeasurementTypeKey","bloodPressure","selectors","optionalFields","exports","standardThermometerDevice","temperature","fieldsBySelector","scale","offset","decimals","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","Array","from","length","_","flags","toString","padStart","Object","fromEntries","selector","standardPulseOximeterDevice","bloodOxygenPulseRate","standardHeartRateDevice","heartRate","filter","map","name","byteIndexes","encoding","unit","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_core","require","_standardGattGlucose","_standardGattProfile","pulseAfterMeanPressure","fields","littleEndian","minLengthBytes","pulseAfterTimestamp","standardBloodPressureDevice","params","declareProfile","decorateReading","reading","frame","recordOffset","decorated","decorateBloodPressureReading","service","characteristic","measurementTypeKey","MeasurementTypeKey","bloodPressure","selectors","optionalFields","exports","standardThermometerDevice","temperature","fieldsBySelector","scale","offset","decimals","WEIGHT_KG_PER_COUNT","standardWeightScaleDevice","bodyWeight","Array","from","length","_","flags","toString","padStart","Object","fromEntries","selector","standardPulseOximeterDevice","bloodOxygenPulseRate","standardHeartRateDevice","heartRate","filter","map","name","byteIndexes","encoding","unit","byteOrder"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.devices.ts"],"mappings":";;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,oBAAA,GAAAD,OAAA;AACA,IAAAE,oBAAA,GAAAF,OAAA;AAPA;;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,sBAAsB,GAAG;EAC7BC,MAAM,EAAE,CAAC,IAAAC,iCAAY,EAAC,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;EAC5DC,cAAc,EA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C;IACnBG,SAAS,EAAE,QAAiB;IAC5BF,QAAQ,EAAE,MAAe;IACzBC,IAAI,EAAE;EACR,CAAC,CACF,CACF,CACL,CAAC;EACD9B,cAAc,EAAEkB,MAAM,CAACC,WAAW,CAChCR,KAAK,CAACC,IAAI,CAAC;IAAEC,MAAM,EAAE;EAAG,CAAC,EAAE,CAACC,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAAC,CAC5CU,MAAM,CAAEV,KAAK,IAAK,CAACA,KAAK,GAAG,IAAI,MAAM,IAAI,CAAC,CAC1CU,MAAM,CAAEV,KAAK,IAAK,CAACA,KAAK,GAAG,IAAI,MAAM,IAAI,CAAC,CAC1CW,GAAG,CAAEX,KAAK,IAAK,CAACA,KAAK,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE;IACpDpC,MAAM,EAAE,EAAE;IACVE,cAAc,EAAE;EAClB,CAAC,CAAC,CACN;AACF,CAAC,CAAC;AAACkB,OAAA,CAAAsB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.js
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.standardGlucoseDevice = exports.recordedAtFromGlucoseFrame = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _defineCustomDevice = require("../../custom/define-custom-device.js");
|
|
9
|
+
var _standardGattProfile = require("./standard-gatt.profile.js");
|
|
10
|
+
/**
|
|
11
|
+
* Glucose Service 0x1808: Glucose Measurement 0x2A18 and the Record Access Control Point
|
|
12
|
+
* 0x2A52.
|
|
13
|
+
*
|
|
14
|
+
* A glucose meter does not push its readings. The collector enables indications on the
|
|
15
|
+
* control point, writes "report all stored records" (`01 01`) once, and the meter answers
|
|
16
|
+
* with one Glucose Measurement per stored record followed by a control-point response
|
|
17
|
+
* (`06 00 01 xx`). Every record is reported; the SDK's stable result identity keeps a
|
|
18
|
+
* record seen on an earlier connection from becoming a second reading.
|
|
19
|
+
*
|
|
20
|
+
* Glucose Measurement layout: flags, sequence number (2), base time (7), time offset (2,
|
|
21
|
+
* flag bit 0), concentration SFLOAT (2) and type/sample-location (1) (bit 1), sensor status
|
|
22
|
+
* (2, bit 3). Bit 2 picks the unit: kg/L, or mol/L. Both are converted to mg/dL.
|
|
23
|
+
*/
|
|
24
|
+
const MG_PER_DL_PER_KG_PER_L = 100_000;
|
|
25
|
+
|
|
26
|
+
/** One mol/L of glucose (180.16 g/mol) is 18,016 mg/dL. */
|
|
27
|
+
const MG_PER_DL_PER_MOL_PER_L = 18_016;
|
|
28
|
+
const FLAG_TIME_OFFSET = 0x01;
|
|
29
|
+
const FLAG_CONCENTRATION = 0x02;
|
|
30
|
+
const FLAG_MOL_PER_L = 0x04;
|
|
31
|
+
const BASE_TIME_INDEX = 3;
|
|
32
|
+
const TIME_OFFSET_INDEX = 10;
|
|
33
|
+
|
|
34
|
+
/** Type 0xA and sample location 0x4 both mean a control-solution test, not a patient sample. */
|
|
35
|
+
const CONTROL_SOLUTION_TYPE = 0x0a;
|
|
36
|
+
const CONTROL_SOLUTION_LOCATION = 0x04;
|
|
37
|
+
const REPORT_ALL_STORED_RECORDS = "0101";
|
|
38
|
+
const concentrationIndex = flags => flags & FLAG_TIME_OFFSET ? TIME_OFFSET_INDEX + 2 : TIME_OFFSET_INDEX;
|
|
39
|
+
const selector = flags => flags.toString(16).padStart(2, "0");
|
|
40
|
+
|
|
41
|
+
/** Bits 5-7 are reserved; a meter that sets one still sends a readable record. */
|
|
42
|
+
const ALL_FLAGS = Array.from({
|
|
43
|
+
length: 256
|
|
44
|
+
}, (_, flags) => flags);
|
|
45
|
+
const glucoseField = flags => {
|
|
46
|
+
const index = concentrationIndex(flags);
|
|
47
|
+
return {
|
|
48
|
+
...(0, _standardGattProfile.littleEndian)("bloodGlucose", [index, index + 1], "mg/dL", "sfloat"),
|
|
49
|
+
scale: flags & FLAG_MOL_PER_L ? MG_PER_DL_PER_MOL_PER_L : MG_PER_DL_PER_KG_PER_L,
|
|
50
|
+
decimals: 0
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
const byte = (frame, index) => {
|
|
54
|
+
const value = Number.parseInt(frame[index] ?? "", 16);
|
|
55
|
+
return Number.isInteger(value) ? value : undefined;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
/** The record's own time: the base time plus its offset in minutes, read as phone-local. */
|
|
59
|
+
const recordedAtFromGlucoseFrame = frame => {
|
|
60
|
+
const parts = Array.from({
|
|
61
|
+
length: 7
|
|
62
|
+
}, (_, i) => byte(frame, BASE_TIME_INDEX + i));
|
|
63
|
+
const flags = byte(frame, 0);
|
|
64
|
+
if (flags === undefined || parts.some(part => part === undefined)) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
const [yearLow, yearHigh, month, day, hour, minute, second] = parts;
|
|
68
|
+
const year = yearLow | yearHigh << 8;
|
|
69
|
+
const recordedAt = new Date(year, month - 1, day, hour, minute, second);
|
|
70
|
+
|
|
71
|
+
// A field out of range (hour 24, minute 60) would roll the Date over into a plausible wrong time.
|
|
72
|
+
if (recordedAt.getFullYear() !== year || recordedAt.getMonth() !== month - 1 || recordedAt.getDate() !== day || recordedAt.getHours() !== hour || recordedAt.getMinutes() !== minute || recordedAt.getSeconds() !== second) {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
if (flags & FLAG_TIME_OFFSET) {
|
|
76
|
+
const low = byte(frame, TIME_OFFSET_INDEX);
|
|
77
|
+
const high = byte(frame, TIME_OFFSET_INDEX + 1);
|
|
78
|
+
if (low === undefined || high === undefined) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
const offsetMinutes = (high << 8 | low) << 16 >> 16;
|
|
82
|
+
recordedAt.setMinutes(recordedAt.getMinutes() + offsetMinutes);
|
|
83
|
+
}
|
|
84
|
+
return recordedAt;
|
|
85
|
+
};
|
|
86
|
+
exports.recordedAtFromGlucoseFrame = recordedAtFromGlucoseFrame;
|
|
87
|
+
const isControlSolution = frame => {
|
|
88
|
+
const flags = byte(frame, 0) ?? 0;
|
|
89
|
+
const typeAndLocation = byte(frame, concentrationIndex(flags) + 2);
|
|
90
|
+
return typeAndLocation !== undefined && ((typeAndLocation & 0x0f) === CONTROL_SOLUTION_TYPE || typeAndLocation >> 4 === CONTROL_SOLUTION_LOCATION);
|
|
91
|
+
};
|
|
92
|
+
const standardGlucoseDevice = params => (0, _defineCustomDevice.defineCustomDevice)({
|
|
93
|
+
id: params.id ?? `standard-${_core.MeasurementTypeKey.bloodGlucose}`,
|
|
94
|
+
nameMatch: params.nameMatch,
|
|
95
|
+
matchByService: params.nameMatch === undefined,
|
|
96
|
+
oneReadingPerConnection: params.oneReadingPerConnection,
|
|
97
|
+
stuckDataTimeoutMs: params.stuckDataTimeoutMs ?? 60_000,
|
|
98
|
+
services: [{
|
|
99
|
+
uuid: (0, _standardGattProfile.sigUuid)("1808"),
|
|
100
|
+
monitor: [{
|
|
101
|
+
uuid: (0, _standardGattProfile.sigUuid)("2a18"),
|
|
102
|
+
frame: {
|
|
103
|
+
minLengthBytes: TIME_OFFSET_INDEX
|
|
104
|
+
},
|
|
105
|
+
caseSelectorBytes: [0],
|
|
106
|
+
cases: ALL_FLAGS.map(flags => flags & FLAG_CONCENTRATION ? {
|
|
107
|
+
selector: selector(flags),
|
|
108
|
+
kind: "result",
|
|
109
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodGlucose,
|
|
110
|
+
fields: [glucoseField(flags)],
|
|
111
|
+
minLengthBytes: concentrationIndex(flags) + 3
|
|
112
|
+
} : {
|
|
113
|
+
selector: selector(flags),
|
|
114
|
+
kind: "idle",
|
|
115
|
+
description: "A record without a concentration"
|
|
116
|
+
})
|
|
117
|
+
}, {
|
|
118
|
+
uuid: (0, _standardGattProfile.sigUuid)("2a52"),
|
|
119
|
+
frame: {
|
|
120
|
+
minLengthBytes: 2
|
|
121
|
+
},
|
|
122
|
+
caseSelectorBytes: [0],
|
|
123
|
+
cases: [{
|
|
124
|
+
selector: "05",
|
|
125
|
+
kind: "idle",
|
|
126
|
+
description: "Number of stored records"
|
|
127
|
+
}, {
|
|
128
|
+
selector: "06",
|
|
129
|
+
kind: "idle",
|
|
130
|
+
description: "Record access response"
|
|
131
|
+
}]
|
|
132
|
+
}],
|
|
133
|
+
write: {
|
|
134
|
+
uuid: (0, _standardGattProfile.sigUuid)("2a52"),
|
|
135
|
+
commandHex: REPORT_ALL_STORED_RECORDS,
|
|
136
|
+
when: "connect"
|
|
137
|
+
}
|
|
138
|
+
}]
|
|
139
|
+
}, {
|
|
140
|
+
decorateReading: (reading, frame, recordOffset) => {
|
|
141
|
+
if (frame && isControlSolution(frame)) {
|
|
142
|
+
return null;
|
|
143
|
+
}
|
|
144
|
+
const recordedAt = frame ? recordedAtFromGlucoseFrame(frame) : undefined;
|
|
145
|
+
const decorated = recordedAt ? {
|
|
146
|
+
...reading,
|
|
147
|
+
recordedAt
|
|
148
|
+
} : reading;
|
|
149
|
+
return params.decorateReading ? params.decorateReading(decorated, frame, recordOffset) : decorated;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
exports.standardGlucoseDevice = standardGlucoseDevice;
|
|
153
|
+
//# sourceMappingURL=standard-gatt.glucose.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_defineCustomDevice","_standardGattProfile","MG_PER_DL_PER_KG_PER_L","MG_PER_DL_PER_MOL_PER_L","FLAG_TIME_OFFSET","FLAG_CONCENTRATION","FLAG_MOL_PER_L","BASE_TIME_INDEX","TIME_OFFSET_INDEX","CONTROL_SOLUTION_TYPE","CONTROL_SOLUTION_LOCATION","REPORT_ALL_STORED_RECORDS","concentrationIndex","flags","selector","toString","padStart","ALL_FLAGS","Array","from","length","_","glucoseField","index","littleEndian","scale","decimals","byte","frame","value","Number","parseInt","isInteger","undefined","recordedAtFromGlucoseFrame","parts","i","some","part","yearLow","yearHigh","month","day","hour","minute","second","year","recordedAt","Date","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","low","high","offsetMinutes","setMinutes","exports","isControlSolution","typeAndLocation","standardGlucoseDevice","params","defineCustomDevice","id","MeasurementTypeKey","bloodGlucose","nameMatch","matchByService","oneReadingPerConnection","stuckDataTimeoutMs","services","uuid","sigUuid","monitor","minLengthBytes","caseSelectorBytes","cases","map","kind","measurementTypeKey","fields","description","write","commandHex","when","decorateReading","reading","recordOffset","decorated"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/standard-gatt/standard-gatt.glucose.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,mBAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMG,sBAAsB,GAAG,OAAO;;AAEtC;AACA,MAAMC,uBAAuB,GAAG,MAAM;AAEtC,MAAMC,gBAAgB,GAAG,IAAI;AAC7B,MAAMC,kBAAkB,GAAG,IAAI;AAC/B,MAAMC,cAAc,GAAG,IAAI;AAE3B,MAAMC,eAAe,GAAG,CAAC;AACzB,MAAMC,iBAAiB,GAAG,EAAE;;AAE5B;AACA,MAAMC,qBAAqB,GAAG,IAAI;AAClC,MAAMC,yBAAyB,GAAG,IAAI;AAEtC,MAAMC,yBAAyB,GAAG,MAAM;AAExC,MAAMC,kBAAkB,GAAIC,KAAa,IACvCA,KAAK,GAAGT,gBAAgB,GAAGI,iBAAiB,GAAG,CAAC,GAAGA,iBAAiB;AAEtE,MAAMM,QAAQ,GAAID,KAAa,IAAaA,KAAK,CAACE,QAAQ,CAAC,EAAE,CAAC,CAACC,QAAQ,CAAC,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71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TranstekCommandDevice = void 0;
|
|
7
|
+
var _integratedDevices = require("../../../types/integrated-devices.js");
|
|
8
|
+
var _deviceSecrets = require("../../device-secrets.js");
|
|
9
|
+
var _btManagedDevice = require("../bt-managed-device.js");
|
|
10
|
+
var _transtekCommandProtocol = require("./transtek-command.protocol.js");
|
|
11
|
+
var _transtekCommandSequencer = require("./transtek-command.sequencer.js");
|
|
12
|
+
/** The sequencer decodes records itself; the declarative parser only has to pass frames on. */
|
|
13
|
+
const passThrough = {
|
|
14
|
+
caseValuePosition: [],
|
|
15
|
+
cases: []
|
|
16
|
+
};
|
|
17
|
+
const service = (uuid, data, optional) => ({
|
|
18
|
+
uuid,
|
|
19
|
+
optional,
|
|
20
|
+
monitorUuids: [{
|
|
21
|
+
uuid: _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.answer,
|
|
22
|
+
parsingModel: passThrough
|
|
23
|
+
}, {
|
|
24
|
+
uuid: data,
|
|
25
|
+
parsingModel: passThrough
|
|
26
|
+
}]
|
|
27
|
+
});
|
|
28
|
+
const SERVICES_BY_KIND = {
|
|
29
|
+
"blood-pressure": [service(_transtekCommandProtocol.TRANSTEK_SERVICES.bloodPressureA2, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure, true), service(_transtekCommandProtocol.TRANSTEK_SERVICES.bloodPressureA3, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure, true)],
|
|
30
|
+
scale: [service(_transtekCommandProtocol.TRANSTEK_SERVICES.scaleA2, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA2, true), service(_transtekCommandProtocol.TRANSTEK_SERVICES.scaleA3, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA3, true)],
|
|
31
|
+
tracker: [service(_transtekCommandProtocol.TRANSTEK_SERVICES.tracker, _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.tracker, false)]
|
|
32
|
+
};
|
|
33
|
+
const KIND = {
|
|
34
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_BPM]: "blood-pressure",
|
|
35
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_SCALE]: "scale",
|
|
36
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_SCALE_1525]: "scale",
|
|
37
|
+
[_integratedDevices.IntegratedDevices.TRANSTEK_TRACKER]: "tracker"
|
|
38
|
+
};
|
|
39
|
+
const secretKey = device => `transtek-password:${device.id}`;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Transtek's white-label blood-pressure monitors, scales and 405A0 activity tracker, on the
|
|
43
|
+
* "command" protocol (A2/A3). See `TranstekCommandSequencer` for the session.
|
|
44
|
+
*/
|
|
45
|
+
class TranstekCommandDevice extends _btManagedDevice.BTManagedDevice {
|
|
46
|
+
stuckDataTimeout = 60_000;
|
|
47
|
+
onStreamStart = undefined;
|
|
48
|
+
constructor(device, params) {
|
|
49
|
+
super(device, params);
|
|
50
|
+
const kind = KIND[params.deviceName];
|
|
51
|
+
this.mainServices = SERVICES_BY_KIND[kind];
|
|
52
|
+
|
|
53
|
+
// The random-number reply has to be answered at once, so the stored password is loaded early.
|
|
54
|
+
void (0, _deviceSecrets.loadDeviceSecret)(secretKey(device));
|
|
55
|
+
this.createCommandSequencer = () => new _transtekCommandSequencer.TranstekCommandSequencer({
|
|
56
|
+
kind,
|
|
57
|
+
secretKey: secretKey(device),
|
|
58
|
+
heightInCentimetres: params.deviceName === _integratedDevices.IntegratedDevices.TRANSTEK_SCALE_1525,
|
|
59
|
+
onResult: result => this.onResult?.(result),
|
|
60
|
+
onError: error => this.onError?.(error)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** No framing: every notification is one whole message. */
|
|
65
|
+
validatePackage = () => true;
|
|
66
|
+
handleSuccessResult() {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.TranstekCommandDevice = TranstekCommandDevice;
|
|
71
|
+
//# sourceMappingURL=transtek-command.device.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.device.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_integratedDevices","require","_deviceSecrets","_btManagedDevice","_transtekCommandProtocol","_transtekCommandSequencer","passThrough","caseValuePosition","cases","service","uuid","data","optional","monitorUuids","TRANSTEK_CHARACTERISTICS","answer","parsingModel","SERVICES_BY_KIND","TRANSTEK_SERVICES","bloodPressureA2","bloodPressure","bloodPressureA3","scale","scaleA2","weightA2","scaleA3","weightA3","tracker","KIND","IntegratedDevices","TRANSTEK_BPM","TRANSTEK_SCALE","TRANSTEK_SCALE_1525","TRANSTEK_TRACKER","secretKey","device","id","TranstekCommandDevice","BTManagedDevice","stuckDataTimeout","onStreamStart","undefined","constructor","params","kind","deviceName","mainServices","loadDeviceSecret","createCommandSequencer","TranstekCommandSequencer","heightInCentimetres","onResult","result","onError","error","validatePackage","handleSuccessResult","exports"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.device.ts"],"mappings":";;;;;;AAIA,IAAAA,kBAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AAIA,IAAAI,yBAAA,GAAAJ,OAAA;AASA;AACA,MAAMK,WAAW,GAAG;EAAEC,iBAAiB,EAAE,EAAE;EAAEC,KAAK,EAAE;AAAG,CAAC;AAExD,MAAMC,OAAO,GAAGA,CAACC,IAAY,EAAEC,IAAY,EAAEC,QAAiB,MAAgB;EAC5EF,IAAI;EACJE,QAAQ;EACRC,YAAY,EAAE,CACZ;IAAEH,IAAI,EAAEI,iDAAwB,CAACC,MAAM;IAAEC,YAAY,EAAEV;EA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gBAAgB,CAAC2B,IAAI,CAAC;;IAE1C;IACA,KAAK,IAAAG,+BAAgB,EAACb,SAAS,CAACC,MAAM,CAAC,CAAC;IAExC,IAAI,CAACa,sBAAsB,GAAG,MAC5B,IAAIC,kDAAwB,CAAC;MAC3BL,IAAI;MACJV,SAAS,EAAEA,SAAS,CAACC,MAAM,CAAC;MAC5Be,mBAAmB,EACjBP,MAAM,CAACE,UAAU,KAAKhB,oCAAiB,CAACG,mBAAmB;MAC7DmB,QAAQ,EAAGC,MAAM,IACf,IAAI,CAACD,QAAQ,GACXC,MAGF,CAAC;MACHC,OAAO,EAAGC,KAAK,IAAK,IAAI,CAACD,OAAO,GAAGC,KAAK;IAC1C,CAAC,CAAC;EACN;;EAEA;EACUC,eAAe,GAAGA,CAAA,KAAe,IAAI;EAErCC,mBAAmBA,CAAA,EAAS;IACpC;EACF;AACF;AAACC,OAAA,CAAApB,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.protocol.js
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.verificationCommand = exports.u32 = exports.u16 = exports.transtekTime = exports.transtekSeconds = exports.trackerUserDataCommand = exports.trackerConfigurationCommand = exports.setTimeCommand = exports.scaleProfileCommand = exports.readRandom = exports.readPassword = exports.opcode = exports.endSessionCommand = exports.bindUserCommand = exports.accountIdCommand = exports.TRANSTEK_SERVICES = exports.TRANSTEK_CHARACTERISTICS = exports.ANSWER = void 0;
|
|
7
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
8
|
+
var _le32FromHex = require("../../../utils/le-32-from-hex.js");
|
|
9
|
+
/* eslint-disable import/group-exports */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The Transtek / LifeSense "command" protocol (generations A2 and A3) spoken by Transtek's
|
|
13
|
+
* white-label blood-pressure monitors, scales and the 405A0 activity tracker.
|
|
14
|
+
*
|
|
15
|
+
* Layouts are from MedM Health Diary 3.12.11's `CTranstekCommandDevice` family. There is no
|
|
16
|
+
* framing: one notification is one message, every integer is little-endian, and the device
|
|
17
|
+
* never acknowledges a command - the app moves on by timers.
|
|
18
|
+
*
|
|
19
|
+
* Generation is picked by which primary service the device has: A2 or A3 for each kind.
|
|
20
|
+
*/
|
|
21
|
+
const sig16 = assigned => `0000${assigned}-0000-1000-8000-00805f9b34fb`;
|
|
22
|
+
const TRANSTEK_SERVICES = exports.TRANSTEK_SERVICES = {
|
|
23
|
+
bloodPressureA2: sig16("7809"),
|
|
24
|
+
bloodPressureA3: sig16("7889"),
|
|
25
|
+
scaleA2: sig16("7802"),
|
|
26
|
+
scaleA3: sig16("7892"),
|
|
27
|
+
tracker: sig16("7801")
|
|
28
|
+
};
|
|
29
|
+
const TRANSTEK_CHARACTERISTICS = exports.TRANSTEK_CHARACTERISTICS = {
|
|
30
|
+
command: sig16("8a81"),
|
|
31
|
+
answer: sig16("8a82"),
|
|
32
|
+
bloodPressure: sig16("8a91"),
|
|
33
|
+
weightA2: sig16("8a21"),
|
|
34
|
+
weightA3: sig16("8a24"),
|
|
35
|
+
tracker: sig16("8a11")
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/** Device-to-app opcodes on the answer characteristic. */
|
|
39
|
+
const ANSWER = exports.ANSWER = {
|
|
40
|
+
password: 0xa0,
|
|
41
|
+
random: 0xa1,
|
|
42
|
+
userCount: 0x83,
|
|
43
|
+
userInfo: 0xc0
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Seconds since this local wall-clock instant are how both directions carry time. */
|
|
47
|
+
const EPOCH_UTC_MS = Date.UTC(2010, 0, 1);
|
|
48
|
+
const toHex = bytes => bytes.map(value => (value & 0xff).toString(16).padStart(2, "0"));
|
|
49
|
+
const le32 = value => [value & 0xff, value >>> 8 & 0xff, value >>> 16 & 0xff, value >>> 24 & 0xff];
|
|
50
|
+
const u32 = (frame, index) => (0, _le32FromHex.le32FromHex)([...frame], index) >>> 0;
|
|
51
|
+
exports.u32 = u32;
|
|
52
|
+
const u16 = (frame, index) => (0, _hexToByte.hexToByte)(frame[index] ?? "00") | (0, _hexToByte.hexToByte)(frame[index + 1] ?? "00") << 8;
|
|
53
|
+
exports.u16 = u16;
|
|
54
|
+
const opcode = frame => (0, _hexToByte.hexToByte)(frame[0] ?? "00");
|
|
55
|
+
|
|
56
|
+
/** A device timestamp, read as the phone's local wall-clock time. */
|
|
57
|
+
exports.opcode = opcode;
|
|
58
|
+
const transtekTime = seconds => {
|
|
59
|
+
const wall = new Date(EPOCH_UTC_MS + seconds * 1000);
|
|
60
|
+
return new Date(wall.getUTCFullYear(), wall.getUTCMonth(), wall.getUTCDate(), wall.getUTCHours(), wall.getUTCMinutes(), wall.getUTCSeconds());
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** The phone's local wall-clock time as device seconds; the device has no timezone. */
|
|
64
|
+
exports.transtekTime = transtekTime;
|
|
65
|
+
const transtekSeconds = now => Math.floor((Date.UTC(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()) - EPOCH_UTC_MS) / 1000);
|
|
66
|
+
exports.transtekSeconds = transtekSeconds;
|
|
67
|
+
const readPassword = frame => u32(frame, 1);
|
|
68
|
+
exports.readPassword = readPassword;
|
|
69
|
+
const readRandom = frame => u32(frame, 1);
|
|
70
|
+
|
|
71
|
+
/** `21 FF 00 00 UU`: sent after the pairing password. */
|
|
72
|
+
exports.readRandom = readRandom;
|
|
73
|
+
const accountIdCommand = user => toHex([0x21, 0xff, 0x00, 0x00, user]);
|
|
74
|
+
|
|
75
|
+
/** `20` + (password XOR random): proves this phone holds the device's password. */
|
|
76
|
+
exports.accountIdCommand = accountIdCommand;
|
|
77
|
+
const verificationCommand = (password, random) => toHex([0x20, ...le32((password ^ random) >>> 0)]);
|
|
78
|
+
exports.verificationCommand = verificationCommand;
|
|
79
|
+
const setTimeCommand = now => toHex([0x02, ...le32(transtekSeconds(now))]);
|
|
80
|
+
|
|
81
|
+
/** `22`: the app is done with this session. */
|
|
82
|
+
exports.setTimeCommand = setTimeCommand;
|
|
83
|
+
const endSessionCommand = () => toHex([0x22]);
|
|
84
|
+
|
|
85
|
+
/** `03 UU` + an 18-byte, space-padded user name (A3 pairing). */
|
|
86
|
+
exports.endSessionCommand = endSessionCommand;
|
|
87
|
+
const bindUserCommand = (user, name) => {
|
|
88
|
+
const bytes = Array.from(name.slice(0, 18), char => char.charCodeAt(0) & 0x7f);
|
|
89
|
+
return toHex([0x03, user, ...bytes, ...Array(18 - bytes.length).fill(0x20)]);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* `51`: the A3 scale's user profile. The SDK has no patient profile, so it sends the same
|
|
94
|
+
* defaults MedM falls back to - male, 30 years, 175 cm, kilograms, no goal. They feed only
|
|
95
|
+
* the scale's own body-composition estimate, never the weight.
|
|
96
|
+
*/
|
|
97
|
+
exports.bindUserCommand = bindUserCommand;
|
|
98
|
+
const scaleProfileCommand = (user, heightInCentimetres) => {
|
|
99
|
+
const heightCm = 175;
|
|
100
|
+
const height = heightInCentimetres ? [heightCm & 0xff, 0xe0 + (heightCm >> 8)] : [heightCm * 10 & 0xff, 0xd0 | heightCm * 10 >> 8];
|
|
101
|
+
return toHex([0x51, 0x17, user, 0x01, 30, ...height, 0x00, 0x00, 0x00, 0x00, 0x00]);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/** `40 00`: tracker configuration, leaving stored data in place. */
|
|
105
|
+
exports.scaleProfileCommand = scaleProfileCommand;
|
|
106
|
+
const trackerConfigurationCommand = () => toHex([0x40, 0x00]);
|
|
107
|
+
|
|
108
|
+
/** `05`: tracker user data - 70 kg and 1.75 m, the same defaults as the scale profile. */
|
|
109
|
+
exports.trackerConfigurationCommand = trackerConfigurationCommand;
|
|
110
|
+
const trackerUserDataCommand = () => toHex([0x05, 0x0a, 0x00, ...[7000 & 0xff, 7000 >> 8], 0x00, 0xfe, 175 & 0xff, 0xe0]);
|
|
111
|
+
exports.trackerUserDataCommand = trackerUserDataCommand;
|
|
112
|
+
//# sourceMappingURL=transtek-command.protocol.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_hexToByte","require","_le32FromHex","sig16","assigned","TRANSTEK_SERVICES","exports","bloodPressureA2","bloodPressureA3","scaleA2","scaleA3","tracker","TRANSTEK_CHARACTERISTICS","command","answer","bloodPressure","weightA2","weightA3","ANSWER","password","random","userCount","userInfo","EPOCH_UTC_MS","Date","UTC","toHex","bytes","map","value","toString","padStart","le32","u32","frame","index","le32FromHex","u16","hexToByte","opcode","transtekTime","seconds","wall","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","transtekSeconds","now","Math","floor","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","readPassword","readRandom","accountIdCommand","user","verificationCommand","setTimeCommand","endSessionCommand","bindUserCommand","name","Array","from","slice","char","charCodeAt","length","fill","scaleProfileCommand","heightInCentimetres","heightCm","height","trackerConfigurationCommand","trackerUserDataCommand"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.protocol.ts"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAHA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,KAAK,GAAIC,QAAgB,IAC7B,OAAOA,QAAQ,8BAA8B;AAExC,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG;EAC/BE,eAAe,EAAEJ,KAAK,CAAC,MAAM,CAAC;EAC9BK,eAAe,EAAEL,KAAK,CAAC,MAAM,CAAC;EAC9BM,OAAO,EAAEN,KAAK,CAAC,MAAM,CAAC;EACtBO,OAA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bt-management/services/devices/transtek/transtek-command.records.js
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.readWeight = exports.readTrackerSteps = exports.readBloodPressure = exports.decodeTranstekRecord = void 0;
|
|
7
|
+
var _core = require("@ovok/core");
|
|
8
|
+
var _decodeMedicalFloat = require("../../../utils/decode-medical-float.js");
|
|
9
|
+
var _hexToByte = require("../../../utils/hex-to-byte.js");
|
|
10
|
+
var _transtekCommandProtocol = require("./transtek-command.protocol.js");
|
|
11
|
+
/* eslint-disable import/group-exports */
|
|
12
|
+
|
|
13
|
+
/** Record layouts for the Transtek command protocol's measurement characteristics. */
|
|
14
|
+
|
|
15
|
+
const POUND_IN_KG = 0.45359237;
|
|
16
|
+
const DAY_MS = 86_400_000;
|
|
17
|
+
const YEAR_MS = 365 * DAY_MS;
|
|
18
|
+
|
|
19
|
+
/** MedM drops records more than a day ahead of the phone: the device clock was wrong. */
|
|
20
|
+
const isFromFuture = recordedAt => recordedAt.getTime() > Date.now() + DAY_MS;
|
|
21
|
+
/** Characteristic 8A91, sixteen bytes at fixed offsets; MedM ignores the kPa flag. */
|
|
22
|
+
const readBloodPressure = (frame, shiftUser) => {
|
|
23
|
+
if (frame.length < 16) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
const flags = (0, _transtekCommandProtocol.opcode)(frame);
|
|
27
|
+
const status = (0, _transtekCommandProtocol.u16)(frame, 14);
|
|
28
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 7));
|
|
29
|
+
if (isFromFuture(recordedAt)) {
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
systolic: (0, _transtekCommandProtocol.u16)(frame, 1),
|
|
34
|
+
diastolic: (0, _transtekCommandProtocol.u16)(frame, 3),
|
|
35
|
+
recordedAt,
|
|
36
|
+
heartRate: (0, _transtekCommandProtocol.u16)(frame, 11),
|
|
37
|
+
memorySlot: (0, _hexToByte.hexToByte)(frame[13] ?? "00") + (shiftUser ? 1 : 0),
|
|
38
|
+
irregularHeartbeat: (flags & 0x10) !== 0 && (status & 0x04) !== 0
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Characteristic 8A21 (A2) or 8A24 (A3): an IEEE-11073 FLOAT in kilograms and a status byte
|
|
44
|
+
* that must say the reading is stable or complete. Frames are 11, 15 or 19+ bytes long.
|
|
45
|
+
*/
|
|
46
|
+
exports.readBloodPressure = readBloodPressure;
|
|
47
|
+
const readWeight = frame => {
|
|
48
|
+
const length = frame.length;
|
|
49
|
+
if (!(length > 18 || length === 11 || length === 15)) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Only status bit 0 set with code 4 ("complete") is a finished weight. MedM also keeps
|
|
54
|
+
// "unstable" frames, tagged; those are the values a scale shows while someone steps on,
|
|
55
|
+
// so they are not reported here.
|
|
56
|
+
const status = (0, _hexToByte.hexToByte)(frame[Math.min(length, 19) - 1] ?? "00");
|
|
57
|
+
if ((status & 0x01) !== 1 || (status >> 1 & 0x07) !== 4) {
|
|
58
|
+
return undefined;
|
|
59
|
+
}
|
|
60
|
+
const value = (0, _decodeMedicalFloat.decodeMedicalFloat)((0, _transtekCommandProtocol.u32)(frame, 1), 8, 24);
|
|
61
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 5));
|
|
62
|
+
if (value === undefined || value <= 0 || isFromFuture(recordedAt)) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// A scale set to pounds flags it (bit 5). MedM reads a value with at most one decimal as
|
|
67
|
+
// kilograms and one with two as already in pounds; the SDK follows it.
|
|
68
|
+
const pounds = ((0, _transtekCommandProtocol.opcode)(frame) & 0x20) !== 0 && Math.round(value * 100) % 10 !== 0;
|
|
69
|
+
return {
|
|
70
|
+
bodyWeight: Math.round((pounds ? value * POUND_IN_KG : value) * 100) / 100,
|
|
71
|
+
recordedAt
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Characteristic 8A11: nineteen bytes starting `7E`, with the day's cumulative step count.
|
|
77
|
+
*
|
|
78
|
+
* Only the live record is a reading: stored points (stamped at :59) are earlier running
|
|
79
|
+
* totals and the day's statistic (23:59:59), so reporting them as well would count the same
|
|
80
|
+
* steps again. A record dated outside the past year or after tomorrow is a clock that was
|
|
81
|
+
* never set.
|
|
82
|
+
*/
|
|
83
|
+
exports.readWeight = readWeight;
|
|
84
|
+
const readTrackerSteps = frame => {
|
|
85
|
+
if (frame.length !== 19 || (0, _transtekCommandProtocol.opcode)(frame) !== 0x7e) {
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
88
|
+
const recordedAt = (0, _transtekCommandProtocol.transtekTime)((0, _transtekCommandProtocol.u32)(frame, 4));
|
|
89
|
+
if (recordedAt.getSeconds() === 59 || isFromFuture(recordedAt) || Date.now() - recordedAt.getTime() > YEAR_MS) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
stepCount: (0, _hexToByte.hexToByte)(frame[1] ?? "00") | (0, _hexToByte.hexToByte)(frame[2] ?? "00") << 8 | (0, _hexToByte.hexToByte)(frame[3] ?? "00") << 16,
|
|
94
|
+
recordedAt
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/** Decodes a record by the characteristic it arrived on; anything else is not a reading. */
|
|
99
|
+
exports.readTrackerSteps = readTrackerSteps;
|
|
100
|
+
const decodeTranstekRecord = (frame, characteristicUuid, shiftUser) => {
|
|
101
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.bloodPressure) {
|
|
102
|
+
const reading = readBloodPressure(frame, shiftUser);
|
|
103
|
+
return reading && {
|
|
104
|
+
measurementTypeKey: _core.MeasurementTypeKey.bloodPressure,
|
|
105
|
+
systolic: reading.systolic,
|
|
106
|
+
diastolic: reading.diastolic,
|
|
107
|
+
heartRate: reading.heartRate,
|
|
108
|
+
recordedAt: reading.recordedAt,
|
|
109
|
+
memorySlot: reading.memorySlot,
|
|
110
|
+
...(reading.irregularHeartbeat ? {
|
|
111
|
+
irregularHeartbeat: true
|
|
112
|
+
} : {})
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA2 || characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.weightA3) {
|
|
116
|
+
const reading = readWeight(frame);
|
|
117
|
+
return reading && {
|
|
118
|
+
measurementTypeKey: _core.MeasurementTypeKey.bodyWeight,
|
|
119
|
+
...reading
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
if (characteristicUuid === _transtekCommandProtocol.TRANSTEK_CHARACTERISTICS.tracker) {
|
|
123
|
+
const reading = readTrackerSteps(frame);
|
|
124
|
+
return reading && {
|
|
125
|
+
measurementTypeKey: _core.MeasurementTypeKey.stepCount,
|
|
126
|
+
...reading
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
130
|
+
};
|
|
131
|
+
exports.decodeTranstekRecord = decodeTranstekRecord;
|
|
132
|
+
//# sourceMappingURL=transtek-command.records.js.map
|
package/lib/commonjs/modules/bt-management/services/devices/transtek/transtek-command.records.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_core","require","_decodeMedicalFloat","_hexToByte","_transtekCommandProtocol","POUND_IN_KG","DAY_MS","YEAR_MS","isFromFuture","recordedAt","getTime","Date","now","readBloodPressure","frame","shiftUser","length","undefined","flags","opcode","status","u16","transtekTime","u32","systolic","diastolic","heartRate","memorySlot","hexToByte","irregularHeartbeat","exports","readWeight","Math","min","value","decodeMedicalFloat","pounds","round","bodyWeight","readTrackerSteps","getSeconds","stepCount","decodeTranstekRecord","characteristicUuid","TRANSTEK_CHARACTERISTICS","bloodPressure","reading","measurementTypeKey","MeasurementTypeKey","weightA2","weightA3","tracker"],"sourceRoot":"../../../../../../../src","sources":["modules/bt-management/services/devices/transtek/transtek-command.records.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAEA,IAAAG,wBAAA,GAAAH,OAAA;AAPA;;AAeA;;AAEA,MAAMI,WAAW,GAAG,UAAU;AAC9B,MAAMC,MAAM,GAAG,UAAU;AACzB,MAAMC,OAAO,GAAG,GAAG,GAAGD,MAAM;;AAE5B;AACA,MAAME,YAAY,GAAIC,UAAgB,IACpCA,UAAU,CAACC,OAAO,CAAC,CAAC,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,GAAGN,MAAM;AAW5C;AACO,MAAMO,iBAAiB,GAAGA,CAC/BC,KAAwB,EACxBC,SAAkB,KACoB;EACtC,IAAID,KAAK,CAACE,MAAM,GAAG,EAAE,EAAE;IACrB,OAAOC,SAAS;EAClB;EAEA,MAAMC,KAAK,GAAG,IAAAC,+BAAM,EAACL,KAAK,CAAC;EAC3B,MAAMM,MAAM,GAAG,IAAAC,4BAAG,EAACP,KAAK,EAAE,EAAE,CAAC;EAC7B,MAAML,UAAU,GAAG,IAAAa,qCAAY,EAAC,IAAAC,4BAAG,EAACT,KAAK,EAAE,CAAC,CAAC,CAAC;EAE9C,IAAIN,YAAY,CAACC,UAAU,CAAC,EAAE;IAC5B,OAAOQ,SAAS;EAClB;EAEA,OAAO;IACLO,QAAQ,EAAE,IAAAH,4BAAG,EAACP,KAAK,EAAE,CAAC,CAAC;IACvBW,SAAS,EAAE,IAAAJ,4BAAG,EAACP,KAAK,EAAE,CAAC,CAAC;IACx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