Skip to content

Instantly share code, notes, and snippets.

@ATouhou
Created February 10, 2024 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ATouhou/deaf79038a6e2083b73be41c413e392f to your computer and use it in GitHub Desktop.
Save ATouhou/deaf79038a6e2083b73be41c413e392f to your computer and use it in GitHub Desktop.
LibreLinkUp Source Code - NativeScript
require("./runtime.js");require("./vendor.js");module.exports =
(global["webpackJsonp"] = global["webpackJsonp"] || []).push([[0],[
/* 0 */,
/* 1 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subscribe", function() { return subscribe; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return once; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return remove; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publish", function() { return publish; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "publishAndWait", function() { return publishAndWait; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "get", function() { return get; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "request", function() { return request; });
/* harmony import */ var mediator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(381);
/* harmony import */ var mediator_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(mediator_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
/**
* When you want to import this, do so as:
* import * as mediator from 'Utility/mediator'
* so you can do mediator.subscribe() or mediator.publish() for example
*
* https://github.com/ajacksified/Mediator.js
*/
var logEvents = true;
var _m = new mediator_js__WEBPACK_IMPORTED_MODULE_0___default.a();
var logEvent = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!logEvents) {
return;
}
var id = args[0], rest = args.slice(1);
// if (log.getLogLevel() !== 'DEBUG') {
// log.groupAndTrace(id);
// return;
// }
// const cleanedArgs = rest.map((v) => {
// if (typeof v === 'object') {
// return cleanObjectProperties(v);
// }
// return v;
// });
_utilities_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].debug.apply(_utilities_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"], __spreadArrays([id], rest));
// Logger.groupAndTrace(id, ...cleanedArgs);
};
var subscribe = _m.subscribe.bind(_m);
var once = _m.once.bind(_m);
var remove = _m.remove.bind(_m);
var publish = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
// want to know who published the event
logEvent.apply(void 0, args);
var id = args[0], originalArguments = args.slice(1);
return new Promise(function (resolve, reject) {
try {
_m.publish.apply(_m, __spreadArrays([id], originalArguments));
resolve();
}
catch (ex) {
reject(ex);
}
});
};
var publishAndWait = function (id) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
// want to know who published the event
logEvent.apply(void 0, __spreadArrays([id], args));
_m.publish.apply(_m, __spreadArrays([id], args));
};
var get = function (id) {
// want to know who published the event
logEvent(id);
var data = {};
_m.publish(id, data);
return data;
};
function request(id, request) {
if (typeof id === 'string') {
if (request) {
request._topicId = id;
}
else {
request = request || { _topicId: id };
}
}
else {
request = id || {};
}
if (!request._topicId) {
throw new Error('missing request._topicId');
}
// want to know who published the event
logEvent(request._topicId, request);
var _request = request;
return new Promise(function (resolve, reject) {
try {
_m.publish(_request._topicId, _request);
if (!_request.response) {
reject(new Error('missing Response'));
return;
}
_request.response
.then(function (val) {
resolve(val);
})
.catch(function (ex) {
reject(ex);
});
}
catch (ex) {
reject(ex);
}
});
}
/* harmony default export */ __webpack_exports__["default"] = ({
get: get,
once: once,
publish: publish,
publishAndWait: publishAndWait,
remove: remove,
request: request,
subscribe: subscribe,
});
;
if (false ) {}
/***/ }),
/* 2 */,
/* 3 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "store", function() { return store; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configureStore", function() { return configureStore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "observeStore", function() { return observeStore; });
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98);
/* harmony import */ var nativescript_websockets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(284);
/* harmony import */ var nativescript_websockets__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_websockets__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var remote_redux_devtools__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(377);
/* harmony import */ var remote_redux_devtools__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(remote_redux_devtools__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(682);
/* harmony import */ var redux_logger__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(redux_logger__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
/* harmony import */ var _reducers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(121);
/* harmony import */ var _utilities_cache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23);
// Needed to instantiate Nativescripts Websocket logic on `global.Websockets` before importing devtools
var store;
var configureStore = function (preloadedState) {
var middlewares = [
function (_store) { return function (next) { return function (action) {
try {
next(action);
var _a = _store.getState(), auth = _a.auth, safetyBannerInterval = _a.config.safetyBannerInterval, token = _a.notification.token, _b = _a.user, country = _b.country, uiLanguage = _b.uiLanguage, id = _b.id, timeBannerWasDismissed = _b.timeBannerWasDismissed;
// Cache the minimal amount of data that we would want recovered after a fresh app launch
Object(_utilities_cache__WEBPACK_IMPORTED_MODULE_6__["cacheObject"])('store', {
auth: __assign(__assign({}, auth), { step: undefined }),
config: { safetyBannerInterval: safetyBannerInterval },
notification: { token: token },
user: { country: country, uiLanguage: uiLanguage, id: id, timeBannerWasDismissed: timeBannerWasDismissed },
});
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_4__["Logger"].warn('Failed to store state in cache; error: ' + e);
}
}; }; },
];
if (false) {}
var middlewareEnhancer = redux__WEBPACK_IMPORTED_MODULE_0__[/* applyMiddleware */ "a"].apply(void 0, middlewares);
var enhancers = [middlewareEnhancer];
// Composed enhancers within dev tools logic
var composedEnhancers = Object(remote_redux_devtools__WEBPACK_IMPORTED_MODULE_2__["composeWithDevTools"])({
realtime: "production" === 'development',
hostname: "192.168.1.6" || false,
port: 8900,
}).apply(void 0, enhancers);
// Use the root reducer to construct the true initial state of the store, then override it with
// any values provided by the preloadedState
// This is necessary since the internal store construction expects that any top level provided
// state contain all values expected for its initial state
//
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
var initialState = Object(_reducers__WEBPACK_IMPORTED_MODULE_5__["rootReducer"])(undefined, { type: '@@INIT' });
Object.keys(preloadedState).forEach(function (k) {
initialState[k] = __assign(__assign({}, initialState[k]), preloadedState[k]);
});
// Use dev tools composed enhancers
store = Object(redux__WEBPACK_IMPORTED_MODULE_0__[/* createStore */ "c"])(_reducers__WEBPACK_IMPORTED_MODULE_5__["rootReducer"], initialState, composedEnhancers);
// Normal redux compose for enhancers
// store = createStore(rootReducer, initialState, compose(...enhancers));
if (false) {}
return store;
};
/**
* This is a helper method to set up a listener to the redux store.
* You pass in a selector function which is used to get the item of the store you care about
* and allow you to return a custom derived state.
* The observer will then pay attention to this item and see when it's been changed (by reference for
* objects and by value for primitives).
* When there is a change, it will execute the callback and pass it the derived state.
*
* @param {func} select Selector function
* @param {func} onChange Callback to execute when there is a change
* @param {boolean} skipSetupRun Only execute the onChange callback after a real state change
*/
var observeStore = function (select, onChange, skipSetupRun) {
if (skipSetupRun === void 0) { skipSetupRun = false; }
var currentState;
var didFirstRun = false;
var handleChange = function () {
var nextState = select(store.getState());
if (nextState !== currentState) {
currentState = nextState;
if (!skipSetupRun || didFirstRun) {
onChange(currentState);
}
didFirstRun = true;
}
};
var unsubscribe = store.subscribe(handleChange);
// Run once to store the current state so we have a previous state to compare to
handleChange();
return unsubscribe;
};
;
if (false ) {}
/***/ }),
/* 4 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _routes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ACCOUNT", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["ACCOUNT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APP_INFO", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["APP_INFO"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CHANGE_PASSWORD", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["CHANGE_PASSWORD"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_LIST", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["CONNECTION_LIST"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "COUNTRY_SELECT", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["COUNTRY_SELECT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DELETE_ACCOUNT", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["DELETE_ACCOUNT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EULA", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["EULA"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FORGOT_PASSWORD", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["FORGOT_PASSWORD"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GLUCOSE_GRAPH", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["GLUCOSE_GRAPH"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_DASHED_LINES", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_DASHED_LINES"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_GREEN_AREA", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_GREEN_AREA"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_MODAL_ROOT", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_MODAL_ROOT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_TAP_ANYWHERE", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_TAP_ANYWHERE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HELP", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["HELP"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HIGH_GLUCOSE_ALARM", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["HIGH_GLUCOSE_ALARM"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HIGH_GLUCOSE_PICKER", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["HIGH_GLUCOSE_PICKER"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HOME", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["HOME"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOADER", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["LOADER"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGIN", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["LOGIN"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOGBOOK", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["LOGBOOK"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOW_GLUCOSE_ALARM", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["LOW_GLUCOSE_ALARM"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LOW_GLUCOSE_PICKER", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["LOW_GLUCOSE_PICKER"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MEASUREMENTS_SUMMARY", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["MEASUREMENTS_SUMMARY"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NEW_FEATURE_MODAL", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["NEW_FEATURE_MODAL"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_SETTINGS", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["NOTIFICATION_SETTINGS"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NO_RECENT_DATA", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["NO_RECENT_DATA"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NO_RECENT_DATA_PICKER", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["NO_RECENT_DATA_PICKER"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_GREETING", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_GREETING"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_INTERNET_REQ", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_INTERNET_REQ"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_NOTIFICATIONS", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_NOTIFICATIONS"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_WARNING", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_WARNING"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PRIVACY", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["PRIVACY"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["REGISTER"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SAFETY_MESSAGE", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["SAFETY_MESSAGE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SPLASH", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["SPLASH"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "URGENT_LOW_GLUCOSE_ALARM", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["URGENT_LOW_GLUCOSE_ALARM"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "VERIFY_EMAIL", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["VERIFY_EMAIL"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "WELCOME_OVERVIEW", function() { return _routes__WEBPACK_IMPORTED_MODULE_0__["WELCOME_OVERVIEW"]; });
/* harmony import */ var _cache_keys__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(162);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "APP_CONFIG", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["APP_CONFIG"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CARE_GIVER_ID", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["CARE_GIVER_ID"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONNECTION", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["CONNECTION"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_DATA", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["CONNECTION_DATA"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REGULATORY_CONFIG", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["REGULATORY_CONFIG"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DATA_POLL_ID", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["DATA_POLL_ID"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DEVICE_ID", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["DEVICE_ID"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ENVIRONMENT", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["ENVIRONMENT"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FCM_TOKEN", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["FCM_TOKEN"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FIRST_USE", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["FIRST_USE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "HAS_MULTI_CONNECTIONS", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["HAS_MULTI_CONNECTIONS"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LANGUAGE", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["LANGUAGE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LIBRE_LINK_NAME", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["LIBRE_LINK_NAME"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LSL_URL", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["LSL_URL"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MEASUREMENT_DATA", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["MEASUREMENT_DATA"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NAG_ALERT_ACTIVE", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["NAG_ALERT_ACTIVE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATIONS_ENABLED", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["NOTIFICATIONS_ENABLED"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PATIENT_ID", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["PATIENT_ID"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TIMEZONE", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["TIMEZONE"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TIMEZONE_ID", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["TIMEZONE_ID"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "REGIONAL_CONFIG", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["REGIONAL_CONFIG"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "USER_COUNTRY", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["USER_COUNTRY"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "USER_PROFILE", function() { return _cache_keys__WEBPACK_IMPORTED_MODULE_1__["USER_PROFILE"]; });
;
if (false ) {}
/***/ }),
/* 5 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "exponentialBackoff", function() { return exponentialBackoff; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shortenedName", function() { return shortenedName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUOMFromGlucoseType", function() { return getUOMFromGlucoseType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRTL", function() { return isRTL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatString", function() { return formatString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPhoneLanguage", function() { return getPhoneLanguage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getLocale", function() { return getLocale; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "localizeNumber", function() { return localizeNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isInt", function() { return isInt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isFloat", function() { return isFloat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "debounce", function() { return debounce; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatMeasurementValue", function() { return formatMeasurementValue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "generateGUID", function() { return generateGUID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isOSFontScaleEnlarged", function() { return isOSFontScaleEnlarged; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGatewayType", function() { return getGatewayType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUUID", function() { return getUUID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSimulator", function() { return isSimulator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openConfigLink", function() { return openConfigLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "urls", function() { return urls; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUrls", function() { return setUrls; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dismissKeyboard", function() { return dismissKeyboard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isGlucoseItemScan", function() { return isGlucoseItemScan; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertMMOLPerLToMGPerDL", function() { return convertMMOLPerLToMGPerDL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertMGPerDLToMMOLPerL", function() { return convertMGPerDLToMMOLPerL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sensorForConnection", function() { return sensorForConnection; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_intl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(379);
/* harmony import */ var nativescript_intl__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_intl__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var nativescript_secure_storage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(380);
/* harmony import */ var nativescript_secure_storage__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nativescript_secure_storage__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(16);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23);
var secureStorage = new nativescript_secure_storage__WEBPACK_IMPORTED_MODULE_3__["SecureStorage"]();
/**
* keeps trying, "toTry" until it returns true or has
* tried "max" number of times. First retry has a delay of "delay".
* "callback" is called upon success.
*/
function exponentialBackoff(toTry, max, delay, callback) {
console.log('max', max, 'next delay', delay);
var result = toTry();
if (result) {
callback(result);
}
else {
if (max > 0) {
setTimeout(function () {
exponentialBackoff(toTry, --max, delay * 2, callback);
}, delay);
}
else {
console.log('>>>Max number of attempts reached, stop trying');
}
}
}
function shortenedName(value) {
var name = value;
var nameParts = name.split(' ');
var lastName = nameParts[nameParts.length - 1];
lastName = lastName.substring(0, 1) + '.';
nameParts[nameParts.length - 1] = lastName;
name = nameParts.join(' ');
return name;
}
function getUOMFromGlucoseType(glucoseType) {
if (glucoseType === 0) {
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('Common.mmmol');
}
else {
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('Common.mgdl');
}
}
function isRTL() {
var phoneLanguage = getPhoneLanguage();
if (phoneLanguage === 'ar' || phoneLanguage === 'he') {
return true;
}
return false;
}
function formatString() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var s = args[0];
for (var i = 1; i < args.length - 1; i++) {
var reg = new RegExp('\\{' + i + '\\}', 'gm');
s = s.replace(reg, args[i + 1]);
}
return s;
}
// Pulling the language from the native APIs
// to avoid pulling the cached Nativescript Lang.
var getPhoneLanguage = function (culture) {
if (culture === void 0) { culture = false; }
var lang;
var supportedLanguages = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().config.langs;
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
var locale = java.util.Locale.getDefault();
// toLanguageTag is only available on API 21+
if (parseInt(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].sdkVersion) >= 21) {
lang = locale.toLanguageTag();
}
else {
lang = locale.toString().replace('_', '-');
}
}
else if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
// Fetch the current language from the loaded bundle filtered by our supported langs
lang = NSBundle.preferredLocalizationsFromArray(supportedLanguages).firstObject;
}
if (lang === undefined) {
lang = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].language;
}
if (culture) {
var returnCulture = supportedLanguages.some(function (element) {
return element.toLowerCase() === lang.toLowerCase();
});
// 1/7/19 - Since we're tyring to avoid an LSL deployment
// This is being done to default to es-MX since LV
// doesn't support the othe Latin American cultures.
// ** Do we still need this? **
if (lang.toLowerCase() === 'es-419' ||
lang.toLowerCase() === 'es-cl' ||
lang.toLowerCase() === 'es-ar' ||
lang.toLowerCase() === 'es-co') {
lang = 'es-MX';
}
// ****
// certain versions of android return iw for hebrew
// so lets make sure we force it to he for the backend.
if (lang.toLowerCase() === 'iw-il' || lang.toLowerCase() === 'iw') {
lang = 'he';
}
if (returnCulture) {
console.log("the current lang is " + lang);
return lang;
}
}
// Normalize platform lang differences
if (lang.length > 2) {
lang = lang.split('-')[0];
}
if (supportedLanguages.indexOf(lang) === -1) {
lang = 'en';
}
return lang;
};
function getLocale() {
var language = getPhoneLanguage();
var user = _cache__WEBPACK_IMPORTED_MODULE_8__["getCachedObject"](_constants__WEBPACK_IMPORTED_MODULE_4__["USER_PROFILE"]);
if (!user) {
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].region;
}
if (language === 'en') {
if (user.Country !== 'US') {
return 'en-GB';
}
}
return language;
}
/**
* Formats numbers based on the device language
*/
function localizeNumber(num, lang, fractional) {
try {
return new nativescript_intl__WEBPACK_IMPORTED_MODULE_1__["NumberFormat"](lang, {
style: 'decimal',
minimumFractionDigits: fractional ? 1 : 0,
}).format(num);
}
catch (error) {
console.error('Error when attempting to call localizeNumber : ' + error.message);
return num.toString();
}
}
function isInt(n) {
return Number(n) === n && n % 1 === 0;
}
function isFloat(n) {
return Number(n) === n && n % 1 !== 0;
}
/**
* This method will take a function and return to you one that will be 'debounced'.
* Essentially what that means is the method will not be executed until after `time` has passed.
* If the function is called back-to-back within that period of time, the timer is reset on the
* second call.
* Additionally, the function will be called with the most recent arguments when the timer finally
* expires. So if you call the method 3 times within the timer with 3 different arguments, only
* the third set of arguments will be executed by the method.
*
* This is very useful in places where a function can be triggered many times, like detecting
* scroll events or a user typing in an input.
*
* @param {func} func function that you want to debounce
* @param {Number} time time in miliseconds you want your debounce to wait
*/
function debounce(func, time) {
if (time === void 0) { time = 300; }
var timeout;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var later = function () {
timeout = null;
func.apply(void 0, args);
};
clearTimeout(timeout);
timeout = setTimeout(later, time);
return function () {
clearTimeout(timeout);
};
};
}
// Formats the measurement value localized to the phones language
function formatMeasurementValue(measurement) {
if (isGlucoseItemScan(measurement)) {
var glucoseUnit = measurement.GlucoseUnits;
var measurementValue = Number(measurement.Value);
return localizeNumber(measurementValue, getPhoneLanguage(), !glucoseUnit);
}
else {
return '';
}
}
function generateGUID() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = (d + Math.random() * 16) % 16 | 0;
d = Math.floor(d / 16);
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16);
});
return uuid;
}
function getOSFontSetting() {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android) {
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.context.getResources().getConfiguration().fontScale;
}
return 1;
}
function isOSFontScaleEnlarged() {
var fontScale = getOSFontSetting();
if (fontScale > 1) {
return true;
}
else {
return false;
}
}
function getGatewayType() {
var OS = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"] ? 'iOS' : 'Android';
var gwType = OS === 'iOS' ? 'LinkUp.iOS' : 'LinkUp.Android';
return gwType;
}
/**
* iOS has strict rules around using a static UUID.
* To get around that, the below code will get the vendorID
* and store it in the keychain. As a fail safe it will fallback
* to the standard UUID id this method fails in future iOS updates.
*/
function getUUID() {
try {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
var uuid = secureStorage.getSync({ key: 'uuid' });
if (!uuid) {
uuid = UIDevice.currentDevice.identifierForVendor.UUIDString;
secureStorage.set({
key: 'uuid',
value: uuid,
});
}
return uuid;
}
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].uuid;
}
catch (e) {
console.log(">>> Exception: " + e + " occured while getting UUID.");
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].uuid;
}
}
function isSimulator() {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
var processInfo = NSProcessInfo.processInfo;
var simDeviceName = processInfo.environment.objectForKey('SIMULATOR_DEVICE_NAME');
if (simDeviceName !== null) {
console.log('--- RUNNING ON SIMULATOR ---');
return true;
}
}
return false;
}
var openConfigLink = function (linkName, path, anchor) {
if (path === void 0) { path = ''; }
if (anchor === void 0) { anchor = ''; }
var domain = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().config[linkName];
if (!domain) {
return _utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error("Link does not exist in config (null): " + linkName);
}
var _a = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().user, country = _a.country, uiLanguage = _a.uiLanguage;
var queryString = "?lang=" + uiLanguage + "&country=" + country;
var url = "" + domain + path + queryString + anchor;
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].log("Opening link: " + url);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Utils"].openUrl(url);
};
/** Reference used to store urls */
var urls = {
lslApi: '',
};
/**
* Sets the urls object to be ready for services
* - config: object - The environment config
*/
var setUrls = function (config) {
var lslApi = config.lslApi;
Object.assign(urls, {
lslApi: lslApi !== '' ? lslApi : undefined,
});
};
// Dismiss the softkeyboard at an OS level
var dismissKeyboard = function () {
try {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
var vc = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().viewController;
// Dismiss the keyboard
vc.view.endEditing(true);
}
else {
var activity = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().android.currentActivity;
var imm = activity.getSystemService(android.app.Activity.INPUT_METHOD_SERVICE);
var view = activity.getCurrentFocus();
if (view === null) {
// Construct a dummy view with the activity
view = new android.view.View(activity);
}
// Dismiss the keyboard
imm.hideSoftInputFromWindow(view.getWindowToken(), 0);
// Remove focus from the text field
view.clearFocus();
}
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].warn('failedToDismissKeyboard: ', e);
}
};
var isGlucoseItemScan = function (item) {
return item.type !== _models_types__WEBPACK_IMPORTED_MODULE_5__["GlucoseItemType"].DeviceAlarm;
};
var convertMMOLPerLToMGPerDL = function (val) {
return Number((Number(val) * 18).toFixed(0));
};
var convertMGPerDLToMMOLPerL = function (val) {
return Number((Number(val) / 18).toFixed(1));
};
var sensorTypeFromSensorAndDevice = function (sensor, device) {
var sens = sensor && sensor.pt !== undefined ? sensor.pt : _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].UNKNOWN;
// If the patient device is available we can make some assumptions
// based on the device type
if (sens === _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].UNKNOWN && device) {
switch (device.dtid) {
// Trident FSLL3, always going to be a 3 sensor
case 40068:
sens = _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].FSL3;
break;
// FSLL 2 in the US and specific countries, always FSL2 sensors
case 40067:
sens = _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].FSL2;
break;
// FSLL in Europe and can be FSL or FSL2
case 40066:
if (!device.alarms) {
sens = _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].FSL1;
}
else {
sens = _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].FSL2;
}
}
}
return sens;
};
/**
* Grab the sensor info from the connection and the patient device
* Priority FSL3 > FSL2 > FSL1
*/
var sensorForConnection = function (conn, pd) {
if (conn.activeSensors && conn.activeSensors.length > 0) {
var sens_1 = _models_types__WEBPACK_IMPORTED_MODULE_5__["ProductType"].UNKNOWN;
conn.activeSensors.forEach(function (ds) {
var s = sensorTypeFromSensorAndDevice(ds.sensor, ds.device);
if (s > sens_1) {
sens_1 = s;
}
});
return sens_1;
}
else {
return sensorTypeFromSensorAndDevice(conn.sensor, pd || conn.patientDevice);
}
};
;
if (false ) {}
/***/ }),
/* 6 */,
/* 7 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alert", function() { return alert; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alertWithTitle", function() { return alertWithTitle; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alertAppStore", function() { return alertAppStore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "confirm", function() { return confirm; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "action", function() { return action; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "alertMaintenanceInProgress", function() { return alertMaintenanceInProgress; });
/* harmony import */ var _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59);
/* harmony import */ var _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__);
var dialogDisplayed = false;
// Check if a dialog is already displayed, and if not fire off the new dialog
var alertWrapper = function (_dialog) {
return new Promise(function (resolve, reject) {
if (dialogDisplayed) {
reject(new Error('dialogAlreadyDisplayed'));
return;
}
dialogDisplayed = true;
_dialog()
.then(function (result) {
dialogDisplayed = false;
resolve(result);
})
.catch(function (err) {
dialogDisplayed = false;
reject(err);
});
});
};
var alert = function (message) {
return alertWrapper(function () {
return _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__["alert"]({
message: message,
okButtonText: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.ok'),
});
});
};
var alertWithTitle = function (title, message) {
return alertWrapper(function () {
return _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__["alert"]({
message: message,
okButtonText: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.ok'),
title: title,
});
});
};
var alertAppStore = function () {
return alertWrapper(function () {
return _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__["alert"]({
cancelable: false,
message: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('UpdateDialog.below_min_version'),
okButtonText: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('UpdateDialog.update_app'),
});
});
};
var confirm = function (messageOrTitle, // Message becomes title if no actual title passed in
okButtonText, cancelText, title) {
if (okButtonText === void 0) { okButtonText = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.ok'); }
if (cancelText === void 0) { cancelText = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.cancel_label'); }
return alertWrapper(function () {
return _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__["confirm"]({
cancelable: false,
cancelButtonText: cancelText,
message: messageOrTitle,
okButtonText: okButtonText,
title: title,
});
});
};
var action = function (items) {
return alertWrapper(function () {
return _nativescript_core_ui_dialogs__WEBPACK_IMPORTED_MODULE_0__["action"]({
actions: items,
cancelButtonText: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.cancel_label'),
});
});
};
var alertMaintenanceInProgress = function () {
return alertWithTitle(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('MaintenanceDialog.down_for_maintenance'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('MaintenanceDialog.maintenance_try_later'));
};
;
if (false ) {}
/***/ }),
/* 8 */,
/* 9 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goBack", function() { return goBack; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "navigateTo", function() { return navigateTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logout", function() { return logout; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCloseModal", function() { return onCloseModal; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _reducers_nav_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(60);
/* harmony import */ var _reducers_user_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(18);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22);
/* harmony import */ var _services_api_cache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(122);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5);
/* harmony import */ var _utilities_cache__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1);
var goBack = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_7__["dismissKeyboard"])();
var loc = '';
// Look at the back stack to get the previous entry's module to update the store
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().canGoBack()) {
var bs = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().backStack;
loc = bs[bs.length - 1].entry.moduleName;
}
var result = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].goBack();
if (result && loc !== '') {
_store_store__WEBPACK_IMPORTED_MODULE_6__["store"].dispatch({ type: _reducers_nav_types__WEBPACK_IMPORTED_MODULE_2__["NAVIGATION"], location: loc });
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_4__["logFindView"])(loc);
}
return result;
};
var navigateTo = function (options, rootFrame) {
if (rootFrame === void 0) { rootFrame = false; }
var entry = {
animated: true,
backstackVisible: true,
transition: {
name: 'slide',
},
};
if (typeof options === 'string') {
entry.moduleName = options;
}
else {
entry = Object.assign(entry, options);
}
if (entry.moduleName !== undefined) {
_store_store__WEBPACK_IMPORTED_MODULE_6__["store"].dispatch({ type: _reducers_nav_types__WEBPACK_IMPORTED_MODULE_2__["NAVIGATION"], location: entry.moduleName });
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_4__["logFindView"])(entry.moduleName);
}
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_7__["dismissKeyboard"])();
try {
if (rootFrame) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].getFrameById('rootFrame').navigate(entry);
}
else {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().navigate(entry);
}
}
catch (error) {
console.error('Error during navigation:', error);
}
};
var logout = function (options) {
// Retrieve the raw cache result for our config so we can resave it after clearing the cache
var configCacheResult = Object(_services_api_cache__WEBPACK_IMPORTED_MODULE_5__["getCacheResult"])(_constants__WEBPACK_IMPORTED_MODULE_1__["APP_CONFIG"]);
var env = _utilities_cache__WEBPACK_IMPORTED_MODULE_8__["getCachedString"](_constants__WEBPACK_IMPORTED_MODULE_1__["ENVIRONMENT"]);
var storeCache = _utilities_cache__WEBPACK_IMPORTED_MODULE_8__["getCachedObject"]('store', {});
_utilities_cache__WEBPACK_IMPORTED_MODULE_8__["clearCache"]();
// Save it back after clear
if (configCacheResult) {
Object(_services_api_cache__WEBPACK_IMPORTED_MODULE_5__["setCacheResult"])(_constants__WEBPACK_IMPORTED_MODULE_1__["APP_CONFIG"], configCacheResult.data, configCacheResult.expirationDate);
}
// Save back the environment to prevent the cache from getting cleared by mismatching environments
_utilities_cache__WEBPACK_IMPORTED_MODULE_8__["cacheString"](_constants__WEBPACK_IMPORTED_MODULE_1__["ENVIRONMENT"], env);
_utilities_cache__WEBPACK_IMPORTED_MODULE_8__["cacheObject"]('store', storeCache);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_9__["default"].request('safetyBanner:dismissBanner');
_utilities_mediator__WEBPACK_IMPORTED_MODULE_9__["default"].publish('fcm:unsubscribe');
_store_store__WEBPACK_IMPORTED_MODULE_6__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_3__["LOGOUT"] });
_utilities_mediator__WEBPACK_IMPORTED_MODULE_9__["default"].publish('api:setTicket');
// Logout against the root frame
navigateTo(__assign(__assign({}, options), { moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["LOGIN"], clearHistory: true }), true);
};
var onCloseModal = function () {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().closeModal();
};
;
if (false ) {}
/***/ }),
/* 10 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Logger", function() { return Logger; });
/* harmony import */ var _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(53);
var properitesFilter = ['password'];
var Logger = /** @class */ (function () {
function Logger() {
}
Logger.init = function (level, enabled) {
this.logLevel = level;
this.logsEnabled = enabled;
};
Logger.log = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.logsEnabled && this.logLevel === _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Debug) {
console.log.apply(console, args);
}
};
Logger.debug = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.logsEnabled && this.logLevel === _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Debug) {
this.logMessage.apply(this, __spreadArrays(['log'], args));
}
};
Logger.info = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.logsEnabled && this.logLevel === _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Debug) {
this.logMessage.apply(this, __spreadArrays(['info'], args));
}
};
Logger.warn = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.logsEnabled && [_constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Debug, _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Warn].indexOf(this.logLevel) !== -1) {
this.logMessage.apply(this, __spreadArrays(['warn'], args));
}
};
Logger.error = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.logsEnabled) {
this.logMessage.apply(this, __spreadArrays(['error'], args));
}
};
Logger.logMessage = function (msgType) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
console.log("------------------------------->");
console[msgType].apply(console, __spreadArrays([msgType.toUpperCase() + ":"], args));
console.log("------------------------------->");
};
Logger.replacer = function (key, val) {
if (properitesFilter.indexOf(key) !== -1) {
return '';
}
return val;
};
/**
* Will return a new object with sensitive properties removed
* If the object is circular, it won't clean it and will just return the original
* object
* @param {*} obj
*/
Logger.cleanObjectProperties = function (obj) {
var stringed = this.cleanObjectPropertiesToString(obj);
if (stringed === null) {
return obj;
}
return JSON.parse(this.cleanObjectPropertiesToString(obj));
};
/**
* Will return a string version of the object with sensitive properties removed
* If the object is circular then it will just return null
* @param {*} obj
*/
Logger.cleanObjectPropertiesToString = function (obj) {
try {
return JSON.stringify(obj, this.replacer, 2);
}
catch (_a) {
return null;
}
};
Logger.logLevel = _constants_enums_log_level__WEBPACK_IMPORTED_MODULE_0__["LogLevel"].Debug;
Logger.logsEnabled = true;
return Logger;
}());
;
if (false ) {}
/***/ }),
/* 11 */,
/* 12 */,
/* 13 */,
/* 14 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionBar", function() { return ActionBar; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46);
/* harmony import */ var _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _components_aware_image__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50);
/* harmony import */ var _components_drawer_content_drawer_content__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(96);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5);
var ActionBar = /** @class */ (function (_super) {
__extends(ActionBar, _super);
function ActionBar() {
var _this = _super.call(this) || this;
_this._lluLogo = 'librelinkup_tiny';
_this.id = 'actionBar';
_this.navigationButton = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["NavigationButton"]();
_this.navigationButton.actionBar = _this;
// Android uses a NavigationButton on the left
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
_this.navigationButton.className = 'icfont icxxsm';
_this.navigationButton.on('tap', _this._navButtonTapped);
_this.navigationButton.actionBar = _this;
}
else {
// iOS uses an ActionItem positioned left
var iosBack = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ActionItem"]();
iosBack.className = 'icfont icsm';
iosBack.ios.position = 'left';
iosBack.on('tap', _this._navButtonTapped);
_this._iosBack = iosBack;
_this.actionItems.addItem(iosBack);
// Disable the OS default nav button
_this.navigationButton.visibility = 'collapsed';
}
_this.setBack();
return _this;
}
ActionBar.prototype.onLoaded = function () {
_super.prototype.onLoaded.call(this);
this.setAndroidOverflowColor();
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
};
ActionBar.prototype.onUnloaded = function () {
_super.prototype.onUnloaded.call(this);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
};
ActionBar.prototype.goBack = function () {
// Just go back if there is no specified view
if (this.navTo === '') {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().canGoBack()) {
_services_navigator__WEBPACK_IMPORTED_MODULE_6__["goBack"]();
return true;
}
else if (this.fallbackNav) {
// If we cant go back, see if we have a fallback nav path
if (typeof _services_navigator__WEBPACK_IMPORTED_MODULE_6__[this.fallbackNav] === 'function') {
_services_navigator__WEBPACK_IMPORTED_MODULE_6__[this.fallbackNav]();
}
else {
_services_navigator__WEBPACK_IMPORTED_MODULE_6__["navigateTo"]({
clearHistory: true,
moduleName: this.fallbackNav,
transition: {
name: 'slideRight',
},
});
}
return true;
}
return false;
}
if (typeof _services_navigator__WEBPACK_IMPORTED_MODULE_6__[this.navTo] === 'function') {
_services_navigator__WEBPACK_IMPORTED_MODULE_6__[this.navTo]({
transition: {
name: 'slideRight',
},
});
}
else {
_services_navigator__WEBPACK_IMPORTED_MODULE_6__["navigateTo"]({
animated: true,
clearHistory: _constants__WEBPACK_IMPORTED_MODULE_5__[this.navTo] === _constants__WEBPACK_IMPORTED_MODULE_5__["MEASUREMENTS_SUMMARY"],
moduleName: _constants__WEBPACK_IMPORTED_MODULE_5__[this.navTo] || this.navTo,
transition: {
name: 'slideRight',
},
});
}
return true;
};
ActionBar.prototype.openMenu = function () {
Object(_components_drawer_content_drawer_content__WEBPACK_IMPORTED_MODULE_4__["toggleDrawer"])();
};
ActionBar.prototype.setAndroidOverflowColor = function () {
if (!this.android) {
return;
}
var appearance = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.systemAppearance;
var isDark = appearance === 'dark';
var toolbar = this.nativeView;
var color = isDark ? new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Color"](255, 207, 69, 32) : new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Color"](255, 233, 85, 38);
toolbar.getOverflowIcon().setTint(color.android);
};
// Update the back button
// Menu has a higher presendence over Back
ActionBar.prototype.setBack = function () {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
if (this.showMenu) {
this.navigationButton.icon = 'font://menu';
this.navigationButton.visibility = 'visible';
}
else if (this.showBack) {
this.navigationButton.icon = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_7__["isRTL"])() ? 'font://abackr' : 'font://aback';
this.navigationButton.visibility = 'visible';
}
else {
this.navigationButton.visibility = 'collapsed';
}
}
else {
if (this.showMenu) {
this._iosBack.icon = 'font://menu';
this._iosBack.visibility = 'visible';
}
else if (this.showBack) {
this._iosBack.icon = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_7__["isRTL"])() ? 'font://backr' : 'font://back';
this._iosBack.visibility = 'visible';
}
else {
this._iosBack.visibility = 'collapsed';
}
}
};
ActionBar.prototype.setLogo = function () {
if (this.showLogo) {
var logo = new _components_aware_image__WEBPACK_IMPORTED_MODULE_3__["AwareImage"]();
logo.src = 'res://' + this._lluLogo;
this.titleView = logo;
}
else {
this.titleView = undefined;
}
};
ActionBar.prototype._handleAppearanceChange = function () {
var _this = this;
setTimeout(function () {
_this.setAndroidOverflowColor();
_this.update();
}, 0);
};
ActionBar.prototype._navButtonTapped = function (args) {
// `this` here is not our ActionBar so we need to retrieve it from the event object
var actionBar = args.object.actionBar;
if (actionBar.showMenu) {
actionBar.openMenu();
}
else {
actionBar.goBack();
}
};
ActionBar.prototype.actionBarAndroidBackHandler = function (args) {
if (this.showBack && !this.showMenu) {
if (this.goBack()) {
args.cancel = true;
}
}
};
return ActionBar;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ActionBar"]));
var fallbackNavProperty = new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'fallbackNav',
defaultValue: '',
});
fallbackNavProperty.register(ActionBar);
var navToProperty = new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'navTo',
defaultValue: '',
});
navToProperty.register(ActionBar);
var showBackProperty = new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'showBack',
defaultValue: true,
valueConverter: _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target) {
target.setBack();
},
});
showBackProperty.register(ActionBar);
var showLogoProperty = new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'showLogo',
defaultValue: false,
valueConverter: _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target) {
target.setLogo();
},
});
showLogoProperty.register(ActionBar);
var showMenuProperty = new _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'showMenu',
defaultValue: false,
valueConverter: _nativescript_core_ui_page__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target) {
target.setBack();
},
});
showMenuProperty.register(ActionBar);
;
if (false ) {}
/***/ }),
/* 15 */,
/* 16 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlucoseItemType", function() { return GlucoseItemType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeviceAlarmType", function() { return DeviceAlarmType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CaregiverAlarmType", function() { return CaregiverAlarmType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ProductType", function() { return ProductType; });
var GlucoseItemType;
(function (GlucoseItemType) {
GlucoseItemType[GlucoseItemType["Scheduled"] = 0] = "Scheduled";
GlucoseItemType[GlucoseItemType["Unscheduled"] = 1] = "Unscheduled";
GlucoseItemType[GlucoseItemType["DeviceAlarm"] = 2] = "DeviceAlarm";
GlucoseItemType[GlucoseItemType["CaregiverAlarm"] = 3] = "CaregiverAlarm";
})(GlucoseItemType || (GlucoseItemType = {}));
var DeviceAlarmType;
(function (DeviceAlarmType) {
DeviceAlarmType[DeviceAlarmType["Low"] = 0] = "Low";
DeviceAlarmType[DeviceAlarmType["High"] = 1] = "High";
DeviceAlarmType[DeviceAlarmType["FixedLow"] = 2] = "FixedLow";
})(DeviceAlarmType || (DeviceAlarmType = {}));
var CaregiverAlarmType;
(function (CaregiverAlarmType) {
CaregiverAlarmType[CaregiverAlarmType["FixedLow"] = 0] = "FixedLow";
CaregiverAlarmType[CaregiverAlarmType["Low"] = 1] = "Low";
CaregiverAlarmType[CaregiverAlarmType["High"] = 2] = "High";
})(CaregiverAlarmType || (CaregiverAlarmType = {}));
var ProductType;
(function (ProductType) {
ProductType[ProductType["UNKNOWN"] = -1] = "UNKNOWN";
ProductType[ProductType["FSL1"] = 0] = "FSL1";
ProductType[ProductType["FSL2"] = 3] = "FSL2";
ProductType[ProductType["FSL3"] = 4] = "FSL3";
})(ProductType || (ProductType = {}));
;
if (false ) {}
/***/ }),
/* 17 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseViewModel", function() { return BaseViewModel; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
var BaseViewModel = /** @class */ (function (_super) {
__extends(BaseViewModel, _super);
function BaseViewModel() {
var _this = _super.call(this) || this;
_this.dismissKeyboard = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["dismissKeyboard"])();
};
return _this;
}
Object.defineProperty(BaseViewModel.prototype, "isRTL", {
get: function () {
return Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["isRTL"])();
},
enumerable: true,
configurable: true
});
Object.defineProperty(BaseViewModel.prototype, "lang", {
get: function () {
return Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["getPhoneLanguage"])();
},
enumerable: true,
configurable: true
});
return BaseViewModel;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"]));
;
if (false ) {}
/***/ }),
/* 18 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BANNER_CLOSED", function() { return BANNER_CLOSED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COUNTRY_CHOSEN", function() { return COUNTRY_CHOSEN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "INITIALIZE_USER", function() { return INITIALIZE_USER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LANGUAGE_CHANGE", function() { return LANGUAGE_CHANGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOGIN", function() { return LOGIN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOGOUT", function() { return LOGOUT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_PHONE_LANGUAGE", function() { return SET_PHONE_LANGUAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SET_TIMEZONE", function() { return SET_TIMEZONE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SYSTEM_MESSAGE_DISMISS", function() { return SYSTEM_MESSAGE_DISMISS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_ACCOUNT_INFO", function() { return UPDATE_ACCOUNT_INFO; });
var BANNER_CLOSED = 'BANNER_CLOSED';
var COUNTRY_CHOSEN = 'COUNTRY_CHOSEN';
var INITIALIZE_USER = 'INITIALIZE_USER';
var LANGUAGE_CHANGE = 'LANGUAGE_CHANGE';
var LOGIN = 'LOGIN';
var LOGOUT = 'LOGOUT';
var SET_PHONE_LANGUAGE = 'SET_PHONE_LANGUAGE';
var SET_TIMEZONE = 'SET_TIMEZONE';
var SYSTEM_MESSAGE_DISMISS = 'SYSTEM_MESSAGE_DISMISS';
var UPDATE_ACCOUNT_INFO = 'UPDATE_ACCOUNT_INFO';
;
if (false ) {}
/***/ }),
/* 19 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "computeXForSlopeFromPoints", function() { return computeXForSlopeFromPoints; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getColors", function() { return getColors; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDay", function() { return formatDay; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatHour", function() { return formatHour; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "momentToRelativeHour", function() { return momentToRelativeHour; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlucoseChartBase", function() { return GlucoseChartBase; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "currentGlucoseProperty", function() { return currentGlucoseProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixedHighThresholdProperty", function() { return fixedHighThresholdProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fixedLowThresholdProperty", function() { return fixedLowThresholdProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "highAlarmProperty", function() { return highAlarmProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMmolPerLProperty", function() { return isMmolPerLProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "itemsProperty", function() { return itemsProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lowAlarmProperty", function() { return lowAlarmProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reviewingProperty", function() { return reviewingProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selectedItemProperty", function() { return selectedItemProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "targetHighThresholdProperty", function() { return targetHighThresholdProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "targetLowThresholdProperty", function() { return targetLowThresholdProperty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "timezoneIdProperty", function() { return timezoneIdProperty; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _nativescript_core_ui_core_weak_event_listener__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74);
/* harmony import */ var _nativescript_core_ui_core_weak_event_listener__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_core_weak_event_listener__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _utilities_date_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(35);
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(45);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__) if(["computeXForSlopeFromPoints","getColors","formatDay","formatHour","momentToRelativeHour","GlucoseChartBase","currentGlucoseProperty","fixedHighThresholdProperty","fixedLowThresholdProperty","highAlarmProperty","isMmolPerLProperty","itemsProperty","lowAlarmProperty","reviewingProperty","selectedItemProperty","targetHighThresholdProperty","targetLowThresholdProperty","timezoneIdProperty","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__[key]; }) }(__WEBPACK_IMPORT_KEY__));
var computeXForSlopeFromPoints = function (p1, p2, newY) {
// X Vaue is the same, so just return that to avoid division by 0
if (p1.x === p2.x) {
return p1.x;
}
// m = y2 - y1 / x2 - x1
var slope = (p2.y - p1.y) / (p2.x - p1.x);
// b = y - mx
var yIntercept = p1.y - slope * p1.x;
return (newY - yIntercept) / slope;
};
/** Gets all the chart colors for the current appearance style both Android and iOS */
var getColors = function () {
var appearance = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].ios
? _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].ios.systemAppearance
: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.systemAppearance;
var isDark = appearance === 'dark';
var colors = {
isDark: isDark,
axisLine: isDark
? new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]((32 * 255) / 100, 255, 255, 255)
: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]((12 * 255) / 100, 0, 0, 0),
axisTick: isDark ? new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#909090') : new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#757575'),
daySplit: isDark ? new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#e6e5e4') : new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]((80 * 255) / 100, 0, 0, 0),
inRange: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#8fcb3a'),
label: isDark ? new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('white') : new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('black'),
low: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#ed1c24'),
outOfRange: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#ffbc04'),
targetRangeBg: isDark
? new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]((30 * 255) / 100, 143, 203, 58)
: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]((20 * 255) / 100, 143, 203, 58),
veryHigh: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#ef6c00'),
};
// Map for measurment color
colors[_constants_enums__WEBPACK_IMPORTED_MODULE_7__["MeasurementColor"].Green] = colors.inRange;
colors[_constants_enums__WEBPACK_IMPORTED_MODULE_7__["MeasurementColor"].Yellow] = colors.outOfRange;
colors[_constants_enums__WEBPACK_IMPORTED_MODULE_7__["MeasurementColor"].Orange] = colors.veryHigh;
colors[_constants_enums__WEBPACK_IMPORTED_MODULE_7__["MeasurementColor"].Red] = colors.low;
// Fallback grey color
colors[0] = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#757575');
return colors;
};
var formatDay = function (time) {
// Use the offset from chart with locale moment
return moment__WEBPACK_IMPORTED_MODULE_4___default.a.unix(time.unix()).utcOffset(time.utcOffset()).format('ddd');
};
var formatHour = function (time) {
var is24Hour = Object(_utilities_date_util__WEBPACK_IMPORTED_MODULE_6__["isPhoneClock24Hour"])();
var lang = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["getPhoneLanguage"])();
var format = 'hA';
if (is24Hour || lang === 'ar') {
format = 'HH';
}
// Use the offset from chart with locale moment
return moment__WEBPACK_IMPORTED_MODULE_4___default.a.unix(time.unix()).utcOffset(time.utcOffset()).format(format);
};
var momentToRelativeHour = function (time, now) {
var midnight = now.clone().startOf('day');
// Use the offset from chart onto the time being converted
return time.utcOffset(now.utcOffset()).diff(midnight, 'hours', true);
};
var GlucoseChartBase = /** @class */ (function (_super) {
__extends(GlucoseChartBase, _super);
function GlucoseChartBase() {
var _this = _super.call(this) || this;
_this.colors = getColors();
_this.fixedLowThreshold = 70;
_this.graphMaximum = 350;
_this.graphMinimum = 0;
_this.now = moment__WEBPACK_IMPORTED_MODULE_4___default()();
return _this;
}
Object.defineProperty(GlucoseChartBase.prototype, "now", {
get: function () {
return this._now.clone();
},
set: function (value) {
// Set the timezone to be used for all the internal chart calculations
this._now = value.tz(this.timezoneId);
},
enumerable: true,
configurable: true
});
GlucoseChartBase.prototype.onLoaded = function () {
_super.prototype.onLoaded.call(this);
var modeBefore = this.colors.isDark;
this.colors = getColors();
// There is a chance dark mode change happened while the app was in the backgrounded
// If so we just need to manually fire of the refresh
if (modeBefore !== this.colors.isDark) {
this.refreshColors();
}
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this.handleAppearanceChange, this);
};
GlucoseChartBase.prototype.onUnloaded = function () {
_super.prototype.onUnloaded.call(this);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this.handleAppearanceChange, this);
};
GlucoseChartBase.prototype.handleAppearanceChange = function (_args) {
this.colors = getColors();
this.refreshColors();
};
GlucoseChartBase.prototype.highlightCurrent = function () {
if (this.currentGlucose &&
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["isGlucoseItemScan"])(this.currentGlucose) &&
this.isCurrentGlucoseRecent()) {
this.selectCurrent({
x: momentToRelativeHour(this.now, this.now),
y: Number(this.currentGlucose.Value),
});
}
else {
this.selectCurrent({
x: momentToRelativeHour(this.now, this.now),
y: -1,
});
}
this.set('reviewing', false);
this.set('selectedItem', this.currentGlucose);
};
// Keep values on the chart
GlucoseChartBase.prototype.normalizeValue = function (value) {
return Math.min(value, this.graphMaximum);
};
GlucoseChartBase.prototype.isCurrentGlucoseRecent = function () {
if (!this.currentGlucose) {
return false;
}
return moment__WEBPACK_IMPORTED_MODULE_4___default.a
.utc(this.currentGlucose.FactoryTimestamp)
.isAfter(this.now.utc().subtract(5, 'minutes'));
};
GlucoseChartBase.prototype.getMeasurementForPoint = function (point) {
var time = this.now.startOf('day');
var item = undefined;
time.add(point.x, 'hours');
if (point.y !== -1) {
// xValues retreived from the chart on Android are off by a millionth of a decimal place
// causing our re-converted date value to be off by a second or 2
item = this.items
.slice()
.find(function (i) {
return i.Value === Number(point.y.toFixed(1)) &&
time.isBefore(moment__WEBPACK_IMPORTED_MODULE_4___default.a.utc(i.FactoryTimestamp).add(2, 'seconds')) &&
time.isAfter(moment__WEBPACK_IMPORTED_MODULE_4___default.a.utc(i.FactoryTimestamp).subtract(2, 'seconds'));
});
}
return item;
};
GlucoseChartBase.prototype.updateSelected = function (point) {
var time = this.now.startOf('day');
var item = undefined;
if (point) {
item = this.getMeasurementForPoint(point);
time.add(point.x, 'hours');
if (item) {
item = __assign({}, item);
}
else {
// Set dummy timestamp for fake data points
item = {};
item.FactoryTimestamp = time.utc().format('M/D/YYYY hh:mm:ss A');
item.type = -1;
}
}
this.set('selectedItem', item);
};
GlucoseChartBase.prototype.refreshAlarms = function () {
//
};
GlucoseChartBase.prototype.refreshColors = function () {
//
};
GlucoseChartBase.prototype.refreshData = function () {
//
};
GlucoseChartBase.prototype.refreshTarget = function () {
//
};
GlucoseChartBase.prototype.selectCurrent = function (_point) {
//
};
GlucoseChartBase.prototype._onItemsChanged = function (_args) {
this.refreshData();
};
GlucoseChartBase = __decorate([
Object(_nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["CSSType"])('GlucoseChart'),
__metadata("design:paramtypes", [])
], GlucoseChartBase);
return GlucoseChartBase;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["View"]));
GlucoseChartBase.prototype.recycleNativeView = 'auto';
var currentGlucoseProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'currentGlucose',
valueChanged: function (target) {
target.refreshData();
},
});
currentGlucoseProperty.register(GlucoseChartBase);
var fixedHighThresholdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'fixedHighThreshold',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
});
fixedHighThresholdProperty.register(GlucoseChartBase);
var fixedLowThresholdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'fixedLowThreshold',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
});
fixedLowThresholdProperty.register(GlucoseChartBase);
var highAlarmProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'highAlarm',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
valueChanged: function (target) {
target.refreshAlarms();
},
});
highAlarmProperty.register(GlucoseChartBase);
var isMmolPerLProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'isMmolPerL',
defaultValue: false,
valueConverter: _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target, oldValue, newValue) {
// TODO: Maybe get these from config?
target.fixedLowThreshold = newValue ? 3.9 : 70;
target.graphMaximum = newValue ? 21 : 350;
target.refreshData();
},
});
isMmolPerLProperty.register(GlucoseChartBase);
var itemsProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'items',
defaultValue: [],
valueChanged: function (target, oldValue, newValue) {
if (oldValue instanceof _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
Object(_nativescript_core_ui_core_weak_event_listener__WEBPACK_IMPORTED_MODULE_3__["removeWeakEventListener"])(oldValue, _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ObservableArray"].changeEvent, target._onItemsChanged, target);
}
if (newValue instanceof _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"]) {
Object(_nativescript_core_ui_core_weak_event_listener__WEBPACK_IMPORTED_MODULE_3__["addWeakEventListener"])(newValue, _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ObservableArray"].changeEvent, target._onItemsChanged, target);
}
target.refreshData();
},
});
itemsProperty.register(GlucoseChartBase);
var lowAlarmProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'lowAlarm',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
valueChanged: function (target) {
target.refreshAlarms();
},
});
lowAlarmProperty.register(GlucoseChartBase);
var reviewingProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'reviewing',
defaultValue: true,
valueConverter: _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target, oldValue, newValue) {
if (!newValue) {
target.highlightCurrent();
}
},
});
reviewingProperty.register(GlucoseChartBase);
var selectedItemProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'selectedItem',
});
selectedItemProperty.register(GlucoseChartBase);
var targetHighThresholdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'targetHighThreshold',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
valueChanged: function (target) {
target.refreshTarget();
},
});
targetHighThresholdProperty.register(GlucoseChartBase);
var targetLowThresholdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'targetLowThreshold',
defaultValue: -1,
valueConverter: function (v) { return Math.max(-1, parseFloat(v)); },
valueChanged: function (target) {
target.refreshTarget();
},
});
targetLowThresholdProperty.register(GlucoseChartBase);
var timezoneIdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'timezoneId',
defaultValue: 'Greenwich',
valueChanged: function (target) {
target.refreshTarget();
// Set graph to current mode as the previous highlight line/dot would correspond to the
// old x-value pre timezone change
target.reviewing = false;
},
});
timezoneIdProperty.register(GlucoseChartBase);
;
if (false ) {}
/***/ }),
/* 20 */,
/* 21 */,
/* 22 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACCOUNT_CREATED", function() { return ACCOUNT_CREATED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACCOUNT_DELETED", function() { return ACCOUNT_DELETED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_ADDED", function() { return CONNECTION_ADDED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_REJECTED", function() { return CONNECTION_REJECTED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_RECEIVED", function() { return NOTIFICATION_RECEIVED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_UNSUBSCRIBE", function() { return NOTIFICATION_UNSUBSCRIBE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NUMBER_OF_CONNECTIONS", function() { return NUMBER_OF_CONNECTIONS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "analyticsProps", function() { return analyticsProps; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logNewUser", function() { return logNewUser; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logConnectionAdded", function() { return logConnectionAdded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logFindView", function() { return logFindView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logView", function() { return logView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logEvent", function() { return logEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logComplexEvent", function() { return logComplexEvent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserProperty", function() { return setUserProperty; });
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42);
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
var analyticsEnabled = _config_config__WEBPACK_IMPORTED_MODULE_1__["appConfig"].analyticsEnabled;
// Screens
var analyticsScreens = [
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["ACCOUNT"], view: 'Account' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["APP_INFO"], view: 'About' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["CHANGE_PASSWORD"], view: 'Change Password' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["CONNECTION_LIST"], view: 'Manage Connections' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["COUNTRY_SELECT"], view: 'Country Select' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["DELETE_ACCOUNT"], view: 'Delete Account' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["EULA"], view: 'Eula' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["GLUCOSE_GRAPH"], view: 'Main Screen' },
{
module: _constants__WEBPACK_IMPORTED_MODULE_2__["HIGH_GLUCOSE_PICKER"],
view: 'Notif Settings - Alarms+NRD Sensor HGA Threshold',
},
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["HELP"], view: 'Help' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["HOME"], view: 'Landing Screen' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["LOGIN"], view: 'Login' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["LOGBOOK"], view: 'Logbook' },
{
module: _constants__WEBPACK_IMPORTED_MODULE_2__["LOW_GLUCOSE_PICKER"],
view: 'Notif Settings - Alarms+NRD Sensor LGA Threshold',
},
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["NEW_FEATURE_MODAL"], view: 'New Features' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["NO_RECENT_DATA"], view: 'Notif Settings - Alarms+NRD Sensor NRD' },
{
module: _constants__WEBPACK_IMPORTED_MODULE_2__["NO_RECENT_DATA_PICKER"],
view: 'Notif Settings - Alarms+NRD Sensor NRD Threshold',
},
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["ONBOARDING_GREETING"], view: 'Onboarding - Welcome' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["ONBOARDING_INTERNET_REQ"], view: 'Onboarding - Internet Required' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["ONBOARDING_NOTIFICATIONS"], view: 'Onboarding - Enable Notifications' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["ONBOARDING_WARNING"], view: 'Onboarding - Warning' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["PRIVACY"], view: 'Privacy Policy' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["REGISTER"], view: 'Register' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["FORGOT_PASSWORD"], view: 'Reset Password' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["VERIFY_EMAIL"], view: 'Verify Email Required' },
{ module: _constants__WEBPACK_IMPORTED_MODULE_2__["WELCOME_OVERVIEW"], view: 'Welcome Overview' },
];
// Events
var ACCOUNT_CREATED = 'account_created';
var ACCOUNT_DELETED = 'account_deleted';
var CONNECTION_ADDED = 'connection_added';
var CONNECTION_REJECTED = 'connection_rejected';
var NOTIFICATION_RECEIVED = 'notification_received';
var NOTIFICATION_UNSUBSCRIBE = 'notification_unsubscribe';
// Event Parameters
var NUMBER_OF_CONNECTIONS = 'number_of_connections';
// User Properties
var analyticsProps = {
connectionCount: 'connection_count',
};
var logNewUser = function () {
if (analyticsEnabled) {
logEvent(ACCOUNT_CREATED);
for (var prop in analyticsProps) {
setUserProperty(analyticsProps[prop], 'not set');
}
}
};
var logConnectionAdded = function () {
if (analyticsEnabled) {
logEvent(CONNECTION_ADDED);
setUserProperty(analyticsProps.connectionCount, _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().connection.connections.length.toString());
}
};
var logFindView = function (module) {
var screen = analyticsScreens.find(function (m) { return m.module === module; });
if (screen && screen.view) {
logView(screen.view);
}
};
var logView = function (view) {
if (analyticsEnabled) {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0___default.a.analytics.setScreenName({
screenName: view,
});
}
};
var logEvent = function (k) {
var p = [];
for (var _i = 1; _i < arguments.length; _i++) {
p[_i - 1] = arguments[_i];
}
if (analyticsEnabled) {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0___default.a.analytics.logEvent({
key: k,
parameters: __spreadArrays(p),
});
}
};
var logComplexEvent = function (k) {
var p = [];
for (var _i = 1; _i < arguments.length; _i++) {
p[_i - 1] = arguments[_i];
}
if (analyticsEnabled) {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0___default.a.analytics.logComplexEvent({
key: k,
parameters: __spreadArrays(p),
});
}
};
var setUserProperty = function (k, v) {
if (analyticsEnabled) {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_0___default.a.analytics.setUserProperty({
key: k,
value: v,
});
}
};
;
if (false ) {}
/***/ }),
/* 23 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cacheObject", function() { return cacheObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCachedObject", function() { return getCachedObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cacheString", function() { return cacheString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCachedString", function() { return getCachedString; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cacheBoolean", function() { return cacheBoolean; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCachedBoolean", function() { return getCachedBoolean; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cacheNumber", function() { return cacheNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCachedNumber", function() { return getCachedNumber; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeKey", function() { return removeKey; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasKey", function() { return hasKey; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clearCache", function() { return clearCache; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
// Cache: String or String Array using JSON
function cacheObject(key, value) {
var dataString = JSON.stringify(value);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].setString(key, dataString);
}
function getCachedObject(key, defaultValue) {
if (defaultValue === void 0) { defaultValue = null; }
var dataString = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].getString(key, '');
try {
return JSON.parse(dataString);
}
catch (e) {
return defaultValue;
}
}
// Cache: String or String Array
function cacheString(key, value) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].setString(key, value);
}
function getCachedString(key, defaultValue) {
if (defaultValue === void 0) { defaultValue = ''; }
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].getString(key, defaultValue);
}
// Cache: Boolean
function cacheBoolean(key, value) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].setBoolean(key, value);
}
function getCachedBoolean(key, defaultValue) {
if (defaultValue === void 0) { defaultValue = false; }
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].getBoolean(key, defaultValue);
}
// Cache: Number
function cacheNumber(key, value) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].setNumber(key, value);
}
function getCachedNumber(key, defaultValue) {
if (defaultValue === void 0) { defaultValue = 0; }
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].getNumber(key, defaultValue);
}
function removeKey(key) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].remove(key);
}
function hasKey(key) {
return _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].hasKey(key);
}
function clearCache() {
var uuidKey = 'TNSUUID';
var deviceId = getCachedString(uuidKey);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].clear();
// Save back the device uuid after clear so that a new one is not generated in its place
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
cacheString(uuidKey, deviceId);
}
}
;
if (false ) {}
/***/ }),
/* 24 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwareLottie", function() { return AwareLottie; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21);
/* harmony import */ var _nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var nativescript_lottie__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(382);
/* harmony import */ var nativescript_lottie__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nativescript_lottie__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
var AwareLottie = /** @class */ (function (_super) {
__extends(AwareLottie, _super);
function AwareLottie() {
var _this = _super.call(this) || this;
_this.autoPlay = true;
return _this;
}
AwareLottie.prototype.onLoaded = function () {
_super.prototype.onLoaded.call(this);
// Watch src change to be able to track a new internal src
this.on('srcChange', this._handleSrcChange, this);
// Track the original src so it is not replaced by a dark mode version
this._src = this.src;
this._handleDarkLottie();
if (this.autoPlay && !this.isAnimating()) {
this.playAnimation();
}
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
};
AwareLottie.prototype.onUnloaded = function () {
_super.prototype.onUnloaded.call(this);
this.off('srcChange', this._handleSrcChange, this);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
};
// NOTE NS7+: Can remove this override method if it no longer works in NS7
AwareLottie.prototype.setSrc = function (src) {
var _this = this;
// Remove the res:// prefix because NS6 lottie plugin doesn't do it for us
var cleanedSrc = src.replace(_nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_2__["RESOURCE_PREFIX"], '');
// Android can crash if we try to load a lottie file that does not exist, so we check on our own
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
var fp = cleanedSrc;
if (!fp.endsWith('.json')) {
fp += '.json';
}
var context = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.context;
var mg = context.getResources().getAssets();
var is = null;
// We attempt to load the file ourselves first to be able to catch the exception
try {
is = mg.open(fp);
// File safely exist on Android
}
catch (e) {
// Bail out to prevent the plugin from loading the bad file
return;
}
finally {
// Close the input stream
if (is !== null) {
is.close();
}
}
}
try {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
// Call the original parent setSrc to actually display the lottie
_super.prototype.setSrc.call(this, cleanedSrc);
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
setTimeout(function () {
_this._handleSrcChange({
value: src,
propertyName: 'src',
object: _this,
eventName: 'propertyChanged',
});
}, 0);
}
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_4__["Logger"].error('Failed to load lottie', src, e);
}
};
AwareLottie.prototype._handleAppearanceChange = function () {
var _this = this;
setTimeout(function () {
if (Object(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearance"])() === 'dark') {
_this._handleDarkLottie();
}
else {
_this.src = _this._src;
}
if (_this.autoPlay && !_this.isAnimating()) {
_this.playAnimation();
}
}, 0);
};
AwareLottie.prototype._handleDarkLottie = function () {
var _this = this;
if (!this._src) {
return;
}
if (Object(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearance"])() === 'dark' && !/_dark(\.json)?$/.test(this._src)) {
var dark = this._src.replace(/\.json$/, '');
dark += '_dark';
if (this._src.endsWith('.json')) {
dark += '.json';
}
// If the dark file does not exist on android, the app throws an exception
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
var fp = dark.replace(_nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_2__["RESOURCE_PREFIX"], '');
if (!fp.endsWith('.json')) {
fp += '.json';
}
var context = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.context;
var mg = context.getResources().getAssets();
var is = null;
// We attempt to load the file ourselves first to be able to catch the exception
try {
is = mg.open(fp);
// File safely exist on Android
this.src = dark;
}
catch (e) {
//
}
finally {
// Close the input stream
if (is !== null) {
is.close();
}
}
}
else {
// iOS does not crash if the file does not exist
this.src = dark;
}
// Failed to load a dark mode lottie, resort back to normal lottie
setTimeout(function () {
if (_this.duration <= 0) {
_this._reverting = true;
_this.src = _this._src;
}
}, 0);
}
};
AwareLottie.prototype._handleSrcChange = function (args) {
var _this = this;
if (!args.value) {
return;
}
// Set internal src if we have not done so already
if (this._src === undefined) {
this._src = args.value;
}
// Track the new animation if it is a different animation (not dark)
if (!args.value.startsWith(this._src.replace(/\.json$/, '')) ||
!/_dark(\.json)?$/.test(args.value)) {
this._src = args.value;
}
// Attempt to load animation as dark. reverting flag to prevent infinite loop of src change
if (!this._reverting) {
this._handleDarkLottie();
}
if (this.autoPlay && !this.isAnimating()) {
this.playAnimation();
}
// Can safely clear reverting flag at this point
setTimeout(function () {
_this._reverting = false;
}, 0);
};
return AwareLottie;
}(nativescript_lottie__WEBPACK_IMPORTED_MODULE_3__["LottieView"]));
;
if (false ) {}
/***/ }),
/* 25 */,
/* 26 */,
/* 27 */,
/* 28 */,
/* 29 */,
/* 30 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appConfig", function() { return appConfig; });
// eslint-disable-next-line @typescript-eslint/no-var-requires
var appConfig = __webpack_require__(683);
;
if (false ) {}
/***/ }),
/* 31 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidEmail", function() { return isValidEmail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isValidPassword", function() { return isValidPassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return isEmpty; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isLength", function() { return isLength; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isUserMinorAge", function() { return isUserMinorAge; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasValidProfileInputs", function() { return hasValidProfileInputs; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPasswordRequirements", function() { return getPasswordRequirements; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "areRegistrationParamsValid", function() { return areRegistrationParamsValid; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getSecurityErrorMessage", function() { return getSecurityErrorMessage; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var validator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(195);
/* harmony import */ var validator__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(validator__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/**
* Validates standard email formats.
* Example: test@test.com
* Allows the following special chars `~!#$%^&*-_={}|/?'+"
* @param email string
*/
var isValidEmail = function (email) {
var emailReg = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i;
if (typeof email == 'undefined' ||
!emailReg.test(email.trim()) ||
!validator__WEBPACK_IMPORTED_MODULE_2___default.a.isLength(email.trim(), { min: 5, max: 255 })) {
return false;
}
return true;
};
/**
* Validates password based on rules fetched from service-config
* @param password
*/
var isValidPassword = function (password) {
var rules = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.passwordRules.rules;
var patternString = '^';
var minLength = '0', maxLength = '';
if (isEmpty(password)) {
return false;
}
for (var rule in rules) {
if (rule === 'min') {
minLength = rules[rule].value;
}
else if (rule === 'max') {
maxLength = rules[rule].value;
}
else {
patternString += "(?=.*?" + rules[rule].value + ")";
}
}
patternString += ".{" + minLength + "," + maxLength + "}$";
var pattern = new RegExp(patternString);
return pattern.test(password);
};
var isEmpty = function (s) {
return s.length < 1;
};
/**
* Check if a string is a certain length of bytes
* @param str
* @param options
*/
var isLength = function (str, options) {
return validator__WEBPACK_IMPORTED_MODULE_2___default.a.isByteLength(str, options);
};
/**
* Calculates minimum dob required to register based
* off minorityAge from config and compares to
* dob to determine if user is a minor.
*
* dob and minDob are in milliseconds.
* @param dob number
*/
var isUserMinorAge = function (dob) {
var minDob = moment__WEBPACK_IMPORTED_MODULE_1___default.a
.utc()
.subtract(_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.minorityAge, 'years')
.startOf('day')
.unix();
if (minDob < dob) {
return true;
}
return false;
};
/**
* Validates standard user profile update inputs.
* @param email string
* @param fname first name string
* @param lname lastname string
* @param password string
*/
var hasValidProfileInputs = function (fname, lname, password) {
if (isEmpty(fname) || isEmpty(lname)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.nameFieldRequired'));
return false;
}
if (fname.length > 40) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.invalid_firstname_length'));
return false;
}
if (lname.length > 80) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.invalid_lastname_length'));
return false;
}
if (!isValidPassword(password)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])("" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('invalidPasswordErrorMessageShort'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('PasswordRequirements.passwordRequirements') + "\n \n" + getPasswordRequirements()
.map(function (req) { return "\u2022 " + req + "\n"; })
.join(''));
return false;
}
return true;
};
/**
* Validates the inputs used during user registration.
* @param user object
* @param pwconfirm password confirmation input
*/
var getPasswordRequirements = function () {
var passwordRules = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.passwordRules;
var rules = passwordRules.rules;
var requirements = passwordRules.PasswordRequirements.map(function (req) {
switch (req) {
case 1:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("PasswordRequirements." + req, rules.min.value, rules.max.value);
case 3:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("PasswordRequirements." + req, '1');
case 4:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("PasswordRequirements." + req, '1');
default:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("PasswordRequirements." + req);
}
});
return requirements;
};
var areRegistrationParamsValid = function (user, pwconfirm) {
if (isEmpty(user.firstname) || isEmpty(user.lastname)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.nameFieldRequired'));
return false;
}
if (user.firstname.length > 40) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.invalid_firstname_length'));
return false;
}
if (user.lastname.length > 80) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.invalid_lastname_length'));
return false;
}
if (isEmpty(user.dateOfBirth)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.invalid_birthday'));
return false;
}
if (isUserMinorAge(user.dateOfBirth)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.tooYoungErrorMessage'));
return false;
}
if (!isValidEmail(user.email)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidEmailAddressErrorMessage'));
return false;
}
if (!isValidPassword(user.password)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])("" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('invalidPasswordErrorMessageShort'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('PasswordRequirements.passwordRequirements') + "\n \n" + getPasswordRequirements()
.map(function (req) { return "\u2022 " + req + "\n"; })
.join(''));
return false;
}
if (pwconfirm !== user.password) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.passwordMismatchErrorMessage'));
return false;
}
return true;
};
/**
* Get the translated error message for the corresponding security rule error
*
* @param secRuleErr Security rule error definition
*/
var getSecurityErrorMessage = function (_a) {
var code = _a.code, _b = _a.data, data = _b === void 0 ? {} : _b, message = _a.message;
var errMsg = '';
switch (code) {
case 11: // Change lock
// Interval is in seconds, error message expects hours
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.' + code, String(data.interval / 60 / 60));
break;
case 13:
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.' + code + '_' + message);
break;
case 14: // Generations
// Limit of 0 means no reusable passwords
var key = 'SecurityRules.' + code + '_' + data.limit;
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])(key);
if (errMsg === key) {
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.' + code, String(data.limit));
}
break;
case 16:
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.15', String(data.limit));
break;
case 60: // Lockout time is in seconds, error message expects minutes
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.' + code, String(data.lockout / 60));
break;
default:
errMsg = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SecurityRules.' + code, String(data.limit));
}
return errMsg;
};
;
if (false ) {}
/***/ }),
/* 32 */,
/* 33 */,
/* 34 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_CONNECTION", function() { return UPDATE_CONNECTION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_CONNECTION_SETTINGS", function() { return UPDATE_CONNECTION_SETTINGS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UPDATE_CONNECTIONS", function() { return UPDATE_CONNECTIONS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UNFOLLOW_CONNECTION", function() { return UNFOLLOW_CONNECTION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ADD_CONNECTION", function() { return ADD_CONNECTION; });
var UPDATE_CONNECTION = 'UPDATE_CONNECTION';
var UPDATE_CONNECTION_SETTINGS = 'UPDATE_CONNECTION_SETTINGS';
var UPDATE_CONNECTIONS = 'UPDATE_CONNECTIONS';
var UNFOLLOW_CONNECTION = 'UNFOLLOW_CONNECTION';
var ADD_CONNECTION = 'ADD_CONNECTION';
;
if (false ) {}
/***/ }),
/* 35 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateRelativeTime", function() { return dateRelativeTime; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFormatDateForTimezone", function() { return getFormatDateForTimezone; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateShortDate", function() { return dateShortDate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noZoneShortDate", function() { return noZoneShortDate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dateTimeStamp", function() { return dateTimeStamp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDateObject", function() { return createDateObject; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "storeDeviceTimezoneInfo", function() { return storeDeviceTimezoneInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getTimeFormat", function() { return getTimeFormat; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isPhoneClock24Hour", function() { return isPhoneClock24Hour; });
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _app_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
/* harmony import */ var _reducers_user_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
function dateRelativeTime(value) {
var timezoneId = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.timezoneId;
if (!_isValidDate(value)) {
return '';
}
var localTime = _getLocalUtcDateString(value, timezoneId);
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(localTime, 'MM/DD/YYYY hh:mm:ss A').tz(timezoneId).format();
var relativeTime = moment__WEBPACK_IMPORTED_MODULE_0___default()(dateMoment).fromNow();
return relativeTime;
}
function getFormatDateForTimezone(date) {
var timezoneId = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.timezoneId;
var localTime = _getLocalUtcDateString(date, timezoneId);
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(localTime, 'MM/DD/YYYY').tz(timezoneId).format();
var dateString = dateMoment.substring(0, dateMoment.indexOf('T'));
return dateString;
}
function dateShortDate(value) {
var timezoneId = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.timezoneId;
if (!_isValidDate(value)) {
return '';
}
var localTime = _getLocalUtcDateString(value, timezoneId);
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(localTime, 'MM/DD/YYYY hh:mm:ss A');
var formatedDate = dateMoment.format('LL');
return formatedDate;
}
function noZoneShortDate(value) {
var utcMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(value);
var formatedDate = moment__WEBPACK_IMPORTED_MODULE_0___default()(utcMoment).format('LL');
return formatedDate;
}
function dateTimeStamp(value) {
// get the properly formated date by timezone.
var timezoneId = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.timezoneId;
if (!_isValidDate(value)) {
return '';
}
var localTime = _getLocalUtcDateString(value, timezoneId);
var dateMoment = moment__WEBPACK_IMPORTED_MODULE_0___default()(localTime, 'MM/DD/YYYY hh:mm:ss A');
var tzMoment = dateMoment.tz(timezoneId).format();
var formatedTime = moment__WEBPACK_IMPORTED_MODULE_0___default()(tzMoment).format(getTimeFormat());
return formatedTime;
}
function createDateObject(dateString) {
var format = 'DD MM YYYY';
if (_store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.country === 'US') {
format = 'MM DD YYYY';
}
return moment__WEBPACK_IMPORTED_MODULE_0___default()(dateString, format).toDate();
}
function storeDeviceTimezoneInfo() {
_storeDeviceTimeZoneInfo();
}
function getTimeFormat() {
var is24HourFormat = isPhoneClock24Hour();
var language = _app_util__WEBPACK_IMPORTED_MODULE_3__["getPhoneLanguage"]();
if (language === 'ar') {
return 'LT';
}
if (!is24HourFormat) {
return 'h:mm A';
}
else {
return 'HH:mm';
}
}
function isPhoneClock24Hour() {
try {
if (_nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__["isAndroid"]) {
var context = _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["android"].context;
return android.text.format.DateFormat.is24HourFormat(context);
}
if (_nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__["isIOS"]) {
var formatedHoursString = NSDateFormatter.dateFormatFromTemplateOptionsLocale('j', 0, NSLocale.currentLocale);
var containsA = formatedHoursString.indexOf('a');
// "-1 is false"
if (containsA === -1) {
return true;
}
else {
return false;
}
}
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error('>>> Error getting clock setting: ' + e.message);
}
}
function _getLocalUtcDateString(utcDateString, timezoneId) {
var utcMoment = moment__WEBPACK_IMPORTED_MODULE_0___default.a.utc(utcDateString, 'MM/DD/YYYY hh:mm:ss A');
var localTimeTz = moment__WEBPACK_IMPORTED_MODULE_0___default.a.utc(utcMoment).tz(timezoneId).format('MM/DD/YYYY hh:mm:ss A');
return localTimeTz;
}
function _storeDeviceTimeZoneInfo() {
var timezoneId;
if (_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["android"]) {
timezoneId = java.util.TimeZone.getDefault().getID();
}
else if (_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["ios"]) {
timezoneId = NSTimeZone.localTimeZone.name;
}
var timezone = moment__WEBPACK_IMPORTED_MODULE_0___default()().tz(timezoneId).zoneAbbr();
_store_store__WEBPACK_IMPORTED_MODULE_5__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_4__["SET_TIMEZONE"], timezone: timezone, timezoneId: timezoneId });
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].debug('>>> APPLICATION TZID = ' + timezoneId);
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].debug('>>> APPLICATION TIME ZONE = ' + timezone);
}
function _isValidDate(date) {
if (!date || !moment__WEBPACK_IMPORTED_MODULE_0___default()(date).isValid()) {
return false;
}
else {
return true;
}
}
;
if (false ) {}
/***/ }),
/* 36 */,
/* 37 */,
/* 38 */,
/* 39 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppVersion", function() { return getAppVersion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAppBuildVersion", function() { return getAppBuildVersion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayAlertAppStore", function() { return displayAlertAppStore; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_appversion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(124);
/* harmony import */ var nativescript_appversion__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_appversion__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _cache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23);
/* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
function getAppVersion() {
return nativescript_appversion__WEBPACK_IMPORTED_MODULE_1__["getVersionNameSync"]();
}
function getAppBuildVersion() {
return nativescript_appversion__WEBPACK_IMPORTED_MODULE_1__["getVersionNameSync"]() + "(" + nativescript_appversion__WEBPACK_IMPORTED_MODULE_1__["getVersionCodeSync"]() + ")";
}
function displayAlertAppStore() {
if (_cache__WEBPACK_IMPORTED_MODULE_5__["getCachedBoolean"](_constants__WEBPACK_IMPORTED_MODULE_2__["NAG_ALERT_ACTIVE"])) {
return;
}
var _a = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config, lluAppAndroid = _a.lluAppAndroid, lluAppIOS = _a.lluAppIOS;
_cache__WEBPACK_IMPORTED_MODULE_5__["cacheBoolean"](_constants__WEBPACK_IMPORTED_MODULE_2__["NAG_ALERT_ACTIVE"], true);
_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertAppStore"]()
.then(function () {
_cache__WEBPACK_IMPORTED_MODULE_5__["cacheBoolean"](_constants__WEBPACK_IMPORTED_MODULE_2__["NAG_ALERT_ACTIVE"], false);
var platformUrl = lluAppIOS;
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"]) {
platformUrl = lluAppAndroid;
}
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Utils"].openUrl(platformUrl);
})
.catch(function (error) {
_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error("errorDisplayingNagAlert: " + error);
});
}
;
if (false ) {}
/***/ }),
/* 40 */,
/* 41 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONTINUE_AUTH", function() { return CONTINUE_AUTH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_AUTH_TICKET", function() { return USER_AUTH_TICKET; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_LEGACY_TOKEN", function() { return USER_LEGACY_TOKEN; });
var CONTINUE_AUTH = 'CONTINUE_AUTH';
var USER_AUTH_TICKET = 'USER_AUTH_TICKET';
var USER_LEGACY_TOKEN = 'USER_LEGACY_TOKEN';
;
if (false ) {}
/***/ }),
/* 42 */,
/* 43 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FloatLabel", function() { return FloatLabel; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(26);
/* harmony import */ var _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _nativescript_core_ui_layouts_grid_layout_grid_layout__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75);
/* harmony import */ var _nativescript_core_ui_layouts_grid_layout_grid_layout__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_layouts_grid_layout_grid_layout__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
var FloatLabel = /** @class */ (function (_super) {
__extends(FloatLabel, _super);
function FloatLabel() {
var _this = _super.call(this) || this;
_this.addRow(new _nativescript_core_ui_layouts_grid_layout_grid_layout__WEBPACK_IMPORTED_MODULE_3__["ItemSpec"](20, 'pixel'));
_this.addRow(new _nativescript_core_ui_layouts_grid_layout_grid_layout__WEBPACK_IMPORTED_MODULE_3__["ItemSpec"](45, 'pixel'));
var label = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Label"]();
var textField = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["TextField"]();
_this._label = label;
_this._textField = textField;
label.row = 1;
label.paddingBottom = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"] ? 10 : 0;
textField.row = 1;
label.className = 'floatLabel label';
textField.className = 'floatLabel textField';
_this.textFieldColor === undefined ? '' : (textField.className += " " + _this.textFieldColor);
_this.addChild(label);
_this.addChild(textField);
return _this;
}
FloatLabel.prototype.onLoaded = function () {
var _this = this;
_super.prototype.onLoaded.call(this);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["suspendEvent"], this.clearSecureField, this);
var label = this._label;
var textField = this._textField;
textField.on('focus', function () {
_this.float();
});
textField.on('blur', function () {
if (!textField.text) {
_this.blur();
}
});
// Update the parent text with the TextField's value
textField.on('textChange', function (data) {
_this.set('text', data.value);
if (_this.text !== '') {
// Float the label if the field was programtically filled
_this.float(false);
}
else {
// Reset the label if the field was progmatically cleared
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
var ios = textField.ios;
if (ios && !ios.editing) {
_this.blur();
}
}
else {
var andr = textField.android;
if (andr && !andr.hasFocus()) {
_this.blur(false);
}
}
}
});
textField.on('returnPress', function (args) {
_this.notify(__assign(__assign({}, args), { view: _this, object: _this }));
});
textField.on('tap', function () {
_this.tap && _this.tap();
});
if (!this._hasBinded) {
this._hasBinded = true;
// Bind all passthrough properties the textfield may expect
textField.bind({ sourceProperty: 'autocapitalizationType', targetProperty: 'autocapitalizationType' }, this);
textField.bind({ sourceProperty: 'autocorrect', targetProperty: 'autocorrect' }, this);
textField.bind({ sourceProperty: 'closeOnReturn', targetProperty: 'closeOnReturn' }, this);
textField.bind({ sourceProperty: 'editable', targetProperty: 'editable' }, this);
textField.bind({ sourceProperty: 'keyboardType', targetProperty: 'keyboardType' }, this);
textField.bind({ sourceProperty: 'maxLength', targetProperty: 'maxLength' }, this);
textField.bind({ sourceProperty: 'returnKeyType', targetProperty: 'returnKeyType' }, this);
textField.bind({ sourceProperty: 'secure', targetProperty: 'secure' }, this);
textField.bind({ sourceProperty: 'text', targetProperty: 'text' }, this);
// Bind the hint onto the Label text
label.bind({ sourceProperty: 'hint', targetProperty: 'text' }, this);
}
};
FloatLabel.prototype.onUnloaded = function () {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["suspendEvent"], this.clearSecureField, this);
_super.prototype.onUnloaded.call(this);
};
FloatLabel.prototype.blur = function (animate) {
if (animate === void 0) { animate = true; }
this._label.fontSize = 18;
this._label.marginLeft = 0;
this._label.marginRight = 0;
this._label.animate({
duration: animate ? 300 : 0.1,
translate: { x: 0, y: 0 },
});
};
FloatLabel.prototype.float = function (animate) {
if (animate === void 0) { animate = true; }
var marginVal = 3;
var yVal = -10;
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
marginVal = 0;
yVal = -18;
}
this._label.fontSize = 13;
this._label.marginLeft = marginVal;
this._label.marginRight = marginVal;
this._label.animate({
duration: animate ? 300 : 0.1,
translate: { x: 0, y: yVal },
});
};
FloatLabel.prototype.clearSecureField = function () {
if (this.secure) {
this.set('text', '');
}
};
return FloatLabel;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["GridLayout"]));
var textFieldColorProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'textFieldColor',
defaultValue: '',
valueChanged: function (target, oldValue, newValue) {
// Update
target._textField.className =
target._textField.className.replace(oldValue, '') + ' ' + newValue;
},
});
textFieldColorProperty.register(FloatLabel);
// Passthrough Properties
var autocapitalizationTypeProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'autocapitalizationType',
defaultValue: 'none',
});
autocapitalizationTypeProperty.register(FloatLabel);
var autocorrectProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'autocorrect',
valueConverter: _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
});
autocorrectProperty.register(FloatLabel);
var closeOnReturnProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'closeOnReturn',
defaultValue: true,
valueConverter: _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
});
closeOnReturnProperty.register(FloatLabel);
var editableProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'editable',
defaultValue: true,
valueConverter: _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
});
editableProperty.register(FloatLabel);
var hintProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'hint',
defaultValue: '',
});
hintProperty.register(FloatLabel);
var keyboardTypeProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'keyboardType',
});
keyboardTypeProperty.register(FloatLabel);
var maxLengthProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'maxLength',
defaultValue: Number.POSITIVE_INFINITY,
valueConverter: parseInt,
});
maxLengthProperty.register(FloatLabel);
var returnKeyTypeProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'returnKeyType',
});
returnKeyTypeProperty.register(FloatLabel);
var secureProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'secure',
defaultValue: false,
valueConverter: _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target, oldValue, newValue) {
// Required for password TextFields on Android
if (newValue && Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["isRTL"])()) {
target._textField.textAlignment = 'right';
}
},
});
secureProperty.register(FloatLabel);
var textProperty = new _nativescript_core_ui_editable_text_base_editable_text_base__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'text',
defaultValue: '',
});
textProperty.register(FloatLabel);
;
if (false ) {}
/***/ }),
/* 44 */,
/* 45 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _measurements_color__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(165);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MeasurementColor", function() { return _measurements_color__WEBPACK_IMPORTED_MODULE_0__["MeasurementColor"]; });
/* harmony import */ var _mobile_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(166);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DevicePlatform", function() { return _mobile_platform__WEBPACK_IMPORTED_MODULE_1__["DevicePlatform"]; });
/* harmony import */ var _api_status__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(167);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ApiStatus", function() { return _api_status__WEBPACK_IMPORTED_MODULE_2__["ApiStatus"]; });
/* harmony import */ var _log_level__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LogLevel", function() { return _log_level__WEBPACK_IMPORTED_MODULE_3__["LogLevel"]; });
/* harmony import */ var _trend__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(168);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TrendValue", function() { return _trend__WEBPACK_IMPORTED_MODULE_4__["TrendValue"]; });
/* harmony import */ var _uom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(169);
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "UOM", function() { return _uom__WEBPACK_IMPORTED_MODULE_5__["UOM"]; });
;
if (false ) {}
/***/ }),
/* 46 */,
/* 47 */,
/* 48 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoadingButton", function() { return LoadingButton; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "runningProperty", function() { return runningProperty; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__);
var LoadingButton = /** @class */ (function (_super) {
__extends(LoadingButton, _super);
function LoadingButton() {
return _super.call(this) || this;
}
LoadingButton.prototype.onLoaded = function () {
_super.prototype.onLoaded.call(this);
var root = Object(_nativescript_core_application_application__WEBPACK_IMPORTED_MODULE_1__["getRootView"])();
var main = root.mainContent;
this.spinner = main.getViewById('rootSpinner');
};
// Disable the button and activate the root spinner, then turn it off when the action is done
LoadingButton.prototype.handleRunning = function (result) {
var _this = this;
this.running = true;
this.spinner.busy = true;
// This will resolve the value as itself and wait if it is a unresolved promise
Promise.resolve(result).then(function () {
_this.running = false;
_this.spinner.busy = false;
});
};
return LoadingButton;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Button"]));
var runningProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["Property"]({
name: 'running',
defaultValue: false,
valueConverter: _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_2__["booleanConverter"],
valueChanged: function (target, oldValue, newValue) {
target.isEnabled = !newValue;
},
});
runningProperty.register(LoadingButton);
;
if (false ) {}
/***/ }),
/* 49 */,
/* 50 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AwareImage", function() { return AwareImage; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_ui_image_image__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95);
/* harmony import */ var _nativescript_core_ui_image_image__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_image_image__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
var AwareImage = /** @class */ (function (_super) {
__extends(AwareImage, _super);
function AwareImage() {
var _this = _super.call(this) || this;
_this.lang = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().user.phoneLanguage.split('-')[0];
_this.stretch = 'none';
return _this;
}
AwareImage.prototype.onLoaded = function () {
var _this = this;
_super.prototype.onLoaded.call(this);
this._src = this.src;
this.setImage();
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
this._unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_3__["observeStore"])(function (_a) {
var user = _a.user;
return ({ lang: user.phoneLanguage });
}, function (_a) {
var lang = _a.lang;
_this.lang = lang.split('-')[0];
_this.setImage();
});
};
AwareImage.prototype.onUnloaded = function () {
_super.prototype.onUnloaded.call(this);
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearanceChangedEvent"], this._handleAppearanceChange, this);
this._unSub && this._unSub();
};
AwareImage.prototype.setImage = function () {
var fileName = this._src;
var lang = "_" + this.lang;
var theme = Object(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["systemAppearance"])() === 'dark' ? '_dark' : '';
if (fileName !== undefined) {
// Attempt loading lang + theme specific image first
this.imageSource = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ImageSource"].fromFileOrResourceSync(fileName + lang + theme);
// Attempt loading lang specific image
if (this.imageSource === null) {
this.imageSource = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ImageSource"].fromFileOrResourceSync(fileName + lang);
// Attempt loading theme specific image
if (this.imageSource === null) {
this.imageSource = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ImageSource"].fromFileOrResourceSync(fileName + theme);
// Load default image
if (this.imageSource === null) {
this.imageSource = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ImageSource"].fromFileOrResourceSync(fileName);
}
}
}
}
else {
// Clear the image
this.imageSource = null;
}
};
AwareImage.prototype._handleAppearanceChange = function () {
var _this = this;
setTimeout(function () {
_this.setImage();
}, 0);
};
// Overwrite the internal src with the new value and rebuild the image source on outside src change
AwareImage.prototype[_nativescript_core_ui_image_image__WEBPACK_IMPORTED_MODULE_2__["srcProperty"].setNative] = function (value) {
this._src = value;
this.setImage();
};
return AwareImage;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Image"]));
;
if (false ) {}
/***/ }),
/* 51 */,
/* 52 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ACCOUNT", function() { return ACCOUNT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_INFO", function() { return APP_INFO; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CHANGE_PASSWORD", function() { return CHANGE_PASSWORD; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_LIST", function() { return CONNECTION_LIST; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "COUNTRY_SELECT", function() { return COUNTRY_SELECT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DELETE_ACCOUNT", function() { return DELETE_ACCOUNT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EULA", function() { return EULA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FORGOT_PASSWORD", function() { return FORGOT_PASSWORD; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GLUCOSE_GRAPH", function() { return GLUCOSE_GRAPH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_DASHED_LINES", function() { return GRAPH_TUTORIAL_DASHED_LINES; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_GREEN_AREA", function() { return GRAPH_TUTORIAL_GREEN_AREA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_MODAL_ROOT", function() { return GRAPH_TUTORIAL_MODAL_ROOT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GRAPH_TUTORIAL_TAP_ANYWHERE", function() { return GRAPH_TUTORIAL_TAP_ANYWHERE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HELP", function() { return HELP; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HIGH_GLUCOSE_ALARM", function() { return HIGH_GLUCOSE_ALARM; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HIGH_GLUCOSE_PICKER", function() { return HIGH_GLUCOSE_PICKER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HOME", function() { return HOME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOADER", function() { return LOADER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOGIN", function() { return LOGIN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOGBOOK", function() { return LOGBOOK; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOW_GLUCOSE_ALARM", function() { return LOW_GLUCOSE_ALARM; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LOW_GLUCOSE_PICKER", function() { return LOW_GLUCOSE_PICKER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MEASUREMENTS_SUMMARY", function() { return MEASUREMENTS_SUMMARY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NEW_FEATURE_MODAL", function() { return NEW_FEATURE_MODAL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_SETTINGS", function() { return NOTIFICATION_SETTINGS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_RECENT_DATA", function() { return NO_RECENT_DATA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NO_RECENT_DATA_PICKER", function() { return NO_RECENT_DATA_PICKER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_GREETING", function() { return ONBOARDING_GREETING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_INTERNET_REQ", function() { return ONBOARDING_INTERNET_REQ; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_NOTIFICATIONS", function() { return ONBOARDING_NOTIFICATIONS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ONBOARDING_WARNING", function() { return ONBOARDING_WARNING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PRIVACY", function() { return PRIVACY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGISTER", function() { return REGISTER; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SAFETY_MESSAGE", function() { return SAFETY_MESSAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SPLASH", function() { return SPLASH; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "URGENT_LOW_GLUCOSE_ALARM", function() { return URGENT_LOW_GLUCOSE_ALARM; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "VERIFY_EMAIL", function() { return VERIFY_EMAIL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "WELCOME_OVERVIEW", function() { return WELCOME_OVERVIEW; });
var ACCOUNT = 'views/account/account';
var APP_INFO = 'views/app-info/app-info';
var CHANGE_PASSWORD = 'views/change-password/change-password';
var CONNECTION_LIST = 'views/connections/connection-list';
var COUNTRY_SELECT = 'views/country-select/country-select';
var DELETE_ACCOUNT = 'views/delete-account/delete-account';
var EULA = 'views/policies/eula';
var FORGOT_PASSWORD = 'views/forgot-password/forgot-password';
var GLUCOSE_GRAPH = 'views/glucose-graph/glucose-graph';
var GRAPH_TUTORIAL_DASHED_LINES = 'views/graph-tutorial/graph-tutorial-dashed-lines';
var GRAPH_TUTORIAL_GREEN_AREA = 'views/graph-tutorial/graph-tutorial-green-area';
var GRAPH_TUTORIAL_MODAL_ROOT = 'views/graph-tutorial/graph-tutorial-modal-root';
var GRAPH_TUTORIAL_TAP_ANYWHERE = 'views/graph-tutorial/graph-tutorial-tap-anywhere';
var HELP = 'views/help/help';
var HIGH_GLUCOSE_ALARM = 'views/notification-settings/high-glucose/high-glucose-alarm';
var HIGH_GLUCOSE_PICKER = 'views/notification-settings/high-glucose/high-glucose-picker';
var HOME = 'views/home/home';
var LOADER = 'views/loader/loader';
var LOGIN = 'views/login/login';
var LOGBOOK = 'views/logbook/logbook';
var LOW_GLUCOSE_ALARM = 'views/notification-settings/low-glucose/low-glucose-alarm';
var LOW_GLUCOSE_PICKER = 'views/notification-settings/low-glucose/low-glucose-picker';
var MEASUREMENTS_SUMMARY = 'views/summary/measurements-summary';
var NEW_FEATURE_MODAL = 'views/new-feature-modal/new-feature-modal';
var NOTIFICATION_SETTINGS = 'views/notification-settings/notification-settings';
var NO_RECENT_DATA = 'views/notification-settings/no-recent-data/no-recent-data';
var NO_RECENT_DATA_PICKER = 'views/notification-settings/no-recent-data/no-recent-data-picker';
var ONBOARDING_GREETING = 'views/onboarding/onboarding-greeting';
var ONBOARDING_INTERNET_REQ = 'views/onboarding/onboarding-internet-req';
var ONBOARDING_NOTIFICATIONS = 'views/onboarding/onboarding-notifications';
var ONBOARDING_WARNING = 'views/onboarding/onboarding-warning';
var PRIVACY = 'views/policies/privacy';
var REGISTER = 'views/registration/register';
var SAFETY_MESSAGE = 'views/safety-message/safety-message';
var SPLASH = 'views/loader/splash';
var URGENT_LOW_GLUCOSE_ALARM = 'views/notification-settings/urgent-low-glucose/urgent-low-glucose-alarm';
var VERIFY_EMAIL = 'views/registration/verify-email';
var WELCOME_OVERVIEW = 'views/registration/welcome-overview';
;
if (false ) {}
/***/ }),
/* 53 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LogLevel", function() { return LogLevel; });
var LogLevel;
(function (LogLevel) {
LogLevel["Debug"] = "Debug";
LogLevel["Warn"] = "Warn";
LogLevel["Error"] = "Error";
})(LogLevel || (LogLevel = {}));
;
if (false ) {}
/***/ }),
/* 54 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_TOKEN", function() { return NOTIFICATION_TOKEN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATION_DELETE_TOKEN", function() { return NOTIFICATION_DELETE_TOKEN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DISABLED_BY_OS", function() { return DISABLED_BY_OS; });
var NOTIFICATION_TOKEN = 'NOTIFICATION_TOKEN';
var NOTIFICATION_DELETE_TOKEN = 'NOTIFICATION_DELETE_TOKEN';
var DISABLED_BY_OS = 'DISABLED_BY_OS';
;
if (false ) {}
/***/ }),
/* 55 */,
/* 56 */,
/* 57 */,
/* 58 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GraphTutorialViewModel", function() { return GraphTutorialViewModel; });
/* harmony import */ var _nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(21);
/* harmony import */ var _nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
var GraphTutorialViewModel = /** @class */ (function (_super) {
__extends(GraphTutorialViewModel, _super);
function GraphTutorialViewModel(step) {
var _this = _super.call(this) || this;
_this.getGraphLottie = function (step) {
var isMgdl = _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().user.uom === '1';
var graphLottie = isMgdl ? 'mgdl-step' : 'mmoll-step';
return "" + _nativescript_core_utils_utils__WEBPACK_IMPORTED_MODULE_0__["RESOURCE_PREFIX"] + graphLottie + step + ".json";
};
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["logView"])("Graph Tutorial " + step);
_this.set('graphlottie', _this.getGraphLottie(step));
return _this;
}
return GraphTutorialViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_3__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 59 */,
/* 60 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NAVIGATION", function() { return NAVIGATION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NAVIGATION_READY", function() { return NAVIGATION_READY; });
var NAVIGATION = 'NAVIGATION';
var NAVIGATION_READY = 'NAVIGATION_READY';
;
if (false ) {}
/***/ }),
/* 61 */,
/* 62 */,
/* 63 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SummaryCard", function() { return SummaryCard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "measurementProperty", function() { return measurementProperty; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_data_observable_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49);
/* harmony import */ var _nativescript_core_data_observable_observable__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_data_observable_observable__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11);
/* harmony import */ var _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _nstudio_nativescript_cardview__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(29);
/* harmony import */ var _nstudio_nativescript_cardview__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_nstudio_nativescript_cardview__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(16);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5);
var ObservableGlucoseItem = /** @class */ (function (_super) {
__extends(ObservableGlucoseItem, _super);
function ObservableGlucoseItem() {
return _super !== null && _super.apply(this, arguments) || this;
}
return ObservableGlucoseItem;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"]));
var SummaryCard = /** @class */ (function (_super) {
__extends(SummaryCard, _super);
function SummaryCard() {
var _this = _super.call(this) || this;
// CardView properties
_this.className = 'summary-card trend-0';
_this.elevation = 8;
// Android CardView radius does not respect the device scale, so we handle it manually here
_this.radius = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"] ? _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_2__["screen"].mainScreen.scale * 8 : 8;
_this.shadowOffsetHeight = 2;
_this.shadowRadius = 2;
// Internal
_this.isMeasurementRecent = false;
return _this;
}
Object.defineProperty(SummaryCard.prototype, "arrow", {
get: function () {
if (this.measurement &&
(this.measurement.type === _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].Unscheduled ||
this.measurement.type === _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].CaregiverAlarm)) {
var arrows = {
1: 'tff',
2: 'tf',
3: 'ts',
4: 'tr',
5: 'trf',
};
return arrows[this.measurement.TrendArrow];
}
// Deliberate invisible character here to have the label take up the same amount of space when
// not displaying an arrow
return '‎';
},
enumerable: true,
configurable: true
});
Object.defineProperty(SummaryCard.prototype, "alertType", {
get: function () {
if (!this.measurementHasAlert()) {
return '';
}
if (!this.isMeasurementRecent) {
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.no_recent_data');
}
if (this.measurement && this.measurement.type !== _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
if (this.measurement.isHigh || this.measurement.isLow) {
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.out_of_range');
}
}
return '';
},
enumerable: true,
configurable: true
});
Object.defineProperty(SummaryCard.prototype, "deviceAlarmType", {
get: function () {
if (!this.measurement || this.measurement.type !== _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
return '';
}
switch (this.measurement.alarmType) {
case 1:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.high_glucose_alarm');
case 2:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.urgent_low_glucose_alarm');
default:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.low_glucose_alarm');
}
},
enumerable: true,
configurable: true
});
Object.defineProperty(SummaryCard.prototype, "displayValue", {
// The localized integer part of the value
get: function () {
if (!this.measurement || this.measurement.type === _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
return '';
}
var value = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_10__["formatMeasurementValue"])(this.measurement);
if (this.measurement.GlucoseUnits) {
return value;
}
return value.slice(0, -2);
},
enumerable: true,
configurable: true
});
Object.defineProperty(SummaryCard.prototype, "displayValueFractional", {
// The localized fractional part and decimal separator of the value
get: function () {
if (!this.measurement ||
this.measurement.type === _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm ||
this.measurement.GlucoseUnits) {
return '';
}
return Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_10__["formatMeasurementValue"])(this.measurement).slice(-2);
},
enumerable: true,
configurable: true
});
SummaryCard.prototype.onLoaded = function () {
_super.prototype.onLoaded.call(this);
var view = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Builder"].load({
path: 'components/summary-card',
name: 'summary-card-view',
attributes: {
bindingContext: this,
},
});
this.content = view;
};
SummaryCard.prototype.measurementHasAlert = function () {
if (!this.showInfoAlerts || this.isHistoricMeasurement) {
return false;
}
// Out of range
if (this.measurement && this.measurement.type !== _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
if (this.measurement.isHigh || this.measurement.isLow) {
return true;
}
}
// No recent data
return !this.isMeasurementRecent;
};
// Convert the measurement into an Observable structure to help with optimized view updates
SummaryCard.prototype.setMeasurement = function (measurement) {
var newTrend = 0;
if (measurement !== undefined && !(measurement instanceof _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"])) {
measurement = Object(_nativescript_core_data_observable_observable__WEBPACK_IMPORTED_MODULE_1__["fromObject"])(measurement);
}
if (measurement) {
if (measurement.type !== _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
newTrend = measurement.MeasurementColor || 0;
}
this.isMeasurementRecent = moment__WEBPACK_IMPORTED_MODULE_5___default.a
.utc(measurement.FactoryTimestamp || 0)
.isAfter(moment__WEBPACK_IMPORTED_MODULE_5___default()().utc().subtract(5, 'minutes'));
}
else {
this.isMeasurementRecent = false;
}
if (!this.isMeasurementRecent && !this.isHistoricMeasurement) {
newTrend = 0;
}
this.className = this.className.replace(/trend-\d/, 'trend-' + newTrend);
if (measurement) {
// Some of the xml view binding expressions rely on values outside the measurement source property
// Set a hash on the measurement to force the measurement object to update when the other flags update
measurement['_hash'] =
"" + this.isHistoricMeasurement +
("" + this.isMeasurementRecent) +
("" + this.showInfoAlerts) +
measurement.FactoryTimestamp;
}
return measurement;
};
SummaryCard.prototype.setPatient = function (patient) {
var pat;
if (typeof patient === 'string') {
var connections = _store_store__WEBPACK_IMPORTED_MODULE_9__["store"].getState().connection.connections;
pat = connections.find(function (c) { return c.patientId === patient; });
}
else {
pat = patient;
}
if (pat) {
this.patient = __assign({}, pat);
this.patientId = pat.patientId;
}
};
SummaryCard.prototype.showAlert = function () {
var _this = this;
if (!this.measurementHasAlert() || this._alertDisplayed) {
return;
}
this._alertDisplayed = true;
// Out of range
if (!this.isMeasurementRecent) {
this._alertDisplayed = true;
var hasStreamingSensor = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_10__["sensorForConnection"])(this.patient) === _models_types__WEBPACK_IMPORTED_MODULE_7__["ProductType"].FSL3;
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_8__["confirm"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.no_recent_data_issues') + "\n\n" +
("\u2022 " + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.no_internet_label') + "\n") +
("\u2022 " + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.no_active_sensor') + "\n") +
("\u2022 " + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.signal_loss') + "\n") +
(!hasStreamingSensor ? "\u2022 " + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.no_scans') + "\n" : '') +
("\u2022 " + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.service_interruption')), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.ok'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Common.learn_more'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.no_data_last_5_mins'))
.then(function (ok) {
_this._alertDisplayed = false;
if (!ok) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_10__["openConfigLink"])('lluSAM', 'articles/glucose-readings');
}
})
.catch(function () {
_this._alertDisplayed = false;
});
return;
}
// No recent data
if (this.measurement && this.measurement.type !== _models_types__WEBPACK_IMPORTED_MODULE_7__["GlucoseItemType"].DeviceAlarm) {
if (this.measurement.isHigh || this.measurement.isLow) {
this._alertDisplayed = true;
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_8__["alertWithTitle"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])(this.measurement.isHigh ? 'Summary.very_high_glucose' : 'Summary.very_low_glucose'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_6__["localize"])('Summary.glucose_out_of_range')).then(function () { return (_this._alertDisplayed = false); });
return;
}
}
};
return SummaryCard;
}(_nstudio_nativescript_cardview__WEBPACK_IMPORTED_MODULE_4__["CardView"]));
var isHistoricMeasurementProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["Property"]({
name: 'isHistoricMeasurement',
defaultValue: false,
valueConverter: _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["booleanConverter"],
valueChanged: function (target) {
measurementProperty.coerce(target);
},
});
isHistoricMeasurementProperty.register(SummaryCard);
var showInfoAlertsProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["Property"]({
name: 'showInfoAlerts',
defaultValue: false,
valueConverter: _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["booleanConverter"],
valueChanged: function (target) {
measurementProperty.coerce(target);
},
});
showInfoAlertsProperty.register(SummaryCard);
// Coercible property allows us to update the "hash" in the measurement object when other properties change
var measurementProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["CoercibleProperty"]({
name: 'measurement',
defaultValue: undefined,
coerceValue: function (target, value) {
return target.setMeasurement(value);
},
});
measurementProperty.register(SummaryCard);
var patientProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["Property"]({
name: 'patient',
defaultValue: undefined,
valueChanged: function (target, oldValue, newValue) {
if (newValue) {
target.patientId = newValue.patientId;
}
},
});
patientProperty.register(SummaryCard);
var patientIdProperty = new _nativescript_core_ui_core_view__WEBPACK_IMPORTED_MODULE_3__["Property"]({
name: 'patientId',
defaultValue: '',
valueChanged: function (target, oldValue, newValue) {
target.setPatient(newValue);
},
});
patientIdProperty.register(SummaryCard);
;
if (false ) {}
/***/ }),
/* 64 */,
/* 65 */,
/* 66 */,
/* 67 */,
/* 68 */,
/* 69 */,
/* 70 */,
/* 71 */,
/* 72 */,
/* 73 */,
/* 74 */,
/* 75 */,
/* 76 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "InvitationViewModel", function() { return InvitationViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
var InvitationViewModel = /** @class */ (function (_super) {
__extends(InvitationViewModel, _super);
function InvitationViewModel() {
return _super.call(this) || this;
}
InvitationViewModel.prototype.getInvites = function () {
var _this = this;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('invitation:getInvites', {
accountId: _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().user.id,
})
.then(function (result) {
var invites = result.data;
var _loop_1 = function (i, p) {
p = p.then(function () { return _this.displayInvite(invites[i]); });
out_p_1 = p;
};
var out_p_1;
// Loop over each invite and start a promise chain to wait for the dialogs to finish
for (var i = 0, p = Promise.resolve(); i < invites.length; i++) {
_loop_1(i, p);
p = out_p_1;
}
});
};
InvitationViewModel.prototype.displayInvite = function (invite) {
var _this = this;
return Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["confirm"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.new_connection_alert', invite.sender.firstName), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.Accept'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.reject')).then(function (result) {
if (result) {
_this.acceptInvite(invite.id);
}
else {
_this.declineInvite(invite.id);
}
});
};
InvitationViewModel.prototype.acceptInvite = function (inviteId) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"].request('invitation:acceptInvite', {
invitationId: inviteId,
});
};
InvitationViewModel.prototype.declineInvite = function (inviteId) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"].request('invitation:declineInvite', {
invitationId: inviteId,
});
};
return InvitationViewModel;
}(_base__WEBPACK_IMPORTED_MODULE_4__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 77 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PoliciesViewModel", function() { return PoliciesViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
/* harmony import */ var _utilities_value_list__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(182);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
var PoliciesViewModel = /** @class */ (function (_super) {
__extends(PoliciesViewModel, _super);
function PoliciesViewModel() {
var _this = _super.call(this) || this;
_this.set('countries', []);
_this.set('isCountrySelected', false);
_this.set('selectedCountryIndex', -1);
_this.set('eulaUrl', '');
_this.set('privacyPolicyUrl', '');
_this.set('countryPlaceholder', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.select_country'));
return _this;
}
PoliciesViewModel.prototype.acceptEula = function () {
var step = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().auth.step;
_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["confirm"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Policies.accept_end_user_agreement'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.Accept'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Policies.decline'), '')
.then(function (result) {
if (result === true) {
// Handle auth task, otherwise proceed with register flow
if (step && step.type === 'tou' && step.props.reaccept) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"].request('auth:continueAccept', { type: 'tou' });
}
else {
_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"](_constants__WEBPACK_IMPORTED_MODULE_1__["PRIVACY"]);
}
}
});
};
PoliciesViewModel.prototype.acceptPrivacyPolicy = function () {
var step = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().auth.step;
_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["confirm"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Policies.accept_privacy_policy'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.Accept'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Policies.decline'), '')
.then(function (result) {
if (result === true) {
// Handle auth task, otherwise proceed with register flow
if (step && step.type === 'pp' && step.props.reaccept) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"].request('auth:continueAccept', { type: 'pp' });
}
else {
_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"](_constants__WEBPACK_IMPORTED_MODULE_1__["REGISTER"]);
}
}
});
};
PoliciesViewModel.prototype.getLocalizedEula = function () {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.lluToUHtml, lluToUHtml = _a === void 0 ? [] : _a;
var lang = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["getPhoneLanguage"])(true);
// Look for 5 char url, otherwise use 2 char
var url = lluToUHtml[lang.toLowerCase()] ||
lluToUHtml[lang.slice(0, 2).toLowerCase()] ||
lluToUHtml['default'];
this.set('eulaUrl', url);
};
PoliciesViewModel.prototype.getLocalizedPrivacyPolicy = function () {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.lluPrivacyPolicyHtml, lluPrivacyPolicyHtml = _a === void 0 ? [] : _a;
var lang = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["getPhoneLanguage"])(true);
// Look for 5 char url, otherwise use 2 char
var url = lluPrivacyPolicyHtml[lang.toLowerCase()] ||
lluPrivacyPolicyHtml[lang.slice(0, 2).toLowerCase()] ||
lluPrivacyPolicyHtml['default'];
this.set('privacyPolicyUrl', url);
};
// Build country list from config state
PoliciesViewModel.prototype.makeCountryList = function () {
var countryList = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.countryList;
var countries = countryList.countries.map(function (c) {
return {
DisplayMember: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("Country." + c.DisplayMember),
ValueMember: c.ValueMember,
};
});
this.set('countries', new _utilities_value_list__WEBPACK_IMPORTED_MODULE_7__["ValueList"](countries));
};
return PoliciesViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_8__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 78 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONFIG_UPDATE", function() { return CONFIG_UPDATE; });
var CONFIG_UPDATE = 'CONFIG_UPDATE';
;
if (false ) {}
/***/ }),
/* 79 */,
/* 80 */,
/* 81 */,
/* 82 */,
/* 83 */,
/* 84 */,
/* 85 */,
/* 86 */,
/* 87 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "networkAvailable", function() { return networkAvailable; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
var networkAvailable = function () {
var connectionType = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Connectivity"].getConnectionType();
if (connectionType === _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Connectivity"].connectionType.none) {
return false;
}
else {
return true;
}
};
;
if (false ) {}
/***/ }),
/* 88 */,
/* 89 */,
/* 90 */,
/* 91 */,
/* 92 */,
/* 93 */,
/* 94 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".glucose-measurement.measurement-item"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"height","value":"72"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".glucose-measurement.measurement-item .severity-color"],"declarations":[{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"width","value":"16"}]},{"type":"rule","selectors":[".glucose-measurement .structure-measure-wrap"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"justify-content","value":"flex-start"},{"type":"declaration","property":"margin","value":"0 12 0 12"}]},{"type":"rule","selectors":[".glucose-measurement .measurement-value",".glucose-measurement .measurement-threshold"],"declarations":[{"type":"declaration","property":"font-size","value":"48"},{"type":"declaration","property":"opacity","value":"0.9"}]},{"type":"rule","selectors":[".glucose-measurement .reading-details"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-start"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-left","value":"4"},{"type":"declaration","property":"padding-top","value":"8"}]},{"type":"rule","selectors":[".glucose-measurement .measurement-uom"],"declarations":[{"type":"declaration","property":"font-size","value":"8"},{"type":"declaration","property":"opacity","value":"0.7"}]},{"type":"rule","selectors":[".glucose-measurement .trend-arrow"],"declarations":[{"type":"declaration","property":"margin-left","value":"4"},{"type":"declaration","property":"margin-bottom","value":"-2"}]},{"type":"rule","selectors":[".glucose-measurement .alarm"],"declarations":[{"type":"declaration","property":"color","value":"#757575"}]},{"type":"rule","selectors":[".glucose-measurement .structure-time-information"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-end"},{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin","value":"0 16 0 16"}]},{"type":"rule","selectors":[".glucose-measurement .measurement-time"],"declarations":[{"type":"declaration","property":"font-size","value":"16"},{"type":"declaration","property":"opacity","value":"0.9"}]},{"type":"rule","selectors":["[class*=\"lang-ar\"] .glucose-measurement .measurement-item .measurement-value"],"declarations":[{"type":"declaration","property":"padding-top","value":"8"}]},{"type":"rule","selectors":[".rtl .glucose-measurement .measurement-item",".rtl .glucose-measurement .structure-reading",".rtl .glucose-measurement .structure-measure-wrap"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row-reverse"}]},{"type":"rule","selectors":[".rtl .glucose-measurement .reading-details"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-end"}]},{"type":"rule","selectors":[".rtl .glucose-measurement .structure-time-information"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-start"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 95 */,
/* 96 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleDrawer", function() { return toggleDrawer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToConnections", function() { return goToConnections; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToAccountSettings", function() { return goToAccountSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToHelpPage", function() { return goToHelpPage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToAboutPage", function() { return goToAboutPage; });
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(30);
/* harmony import */ var _constants_routes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
var onLoad = function (args) {
var drawerContent = args.object;
var envLabel = drawerContent.getViewById('env-label');
if (_config_config__WEBPACK_IMPORTED_MODULE_1__["appConfig"].environment.toUpperCase() !== 'PROD') {
envLabel.marginTop = 18;
envLabel.text = _config_config__WEBPACK_IMPORTED_MODULE_1__["appConfig"].environment + " " + Object(_utilities_version__WEBPACK_IMPORTED_MODULE_4__["getAppBuildVersion"])();
envLabel.visibility = 'visible';
}
};
var toggleDrawer = function () {
var sideDrawer = Object(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_0__["getRootView"])();
if (sideDrawer !== undefined) {
sideDrawer.toggleDrawerState();
}
};
var goToConnections = function () {
toggleDrawer();
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])(_constants_routes__WEBPACK_IMPORTED_MODULE_2__["CONNECTION_LIST"]);
};
var goToAccountSettings = function () {
toggleDrawer();
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])(_constants_routes__WEBPACK_IMPORTED_MODULE_2__["ACCOUNT"]);
};
var goToHelpPage = function () {
toggleDrawer();
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])(_constants_routes__WEBPACK_IMPORTED_MODULE_2__["HELP"]);
};
var goToAboutPage = function () {
toggleDrawer();
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])(_constants_routes__WEBPACK_IMPORTED_MODULE_2__["APP_INFO"]);
};
;
if (false ) {}
/***/ }),
/* 97 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RegistrationViewModel", function() { return RegistrationViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
var RegistrationViewModel = /** @class */ (function (_super) {
__extends(RegistrationViewModel, _super);
function RegistrationViewModel() {
var _this = _super.call(this) || this;
_this.set('firstname', '');
_this.set('lastname', '');
_this.set('email', '');
_this.set('username', '');
_this.set('dob', '');
_this.set('password', '');
_this.set('pwconfirm', '');
return _this;
}
RegistrationViewModel.prototype.register = function () {
var user = {
firstname: this.get('firstname'),
lastname: this.get('lastname'),
email: this.get('email').trim(),
dateOfBirth: this.get('dob'),
password: this.get('password'),
country: _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.country,
phoneLanguage: _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.phoneLanguage,
uiLanguage: _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.phoneLanguage,
pp: true,
tou: true,
};
var isValid = Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_7__["areRegistrationParamsValid"])(user, this.get('pwconfirm'));
if (!isValid) {
return;
}
return _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('auth:register', { data: user })
.then(function (result) {
if (result.status === 0 || result.status === 4) {
// GO NEXT: VERIFY EMAIL
_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"]({
backstackVisible: false,
context: { values: __assign(__assign({}, user), { registering: true }) },
moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["VERIFY_EMAIL"],
}, true);
return;
}
else if (result.status === 411) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_7__["getSecurityErrorMessage"])(result.data));
}
else if (result.status === 412) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.accountAlreadyRegisteredErrorMessage'));
}
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
RegistrationViewModel.prototype.resendValidationEmail = function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('auth:resendVerifyEmail')
.then(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.verify_email_blurb'));
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error(err);
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
RegistrationViewModel.prototype.checkEmailValidation = function (request) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('auth:continue', {
values: request.values,
})
.then(function (result) {
if (result.data.step && result.data.step.type && result.data.step.type === 'verifyEmail') {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.verify_before_continue'));
}
});
};
return RegistrationViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_8__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 98 */,
/* 99 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getResource", function() { return getResource; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNotificationChannel", function() { return createNotificationChannel; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
var getResource = function (name, folder) {
var context = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Utils"].android.getApplicationContext();
var packageName = context.getPackageName();
var id = context.getResources().getIdentifier(name, folder || 'raw', packageName);
var uri = android.net.Uri.parse(android.content.ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + packageName + "/" + id);
return { id: id, uri: uri };
};
var createNotificationChannel = function (channel) {
// channels are only required in android 8 and up
var ANDROID_OREO_SDK_VERSION = 26;
if (android.os.Build.VERSION.SDK_INT >= ANDROID_OREO_SDK_VERSION) {
var notificationChannel = new android.app.NotificationChannel(channel.id, channel.name, android.app.NotificationManager.IMPORTANCE_HIGH);
if (channel.soundFilename) {
var audioAttributes = new android.media.AudioAttributes.Builder()
.setContentType(android.media.AudioAttributes.CONTENT_TYPE_SPEECH)
.setUsage(android.media.AudioAttributes.USAGE_NOTIFICATION)
.build();
notificationChannel.setSound(getResource(channel.soundFilename).uri, audioAttributes);
}
var context = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Utils"].android.getApplicationContext();
var notificationManager = context.getSystemService(android.app.NotificationManager.class);
notificationManager.createNotificationChannel(notificationChannel);
}
};
;
if (false ) {}
/***/ }),
/* 100 */,
/* 101 */,
/* 102 */,
/* 103 */,
/* 104 */,
/* 105 */,
/* 106 */,
/* 107 */,
/* 108 */,
/* 109 */,
/* 110 */,
/* 111 */,
/* 112 */,
/* 113 */,
/* 114 */,
/* 115 */,
/* 116 */,
/* 117 */,
/* 118 */,
/* 119 */,
/* 120 */,
/* 121 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rootReducer", function() { return rootReducer; });
/* harmony import */ var redux__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98);
/* harmony import */ var _auth_reducer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(176);
/* harmony import */ var _config_reducer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(177);
/* harmony import */ var _connections_reducer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(178);
/* harmony import */ var _nav_reducer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(179);
/* harmony import */ var _notifications_reducer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(180);
/* harmony import */ var _user_reducer__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(181);
var reducerMap = {
auth: _auth_reducer__WEBPACK_IMPORTED_MODULE_1__["authReducer"],
config: _config_reducer__WEBPACK_IMPORTED_MODULE_2__["configReducer"],
connection: _connections_reducer__WEBPACK_IMPORTED_MODULE_3__["connectionReducer"],
nav: _nav_reducer__WEBPACK_IMPORTED_MODULE_4__["navReducer"],
user: _user_reducer__WEBPACK_IMPORTED_MODULE_6__["userReducer"],
notification: _notifications_reducer__WEBPACK_IMPORTED_MODULE_5__["notificationReducer"],
};
var rootReducer = Object(redux__WEBPACK_IMPORTED_MODULE_0__[/* combineReducers */ "b"])(reducerMap);
;
if (false ) {}
/***/ }),
/* 122 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getData", function() { return getData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCacheResult", function() { return getCacheResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeCacheResult", function() { return removeCacheResult; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCacheResult", function() { return setCacheResult; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(30);
var defaultOptions = {
bustCache: false,
expirationPeriod: 60 * 60 * 1,
};
var getCache = function (key) {
var jsonString = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].getString('api/' + key);
if (jsonString !== undefined) {
return JSON.parse(jsonString);
}
return undefined;
};
var removeCache = function (key) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].remove('api/' + key);
};
var setCache = function (key, data, expirationPeriod) {
var cacheResult = {
data: data,
expirationDate: moment__WEBPACK_IMPORTED_MODULE_1___default()().add(expirationPeriod, 'seconds').valueOf(),
};
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ApplicationSettings"].setString('api/' + key, JSON.stringify(cacheResult));
};
/**
* Attempts to grab data from cache, otherwise makes an Http request and then caches the result
* @param key Key used in cache
* @param url Url to comminucate to
* @param options options to influence data request
*/
function getData(key, url, options) {
return new Promise(function (resolve, reject) {
// Merge default options
options = Object.assign({}, defaultOptions, options);
if (options.bustCache) {
removeCache(key);
}
var cacheResult = getCache(key);
// Ensure the result is not expired
if (cacheResult !== undefined && moment__WEBPACK_IMPORTED_MODULE_1___default()().isBefore(cacheResult.expirationDate)) {
console.log('----------- CACHE HIT ' + key);
resolve(cacheResult.data);
return;
}
// Process Request
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Http"].request({
headers: {
'Content-Type': 'application/json',
'llu-version': Object(_utilities_version__WEBPACK_IMPORTED_MODULE_2__["getAppVersion"])(),
},
method: 'GET',
timeout: _config_config__WEBPACK_IMPORTED_MODULE_3__["appConfig"].timeout,
url: url,
})
.then(function (response) {
var data = response.content.toJSON().result;
setCache(key, data, options.expirationPeriod);
resolve(data);
})
.catch(function (error) {
reject(error);
});
});
}
var getCacheResult = getCache;
var removeCacheResult = removeCache;
var setCacheResult = setCache;
;
if (false ) {}
/***/ }),
/* 123 */,
/* 124 */,
/* 125 */,
/* 126 */,
/* 127 */,
/* 128 */,
/* 129 */,
/* 130 */,
/* 131 */,
/* 132 */,
/* 133 */,
/* 134 */,
/* 135 */,
/* 136 */,
/* 137 */,
/* 138 */,
/* 139 */,
/* 140 */,
/* 141 */,
/* 142 */,
/* 143 */,
/* 144 */,
/* 145 */,
/* 146 */,
/* 147 */,
/* 148 */,
/* 149 */,
/* 150 */,
/* 151 */,
/* 152 */,
/* 153 */,
/* 154 */,
/* 155 */,
/* 156 */,
/* 157 */,
/* 158 */,
/* 159 */,
/* 160 */,
/* 161 */,
/* 162 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "APP_CONFIG", function() { return APP_CONFIG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CARE_GIVER_ID", function() { return CARE_GIVER_ID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION", function() { return CONNECTION; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CONNECTION_DATA", function() { return CONNECTION_DATA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGULATORY_CONFIG", function() { return REGULATORY_CONFIG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DATA_POLL_ID", function() { return DATA_POLL_ID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEVICE_ID", function() { return DEVICE_ID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ENVIRONMENT", function() { return ENVIRONMENT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FCM_TOKEN", function() { return FCM_TOKEN; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FIRST_USE", function() { return FIRST_USE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "HAS_MULTI_CONNECTIONS", function() { return HAS_MULTI_CONNECTIONS; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LANGUAGE", function() { return LANGUAGE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LIBRE_LINK_NAME", function() { return LIBRE_LINK_NAME; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LSL_URL", function() { return LSL_URL; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MEASUREMENT_DATA", function() { return MEASUREMENT_DATA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NAG_ALERT_ACTIVE", function() { return NAG_ALERT_ACTIVE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NOTIFICATIONS_ENABLED", function() { return NOTIFICATIONS_ENABLED; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PATIENT_ID", function() { return PATIENT_ID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TIMEZONE", function() { return TIMEZONE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TIMEZONE_ID", function() { return TIMEZONE_ID; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "REGIONAL_CONFIG", function() { return REGIONAL_CONFIG; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_COUNTRY", function() { return USER_COUNTRY; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "USER_PROFILE", function() { return USER_PROFILE; });
var APP_CONFIG = 'appConfig';
var CARE_GIVER_ID = 'careGiverId';
var CONNECTION = 'connection';
var CONNECTION_DATA = 'connectionData';
var REGULATORY_CONFIG = 'regulatoryConfig';
var DATA_POLL_ID = 'datapollId';
var DEVICE_ID = 'deviceID';
var ENVIRONMENT = 'environment';
var FCM_TOKEN = 'fcmToken';
var FIRST_USE = 'firstUse';
var HAS_MULTI_CONNECTIONS = 'hasMultiConnections';
var LANGUAGE = 'language';
var LIBRE_LINK_NAME = 'libreLinkName';
var LSL_URL = 'LSLUrl';
var MEASUREMENT_DATA = 'measurementData';
var NAG_ALERT_ACTIVE = 'nagAlertActive';
var NOTIFICATIONS_ENABLED = 'notificationsEnabled';
var PATIENT_ID = 'patientId';
var TIMEZONE = 'timezone';
var TIMEZONE_ID = 'timezoneId';
var REGIONAL_CONFIG = 'regionalConfig';
var USER_COUNTRY = 'userCountry';
var USER_PROFILE = 'userProfile';
;
if (false ) {}
/***/ }),
/* 163 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".alarm-item"],"declarations":[{"type":"declaration","property":"background-color","value":"#f2f4f5"},{"type":"declaration","property":"height","value":"72"},{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"padding","value":"0 16 0 16"},{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".alarm-item .alarm-img"],"declarations":[{"type":"declaration","property":"color","value":"#757575"},{"type":"declaration","property":"margin-right","value":"10"}]},{"type":"rule","selectors":[".alarm-item .alarm-text"],"declarations":[{"type":"declaration","property":"font-size","value":"16"},{"type":"declaration","property":"opacity","value":"0.9"}]},{"type":"rule","selectors":[".alarm-item .alarm-type"],"declarations":[{"type":"declaration","property":"align-items","value":"center"}]},{"type":"rule","selectors":[".alarm-item .alarm-time-info"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-end"},{"type":"declaration","property":"font-size","value":"16"},{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":[".alarm-item .alarm-time"],"declarations":[{"type":"declaration","property":"opacity","value":"0.9"}]},{"type":"rule","selectors":[".ns-root.ns-dark .alarm-item"],"declarations":[{"type":"declaration","property":"background-color","value":"#242424"}]},{"type":"rule","selectors":[".ns-root.ns-dark .alarm-item .alarm-img"],"declarations":[{"type":"declaration","property":"color","value":"#e6e5e4"}]},{"type":"rule","selectors":[".rtl .alarm-item"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row-reverse"}]},{"type":"rule","selectors":[".rtl .alarm-item .alarm-type"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row-reverse"}]},{"type":"rule","selectors":[".rtl .alarm-item .alarm-time-info"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-start"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 164 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openModal", function() { return openModal; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var onLoaded = function (args) {
var page = args.object;
var closeButton = page.getViewById('close-button');
var gettingStartedBanner = page.getViewById('getting-started-banner');
var _a = _store_store__WEBPACK_IMPORTED_MODULE_1__["store"].getState().user.system.messages, sysMessages = _a === void 0 ? {} : _a;
if (sysMessages === null || sysMessages.lluGettingStartedBanner !== undefined) {
gettingStartedBanner.visibility = 'collapse';
return;
}
gettingStartedBanner.visibility = 'visible';
gettingStartedBanner.translateY = 300;
gettingStartedBanner.animate({
duration: 1000,
translate: { x: 0, y: 0 },
});
closeButton.on('tap', function () {
handleDismissBanner(page);
});
};
function openModal(args) {
var page = args.object.page;
var options = {
context: '',
closeCallback: function () {
//
},
fullscreen: true,
};
handleDismissBanner(page);
page.showModal(_constants__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_MODAL_ROOT"], options);
}
var handleDismissBanner = function (page) {
var gettingStartedBanner = page.getViewById('getting-started-banner');
gettingStartedBanner.animate({
duration: 400,
translate: { x: 0, y: 300 },
});
setTimeout(function () {
gettingStartedBanner.visibility = 'collapse';
}, 500);
// Mark Getting Started banner as seen
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].publish('user:dismissSystemMessage', { messageId: 'lluGettingStartedBanner' });
};
;
if (false ) {}
/***/ }),
/* 165 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MeasurementColor", function() { return MeasurementColor; });
var MeasurementColor;
(function (MeasurementColor) {
MeasurementColor[MeasurementColor["Green"] = 1] = "Green";
MeasurementColor[MeasurementColor["Yellow"] = 2] = "Yellow";
MeasurementColor[MeasurementColor["Orange"] = 3] = "Orange";
MeasurementColor[MeasurementColor["Red"] = 4] = "Red";
})(MeasurementColor || (MeasurementColor = {}));
;
if (false ) {}
/***/ }),
/* 166 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DevicePlatform", function() { return DevicePlatform; });
var DevicePlatform;
(function (DevicePlatform) {
DevicePlatform[DevicePlatform["Android"] = 1] = "Android";
DevicePlatform[DevicePlatform["iOS"] = 2] = "iOS";
})(DevicePlatform || (DevicePlatform = {}));
;
if (false ) {}
/***/ }),
/* 167 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApiStatus", function() { return ApiStatus; });
var ApiStatus;
(function (ApiStatus) {
ApiStatus[ApiStatus["Success"] = 0] = "Success";
ApiStatus[ApiStatus["InvalidUser"] = 10] = "InvalidUser";
ApiStatus[ApiStatus["InvalidCountry"] = 50] = "InvalidCountry";
ApiStatus[ApiStatus["InvalidUserToken"] = 24] = "InvalidUserToken";
ApiStatus[ApiStatus["InvalidPassword"] = 25] = "InvalidPassword";
ApiStatus[ApiStatus["EmailNotValidated"] = 48] = "EmailNotValidated";
ApiStatus[ApiStatus["DuplicateUserName"] = 12] = "DuplicateUserName";
ApiStatus[ApiStatus["DuplicateEmail"] = 11] = "DuplicateEmail";
ApiStatus[ApiStatus["InvalidCredentials"] = 30] = "InvalidCredentials";
ApiStatus[ApiStatus["RedirectRequired"] = 55] = "RedirectRequired";
})(ApiStatus || (ApiStatus = {}));
;
if (false ) {}
/***/ }),
/* 168 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TrendValue", function() { return TrendValue; });
var TrendValue;
(function (TrendValue) {
TrendValue[TrendValue["NotDetermined"] = 0] = "NotDetermined";
TrendValue[TrendValue["FallingQuickly"] = 1] = "FallingQuickly";
TrendValue[TrendValue["Falling"] = 2] = "Falling";
TrendValue[TrendValue["Stable"] = 3] = "Stable";
TrendValue[TrendValue["Rising"] = 4] = "Rising";
TrendValue[TrendValue["RisingQuickly"] = 5] = "RisingQuickly";
})(TrendValue || (TrendValue = {}));
;
if (false ) {}
/***/ }),
/* 169 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "UOM", function() { return UOM; });
var UOM;
(function (UOM) {
UOM[UOM["MmolPerl"] = 0] = "MmolPerl";
UOM[UOM["MgPerDl"] = 1] = "MgPerDl";
})(UOM || (UOM = {}));
;
if (false ) {}
/***/ }),
/* 170 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GlucoseChart", function() { return GlucoseChart; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20);
/* harmony import */ var _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_platform__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
/* harmony import */ var _glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(19);
/* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__) if(["GlucoseChart","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__[key]; }) }(__WEBPACK_IMPORT_KEY__));
// import lazy from '@nativescript/core/utils/lazy';
// const sdkVersion = lazy(() => parseInt(platform.device.sdkVersion));
// Alias the charting types namespace
// This can not be used in the @Interface decorator, gradle fails to interpret it
var charting = com.github.mikephil.charting;
var FillFormatter;
var ValueSelectedListener;
var ValueFormatter = /** @class */ (function (_super) {
__extends(ValueFormatter, _super);
function ValueFormatter(owner) {
var _this = _super.call(this) || this;
_this.owner = owner;
return global.__native(_this);
}
ValueFormatter.prototype.getAxisLabel = function (value, _axis) {
var time = moment__WEBPACK_IMPORTED_MODULE_2___default()().tz(this.owner.timezoneId).hours(value);
return Math.floor(value) % 3 ? '' : Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["formatHour"])(time);
};
return ValueFormatter;
}(charting.formatter.ValueFormatter));
function initializeNativeClasses() {
if (FillFormatter) {
return;
}
var FillFormatterImpl = /** @class */ (function (_super) {
__extends(FillFormatterImpl, _super);
function FillFormatterImpl(owner) {
var _this = _super.call(this) || this;
_this.owner = owner;
return global.__native(_this);
}
FillFormatterImpl.prototype.getFillLinePosition = function (_dataSet, _dataProvider) {
// Must be a Java float primitive
return float(this.owner.targetLowThreshold);
};
FillFormatterImpl = __decorate([
Interfaces([com.github.mikephil.charting.formatter.IFillFormatter]),
__metadata("design:paramtypes", [GlucoseChart])
], FillFormatterImpl);
return FillFormatterImpl;
}(java.lang.Object));
var ValueSelectedListenerImpl = /** @class */ (function (_super) {
__extends(ValueSelectedListenerImpl, _super);
function ValueSelectedListenerImpl(owner) {
var _this = _super.call(this) || this;
_this.owner = owner;
return global.__native(_this);
}
ValueSelectedListenerImpl.prototype.onNothingSelected = function () {
this.owner.reviewing = false;
};
ValueSelectedListenerImpl.prototype.onValueSelected = function (entry, _highlight) {
var data = this.owner.android.getLineData();
// If we are highlighting a value offscreen then we should try to higlight the next value
// until we are onscreen
if (entry.getX() < this.owner.android.getXAxis().getAxisMinimum()) {
var mainData = data.getDataSetByLabel('mainData', false);
var index = mainData.getEntryIndex(entry);
if (index + 1 < mainData.getEntryCount()) {
var newEntry = mainData.getEntryForIndex(index + 1);
// Highlighting the next value will recursively trigger the handler we are in and move
// to the next value if we need
this.owner.android.highlightValue(newEntry.getX(), 1);
}
return;
}
var highlightDot = data.getDataSetByLabel('highlightDot', false);
data.removeDataSet(highlightDot);
highlightDot = new charting.data.LineDataSet(new java.util.ArrayList(), 'highlightDot');
highlightDot.setCircleColor(this.owner.colors.label.android);
highlightDot.setCircleHoleColor(this.owner.colors.low.android);
highlightDot.setDrawValues(false);
highlightDot.setCircleRadius(8);
highlightDot.setCircleHoleRadius(7);
highlightDot.setHighlightEnabled(false);
var yVal = Number(entry.getY().toFixed(1));
var measurement = this.owner.getMeasurementForPoint({ x: entry.getX(), y: yVal });
if (measurement) {
highlightDot.setCircleHoleColor(this.owner.colors[measurement.MeasurementColor || 0].android);
}
this.owner.nativeView.getAxisRight().setDrawAxisLine(false);
// Avoid highlighting invisible points
if (yVal !== -1) {
highlightDot.addEntry(entry);
data.addDataSet(highlightDot);
highlightDot.notifyDataSetChanged();
data.notifyDataChanged();
this.owner.nativeView.notifyDataSetChanged();
this.owner.nativeView.invalidate();
}
this.owner.reviewing = true;
this.owner.updateSelected({ x: entry.getX(), y: yVal });
};
ValueSelectedListenerImpl = __decorate([
Interfaces([com.github.mikephil.charting.listener.OnChartValueSelectedListener]),
__metadata("design:paramtypes", [GlucoseChart])
], ValueSelectedListenerImpl);
return ValueSelectedListenerImpl;
}(java.lang.Object));
FillFormatter = FillFormatterImpl;
ValueSelectedListener = ValueSelectedListenerImpl;
}
var GlucoseChart = /** @class */ (function (_super) {
__extends(GlucoseChart, _super);
function GlucoseChart() {
return _super !== null && _super.apply(this, arguments) || this;
}
GlucoseChart.prototype.createNativeView = function () {
this.dataSets = {};
this.redDataSets = {};
return new charting.charts.LineChart(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.context);
};
GlucoseChart.prototype.initNativeView = function () {
var _this = this;
_super.prototype.initNativeView.call(this);
initializeNativeClasses();
var nativeView = this.nativeViewProtected;
nativeView.setLogEnabled(true);
var font;
// Load our font
try {
font = android.graphics.Typeface.createFromAsset(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.context.getAssets(), 'app/fonts/SourceSansPro-Regular.ttf');
}
catch (e) {
font = android.graphics.Typeface.SANS_SERIF;
_utilities_logger__WEBPACK_IMPORTED_MODULE_4__["Logger"].error('failed to load font ', e);
}
nativeView.getDescription().setEnabled(false);
nativeView.setScaleEnabled(false);
nativeView.setPinchZoom(false);
nativeView.setDoubleTapToZoomEnabled(false);
nativeView.setHighlightPerDragEnabled(true);
nativeView.getLegend().setEnabled(false);
nativeView.getXAxis().enableGridDashedLine(100, 9000, 85);
nativeView.getXAxis().setPosition(charting.components.XAxis.XAxisPosition.BOTTOM);
nativeView.getXAxis().setLabelCount(12);
nativeView.getXAxis().setGranularity(1);
nativeView.getXAxis().setTextColor(this.colors.label.android);
nativeView.getXAxis().setTextSize(16);
nativeView.getXAxis().setTypeface(font);
nativeView.getXAxis().setGranularityEnabled(true);
nativeView.getXAxis().setGridColor(this.colors.axisTick.android);
// Offset helps keep the labels from being clipped
nativeView.getXAxis().setYOffset(-1);
nativeView.getXAxis().setValueFormatter(new ValueFormatter(this));
var dateBarThing = new charting.components.LimitLine(0);
dateBarThing.enableDashedLine(100, 9000, -1265);
dateBarThing.setLineColor(this.colors.daySplit.android);
dateBarThing.setTextColor(new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('gray').android);
dateBarThing.setTextSize(10);
dateBarThing.setTypeface(font);
dateBarThing.setLabel(Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["formatDay"])(this.now.subtract(1, 'days')));
dateBarThing.setLineWidth(0.5);
dateBarThing.setLabelPosition(charting.components.LimitLine.LimitLabelPosition.LEFT_BOTTOM);
nativeView.getXAxis().addLimitLine(dateBarThing);
var dateBarThing2 = new charting.components.LimitLine(0);
dateBarThing2.enableDashedLine(100, 9000, -1265);
dateBarThing2.setLineColor(this.colors.daySplit.android);
dateBarThing2.setTextColor(new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('gray').android);
dateBarThing2.setTextSize(10);
dateBarThing2.setTypeface(font);
dateBarThing2.setLabel(Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["formatDay"])(this.now));
dateBarThing2.setLineWidth(0.5);
dateBarThing2.setLabelPosition(charting.components.LimitLine.LimitLabelPosition.RIGHT_BOTTOM);
nativeView.getXAxis().addLimitLine(dateBarThing2);
nativeView.getAxisLeft().setAxisMaximum(this.graphMaximum);
nativeView.getAxisLeft().setAxisMinimum(this.graphMinimum);
nativeView.getAxisLeft().setLabelCount(7);
nativeView.getAxisLeft().setDrawAxisLine(false);
nativeView.getAxisLeft().setGridColor(this.colors.axisLine.android);
nativeView.getAxisLeft().setZeroLineColor(this.colors.axisTick.android);
nativeView.getAxisLeft().setDrawZeroLine(true);
nativeView.getAxisLeft().setTextColor(this.colors.label.android);
nativeView.getAxisLeft().setTextSize(16);
nativeView.getAxisLeft().setTypeface(font);
nativeView.getAxisLeft().setDrawLimitLinesBehindData(true);
nativeView.getAxisRight().setEnabled(true);
nativeView.getAxisRight().setAxisMaximum(this.graphMaximum);
nativeView.getAxisRight().setAxisMinimum(this.graphMinimum);
nativeView.getAxisRight().setAxisLineColor(this.colors.label.android);
nativeView.getAxisRight().setAxisLineWidth(2);
nativeView.getAxisRight().setDrawLabels(false);
nativeView.getAxisRight().setDrawAxisLine(false);
nativeView.getAxisRight().setDrawGridLines(false);
nativeView.getAxisRight().setLabelCount(7);
nativeView.getAxisRight().setTextColor(0);
nativeView.getAxisRight().setTextSize(16);
nativeView.getAxisRight().setTypeface(font);
// Create a limit line at the top of the chart to mimic a "border top" line
var topLine = new charting.components.LimitLine(this.graphMaximum);
topLine.setLineColor(this.colors.axisTick.android);
topLine.setLineWidth(1);
nativeView.getAxisLeft().addLimitLine(topLine);
var highAlarm = new charting.components.LimitLine(this.normalizeValue(this.highAlarm));
highAlarm.setLineColor(this.colors.veryHigh.argb);
highAlarm.setLineWidth(2);
highAlarm.enableDashedLine(15, 10, 0);
// Add high alarm if it is set
if (this.highAlarm !== -1) {
nativeView.getAxisLeft().addLimitLine(highAlarm);
}
var lowAlarm = new charting.components.LimitLine(this.lowAlarm);
lowAlarm.setLineColor(this.colors.low.argb);
lowAlarm.setLineWidth(2);
lowAlarm.enableDashedLine(15, 10, 0);
// Add low alarm if it is set
if (this.lowAlarm !== -1) {
nativeView.getAxisLeft().addLimitLine(lowAlarm);
}
var entries = new java.util.ArrayList();
var lastVal = new java.util.ArrayList();
// Make fake values for every hour to have the axis print values evenly
var targetRangeEntries = new java.util.ArrayList();
var hours = this.now.subtract(12, 'hours');
var graphStart = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(hours, this.now);
var graphEnd = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(this.now, this.now);
targetRangeEntries.add(new charting.data.Entry(graphStart, this.targetHighThreshold));
targetRangeEntries.add(new charting.data.Entry(graphEnd, this.targetHighThreshold));
// Real data set
var mainData = new charting.data.LineDataSet(entries, 'mainData');
mainData.setHighLightColor(this.colors.label.android);
mainData.setHighlightLineWidth(2);
mainData.setDrawCircles(false);
mainData.setDrawHorizontalHighlightIndicator(false);
// mainData.setColor(this.colors.label.android);
// mainData.setLineWidth(4);
mainData.setDrawValues(false);
// mainData.setMode(charting.data.LineDataSet.Mode.CUBIC_BEZIER);
// mainData.setCubicIntensity(0.05);
mainData.setVisible(false);
// Fake data set to have last highlight value display circle
var highlightDot = new charting.data.LineDataSet(lastVal, 'highlightDot');
highlightDot.setCircleColor(this.colors.label.android);
highlightDot.setCircleHoleColor(this.colors.low.android);
highlightDot.setDrawValues(false);
highlightDot.setCircleRadius(8);
highlightDot.setCircleHoleRadius(7);
highlightDot.setHighlightEnabled(false);
// Fake data set to create the target range green background
var targetRangeSet = new charting.data.LineDataSet(targetRangeEntries, 'targetRange');
targetRangeSet.setDrawCircles(false);
targetRangeSet.setDrawValues(false);
targetRangeSet.setLineWidth(0);
targetRangeSet.setColor(0); // Clear
targetRangeSet.setHighlightEnabled(false);
targetRangeSet.setDrawFilled(true);
targetRangeSet.setFillColor(this.colors.targetRangeBg.android); // Green
targetRangeSet.setFillAlpha(this.colors.targetRangeBg.a); // Alpha must be set separetely for Android
targetRangeSet.setFillFormatter(new FillFormatter(this));
var dataList = new java.util.ArrayList();
dataList.add(targetRangeSet);
dataList.add(mainData);
dataList.add(highlightDot);
var data = new charting.data.LineData(dataList);
var chartValueSelectedListener = new ValueSelectedListener(this);
nativeView.setOnChartValueSelectedListener(chartValueSelectedListener);
nativeView.chartValueSelectedListener = chartValueSelectedListener;
nativeView.setData(data);
this.dataSets = {
0: this.makeMainDataSet(new java.util.ArrayList(), 0),
};
this.redDataSets = {};
nativeView.getXAxis().setAxisMinimum(graphStart);
nativeView.getXAxis().setAxisMaximum(graphEnd);
// Refresh the view for display
nativeView.invalidate();
setTimeout(function () {
_this.refreshData();
}, 0);
};
GlucoseChart.prototype.disposeNativeView = function () {
var nativeView = this.nativeViewProtected;
nativeView.chartValueSelectedListener = null;
_super.prototype.disposeNativeView.call(this);
};
Object.defineProperty(GlucoseChart.prototype, "android", {
get: function () {
return this.nativeViewProtected;
},
enumerable: true,
configurable: true
});
Object.defineProperty(GlucoseChart.prototype, "_nativeView", {
get: function () {
return this.nativeViewProtected;
},
enumerable: true,
configurable: true
});
GlucoseChart.prototype.onUnloaded = function () {
_super.prototype.onUnloaded.call(this);
FillFormatter = null;
};
GlucoseChart.prototype.makeMainDataSet = function (entries, index) {
// Real data set
var lineData = new charting.data.LineDataSet(entries, 'lineData-' + index);
this.dataSets[index] = lineData;
// lineData.highlightColor = UIColor.labelColor;
// lineData.highlightLineWidth = 2;
lineData.setHighlightEnabled(false);
// lineData.setDrawCircles(false);
lineData.setCircleRadius(1.8);
lineData.setDrawCircleHole(false);
lineData.setCircleColor(this.colors.label.android);
// lineData.drawHorizontalHighlightIndicatorEnabled = false;
lineData.setColor(this.colors.label.android);
lineData.setLineWidth(4);
lineData.setDrawValues(false);
lineData.setMode(charting.data.LineDataSet.Mode.CUBIC_BEZIER);
lineData.setCubicIntensity(0.05);
// lineData.lineCapType = CGLineCap.kCGLineCapRound;
this.android.getLineData().addDataSet(lineData);
return lineData;
};
GlucoseChart.prototype.makeRedDataSet = function (entries, index) {
var lineData = this.redDataSets[index];
if (lineData) {
this.android.getLineData().removeDataSet(lineData);
}
// Real data set
lineData = new charting.data.LineDataSet(entries, 'redData-' + index);
this.redDataSets[index] = lineData;
// lineData.highlightColor = UIColor.labelColor;
// lineData.highlightLineWidth = 2;
lineData.setHighlightEnabled(false);
// lineData.setDrawCircles(false);
lineData.setCircleRadius(2.1);
lineData.setDrawCircleHole(false);
lineData.setCircleColor(this.colors.low.android);
// lineData.drawHorizontalHighlightIndicatorEnabled = false;
lineData.setColor(this.colors.low.android);
lineData.setLineWidth(4);
lineData.setDrawValues(false);
lineData.setMode(charting.data.LineDataSet.Mode.CUBIC_BEZIER);
lineData.setCubicIntensity(0.05);
// lineData.lineCapType = CGLineCap.kCGLineCapRound;
this.android.getLineData().addDataSet(lineData);
return lineData;
};
GlucoseChart.prototype.refreshColors = function (notify) {
if (notify === void 0) { notify = true; }
var nativeView = this.android;
// Chart is probably unloaded
if (!nativeView) {
return;
}
var data = nativeView.getLineData();
nativeView.getAxisLeft().setGridColor(this.colors.axisLine.android);
nativeView.getAxisLeft().setZeroLineColor(this.colors.axisTick.android);
nativeView.getAxisLeft().setDrawZeroLine(true);
nativeView.getAxisLeft().getLimitLines().get(0).setLineColor(this.colors.axisTick.android);
nativeView.getAxisLeft().setTextColor(this.colors.label.android);
nativeView.getXAxis().setGridColor(this.colors.axisTick.android);
nativeView.getXAxis().setTextColor(this.colors.label.android);
nativeView.getAxisRight().setAxisLineColor(this.colors.label.android);
var dayLines = nativeView.getXAxis().getLimitLines();
var dayLine1 = dayLines.get(0);
var dayLine2 = dayLines.get(1);
dayLine1.setLineColor(this.colors.daySplit.android);
dayLine2.setLineColor(this.colors.daySplit.android);
var highlightDot = data.getDataSetByLabel('highlightDot', false);
var mainData = data.getDataSetByLabel('mainData', false);
var targetRangeSet = data.getDataSetByLabel('targetRange', false);
mainData.setHighLightColor(this.colors.label.android);
targetRangeSet.setFillColor(this.colors.targetRangeBg.android);
if (highlightDot) {
highlightDot.setCircleColor(this.colors.label.android);
}
if (notify) {
// Due to android not allowing the circle color to change for existing datasets, we need
// to delete the existing ones and redraw the data to get the correct colored lines added
for (var i = Object.keys(this.dataSets).length; i >= 0; i--) {
var set = this.dataSets[i];
data.removeDataSet(set);
set = null;
this.dataSets[i] = null;
delete this.dataSets[i];
}
// Create expected initial data set
this.makeMainDataSet(new java.util.ArrayList(), 0);
// Redraw the lines with correct colors
this.refreshData();
data.notifyDataChanged();
nativeView.notifyDataSetChanged();
nativeView.invalidate();
}
};
GlucoseChart.prototype.refreshAlarms = function (notify) {
if (notify === void 0) { notify = true; }
var nativeView = this.android;
if (!nativeView) {
return;
}
nativeView.getAxisLeft().removeAllLimitLines();
// Create a limit line at the top of the chart to mimic a "border top" line
var topLine = new charting.components.LimitLine(this.graphMaximum);
topLine.setLineColor(this.colors.axisTick.android);
topLine.setLineWidth(1);
nativeView.getAxisLeft().addLimitLine(topLine);
var highAlarm = new charting.components.LimitLine(this.normalizeValue(this.highAlarm));
highAlarm.setLineColor(this.colors.veryHigh.argb);
highAlarm.setLineWidth(2);
highAlarm.enableDashedLine(15, 10, 0);
// Add high alarm if it is set
if (this.highAlarm !== -1) {
nativeView.getAxisLeft().addLimitLine(highAlarm);
}
var lowAlarm = new charting.components.LimitLine(this.lowAlarm);
lowAlarm.setLineColor(this.colors.low.argb);
lowAlarm.setLineWidth(2);
lowAlarm.enableDashedLine(15, 10, 0);
// Add low alarm if it is set
if (this.lowAlarm !== -1) {
nativeView.getAxisLeft().addLimitLine(lowAlarm);
}
if (notify) {
nativeView.invalidate();
}
};
GlucoseChart.prototype.refreshTarget = function (notify) {
if (notify === void 0) { notify = true; }
var nativeView = this.android;
// Chart is probably unloaded
if (!nativeView) {
return;
}
var data = nativeView.getData();
var targetRange = data.getDataSetByLabel('targetRange', false);
var hours = this.now.subtract(12, 'hours');
var graphStart = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(hours, this.now);
var graphEnd = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(this.now, this.now);
targetRange.clear();
targetRange.addEntry(new charting.data.Entry(graphStart, this.targetHighThreshold));
targetRange.addEntry(new charting.data.Entry(graphEnd, this.targetHighThreshold));
if (notify) {
data.notifyDataChanged();
nativeView.notifyDataSetChanged();
nativeView.invalidate();
}
};
GlucoseChart.prototype.refreshData = function () {
var _this = this;
var nativeView = this.android;
// Chart is probably unloaded
if (!nativeView) {
return;
}
this.now = moment__WEBPACK_IMPORTED_MODULE_2___default()();
var data = nativeView.getLineData();
// Graph ticks
var height = nativeView.getHeight();
nativeView.getXAxis().enableGridDashedLine(20, height, 0);
// Y axis maximums
nativeView.getAxisLeft().setAxisMaximum(this.graphMaximum);
nativeView.getAxisRight().setAxisMaximum(this.graphMaximum);
// Day split
var dayLines = nativeView.getXAxis().getLimitLines();
var dayLine1 = dayLines.get(0);
var dayLine2 = dayLines.get(1);
dayLine1.enableDashedLine(40, height, -height + 40 * _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_1__["screen"].mainScreen.scale);
dayLine1.setLabel(Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["formatDay"])(this.now.subtract(1, 'days')));
dayLine2.enableDashedLine(40, height, -height + 40 * _nativescript_core_platform__WEBPACK_IMPORTED_MODULE_1__["screen"].mainScreen.scale);
dayLine2.setLabel(Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["formatDay"])(this.now));
// Alarms and top line
this.refreshAlarms(false);
// In target range zone
this.refreshTarget(false);
var hours = this.now.subtract(12, 'hours');
var graphStart = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(hours, this.now);
var graphEnd = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(this.now, this.now);
// Handle Data
var mainData = data.getDataSetByLabel('mainData', false);
mainData.clear();
Object.keys(this.dataSets).forEach(function (i) { return _this.dataSets[i].clear(); });
Object.keys(this.redDataSets).forEach(function (i) { return _this.redDataSets[i].clear(); });
var setIndex = 0;
var lineData = this.dataSets[0];
var prevX = null;
var redEntries = new java.util.ArrayList();
var redIndex = 0;
// This loop has 4 main goals:
// - Filling individual lines for display
// - Detecting and filling partial red lines
// - Detecting gaps in data and creating invisible points at 5 minute intervals on the hour
// - Adding all data and fake points to a master invisible line for intractability
this.items.forEach(function (i, idx) {
var time = moment__WEBPACK_IMPORTED_MODULE_2___default.a.utc(i.FactoryTimestamp);
var currX = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(time, _this.now);
// Add fake points from start of graph to first real point
if (idx === 0 && currX - graphStart > 15 / 60) {
for (var p = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(hours.clone().subtract(hours.minutes() % 5, 'minutes'), _this.now); p < currX - 5 / 60; p += 5 / 60) {
mainData.addEntry(new charting.data.Entry(p, -1));
}
}
// A gap of more than 20 minutes
if (prevX && currX - prevX > 20 / 60) {
var prevTime = time.clone().subtract(currX - prevX, 'hours');
// Add fake points to fill in gaps
for (var p = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(prevTime
.clone()
.add(5, 'minutes')
.add((5 - (prevTime.minutes() % 5)) % 5, 'minutes'), _this.now); p < currX - 5 / 60; p += 5 / 60) {
mainData.addEntry(new charting.data.Entry(p, -1));
}
setIndex++;
lineData = _this.dataSets[setIndex];
if (!lineData) {
lineData = _this.makeMainDataSet(new java.util.ArrayList(), setIndex);
}
// End any red lines since we detected a gap in data
if (redEntries.size() !== 0) {
_this.makeRedDataSet(redEntries.clone(), redIndex);
redEntries.clear();
redIndex++;
}
}
// Add low values to red lines
if (i.Value < _this.fixedLowThreshold) {
// At the start of a new red line when there is a previous data point on the data line,
// we should compute the theoretical start of the red line along the slope
if (redEntries.size() === 0) {
if (idx > 0 && lineData.getEntryCount() > 0) {
var prev = _this.items.getItem(idx - 1);
var simX = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["computeXForSlopeFromPoints"])({
x: Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(moment__WEBPACK_IMPORTED_MODULE_2___default.a.utc(prev.FactoryTimestamp), _this.now),
y: prev.Value,
}, { x: currX, y: i.Value }, _this.fixedLowThreshold);
redEntries.add(new charting.data.Entry(simX, _this.fixedLowThreshold));
}
}
redEntries.add(new charting.data.Entry(currX, i.Value));
}
// End a red line because we have crossed over the threshold
if (i.Value >= _this.fixedLowThreshold) {
if (redEntries.size() !== 0) {
// Again, compute the theoretical end of the red line following the slope of the line
if (idx > 0) {
var prev = _this.items.getItem(idx - 1);
var simX = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["computeXForSlopeFromPoints"])({ x: currX, y: i.Value }, {
x: Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(moment__WEBPACK_IMPORTED_MODULE_2___default.a.utc(prev.FactoryTimestamp), _this.now),
y: prev.Value,
}, _this.fixedLowThreshold);
redEntries.add(new charting.data.Entry(simX, _this.fixedLowThreshold));
}
_this.makeRedDataSet(redEntries.clone(), redIndex);
redEntries.clear();
redIndex++;
}
}
mainData.addEntry(new charting.data.Entry(currX, i.Value));
lineData.addEntry(new charting.data.Entry(currX, _this.normalizeValue(i.Value)));
// End of historical items
if (idx === _this.items.length - 1) {
if (_this.isCurrentGlucoseRecent() &&
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["isGlucoseItemScan"])(_this.currentGlucose) &&
Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(moment__WEBPACK_IMPORTED_MODULE_2___default.a.utc(_this.currentGlucose.FactoryTimestamp), _this.now) - currX <
25 / 60) {
// Connect the trace line to the current glucose if it is within 25 minutes
lineData.addEntry(new charting.data.Entry(graphEnd, _this.currentGlucose.Value));
// Handle red line
if (_this.currentGlucose.Value < _this.fixedLowThreshold) {
// Simulate redline starting for current glucose
if (redEntries.size() === 0) {
var simX = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["computeXForSlopeFromPoints"])({ x: currX, y: i.Value }, { x: graphEnd, y: _this.currentGlucose.Value }, _this.fixedLowThreshold);
redEntries.add(new charting.data.Entry(simX, _this.fixedLowThreshold));
}
redEntries.add(new charting.data.Entry(graphEnd, _this.currentGlucose.Value));
}
else {
// Simulate redline ending before current glucose
if (redEntries.size() !== 0) {
var simX = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["computeXForSlopeFromPoints"])({ x: currX, y: i.Value }, { x: graphEnd, y: _this.currentGlucose.Value }, _this.fixedLowThreshold);
redEntries.add(new charting.data.Entry(simX, _this.fixedLowThreshold));
}
}
}
else {
// Add fake points from last real point to the end of graph if not connecting to current glucose
for (var p = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(time
.clone()
.add(5, 'minutes')
.add((5 - (time.minutes() % 5)) % 5, 'minutes'), _this.now); p < graphEnd; p += 5 / 60) {
mainData.addEntry(new charting.data.Entry(p, -1));
}
// Add one fake dot as there needs to be at least 2 points to draw a line
if (lineData.getEntryCount() === 1) {
// lineData.addEntry(new charting.data.Entry(currX + 0.1, i.Value));
// Handle if the sole dot is below the red cutoff
if (i.Value < _this.fixedLowThreshold) {
// redEntries.add(new charting.data.Entry(currX + 0.1, i.Value));
}
}
}
// Commit any remaining red lines
if (redEntries.size() !== 0) {
_this.makeRedDataSet(redEntries.clone(), redIndex);
}
}
prevX = currX;
});
lineData = this.dataSets[0];
var entries = lineData.getValues().clone();
// Remove older entries that are offscreen
for (var i = 0; i < entries.size(); i++) {
var point = entries.get(i);
var time = this.now.startOf('day');
time.add(point.getX(), 'hours');
// Leave a little extra data points offscreen for cubic bezier smoothing
if (time.isBefore(hours.clone().subtract(1, 'hours'))) {
mainData.removeEntryByXValue(point.getX());
lineData.removeEntryByXValue(point.getX());
}
}
// Add fake points to the whole graph if empty
if (mainData.getEntryCount() === 0) {
for (var p = Object(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["momentToRelativeHour"])(hours.clone().subtract(hours.minutes() % 5, 'minutes'), this.now); p <= graphEnd; p += 5 / 60) {
mainData.addEntry(new charting.data.Entry(p, -1));
}
}
// Force the xAxis to stay at a 12 hour range
nativeView.getXAxis().setAxisMinimum(graphStart);
nativeView.getXAxis().setAxisMaximum(graphEnd);
// Update colors
this.refreshColors(false);
var sets = data.getDataSets();
// Move highlightDot data set to the end so that it is on top of all our lines
for (var i = data.getDataSetIndexByLabel(sets, 'highlightDot', false); i !== -1 && i < data.getDataSetCount() - 1; i++) {
var temp = sets.get(i);
sets.set(i, sets.get(i + 1));
sets.set(i + 1, temp);
}
data.notifyDataChanged();
nativeView.notifyDataSetChanged();
nativeView.invalidate();
setTimeout(function () {
// Always highlight the newest current glucose when in current mode
if (!_this.reviewing) {
_this.highlightCurrent();
}
else if (
// If the reviewed measurement is no longer on the graph,
// highlight the oldest available measurement instead
_this.selectedItem &&
moment__WEBPACK_IMPORTED_MODULE_2___default.a.utc(_this.selectedItem.FactoryTimestamp).isBefore(_this.now.subtract(12, 'hours'))) {
nativeView.highlightValue(graphStart, 1);
}
}, 0);
};
GlucoseChart.prototype.selectCurrent = function (point) {
var nativeView = this.android;
if (!nativeView) {
return;
}
var data = nativeView.getLineData();
var highlightDot = data.getDataSetByLabel('highlightDot', false);
data.removeDataSet(highlightDot);
highlightDot = new charting.data.LineDataSet(new java.util.ArrayList(), 'highlightDot');
highlightDot.setCircleColor(this.colors.label.android);
highlightDot.setCircleHoleColor(this.colors.low.android);
highlightDot.setDrawValues(false);
highlightDot.setCircleRadius(8);
highlightDot.setCircleHoleRadius(7);
highlightDot.setHighlightEnabled(false);
if (point.y !== -1 && Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["isGlucoseItemScan"])(this.currentGlucose)) {
highlightDot.setCircleHoleColor(this.colors[this.currentGlucose.MeasurementColor || 0].android);
var entry = new charting.data.Entry(point.x, point.y);
highlightDot.addEntry(entry);
}
data.addDataSet(highlightDot);
nativeView.highlightValue(point.x, data.getDataSetCount() - 1, false);
nativeView.getAxisRight().setDrawAxisLine(true);
highlightDot.notifyDataSetChanged();
data.notifyDataChanged();
nativeView.notifyDataSetChanged();
nativeView.invalidate();
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["fixedHighThresholdProperty"].getDefault] = function () {
return -1;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["fixedLowThresholdProperty"].getDefault] = function () {
return -1;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["highAlarmProperty"].getDefault] = function () {
return -1;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["isMmolPerLProperty"].getDefault] = function () {
return false;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["itemsProperty"].getDefault] = function () {
return [];
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["lowAlarmProperty"].getDefault] = function () {
return -1;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["targetHighThresholdProperty"].getDefault] = function () {
return -1;
};
GlucoseChart.prototype[_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["targetLowThresholdProperty"].getDefault] = function () {
return -1;
};
return GlucoseChart;
}(_glucose_chart_common__WEBPACK_IMPORTED_MODULE_5__["GlucoseChartBase"]));
;
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 171 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = "<GridLayout class=\"{{'glucose-measurement ' + getBackgroundClass()}}\" columns=\"*, auto, *\">\n <!-- Reading -->\n <FlexboxLayout class=\"structure-reading flex-row\" col=\"0\" >\n <!-- Severity edge -->\n <Label class=\"{{getBorderClass()}}\" text=\"\" />\n\n <!-- Measure -->\n <FlexboxLayout class=\"structure-measure-wrap flex-row\">\n <!-- Value -->\n <Label class=\"measurement-value\" text=\"{{$parent | localizeValue}}\" textWrap=\"true\"\n visibility=\"{{isHigh || isLow ? 'collapsed' : 'visible'}}\" />\n <Label class=\"measurement-threshold\" text=\"{{L(isHigh ? 'Summary.high' : 'Summary.low')}}\" textWrap=\"true\"\n visibility=\"{{isHigh || isLow ? 'visible' : 'collapsed'}}\" />\n <!-- Arrow / UOM -->\n <FlexboxLayout class=\"reading-details flex-col\" visibility=\"{{isHigh || isLow ? 'collapsed' : 'visible'}}\">\n <Label text=\"{{getArrow()}}\" class=\"icfont icxsm trend-arrow\" />\n <Label class=\"measurement-uom\" text=\"{{GlucoseUnits | getUOMFromGlucoseType}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </FlexboxLayout>\n\n <Label text=\"alarm\" class=\"icfont icmd alarm\" col=\"1\" verticalAlignment=\"center\" visibility=\"{{alarmType !== undefined ? 'visible' : 'collapsed' }}\" />\n\n <!-- Time info -->\n <FlexboxLayout class=\"structure-time-information flex-col\" col=\"2\">\n <Label class=\"measurement-time\" text=\"{{FactoryTimestamp | dateTimeStamp}}\" />\n </FlexboxLayout>\n</GridLayout>\n";
if (false ) {}
/***/ }),
/* 172 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony import */ var _reducers_user_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var onLoaded = function (args) {
var page = args.object;
var safetyBanner = page.getViewById('safety-banner');
var handleDisplayBanner = function () {
var closeButton = page.getViewById('close-button');
if (safetyBanner.visibility === 'visible' || !isBannerReadyToDisplay()) {
return;
}
safetyBanner.visibility = 'visible';
safetyBanner.translateY = 300;
safetyBanner.animate({
duration: 1000,
translate: { x: 0, y: 0 },
});
closeButton.on('tap', function () {
handleDismissBanner();
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_0__["BANNER_CLOSED"] });
});
};
var handleDismissBanner = function () {
safetyBanner.animate({
duration: 400,
translate: { x: 0, y: 300 },
});
setTimeout(function () {
safetyBanner.visibility = 'collapse';
}, 500);
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe('safetyBanner:getBanner', handleDisplayBanner);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe('safetyBanner:dismissBanner', handleDismissBanner);
};
var isBannerReadyToDisplay = function () {
var storeState = _store_store__WEBPACK_IMPORTED_MODULE_1__["store"].getState();
var safetyBannerInterval = storeState.config.safetyBannerInterval;
var timeNextBannerDisplays = storeState.user.timeBannerWasDismissed + safetyBannerInterval;
var currentTime = new Date().getTime();
if (timeNextBannerDisplays < currentTime) {
return true;
}
return false;
};
;
if (false ) {}
/***/ }),
/* 173 */,
/* 174 */,
/* 175 */,
/* 176 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "authReducer", function() { return authReducer; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
/* harmony import */ var _user_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
var initialState = {
error: false,
loggedIn: false,
token: '',
};
var authReducer = function (state, action) {
if (state === void 0) { state = initialState; }
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_0__["CONTINUE_AUTH"]:
if (!state.error && state.step && state.step.type === action.step.type) {
return state;
}
return __assign(__assign({}, state), { step: action.step, error: false });
case _user_types__WEBPACK_IMPORTED_MODULE_1__["INITIALIZE_USER"]:
return __assign(__assign({}, state), { legacyToken: undefined, loggedIn: true });
case _types__WEBPACK_IMPORTED_MODULE_0__["USER_LEGACY_TOKEN"]:
return __assign(__assign({}, state), { legacyToken: action.token });
case _user_types__WEBPACK_IMPORTED_MODULE_1__["LOGIN"]:
return __assign(__assign({}, state), {
// errors: action.error ? action.payload.errors : null,
loggedIn: true, step: undefined });
case _user_types__WEBPACK_IMPORTED_MODULE_1__["LOGOUT"]:
return __assign({}, initialState);
case _types__WEBPACK_IMPORTED_MODULE_0__["USER_AUTH_TICKET"]:
return __assign(__assign({}, state), { token: action.token });
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 177 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "configReducer", function() { return configReducer; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78);
var initialState = {
safetyBannerInterval: 0,
captureAnalytics: false,
countryList: {
countries: [],
},
langs: [],
lluAppAndroid: '',
lluAppIOS: '',
lluSAM: '',
lluSupport: '',
lluSupportMain: '',
lslApi: '',
apiEndpoint: '',
lv: '',
minorityAge: 0,
MinVersion: '',
regionalMap: {},
regulatory: {
isoIconFonts: {},
regulatoryLabels: {},
sectionIsVisible: {},
},
ShowAlert: false,
versionLLU: '',
versionLV: '',
lluToUHtml: {},
lluPrivacyPolicyHtml: {},
PartnerApplicationKeys: [],
passwordRules: {
PasswordRequirements: [],
rules: {},
},
};
var configReducer = function (state, action) {
if (state === void 0) { state = initialState; }
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_0__["CONFIG_UPDATE"]:
return __assign(__assign({}, state), action.config);
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 178 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "connectionReducer", function() { return connectionReducer; });
/* harmony import */ var _user_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(18);
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34);
var initialState = {
connections: [],
loaded: false,
};
var connectionReducer = function (state, action) {
if (state === void 0) { state = initialState; }
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_1__["UPDATE_CONNECTION"]: {
var connections = state.connections.slice();
var index = connections.findIndex(function (c) { return c.id === action.connection.id; });
connections[index] = __assign(__assign({}, connections[index]), action.connection);
return __assign(__assign({}, state), { connections: connections });
}
case _types__WEBPACK_IMPORTED_MODULE_1__["UPDATE_CONNECTIONS"]: {
return __assign(__assign({}, state), { connections: action.connections, loaded: true });
}
case _types__WEBPACK_IMPORTED_MODULE_1__["UPDATE_CONNECTION_SETTINGS"]: {
var connections = state.connections.slice();
var index = connections.findIndex(function (c) { return c.id === action.connectionId; });
var con = __assign({}, connections[index]);
con.alarmRules = action.alarmRules;
connections[index] = con;
return __assign(__assign({}, state), { connections: connections });
}
case _types__WEBPACK_IMPORTED_MODULE_1__["UNFOLLOW_CONNECTION"]: {
var updatedConnections = state.connections.filter(function (connection) {
return connection.id !== action.unfollowConnectionID;
});
return __assign(__assign({}, state), { connections: updatedConnections });
}
case _types__WEBPACK_IMPORTED_MODULE_1__["ADD_CONNECTION"]:
return __assign(__assign({}, state), { connections: __spreadArrays([action.connection], state.connections) });
case _user_types__WEBPACK_IMPORTED_MODULE_0__["LOGOUT"]:
return __assign({}, initialState);
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 179 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "navReducer", function() { return navReducer; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
var initialState = {
location: 'views/loader/loader',
previousLocation: '',
ready: false,
};
var navReducer = function (state, action) {
if (state === void 0) { state = initialState; }
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_0__["NAVIGATION"]:
return __assign(__assign({}, state), { previousLocation: state.ready ? state.location : '', location: action.location });
case _types__WEBPACK_IMPORTED_MODULE_0__["NAVIGATION_READY"]:
return __assign(__assign({}, state), { ready: true });
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 180 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "notificationReducer", function() { return notificationReducer; });
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
var initialState = {
token: '',
disabledByOS: false,
};
var notificationReducer = function (state, action) {
if (state === void 0) { state = initialState; }
switch (action.type) {
case _types__WEBPACK_IMPORTED_MODULE_0__["NOTIFICATION_TOKEN"]:
return __assign(__assign({}, state), { token: action.token });
case _types__WEBPACK_IMPORTED_MODULE_0__["NOTIFICATION_DELETE_TOKEN"]:
return __assign(__assign({}, state), { token: '' });
case _types__WEBPACK_IMPORTED_MODULE_0__["DISABLED_BY_OS"]:
return __assign(__assign({}, state), { disabledByOS: action.disabled });
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 181 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "userReducer", function() { return userReducer; });
/* harmony import */ var _auth_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41);
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18);
var initialState = {
accountType: 'pat',
communicationLanguage: '',
country: '',
created: 0,
dateFormat: '1',
dateOfBirth: 0,
email: '',
firstName: '',
id: '',
lastName: '',
phoneLanguage: '',
system: {
messages: {},
},
timeBannerWasDismissed: 0,
timeFormat: '1',
timezone: 'GMT',
timezoneId: 'Greenwich',
uiLanguage: '',
uom: '0',
};
var userReducer = function (state, action) {
var _a;
if (state === void 0) { state = initialState; }
switch (action.type) {
case _auth_types__WEBPACK_IMPORTED_MODULE_0__["CONTINUE_AUTH"]:
if (action.user) {
return __assign(__assign({}, state), action.user);
}
return state;
case _types__WEBPACK_IMPORTED_MODULE_1__["UPDATE_ACCOUNT_INFO"]:
return __assign(__assign({}, state), action.user);
case _types__WEBPACK_IMPORTED_MODULE_1__["COUNTRY_CHOSEN"]:
return __assign(__assign({}, state), { country: action.country });
case _types__WEBPACK_IMPORTED_MODULE_1__["INITIALIZE_USER"]:
return __assign(__assign({}, state), action.user);
case _types__WEBPACK_IMPORTED_MODULE_1__["LANGUAGE_CHANGE"]:
if (action.language === state.uiLanguage) {
return state;
}
return __assign(__assign({}, state), { uiLanguage: action.language });
case _types__WEBPACK_IMPORTED_MODULE_1__["SET_PHONE_LANGUAGE"]:
return __assign(__assign({}, state), { phoneLanguage: action.language });
case _types__WEBPACK_IMPORTED_MODULE_1__["SET_TIMEZONE"]:
return __assign(__assign({}, state), { timezone: action.timezone, timezoneId: action.timezoneId });
case _types__WEBPACK_IMPORTED_MODULE_1__["SYSTEM_MESSAGE_DISMISS"]:
return __assign(__assign({}, state), { system: __assign(__assign({}, state.system), { messages: __assign(__assign({}, state.system.messages), (_a = {}, _a[action.messageId] = true, _a)) }) });
case _types__WEBPACK_IMPORTED_MODULE_1__["LOGIN"]:
return __assign(__assign({}, state), action.user);
case _types__WEBPACK_IMPORTED_MODULE_1__["LOGOUT"]:
return __assign(__assign({}, initialState), { country: state.country, timeBannerWasDismissed: state.timeBannerWasDismissed, timezone: state.timezone, timezoneId: state.timezoneId, uiLanguage: state.uiLanguage });
case _types__WEBPACK_IMPORTED_MODULE_1__["BANNER_CLOSED"]:
return __assign(__assign({}, state), { timeBannerWasDismissed: new Date().getTime() });
default:
return state;
}
};
;
if (false ) {}
/***/ }),
/* 182 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ValueList", function() { return ValueList; });
/* harmony import */ var _nativescript_core_utils_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(38);
/* harmony import */ var _nativescript_core_utils_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_utils_types__WEBPACK_IMPORTED_MODULE_0__);
var ValueList = /** @class */ (function () {
function ValueList(array) {
this._array = array;
}
Object.defineProperty(ValueList.prototype, "length", {
get: function () {
return this._array.length;
},
enumerable: true,
configurable: true
});
ValueList.prototype.push = function (value) {
return (this._array[this._array.length++] = value);
};
ValueList.prototype.getItem = function (index) {
// Used for items source in list picker
return this.getText(index);
};
ValueList.prototype.getText = function (index) {
if (_nativescript_core_utils_types__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"](index)) {
return null;
}
if (index < 0 || index >= this._array.length) {
return '';
}
return this._array[index].DisplayMember;
};
ValueList.prototype.getValue = function (index) {
if (_nativescript_core_utils_types__WEBPACK_IMPORTED_MODULE_0__["isNullOrUndefined"](index) || index < 0 || index >= this._array.length) {
return null;
}
return this._array[index].ValueMember;
};
ValueList.prototype.getIndex = function (value) {
var loop;
for (loop = 0; loop < this._array.length; loop++) {
if (this.getValue(loop) === value) {
return loop;
}
}
return -1;
};
return ValueList;
}());
;
if (false ) {}
/***/ }),
/* 183 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AccountViewModel", function() { return AccountViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
var AccountViewModel = /** @class */ (function (_super) {
__extends(AccountViewModel, _super);
function AccountViewModel() {
var _this = _super.call(this) || this;
var user = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().user;
_this.set('password', '');
if (user) {
_this.set('firstname', user.firstName);
_this.set('lastname', user.lastName);
_this.set('email', user.email);
_this.set('isHCP', user.accountType === 'pro');
}
return _this;
}
AccountViewModel.prototype.getUserAccountInfo = function () {
var _this = this;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('user:getAccount')
.then(function (response) {
_this.set('firstname', response.firstName);
_this.set('lastname', response.lastName);
_this.set('isHCP', response.accountType === 'pro');
_this.set('email', response.email);
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
AccountViewModel.prototype.updateUserProfile = function () {
var _this = this;
var firstName = this.get('firstname');
var lastName = this.get('lastname');
var email = this.get('email');
var password = this.get('password');
if (!Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["hasValidProfileInputs"])(firstName, lastName, password)) {
return;
}
return _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('auth:verifyPassword', {
email: email,
password: password,
})
.then(function (response) {
_this.handleVerifyPasswordResponse(response, firstName, lastName);
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
AccountViewModel.prototype.handleVerifyPasswordResponse = function (r, first, last) {
var _this = this;
if (r.status === _constants_enums__WEBPACK_IMPORTED_MODULE_1__["ApiStatus"].Success) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('user:updateUserProfile', {
firstName: first,
lastName: last,
})
.then(function () {
_this.set('password', '');
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Account.account_settings_updated'));
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidProfileUpdatePassword'));
}
};
return AccountViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_5__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 184 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppInfoViewModel", function() { return AppInfoViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
var AppInfoViewModel = /** @class */ (function (_super) {
__extends(AppInfoViewModel, _super);
function AppInfoViewModel() {
var _this = _super.call(this) || this;
_this.getRegulatoryData = function () { return __awaiter(_this, void 0, Promise, function () {
var config, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 2, , 3]);
return [4 /*yield*/, _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].request('config:getRegulatory')];
case 1:
config = _a.sent();
this.set('regulatoryConfig', config);
this.set('regulatoryInfo', this.getRegulatoryInfo());
this.set('regulatoryIconFonts', config.isoIconFonts);
this.set('regulatoryLabels', config.regulatoryLabels);
this.set('regSectionIsVisible', config.sectionIsVisible);
this.set('iuDescription', config.iuDescription);
return [3 /*break*/, 3];
case 2:
err_1 = _a.sent();
alert(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
console.error('Error getting regulatoryData ', err_1);
return [3 /*break*/, 3];
case 3: return [2 /*return*/, Boolean(config)];
}
});
}); };
_this.getRegulatoryInfo = function () {
var baseConfig = _store_store__WEBPACK_IMPORTED_MODULE_1__["store"].getState().config;
var regulatoryConfig = _this.regulatoryConfig;
var regulatoryInfo = {
iuHeader: regulatoryConfig.iuHeader,
ecrepMessageLLU1: regulatoryConfig.safetyMessage1,
ecrepMessageLLU2: regulatoryConfig.safetyMessage2,
siteLV: baseConfig.lv,
siteLLU: baseConfig.lluSAM,
mfgName: regulatoryConfig.mfgName,
mfgAddress: regulatoryConfig.mfgAddress,
mfgCity: regulatoryConfig.mfgCity,
importerTitle: regulatoryConfig.importerTitle,
importerName: regulatoryConfig.importerName,
importerAddress: regulatoryConfig.importerAddress,
importerCity: regulatoryConfig.importerCity,
importerCountry: regulatoryConfig.importerCountry,
ecrepName: regulatoryConfig.ecrepName,
ecrepAddress: regulatoryConfig.ecrepAddress,
ecrepCity: regulatoryConfig.ecrepCity,
ecrepCountry: regulatoryConfig.ecrepCountry,
customLabels: regulatoryConfig.customLabels,
};
return regulatoryInfo;
};
return _this;
}
return AppInfoViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_3__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 185 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AppRootViewModel", function() { return AppRootViewModel; });
/* harmony import */ var _constants_routes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
var AppRootViewModel = /** @class */ (function (_super) {
__extends(AppRootViewModel, _super);
function AppRootViewModel() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.defaultPage = _constants_routes__WEBPACK_IMPORTED_MODULE_0__["LOADER"];
return _this;
}
Object.defineProperty(AppRootViewModel.prototype, "lang", {
get: function () {
return this._lang;
},
set: function (value) {
this._lang = value;
},
enumerable: true,
configurable: true
});
return AppRootViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_1__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 186 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ChangePasswordViewModel", function() { return ChangePasswordViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
var ChangePasswordViewModel = /** @class */ (function (_super) {
__extends(ChangePasswordViewModel, _super);
function ChangePasswordViewModel() {
var _this = _super.call(this) || this;
_this.set('currentPW', '');
_this.set('newPW', '');
_this.set('newPWConfirm', '');
return _this;
}
ChangePasswordViewModel.prototype.updatePassword = function () {
var _this = this;
var currentPW = this.currentPW;
var newPW = this.newPW;
var newPWConfirm = this.newPWConfirm;
if (!currentPW) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Account.current_password_required_save'));
return;
}
if (!newPW || !newPWConfirm || !Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["isValidPassword"])(newPW)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])("" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('invalidPasswordErrorMessageShort'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('PasswordRequirements.passwordRequirements') + "\n \n" + Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["getPasswordRequirements"])()
.map(function (req) { return "\u2022 " + req + "\n"; })
.join(''));
return;
}
if (newPW !== newPWConfirm) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Registration.passwordMismatchErrorMessage'));
return;
}
if (currentPW === newPW) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('ChangePW.passwordsCannotMatch'));
return;
}
return _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('user:changePassword', {
oldPass: this.currentPW,
newPass: this.newPW,
})
.then(function (result) {
if (result.status === _constants_enums__WEBPACK_IMPORTED_MODULE_1__["ApiStatus"].Success) {
_this.set('currentPW', '');
_this.set('newPW', '');
_this.set('newPWConfirm', '');
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('ChangePW.passwordUpdateSuccess'));
}
else if (result.status === 1) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidProfileUpdatePassword'));
}
else if (result.status === 411) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["getSecurityErrorMessage"])(result.data));
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('ChangePW.passwordUpdateError'));
}
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
return ChangePasswordViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_5__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 187 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionListViewModel", function() { return ConnectionListViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
var ConnectionListViewModel = /** @class */ (function (_super) {
__extends(ConnectionListViewModel, _super);
function ConnectionListViewModel() {
var _this = _super.call(this) || this;
_this.set('connections', []);
_this.set('rowsVar', '15, auto');
return _this;
}
ConnectionListViewModel.prototype.setListView = function () {
var connections = _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().connection.connections;
this.set('connections', connections);
// Number of connections * ( height + margin of connection-card ) + some height for connection-text-block
this.set('rowsVar', connections.length * 76 + 20 + ', auto');
};
ConnectionListViewModel.prototype.removeConnection = function (connectionID) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"].request('connections:unfollowConnection', { id: connectionID }).catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
ConnectionListViewModel.prototype.getConnections = function () {
var _this = this;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('connections:getConnections')
.then(function () {
_this.setListView();
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
});
};
return ConnectionListViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_4__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 188 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionViewModel", function() { return ConnectionViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(17);
var ConnectionViewModel = /** @class */ (function (_super) {
__extends(ConnectionViewModel, _super);
function ConnectionViewModel() {
var _this = _super.call(this) || this;
_this.loading = true;
_this.set('connections', []);
_this.set('timezone', _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.timezone);
return _this;
}
ConnectionViewModel.prototype.getConnections = function () {
var _this = this;
this.set('loading', true);
return new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_5__["default"]
.request('connections:getConnections')
.then(function () {
_this.set('loading', false);
var connections = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().connection.connections;
if (connections.length === 1) {
_this.navToGraph();
resolve(false);
}
else {
_this.setSummaryList();
resolve(true);
}
})
.catch(function () {
_this.set('loading', false);
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
reject();
});
});
};
ConnectionViewModel.prototype.setSummaryList = function () {
var connections = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().connection.connections;
this.set('connections', connections.map(function (c) { return (__assign({}, c)); }));
};
ConnectionViewModel.prototype.navToGraph = function () {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState(), connections = _a.connection.connections, location = _a.nav.location;
// This can be called multiple times when an invite is accepted, and the connections are being updated,
// so we need to check if we have navigated already to stop multiple nav calls.
if (location !== _constants__WEBPACK_IMPORTED_MODULE_1__["GLUCOSE_GRAPH"]) {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])({
context: { patientId: connections[0].patientId },
moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["GLUCOSE_GRAPH"],
clearHistory: true,
});
}
};
return ConnectionViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_6__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 189 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DeleteAccountViewModel", function() { return DeleteAccountViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants_enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31);
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
var DeleteAccountViewModel = /** @class */ (function (_super) {
__extends(DeleteAccountViewModel, _super);
function DeleteAccountViewModel() {
var _this = _super.call(this) || this;
_this.set('inputPW', '');
return _this;
}
DeleteAccountViewModel.prototype.deleteAccount = function () {
var _this = this;
var user = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user;
var email = user.email;
var password = this.get('inputPW');
if (!Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_7__["isValidPassword"])(password)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidProfileUpdatePassword'));
return;
}
return _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('auth:verifyPassword', {
email: email,
password: password,
})
.then(function (response) {
_this.handleVerifyPasswordResponse(response);
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
DeleteAccountViewModel.prototype.handleVerifyPasswordResponse = function (r) {
var _this = this;
if (r.status === _constants_enums__WEBPACK_IMPORTED_MODULE_1__["ApiStatus"].Success) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('user:deleteAccount')
.then(function (response) {
_this.handleDeleteAccountResponse(response);
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidProfileUpdatePassword'));
}
};
DeleteAccountViewModel.prototype.handleDeleteAccountResponse = function (r) {
if (r.status === _constants_enums__WEBPACK_IMPORTED_MODULE_1__["ApiStatus"].Success) {
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_2__["logEvent"])(_services_analytics__WEBPACK_IMPORTED_MODULE_2__["ACCOUNT_DELETED"], {
key: _services_analytics__WEBPACK_IMPORTED_MODULE_2__["NUMBER_OF_CONNECTIONS"],
value: _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().connection.connections.length.toString(),
});
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('DeleteAccount.account_deleted')).then(function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["logout"])();
});
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
}
};
return DeleteAccountViewModel;
}(_base__WEBPACK_IMPORTED_MODULE_8__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 190 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ForgotPasswordViewModel", function() { return ForgotPasswordViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
var ForgotPasswordViewModel = /** @class */ (function (_super) {
__extends(ForgotPasswordViewModel, _super);
function ForgotPasswordViewModel() {
var _this = _super.call(this) || this;
_this.set('email', '');
return _this;
}
ForgotPasswordViewModel.prototype.resetPassword = function () {
var email = this.get('email');
if (!Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["isValidEmail"])(email)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.invalidEmailAddressErrorMessage'));
return;
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('auth:forgotpassword', { email: email })
.then(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('ForgotPW.reset_pw_popup'));
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_2__["Logger"].error(err);
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
return ForgotPasswordViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_5__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 191 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MeasurementViewModel", function() { return MeasurementViewModel; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _services_network__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(87);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _utilities_date_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(35);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
var ObservableGlucoseItem = /** @class */ (function (_super) {
__extends(ObservableGlucoseItem, _super);
function ObservableGlucoseItem(g) {
var _this = _super.call(this) || this;
_this.type = g.type;
if ('FactoryTimestamp' in g) {
_this.FactoryTimestamp = g.FactoryTimestamp;
if (Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["isGlucoseItemScan"])(g)) {
_this.MeasurementColor = g.MeasurementColor;
_this.GlucoseUnits = g.GlucoseUnits;
_this.Value = g.Value;
_this.isHigh = g.isHigh;
_this.isLow = g.isLow;
if (g.type !== _models_types__WEBPACK_IMPORTED_MODULE_2__["GlucoseItemType"].Scheduled) {
_this.TrendArrow = g.TrendArrow;
}
}
if (g.type === _models_types__WEBPACK_IMPORTED_MODULE_2__["GlucoseItemType"].DeviceAlarm || g.type === _models_types__WEBPACK_IMPORTED_MODULE_2__["GlucoseItemType"].CaregiverAlarm) {
_this.alarmType = g.alarmType;
}
}
return _this;
}
ObservableGlucoseItem.prototype.getBackgroundClass = function () {
return 'measurement-item flex-row trend-' + this.MeasurementColor;
};
ObservableGlucoseItem.prototype.getBorderClass = function () {
return 'severity-color severity-' + this.MeasurementColor;
};
Object.defineProperty(ObservableGlucoseItem.prototype, "deviceAlarmType", {
get: function () {
if (this.type !== _models_types__WEBPACK_IMPORTED_MODULE_2__["GlucoseItemType"].DeviceAlarm) {
return '';
}
switch (this.alarmType) {
case 1:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.high_glucose_alarm');
case 2:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.urgent_low_glucose_alarm');
default:
return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Common.low_glucose_alarm');
}
},
enumerable: true,
configurable: true
});
ObservableGlucoseItem.prototype.getArrow = function () {
var arrows = {
1: 'tff',
2: 'tf',
3: 'ts',
4: 'tr',
5: 'trf',
};
return arrows[this.TrendArrow];
};
return ObservableGlucoseItem;
}(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"]));
var MeasurementViewModel = /** @class */ (function (_super) {
__extends(MeasurementViewModel, _super);
function MeasurementViewModel() {
var _this = _super.call(this) || this;
_this.measurements = [];
_this.readingCount = -1;
return _this;
}
MeasurementViewModel.prototype.init = function () {
var root = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].getRootView();
var main = root.mainContent;
this.spinner = main.getViewById('rootSpinner');
if (_services_network__WEBPACK_IMPORTED_MODULE_4__["networkAvailable"]()) {
this.getPatientMeasurements();
}
else {
_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('SystemMessages.no_internet'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('SystemMessages.check_internet'));
}
};
MeasurementViewModel.prototype.getPatientMeasurements = function () {
var _this = this;
var cancelDebounce = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["debounce"])(function () {
_this.spinner.busy = true;
})();
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('measurements:getLogbook', {
patientId: this.patientId,
})
.then(function (result) {
cancelDebounce();
_this.spinner.busy = false;
var formatted = _this._structureMeasurementList(result.data);
_this.set('readingCount', result.data.length);
_this.set('measurements', formatted);
})
.catch(function () {
cancelDebounce();
_this.spinner.busy = false;
_this.set('readingCount', _this.measurements.length);
});
};
MeasurementViewModel.prototype.setPatientContext = function (context) {
var oldId = this.get('patientId');
this.set('patientId', context.patientId);
this.set('patientFirstName', context.firstName);
this.set('patientLastName', context.lastName);
// Clear out existing measurements if the patient context changes
if (oldId !== context.patientId) {
this.set('measurements', []);
this.set('readingCount', -1);
}
};
MeasurementViewModel.prototype._structureMeasurementList = function (measurements) {
var data = [];
var prevHeader = null;
var currHeader;
for (var i = 0; i < measurements.length; i++) {
var meas = measurements[i];
var timestamp = meas.FactoryTimestamp;
var newMeas = new ObservableGlucoseItem(meas);
currHeader = _utilities_date_util__WEBPACK_IMPORTED_MODULE_6__["getFormatDateForTimezone"](timestamp);
if (currHeader !== prevHeader) {
var headerObj = new ObservableGlucoseItem({ type: -2 });
headerObj.header = _utilities_date_util__WEBPACK_IMPORTED_MODULE_6__["noZoneShortDate"](currHeader); // meas.FactoryTimestamp;
prevHeader = currHeader;
data.push(headerObj);
}
data.push(newMeas);
}
return data;
};
return MeasurementViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_8__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 192 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LoginViewModel", function() { return LoginViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
/* harmony import */ var _utilities_validation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(17);
var LoginViewModel = /** @class */ (function (_super) {
__extends(LoginViewModel, _super);
function LoginViewModel() {
var _this = _super.call(this) || this;
_this.set('email', '');
_this.set('password', '');
_this.set('backNav', _constants__WEBPACK_IMPORTED_MODULE_1__["HOME"]);
return _this;
}
LoginViewModel.prototype.login = function () {
var email = this.get('email');
var pw = this.get('password');
if (!Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["isValidEmail"])(email) || Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["isEmpty"])(pw)) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Login.invalidLoginErrorMessage'));
return;
}
return _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"]
.request('auth:login', { email: email, password: pw })
.then(function (result) {
if (result.status === 0) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"].publish('safetyBanner:getBanner');
}
else if (result.status === 2) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Login.invalidLoginErrorMessage'));
}
else if (result.status === 3) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Login.login_country_not_supported'));
}
else if ([411, 429].indexOf(result.status) !== -1) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(_utilities_validation__WEBPACK_IMPORTED_MODULE_4__["getSecurityErrorMessage"])(result.data));
}
else if (result.status === 4) {
// Auth tasks handled in service callback
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
}
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
});
};
return LoginViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_5__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 193 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotificationSettingsViewModel", function() { return NotificationSettingsViewModel; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(123);
/* harmony import */ var nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17);
var NotificationSettingsViewModel = /** @class */ (function (_super) {
__extends(NotificationSettingsViewModel, _super);
function NotificationSettingsViewModel(patient) {
var _this = _super.call(this) || this;
_this.connectionID = patient.id;
_this.notificationsEnabled = nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__["messaging"].areNotificationsEnabled();
_this._patient = patient;
_this._firstLoad = false;
_this.setNotificationSettings(patient.alarmRules, patient.patientDevice);
return _this;
}
NotificationSettingsViewModel.prototype.refreshNotificationSettings = function (staleCheck) {
if (staleCheck === void 0) { staleCheck = false; }
return __awaiter(this, void 0, Promise, function () {
var cg, e_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!(staleCheck || !this._firstLoad)) return [3 /*break*/, 4];
_a.label = 1;
case 1:
_a.trys.push([1, 3, , 4]);
return [4 /*yield*/, _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"].request('notificationSettings:getSettings', {
id: this.connectionID,
})];
case 2:
cg = _a.sent();
this._firstLoad = true;
this.setNotificationSettings(cg.alarmRules, cg.patientDevice);
return [3 /*break*/, 4];
case 3:
e_1 = _a.sent();
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_4__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
return [3 /*break*/, 4];
case 4: return [2 /*return*/];
}
});
});
};
NotificationSettingsViewModel.prototype.setNotificationSettings = function (ar, pd) {
var hasPreviousSettings = ar.c !== undefined;
var sens = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["sensorForConnection"])(this._patient, pd);
this.set('sensor', sens);
this.set('isMgdl', this._patient.uom === 1);
this.set('firstName', this._patient.firstName);
this.set('scansEnabled', !ar.std.sd);
this.set('cgRules', ar);
if (sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL3) {
this.setRulesFSL3(ar, hasPreviousSettings);
}
else if (sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL2 || sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].UNKNOWN) {
this.setRules(ar, hasPreviousSettings, pd);
}
};
NotificationSettingsViewModel.prototype.setRulesFSL3 = function (ar, hasPrevSettings) {
if (hasPrevSettings) {
this.setCurrentRulesFSL3(ar);
}
else {
this.setDefaultsFSL3();
}
this.set('patLowEnabled', true);
this.set('patHighEnabled', true);
};
NotificationSettingsViewModel.prototype.setCurrentRulesFSL3 = function (ar) {
var cgEnabledAlarms = {
l: ar.l.on,
h: ar.h.on,
nd: ar.nd.on,
};
this.set('cgLowEnabled', cgEnabledAlarms.l);
this.set('cgHighEnabled', cgEnabledAlarms.h);
this.set('cgNoRecentEnabled', cgEnabledAlarms.nd);
this.set('noRecentInterval', ar.nd.i || 20);
if (this.isMgdl) {
this.set('lowThreshold', ar.l.th || 70);
this.set('highThreshold', ar.h.th || 250);
}
else {
this.set('lowThreshold', ar.l.thmm.toFixed(1) || 3.9);
this.set('highThreshold', ar.h.thmm.toFixed(1) || 13.9);
}
};
NotificationSettingsViewModel.prototype.setDefaultsFSL3 = function () {
this.set('cgLowEnabled', true);
this.set('cgHighEnabled', true);
this.set('cgNoRecentEnabled', false);
this.set('noRecentInterval', 20);
if (this.isMgdl) {
this.set('lowThreshold', 70);
this.set('highThreshold', 250);
}
else {
this.set('lowThreshold', 3.9);
this.set('highThreshold', 13.9);
}
};
NotificationSettingsViewModel.prototype.setRules = function (ar, hasPrevSettings, patientDevice) {
var patEnabledAlarms = {
l: (patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.l) || false,
h: (patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.h) || false,
};
var hasUploaded = this._patient.sensor !== null;
var patLowEnabled = hasUploaded ? patEnabledAlarms.l : true;
var patHighEnabled = hasUploaded ? patEnabledAlarms.h : true;
var cgEnabledAlarms = {
l: ar.l.on,
h: ar.h.on,
nd: ar.nd.on,
};
this.set('patLowEnabled', patLowEnabled);
this.set('patHighEnabled', patHighEnabled);
if (hasPrevSettings) {
this.set('cgLowEnabled', patLowEnabled && cgEnabledAlarms.l);
this.set('cgHighEnabled', patHighEnabled && cgEnabledAlarms.h);
}
else {
this.set('cgLowEnabled', patLowEnabled);
this.set('cgHighEnabled', patLowEnabled);
}
if (this.isMgdl) {
this.set('lowThreshold', patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.ll);
this.set('highThreshold', patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.hl);
}
else {
this.set('lowThreshold', Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMGPerDLToMMOLPerL"])(patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.ll));
this.set('highThreshold', Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMGPerDLToMMOLPerL"])(patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.hl));
}
this.setUrgentLowRules(ar, hasPrevSettings, patientDevice);
};
NotificationSettingsViewModel.prototype.setUrgentLowRules = function (ar, hasPrevSettings, patientDevice) {
var _a, _b, _c, _d;
var isfEnabled = (_a = ar === null || ar === void 0 ? void 0 : ar.f) === null || _a === void 0 ? void 0 : _a.isf;
var userEnabled = !((_b = ar === null || ar === void 0 ? void 0 : ar.f) === null || _b === void 0 ? void 0 : _b.ud);
var urgentLowMgdl = (_c = patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.fixedLowAlarmValues) === null || _c === void 0 ? void 0 : _c.mgdl;
var urgentLowMmoll = (_d = patientDevice === null || patientDevice === void 0 ? void 0 : patientDevice.fixedLowAlarmValues) === null || _d === void 0 ? void 0 : _d.mmoll;
this.set('isfEnabled', isfEnabled);
if (isfEnabled) {
this.set('urgentLowThreshold', this.isMgdl ? urgentLowMgdl : urgentLowMmoll);
this.set('cgUrgentLowEnabled', hasPrevSettings ? userEnabled : true);
}
};
NotificationSettingsViewModel.prototype.updateSettings = function () {
var patRules = this._patient.alarmRules;
var cgRules = this.cgRules;
var hasPreviousSettings = cgRules.c !== undefined;
var rules = hasPreviousSettings ? cgRules : patRules;
var sens = this.sensor;
var updatedRules;
if (sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL3) {
updatedRules = this.getUpdatedRulesFSL3(rules);
}
else if (sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL2 || sens === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].UNKNOWN) {
updatedRules = this.getUpdatedRules(rules);
}
else {
updatedRules = rules;
}
updatedRules = __assign(__assign({}, updatedRules), { c: true, std: {
sd: !this.scansEnabled,
} });
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"]
.request('notificationSettings:saveSettings', {
connectionId: this.connectionID,
alarmRules: updatedRules,
})
.catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_4__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
});
};
NotificationSettingsViewModel.prototype.getUpdatedRulesFSL3 = function (r) {
r.l.on = this.cgLowEnabled;
r.h.on = this.cgHighEnabled;
r.nd.on = this.cgNoRecentEnabled;
r.nd.i = this.noRecentInterval;
if (this.isMgdl) {
r.l.th = Number(this.lowThreshold);
r.h.th = Number(this.highThreshold);
r.l.thmm = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMGPerDLToMMOLPerL"])(this.lowThreshold);
r.h.thmm = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMGPerDLToMMOLPerL"])(this.highThreshold);
}
else {
var lTh = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMMOLPerLToMGPerDL"])(this.lowThreshold);
var hTh = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["convertMMOLPerLToMGPerDL"])(this.highThreshold);
// Since we have more mmoll picker options than we do mgdl options, we need to
// align the converted mgdl values to correspond with the equivalent picker value options
var lRem = lTh % 5;
var hRem = hTh % 5;
lTh = lTh - lRem + (lRem > 2 ? 5 : 0);
hTh = hTh - hRem + (hRem > 2 ? 5 : 0);
lTh = Math.min(100, Math.max(60, lTh));
hTh = Math.min(400, Math.max(120, hTh));
r.l.th = lTh;
r.h.th = hTh;
r.l.thmm = Number(this.lowThreshold);
r.h.thmm = Number(this.highThreshold);
}
return r;
};
NotificationSettingsViewModel.prototype.getUpdatedRules = function (r) {
r.l.on = this.cgLowEnabled;
r.h.on = this.cgHighEnabled;
if (this.isfEnabled) {
r.f.ud = !this.cgUrgentLowEnabled;
}
return r;
};
NotificationSettingsViewModel.prototype.handleGoogleAnalyticsNS = function (appendScreenName) {
var screenName = 'Permission Off';
if (this.notificationsEnabled) {
switch (this.sensor) {
case 0:
screenName = 'Notif Settings - FSL Sensor';
break;
case 3:
screenName = 'Notif Settings - Scan+Alarm Sensor';
break;
case 4:
screenName = 'Notif Settings - Alarms+NRD Sensor';
break;
default:
screenName = 'Notif Settings - Unknown Sensor';
}
if (appendScreenName) {
screenName = screenName + ' ' + appendScreenName;
}
}
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_3__["logView"])(screenName);
};
return NotificationSettingsViewModel;
}(_base__WEBPACK_IMPORTED_MODULE_7__["BaseViewModel"]));
;
if (false ) {}
/***/ }),
/* 194 */,
/* 195 */,
/* 196 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var nativescript_master_technology__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(944);
/* harmony import */ var nativescript_master_technology__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_master_technology__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var shims_process__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(945);
/* harmony import */ var shims_process__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(shims_process__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _nativescript_core_ui_text_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(33);
/* harmony import */ var _nativescript_core_ui_text_base__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_text_base__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(30);
/* harmony import */ var _services__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(358);
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(42);
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(125);
/* harmony import */ var moment_timezone__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment_timezone__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9);
/* harmony import */ var _services_network__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(87);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(5);
/* harmony import */ var _utilities_cache__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(23);
/* harmony import */ var _utilities_date_util__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(35);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(4);
/* harmony import */ var _reducers_notifications_types__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(54);
/* harmony import */ var _reducers_user_types__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(18);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(3);
/* harmony import */ var _utilities_android__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(99);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(1);
let applicationCheckPlatform = __webpack_require__(8);
if (applicationCheckPlatform.android && !global["__snapshot"]) {
__webpack_require__(44);
__webpack_require__(537);
}
__webpack_require__(538)();
if (false) {}
const context = __webpack_require__(541);
global.registerWebpackModules(context);
if (false) {}
__webpack_require__(940);
/*
In NativeScript, the app.ts file is the entry point to your application.
You can use this file to perform app-level initialization, but the primary
purpose of the file is to pass control to the app's first module.
*/
// Populates process.env for packages that expect it to exist
// Setup our logger so that it is available from here on forward
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].init(_config_config__WEBPACK_IMPORTED_MODULE_6__["appConfig"].logLevel, _config_config__WEBPACK_IMPORTED_MODULE_6__["appConfig"].logsEnabled);
// Import services via the index file so that our mediator subscriptions are created
// Import moment timezone once so that all other moment imports have timezone data and methods
var inited = false;
var initing = true;
var failure = false;
var store;
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["setResources"]({ L: nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"] });
var initialize = function (config) {
failure = false;
if (inited) {
return;
}
initing = true;
textBaseResize();
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('config:getBase', { config: config })
.then(function () {
store.dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_19__["SET_PHONE_LANGUAGE"], language: _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getPhoneLanguage"](true) });
trySession();
})
.catch(function (err) {
// Track failures to make it easier to retry without force closing the app
failure = true;
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error('failed to get server config: ' + err);
_services_dialogs__WEBPACK_IMPORTED_MODULE_11__["alert"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('SystemMessages.errorOccuredTryAgain')).then(function () {
// Retry
initialize(config);
});
});
};
var textBaseResize = function () {
// this function makes the component based on textBase ignore the font size of the android system
if (_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["android"]) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_2__["TextBase"].prototype[_nativescript_core_ui_text_base__WEBPACK_IMPORTED_MODULE_3__["fontSizeProperty"].setNative] = function (value) {
if (!this.formattedText) {
if (typeof value === 'number') {
this.nativeTextViewProtected.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PX, _nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Utils"].layout.toDevicePixels(value));
}
}
};
}
};
var clearSession = function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('fcm:unsubscribe');
store.dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_19__["LOGOUT"] });
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('api:setTicket');
};
var noCurrentSession = function () {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].debug('no current session');
var country = store.getState().user.country;
if (country) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('config:updateConfig', { country: country })
.then(function () {
ready(_constants__WEBPACK_IMPORTED_MODULE_17__["HOME"]);
})
.catch(function () {
ready(_constants__WEBPACK_IMPORTED_MODULE_17__["HOME"]);
});
}
else {
ready(_constants__WEBPACK_IMPORTED_MODULE_17__["HOME"]);
}
};
var tryLegacySession = function (legToken) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('user:convertLegacyToken', { token: legToken })
.then(function (data) {
// Clear out the user profile from cache so we never do this again
_utilities_cache__WEBPACK_IMPORTED_MODULE_15__["cacheObject"](_constants__WEBPACK_IMPORTED_MODULE_17__["USER_PROFILE"], {});
// Attempt to retain the old FCM token
store.dispatch({ type: _reducers_notifications_types__WEBPACK_IMPORTED_MODULE_18__["NOTIFICATION_TOKEN"], token: _utilities_cache__WEBPACK_IMPORTED_MODULE_15__["getCachedString"](_constants__WEBPACK_IMPORTED_MODULE_17__["FCM_TOKEN"]) });
// Check if we should show the New Feature modal
var messages = data.user.system.messages || {};
var view = _constants__WEBPACK_IMPORTED_MODULE_17__["NEW_FEATURE_MODAL"];
if (messages.lluNewFeatureModal !== undefined) {
view = _constants__WEBPACK_IMPORTED_MODULE_17__["MEASUREMENTS_SUMMARY"];
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('config:updateConfig', { country: data.user.country })
.then(function (result) {
_utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["setUrls"](result);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('user:updateLangAndVersion');
if (view === _constants__WEBPACK_IMPORTED_MODULE_17__["MEASUREMENTS_SUMMARY"]) {
// Otherwise start fcm
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('fcm:subscribe');
}
// FINISHED
ready(view);
})
.catch(function () {
// We have the user, but may not have the correct config but we should navigate anyways
ready(view);
// Try again for config in background
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('config:updateConfig', { country: data.user.country });
});
})
.catch(function () {
// Clear out the user profile from cache so we never do this again
_utilities_cache__WEBPACK_IMPORTED_MODULE_15__["cacheObject"](_constants__WEBPACK_IMPORTED_MODULE_17__["USER_PROFILE"], {});
noCurrentSession();
});
};
var trySession = function () {
var loggedIn = store.getState().auth.loggedIn;
if (loggedIn) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('api:setTicket');
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('user:getUser')
.then(function (data) {
// On iOS if the app was started in the background, it most likely happened due to dismissing
// an actionable notification. We stop once we have the user and setup the api service with the token
// Then we bail startup and register the interactive notification handler to process and dismiss
// the alarm
if (_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["ios"]) {
var iosApp = _nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["ios"].nativeApp;
if (iosApp.applicationState === UIApplicationState.Background) {
initing = false;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('fcm:registerInteractive');
return;
}
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('user:updateLangAndVersion');
// Check if we should show the New Feature modal
var messages = data.user.system.messages || {};
var view = _constants__WEBPACK_IMPORTED_MODULE_17__["NEW_FEATURE_MODAL"];
if (messages.lluNewFeatureModal !== undefined) {
// Otherwise start fcm
view = _constants__WEBPACK_IMPORTED_MODULE_17__["MEASUREMENTS_SUMMARY"];
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('fcm:subscribe');
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"]
.request('config:updateConfig', { country: data.user.country })
.then(function () {
// FINISHED
ready(view);
})
.catch(function () {
// We have the user, but may not have the correct config but we should navigate anyways
ready(view);
// Try again for config in background
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('config:updateConfig', { country: data.user.country });
});
})
.catch(function () {
clearSession();
noCurrentSession();
});
}
else {
// Check to see if we have a legacy user from a previous v3 install and attempt to retain them
var legUser = _utilities_cache__WEBPACK_IMPORTED_MODULE_15__["getCachedObject"](_constants__WEBPACK_IMPORTED_MODULE_17__["USER_PROFILE"], {});
if (legUser.UserToken) {
tryLegacySession(legUser.UserToken);
}
else {
noCurrentSession();
}
}
};
var ready = function (view) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('store:created');
inited = true;
initing = false;
moment_timezone__WEBPACK_IMPORTED_MODULE_9___default.a.locale(_utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getPhoneLanguage"](true));
if (view) {
if (typeof view === 'string') {
_services_navigator__WEBPACK_IMPORTED_MODULE_12__["navigateTo"]({ moduleName: view, clearHistory: true, transition: { name: 'fade' } }, true);
}
else {
_services_navigator__WEBPACK_IMPORTED_MODULE_12__["navigateTo"](__assign({ clearHistory: true, transition: { name: 'fade' } }, view), true);
}
}
};
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["on"](_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["launchEvent"], function () {
// On Android if the system back arrow minimised the app, the main android activity is gone and so
// Nativescript relaunches the app activity, but our store is still alive with our data, so we can
// safely navigate to where we expect
if (inited) {
if (store.getState().auth.loggedIn) {
return ready(_constants__WEBPACK_IMPORTED_MODULE_17__["MEASUREMENTS_SUMMARY"]);
}
else {
return ready(_constants__WEBPACK_IMPORTED_MODULE_17__["HOME"]);
}
}
var UUID = _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getUUID"]();
var initialState = _utilities_cache__WEBPACK_IMPORTED_MODULE_15__["getCachedObject"]('store', {});
store = Object(_store_store__WEBPACK_IMPORTED_MODULE_20__["configureStore"])(__assign({}, initialState));
_utilities_cache__WEBPACK_IMPORTED_MODULE_15__["cacheString"](_constants__WEBPACK_IMPORTED_MODULE_17__["DEVICE_ID"], UUID);
_utilities_cache__WEBPACK_IMPORTED_MODULE_15__["cacheBoolean"](_constants__WEBPACK_IMPORTED_MODULE_17__["NAG_ALERT_ACTIVE"], false);
moment_timezone__WEBPACK_IMPORTED_MODULE_9___default.a.locale(_utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getPhoneLanguage"](true));
if (!_services_network__WEBPACK_IMPORTED_MODULE_13__["networkAvailable"]()) {
// Display dialog after timeout and attempt to retry when closing
setTimeout(function () {
_services_dialogs__WEBPACK_IMPORTED_MODULE_11__["alertWithTitle"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('SystemMessages.no_internet'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('SystemMessages.check_internet'))
.then(function () {
initialize(_config_config__WEBPACK_IMPORTED_MODULE_6__["appConfig"]);
});
}, 0);
return;
}
initialize(_config_config__WEBPACK_IMPORTED_MODULE_6__["appConfig"]);
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["on"](_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["resumeEvent"], function () {
_utilities_date_util__WEBPACK_IMPORTED_MODULE_16__["storeDeviceTimezoneInfo"]();
store.dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_19__["SET_PHONE_LANGUAGE"], language: _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getPhoneLanguage"](true) });
var _a = store.getState(), auth = _a.auth, user = _a.user;
// Retry initializing the app after a failure or incomplete init
if (!initing && (failure || !inited)) {
initialize(_config_config__WEBPACK_IMPORTED_MODULE_6__["appConfig"]);
}
if (inited) {
if (!_services_network__WEBPACK_IMPORTED_MODULE_13__["networkAvailable"]()) {
_services_dialogs__WEBPACK_IMPORTED_MODULE_11__["alertWithTitle"](Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('SystemMessages.no_internet'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('SystemMessages.check_internet'));
}
moment_timezone__WEBPACK_IMPORTED_MODULE_9___default.a.locale(_utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getPhoneLanguage"](true));
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].request('config:updateConfig', { country: user.country || 'GB' });
if (auth.loggedIn) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('fcm:refreshToken');
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('user:updateLangAndVersion');
}
}
if (auth.loggedIn) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_22__["default"].publish('safetyBanner:getBanner');
}
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["on"](_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["suspendEvent"], function () {
clearInterval(_utilities_cache__WEBPACK_IMPORTED_MODULE_15__["getCachedNumber"](_constants__WEBPACK_IMPORTED_MODULE_17__["DATA_POLL_ID"]));
// Close the side drawer
var sideDrawer = _nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getRootView"]();
if (sideDrawer) {
sideDrawer.closeDrawer();
}
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["on"](_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["lowMemoryEvent"], function (args) {
if (args.android) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error('LowMemoryEvent', args.android);
}
else if (args.ios) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error('LowMemoryEvent', args.ios);
}
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["on"](_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["uncaughtErrorEvent"], function (args) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error('UnhandledError', args.error);
global.process.exit();
});
if (_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["android"]) {
// Have the android native back button mimic the actionbar back button
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["android"].on(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["AndroidApplication"].activityBackPressedEvent, function (args) {
var actionBar = null;
var stack = _nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Frame"]._stack();
// Grab the actionbar from the current frame if it is visible
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Frame"].topmost().actionBarVisibility !== 'never') {
actionBar = _nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Frame"].topmost().currentPage.getViewById('actionBar');
}
else if (stack.length > 1) {
var prevFramePage = stack[stack.length - 2].currentPage;
// Check for a nested frame and grab the actionbar from the parent frame
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Frame"].topmost().page && _nativescript_core__WEBPACK_IMPORTED_MODULE_2__["Frame"].topmost().page === prevFramePage) {
actionBar = prevFramePage.getViewById('actionBar');
}
}
actionBar && actionBar.actionBarAndroidBackHandler(args);
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["android"].on(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["AndroidApplication"].activityCreatedEvent, function () {
Object(_utilities_android__WEBPACK_IMPORTED_MODULE_21__["createNotificationChannel"])({
id: 'low_alarm_channel',
name: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('low_glucose_alarm'),
soundFilename: 'low_alarm',
});
Object(_utilities_android__WEBPACK_IMPORTED_MODULE_21__["createNotificationChannel"])({
id: 'high_alarm_channel',
name: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('high_glucose_alarm'),
soundFilename: 'high_alarm',
});
Object(_utilities_android__WEBPACK_IMPORTED_MODULE_21__["createNotificationChannel"])({
id: 'signal_loss_channel',
name: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_4__["localize"])('Summary.signal_loss'),
soundFilename: 'signal_loss',
});
});
}
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().getUOMFromGlucoseType = _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["getUOMFromGlucoseType"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().localizeValue = _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["formatMeasurementValue"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().shortenedName = _utilities_app_util__WEBPACK_IMPORTED_MODULE_14__["shortenedName"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().dateRelativeTime = _utilities_date_util__WEBPACK_IMPORTED_MODULE_16__["dateRelativeTime"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().dateShortDate = _utilities_date_util__WEBPACK_IMPORTED_MODULE_16__["dateShortDate"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().dateTimeStamp = _utilities_date_util__WEBPACK_IMPORTED_MODULE_16__["dateTimeStamp"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().noZoneShortDate = _utilities_date_util__WEBPACK_IMPORTED_MODULE_16__["noZoneShortDate"];
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["getResources"]().getTimeZone = function () { return _utilities_cache__WEBPACK_IMPORTED_MODULE_15__["getCachedString"](_constants__WEBPACK_IMPORTED_MODULE_17__["TIMEZONE"]); };
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["setCssFileName"]('styles/app.css');
// Init firebase here so that upon very first app launch, all firebase event logic is register in the OS
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_8___default.a
.init({
showNotificationsWhenInForeground: true,
iOSEmulatorFlush: true,
})
.then(function () {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].log('firebase initialized');
}, function (error) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].log('firebase initialization error: ' + error);
});
_nativescript_core_application__WEBPACK_IMPORTED_MODULE_10__["run"]({ moduleName: 'views/app-root/app-root' });
/*
Do not place any code after the application has been started as it will not
be executed on iOS.
*/
;
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 197 */,
/* 198 */,
/* 199 */,
/* 200 */,
/* 201 */,
/* 202 */
/***/ (function(module, exports) {
module.exports = require("~/package.json");
/***/ }),
/* 203 */,
/* 204 */,
/* 205 */,
/* 206 */,
/* 207 */,
/* 208 */,
/* 209 */,
/* 210 */,
/* 211 */,
/* 212 */,
/* 213 */,
/* 214 */,
/* 215 */,
/* 216 */,
/* 217 */,
/* 218 */,
/* 219 */,
/* 220 */,
/* 221 */,
/* 222 */,
/* 223 */,
/* 224 */,
/* 225 */,
/* 226 */,
/* 227 */,
/* 228 */,
/* 229 */,
/* 230 */,
/* 231 */,
/* 232 */,
/* 233 */,
/* 234 */,
/* 235 */,
/* 236 */,
/* 237 */,
/* 238 */,
/* 239 */,
/* 240 */,
/* 241 */,
/* 242 */,
/* 243 */,
/* 244 */,
/* 245 */,
/* 246 */,
/* 247 */,
/* 248 */,
/* 249 */,
/* 250 */,
/* 251 */,
/* 252 */,
/* 253 */,
/* 254 */,
/* 255 */,
/* 256 */,
/* 257 */,
/* 258 */,
/* 259 */,
/* 260 */,
/* 261 */,
/* 262 */,
/* 263 */,
/* 264 */,
/* 265 */,
/* 266 */,
/* 267 */,
/* 268 */,
/* 269 */,
/* 270 */,
/* 271 */,
/* 272 */,
/* 273 */,
/* 274 */,
/* 275 */,
/* 276 */,
/* 277 */,
/* 278 */,
/* 279 */,
/* 280 */,
/* 281 */,
/* 282 */,
/* 283 */,
/* 284 */,
/* 285 */,
/* 286 */,
/* 287 */,
/* 288 */,
/* 289 */,
/* 290 */,
/* 291 */,
/* 292 */,
/* 293 */,
/* 294 */,
/* 295 */,
/* 296 */,
/* 297 */,
/* 298 */,
/* 299 */,
/* 300 */,
/* 301 */,
/* 302 */,
/* 303 */,
/* 304 */,
/* 305 */,
/* 306 */,
/* 307 */,
/* 308 */,
/* 309 */,
/* 310 */,
/* 311 */,
/* 312 */,
/* 313 */,
/* 314 */,
/* 315 */,
/* 316 */,
/* 317 */,
/* 318 */,
/* 319 */,
/* 320 */,
/* 321 */,
/* 322 */,
/* 323 */,
/* 324 */,
/* 325 */,
/* 326 */,
/* 327 */,
/* 328 */,
/* 329 */,
/* 330 */,
/* 331 */,
/* 332 */,
/* 333 */,
/* 334 */,
/* 335 */,
/* 336 */,
/* 337 */,
/* 338 */,
/* 339 */,
/* 340 */,
/* 341 */,
/* 342 */,
/* 343 */,
/* 344 */,
/* 345 */,
/* 346 */,
/* 347 */,
/* 348 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = "<FlexboxLayout class=\"alarm-item flex-row\">\n <FlexboxLayout class=\"alarm-type flex-row\">\n <Label class=\"icfont icmd alarm-img\" text=\"alarm\" />\n <Label class=\"alarm-text\" text=\"{{deviceAlarmType}}\" />\n </FlexboxLayout>\n <FlexboxLayout class=\"alarm-time-info flex-col\">\n <Label class=\"alarm-time\" text=\"{{FactoryTimestamp | dateTimeStamp}}\" />\n </FlexboxLayout>\n</FlexboxLayout>\n";
if (false ) {}
/***/ }),
/* 349 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/aware-image", function() { return __webpack_require__(50); });
global.registerModule("components/aware-image/aware-image", function() { return __webpack_require__(50); });
module.exports = "<FlexboxLayout\n id=\"drawer-content\"\n class=\"flex-col\"\n loaded=\"onLoad\"\n xmlns:AwareImage=\"components/aware-image\"\n >\n\n <FlexboxLayout id=\"logo-col\" class=\"flex-col\">\n <AwareImage:aware-image id=\"drawer-logo\" src=\"res://librelinkup_tiny\" />\n </FlexboxLayout>\n\n <FlexboxLayout class=\"flex-row drawer-row\" tap=\"goToConnections\">\n <Label class=\"icfont gray icsm drawer-icon\" text=\"connections\" />\n <Label class=\"body black-3 md\" text=\"{{L('ManageConnections.manage_connections')}}\" />\n </FlexboxLayout>\n <FlexboxLayout class=\"flex-row drawer-row\" tap=\"goToAccountSettings\">\n <Label class=\"icfont gray icsm drawer-icon\" text=\"settings\" />\n <Label class=\"body black-3 md\" text=\"{{L('Account.account_settings')}}\" />\n </FlexboxLayout>\n <FlexboxLayout class=\"flex-row drawer-row\" tap=\"goToHelpPage\">\n <Label class=\"icfont gray icsm drawer-icon\" text=\"help\" />\n <Label class=\"body black-3 md\" text=\"{{L('Help.help')}}\" />\n </FlexboxLayout>\n <FlexboxLayout class=\"flex-row drawer-row\" tap=\"goToAboutPage\">\n <Label class=\"icfont gray icsm drawer-icon\" text=\"info\" />\n <Label class=\"body black-3 md\" text=\"{{L('AppInfo.about')}}\" />\n </FlexboxLayout>\n\n <Label id=\"env-label\" class=\"body black-3 md\" text=\"\" textWrap=\"true\" visibility=\"collapsed\" />\n\n</FlexboxLayout>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 350 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Card:CardView\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n id=\"getting-started-banner\"\n radius=\"10\"\n elevation=\"5\"\n shadowOffsetHeight=\"1\"\n loaded=\"onLoaded\">\n\n <FlexboxLayout id=\"banner-container\" class=\"flex-col\">\n <FlexboxLayout id=\"banner-header\">\n <FlexboxLayout id=\"banner-title-container\">\n <Label class=\"icfont icsm\" text=\"info\" />\n <Label id=\"banner-title\" class=\"bold lg\" text=\"{{L('GettingStarted.getting_started')}}\" textWrap=\"true\" />\n </FlexboxLayout>\n <Label id=\"close-button\" class=\"icfont gray icsm\" text=\"close\" tap=\"closeBanner\" />\n </FlexboxLayout>\n <Label id=\"banner-message\" class=\"body black-3 md\" text=\"{{L('GettingStarted.learn_graph_details')}}\" textWrap=\"true\" />\n <Button class=\"btn primary-light blg\" text=\"{{L('GettingStarted.view_graph_tutorial')}}\" tap=\"openModal\" />\n </FlexboxLayout>\n</Card:CardView>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 351 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Card:CardView\n id=\"safety-banner\"\n loaded=\"onLoaded\"\n elevation=\"5\"\n radius=\"10\"\n shadowOffsetHeight=\"1\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n>\n <FlexboxLayout id=\"banner-container\" class=\"flex-col\">\n <FlexboxLayout id=\"banner-header\">\n <FlexboxLayout id=\"banner-title-container\">\n <Image id=\"warning-img\" src=\"{{'res://warning_tiny'}}\" stretch=\"none\" />\n <Label id=\"banner-title\" class=\"bold lg\" text=\"{{L('Common.saftey_message_header')}}\" textWrap=\"true\" />\n </FlexboxLayout>\n <Label id=\"close-button\" class=\"icfont gray icsm\" text=\"close\" tap=\"closeBanner\" />\n </FlexboxLayout>\n <Label id=\"banner-message\" class=\"body black-3 sm\" text=\"{{L('Common.saftey_message_alert')}}\" textWrap=\"true\" />\n </FlexboxLayout>\n</Card:CardView>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 352 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _reducers_auth_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(41);
/* harmony import */ var _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(39);
/* harmony import */ var _navigator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9);
var evaluateRegionInResult = function (data) {
if (data && data.region) {
var regionalMap = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.regionalMap;
var regionalUrls = regionalMap[data.region];
if (regionalUrls) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["setUrls"])(regionalUrls);
}
}
};
var handleContinue = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'auth/continue',
})
.then(function (result) {
if (result.status === 0) {
// in this situation the user is done, so we can do some
// store updates and navigation!!
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('auth:finishLogin', { values: request.values });
}
else if (result.status === 4) {
// still work to do, may need email
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_auth_types__WEBPACK_IMPORTED_MODULE_1__["CONTINUE_AUTH"], step: result.data.step });
}
else {
reject(result);
}
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleContinueAccept = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'auth/continue/' + request.type,
})
.then(function (result) {
var errorMsg = false;
if (result.status === 0) {
// in this situation the user is done, so we can do some
// store updates and navigation!!
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('auth:finishLogin', { values: request.values });
}
else if (result.status === 4) {
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_auth_types__WEBPACK_IMPORTED_MODULE_1__["CONTINUE_AUTH"], step: result.data.step });
}
else {
errorMsg = true;
}
resolve(__assign(__assign({}, result), { errorMsg: errorMsg }));
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleCountryChosen = function (request) {
var currentCountry = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.country;
request.response = new Promise(function (resolve, reject) {
var country = request.country;
if (currentCountry === country) {
resolve();
return;
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].once('config:updatedConfigForCountry', function (res) {
if (res.error) {
reject();
return;
}
resolve();
});
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["COUNTRY_CHOSEN"], country: country });
});
};
var handleDismissSystemMessage = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'user/dismissMessage/' + request.messageId,
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({
type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["SYSTEM_MESSAGE_DISMISS"],
messageId: request.messageId,
});
resolve();
}
reject();
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
// This is very similar to the 'user:getUser' except it lets 'user:loginSuccess' handle everything redux-wise
var handleFinishLogin = function (request) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'user',
})
.then(function (result) {
if (result.status === 0) {
if (result.data && result.data.redirect) {
var regionalMap = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.regionalMap;
var regionalUrls = regionalMap[result.data.region];
if (regionalUrls) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["setUrls"])(regionalUrls);
// login again with the new url
handleFinishLogin(request);
return;
}
// TODO: bad state, lvis telling us wrong region
// but no way to get there
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('user:loginSuccess', __assign(__assign({}, result.data), { values: request.values }));
}
else {
// TODO: error
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
});
};
// This call allows us to get the logged in user info on a fresh app launch
var handleGetUser = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'user',
})
.then(function (result) {
if (result.status === 0) {
if (result.data && result.data.redirect) {
var regionalMap = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.regionalMap;
var regionalUrls = regionalMap[result.data.region];
if (regionalUrls) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["setUrls"])(regionalUrls);
// login again with the new url
handleGetUser(request);
request.response.then(function (result) { return resolve(result); }).catch(function (err) { return reject(err); });
return;
}
// TODO: bad state, lvis telling us wrong region
// but no way to get there
}
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch(__assign({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["INITIALIZE_USER"] }, result.data));
resolve(result.data);
}
else {
reject(result);
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleLogin = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/auth/login',
data: {
email: request.email,
password: request.password,
},
})
.then(function (result) {
if (result.status === 0) {
if (result.data && result.data.redirect) {
var regionalMap = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().config.regionalMap;
var regionalUrls = regionalMap[result.data.region];
if (regionalUrls) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["setUrls"])(regionalUrls);
// login again with the new url
handleLogin(request);
request.response.then(function (result) { return resolve(result); }).catch(function (err) { return reject(err); });
return;
}
// TODO: bad state, lvis telling us wrong region
// but no way to get there
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('user:loginSuccess', result.data);
}
else if ([1, 2, 3].indexOf(result.status) !== -1) {
//
}
else if (result.status === 4) {
if (result.data.step) {
var step = result.data.step;
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_auth_types__WEBPACK_IMPORTED_MODULE_1__["CONTINUE_AUTH"], step: step, user: result.data.user });
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])('views/finish-login/finish-login');
// if (step.type === 'tou') {
// // TODO: Navigate TOU
// navigateTo(EULA);
// } else if (step.type === 'pp') {
// // TODO: Navigate PP
// navigateTo(EULA);
// }
}
}
else if (result.status === 411) {
// user received secuirty rule error
}
else if (result.status === 429) {
// user account locked out
}
else {
reject(result);
return;
}
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
return request.response;
};
var _finishLoginSuccess = function (request) {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.system.messages, sysMessages = _a === void 0 ? {} : _a;
// FCM subscribe also handled by New Feature modal and Onboarding flow
if (sysMessages !== null &&
(sysMessages.lluRegister || (request && request.registering)) &&
sysMessages.lluOnboarding === undefined) {
// New accounts should not see the new feature modal
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('user:dismissSystemMessage', { messageId: 'lluNewFeatureModal' });
// Only display the welcome screen for new accounts registered via llu
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])({ clearHistory: true, moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_GREETING"] }, true);
}
else if (sysMessages === null || sysMessages.lluNewFeatureModal === undefined) {
// Display the New Feature Modal if first time opening app since update
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])({ clearHistory: true, moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["NEW_FEATURE_MODAL"] }, true);
}
else {
// Navigate to home
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('fcm:subscribe');
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])({ clearHistory: true, moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["MEASUREMENTS_SUMMARY"] }, true);
}
};
var handleLoginSuccess = function (request) {
var currentCountry = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user.country;
// the logic around this flag is to make sure that we have an updated config before trying to log in
var updateConfig = currentCountry !== request.user.country;
if (updateConfig) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].once('config:updatedConfigForCountry', function () {
_finishLoginSuccess(request.values);
});
}
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["LOGIN"], user: request.user });
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('user:updateLangAndVersion');
if (!updateConfig) {
_finishLoginSuccess(request.values);
}
};
var handleRegister = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/auth/register',
data: request.data,
})
.then(function (result) {
if (result.status === 0 || result.status === 4) {
evaluateRegionInResult(result.data);
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_3__["logNewUser"])();
resolve(result);
}
else if ([411, 412].indexOf(result.status) !== -1) {
resolve(result);
}
else {
reject(result);
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleResendVerifyEmail = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'auth/resendVerifyEmail',
})
.then(function (result) {
if (result.status !== 0) {
reject(result);
}
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleSignOut = function (request) {
var token = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().notification.token;
request.response = new Promise(function (resolve, reject) {
if (token) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('notification:deleteToken', { token: token })
.then(function () {
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["logout"])();
resolve();
})
.catch(function () {
reject();
});
}
else {
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["logout"])();
resolve();
}
});
};
var handleForgotPassword = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'auth/forgotpassword',
data: {
email: request.email,
},
})
.then(function (result) {
if (result.status !== 0) {
reject(result);
}
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleChangePassword = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'auth/changepassword',
data: {
oldPassword: request.oldPass,
password: request.newPass,
},
})
.then(function (result) {
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleConvertLegacyToken = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/legacytoken',
headers: {
UserToken: request.token,
},
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch(__assign({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["INITIALIZE_USER"] }, result.data));
resolve(result.data);
return;
}
reject();
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleDeleteAccount = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'DELETE',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/auth/account',
})
.then(function (result) {
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleGetAccount = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'account',
})
.then(function (result) {
if (result.status === 0) {
var userInfo = result.data.user;
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["UPDATE_ACCOUNT_INFO"], user: userInfo });
resolve(userInfo);
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleVerifyPassword = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/auth/login',
data: {
email: request.email,
password: request.password,
},
})
.then(function (result) {
resolve(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleUpdateUserProfile = function (request) {
var user = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().user;
var updateAccountRequest = {
firstName: request.firstName,
lastName: request.lastName,
email: user.email,
country: user.country,
uiLanguage: user.uiLanguage,
phoneLanguage: user.phoneLanguage,
communicationLanguage: user.communicationLanguage,
appVersion: Object(_utilities_version__WEBPACK_IMPORTED_MODULE_8__["getAppVersion"])(),
};
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/user/updateaccount',
data: updateAccountRequest,
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({
type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["UPDATE_ACCOUNT_INFO"],
user: updateAccountRequest,
});
resolve();
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject();
});
});
};
var handleUpdateLangAndVersion = function (request) {
var lang = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["getPhoneLanguage"])(true);
var updateAccountRequest = {
appVersion: Object(_utilities_version__WEBPACK_IMPORTED_MODULE_8__["getAppVersion"])(),
phoneLanguage: lang,
};
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_user_types__WEBPACK_IMPORTED_MODULE_2__["SET_PHONE_LANGUAGE"], language: lang });
request.promise = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + 'llu/user/updateaccount',
data: updateAccountRequest,
})
.then(function (result) {
if (result.status === 0) {
resolve();
return;
}
reject();
})
.catch(function (err) {
reject();
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:continue', handleContinue);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:continueAccept', handleContinueAccept);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:countryChosen', handleCountryChosen);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:finishLogin', handleFinishLogin);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:login', handleLogin);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:register', handleRegister);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:resendVerifyEmail', handleResendVerifyEmail);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:signOut', handleSignOut);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:forgotpassword', handleForgotPassword);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('auth:verifyPassword', handleVerifyPassword);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:changePassword', handleChangePassword);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:convertLegacyToken', handleConvertLegacyToken);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:deleteAccount', handleDeleteAccount);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:dismissSystemMessage', handleDismissSystemMessage);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:getAccount', handleGetAccount);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:getUser', handleGetUser);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:loginSuccess', handleLoginSuccess);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:updateUserProfile', handleUpdateUserProfile);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('user:updateLangAndVersion', handleUpdateLangAndVersion);
;
if (false ) {}
/***/ }),
/* 353 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var handleDismissAlarm = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"]
.request('api:invoke', {
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_0__["urls"].lslApi + 'llu/alarm/dismiss',
method: 'POST',
data: {
alarmType: request.alarmType,
patientId: request.patientId,
updated: request.actionTime,
},
})
.then(function (result) {
if (result.status === 0) {
resolve();
return;
}
reject();
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"].error('failedToDismissAlarm: ', err);
reject(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].subscribe('alarm:dismissAlarm', handleDismissAlarm);
;
if (false ) {}
/***/ }),
/* 354 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86);
/* harmony import */ var _nativescript_core_http__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_http__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(30);
/* harmony import */ var _reducers_auth_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(39);
/* harmony import */ var _dialogs__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7);
var _authTicket = {
expires: 0,
token: '',
};
var encodeQuery = function (obj) {
return '?' +
Object.keys(obj)
.map(function (k) { return encodeURIComponent(k) + '=' + encodeURIComponent(obj[k]); })
.join('&');
};
var _invoke = function (method, url, data, query, headers) {
return new Promise(function (resolve, reject) {
var request = {
method: method,
url: url + (query ? encodeQuery(query) : ''),
content: data ? JSON.stringify(data) : undefined,
timeout: _config_config__WEBPACK_IMPORTED_MODULE_2__["appConfig"].timeout,
headers: Object.assign({}, headers, {
'Content-Type': 'application/json',
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
version: Object(_utilities_version__WEBPACK_IMPORTED_MODULE_7__["getAppVersion"])(),
product: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"] ? 'llu.ios' : 'llu.android',
}),
};
if (_authTicket.token && _authTicket.token !== 'LOGGEDOUT') {
request.headers.Authorization = 'Bearer ' + _authTicket.token;
}
Object(_nativescript_core_http__WEBPACK_IMPORTED_MODULE_1__["request"])(request)
.then(function (response) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].debug("API: response for " + url, ['request', _utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].cleanObjectProperties(request)], ['response', response]);
// content is the body of the response
// statusCode is the status
// headers = {}
var content = undefined;
// Maintenance mode
if (response.statusCode === 911) {
// Defer the alert to the next available tick as there are conflicts when trying to navigate
// during the animation period of the alert
setTimeout(function () {
Object(_dialogs__WEBPACK_IMPORTED_MODULE_8__["alertMaintenanceInProgress"])();
}, 0);
reject({ status: response.statusCode });
return;
}
if (response.content) {
content = response.content.toJSON();
if (content.data && content.data.authTicket) {
_authTicket.duration = content.data.authTicket.duration;
_authTicket.expires = content.data.authTicket.expires;
_authTicket.token = content.data.authTicket.token;
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_auth_types__WEBPACK_IMPORTED_MODULE_3__["USER_AUTH_TICKET"], token: _authTicket.token });
}
else if (content.ticket) {
_authTicket.duration = content.ticket.duration;
_authTicket.expires = content.ticket.expires;
_authTicket.token = content.ticket.token;
_store_store__WEBPACK_IMPORTED_MODULE_4__["store"].dispatch({ type: _reducers_auth_types__WEBPACK_IMPORTED_MODULE_3__["USER_AUTH_TICKET"], token: _authTicket.token });
}
}
// Anyhtign outside of 2xx is a bad status
if (response.statusCode < 200 || response.statusCode >= 300) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error("API: Error response for " + url, ['request', _utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].cleanObjectProperties(request)], ['response', __assign(__assign({}, content), { status: content.status || response.statusCode })]);
// Min version failure
if (content && content.status === 920) {
setTimeout(function () {
Object(_utilities_version__WEBPACK_IMPORTED_MODULE_7__["displayAlertAppStore"])();
}, 0);
}
reject(__assign(__assign({}, content), { status: content.status || response.statusCode }));
return;
}
resolve(content);
})
.catch(function (error) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].error("API: Error response for " + url, ['request', _utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].cleanObjectProperties(request)], ['response', error]);
reject(error);
});
});
};
var _handleInvoke = function (request) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].debug('API: incomingRequest:' + request.url, _utilities_logger__WEBPACK_IMPORTED_MODULE_5__["Logger"].cleanObjectProperties(request));
if (!request) {
throw new Error('missing Request');
}
// validate the request
try {
if (!request.method) {
throw new Error('missing method(GET,POST,PUT,DELETE)');
}
if (!request.url) {
throw new Error('missing url(users/create)');
}
request.response = _invoke(request.method, request.url, request.data, request.query, request.headers);
}
catch (ex) {
request.response = new Promise(function (_resolve, reject) {
reject(ex);
});
}
};
var _setTicket = function () {
var ticket = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().auth.token;
_authTicket.token = ticket;
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"].subscribe('api:invoke', _handleInvoke);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_6__["default"].subscribe('api:setTicket', _setTicket);
;
if (false ) {}
/***/ }),
/* 355 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _config_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(30);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _reducers_config_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(78);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
/* harmony import */ var _utilities_cache__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(39);
// Clear the cache when environment configuration changes to ensure correct LSL url is used on start
if (false) {}
console.log("App configured for " + _config_config__WEBPACK_IMPORTED_MODULE_0__["appConfig"].environment);
_utilities_cache__WEBPACK_IMPORTED_MODULE_5__["cacheString"](_constants__WEBPACK_IMPORTED_MODULE_1__["ENVIRONMENT"], _constants__WEBPACK_IMPORTED_MODULE_1__["ENVIRONMENT"]);
var _getConfigWithCountry = function (country) {
return new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["urls"].lslApi + 'llu/config/country',
query: {
country: country,
},
})
.then(function (result) {
if (result.status === 0) {
resolve(result.data);
}
else {
reject(result);
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleGetBase = function (request) {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["setUrls"])(request.config);
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["urls"].lslApi + 'llu/config/base',
})
.then(function (result) {
if (_store_store__WEBPACK_IMPORTED_MODULE_3__["store"]) {
_store_store__WEBPACK_IMPORTED_MODULE_3__["store"].dispatch({ type: _reducers_config_types__WEBPACK_IMPORTED_MODULE_2__["CONFIG_UPDATE"], config: __assign(__assign({}, request.config), result.data) });
}
resolve(result.data);
})
.catch(function (err) {
var _a;
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
if (((_a = err.response) === null || _a === void 0 ? void 0 : _a.status) === 911) {
reject(__assign(__assign({}, err), { config: request.config }));
}
else {
reject(err);
}
});
});
};
var handleGetRegulatory = function (request) {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().user, country = _a.country, phoneLanguage = _a.phoneLanguage;
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["urls"].lslApi + 'llu/config/regulatory',
query: {
country: country,
language: phoneLanguage,
version: Object(_utilities_version__WEBPACK_IMPORTED_MODULE_8__["getAppVersion"])(),
},
})
.then(function (result) {
_store_store__WEBPACK_IMPORTED_MODULE_3__["store"].dispatch({ type: _reducers_config_types__WEBPACK_IMPORTED_MODULE_2__["CONFIG_UPDATE"], config: { regulatory: result.data } });
resolve(result.data);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
var handleUpdateConfig = function (request) {
request.response = new Promise(function (resolve, reject) {
_getConfigWithCountry(request.country || 'GB')
.then(function (res) {
if (_store_store__WEBPACK_IMPORTED_MODULE_3__["store"]) {
_store_store__WEBPACK_IMPORTED_MODULE_3__["store"].dispatch({ type: _reducers_config_types__WEBPACK_IMPORTED_MODULE_2__["CONFIG_UPDATE"], config: res });
}
// this allows a service to wait until an update is done
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].publish('config:updatedConfigForCountry', { country: request.country });
resolve(res);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_6__["Logger"].error(err);
reject(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].once('store:created', function () {
// Update the service urls when config changes
Object(_store_store__WEBPACK_IMPORTED_MODULE_3__["observeStore"])(function (state) { return state.config; }, _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["setUrls"], true);
// Update when user country changes
Object(_store_store__WEBPACK_IMPORTED_MODULE_3__["observeStore"])(function (state) { return state.user.country; }, function (country) { return handleUpdateConfig({ country: country }); }, true);
});
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('config:getBase', handleGetBase);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('config:getRegulatory', handleGetRegulatory);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('config:updateConfig', handleUpdateConfig);
;
if (false ) {}
/***/ }),
/* 356 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1);
var handleGetConnections = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_5__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["urls"].lslApi + 'llu/connections',
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_2__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["UPDATE_CONNECTIONS"],
connections: result.data,
});
resolve();
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_4__["Logger"].error(err);
reject();
});
});
};
var handleUnfollowConnection = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_5__["default"]
.request('api:invoke', {
method: 'DELETE',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["urls"].lslApi + 'llu/connections/' + request.id,
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_2__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["UNFOLLOW_CONNECTION"],
unfollowConnectionID: request.id,
});
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["setUserProperty"])(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["analyticsProps"].connectionCount, _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().connection.connections.length.toString());
resolve();
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_4__["Logger"].error(err);
reject();
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_5__["default"].subscribe('connections:getConnections', handleGetConnections);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_5__["default"].subscribe('connections:unfollowConnection', handleUnfollowConnection);
;
if (false ) {}
/***/ }),
/* 357 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_local_notifications__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(194);
/* harmony import */ var nativescript_local_notifications__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_local_notifications__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42);
/* harmony import */ var nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(22);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1);
/* harmony import */ var _navigator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9);
var _a;
// Notification actions
var ACK_ACTION = 'ACK_ACTION';
// Noticication categories
var FIXED_LOW_ALARM = 'FIXED_LOW_ALARM';
var HIGH_ALARM = 'HIGH_ALARM';
var LOW_ALARM = 'LOW_ALARM';
var NO_DATA_ALARM = 'NO_DATA_ALARM';
var _registeredThisSession = false;
var DISMISSABLE_ALARMS = [HIGH_ALARM, LOW_ALARM, NO_DATA_ALARM];
var Alarms = (_a = {},
_a[FIXED_LOW_ALARM] = 0,
_a[LOW_ALARM] = 1,
_a[HIGH_ALARM] = 2,
_a[NO_DATA_ALARM] = 3,
_a);
var _dismissAlarm = function (type, patientId, actionTime) {
var time = Number(actionTime);
var alarmType = Alarms[type];
return new Promise(function (resolve) {
if (!_store_store__WEBPACK_IMPORTED_MODULE_6__["store"]) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].once('api:setTicket', function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"]
.request('alarm:dismissAlarm', { actionTime: time, alarmType: alarmType, patientId: patientId })
.then(function () {
resolve(true);
})
.catch(function () {
resolve(false);
});
});
}
else {
var auth = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().auth;
if (auth.loggedIn && auth.token !== '') {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"]
.request('alarm:dismissAlarm', { actionTime: time, alarmType: alarmType, patientId: patientId })
.then(function () {
resolve(true);
})
.catch(function () {
resolve(false);
});
}
else {
resolve(false);
}
}
});
};
// Navigate to the patient graph screen
var _doPatientNav = function (patientId) {
if (!patientId) {
return;
}
try {
// Check the store is available and that we can navigate
if (_store_store__WEBPACK_IMPORTED_MODULE_6__["store"]) {
var _a = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().nav, location = _a.location, ready = _a.ready;
if (ready) {
// Check if we are on the graph screen already for the patient we want
if (location === _constants__WEBPACK_IMPORTED_MODULE_4__["GLUCOSE_GRAPH"]) {
var graphPat = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().currentPage.bindingContext.get('patientId');
if (graphPat === patientId) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].publish('glucoseGraph:higlightCurrent');
return;
}
}
// Clear the navigation stack if we are not previously on the summary view
var clearHistory = location !== _constants__WEBPACK_IMPORTED_MODULE_4__["MEASUREMENTS_SUMMARY"];
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])({
clearHistory: clearHistory,
context: { patientId: patientId },
moduleName: _constants__WEBPACK_IMPORTED_MODULE_4__["GLUCOSE_GRAPH"],
});
return;
}
}
// The app was most likely not running when the notification was tapped,
// so we need to wait till the app launch cycle is done
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].once('navigation:ready', function () {
Object(_navigator__WEBPACK_IMPORTED_MODULE_9__["navigateTo"])({
clearHistory: true,
context: { patientId: patientId },
moduleName: _constants__WEBPACK_IMPORTED_MODULE_4__["GLUCOSE_GRAPH"],
});
});
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error(e);
}
};
var _saveNotificationToken = function (fcmToken, checkCurrent) {
if (checkCurrent === void 0) { checkCurrent = false; }
var currentToken = _store_store__WEBPACK_IMPORTED_MODULE_6__["store"].getState().notification.token;
if (checkCurrent && currentToken && currentToken === fcmToken) {
return;
}
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"]
.request('notification:saveToken', {
deviceId: _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].uuid,
token: fcmToken,
})
.catch(function (error) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error('failedToSaveToken:', error);
});
};
var sentIds = {};
var _receivedMessageHandler = function (message) {
if (Object.keys(message.data).length === 0) {
return;
}
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_5__["logEvent"])(_services_analytics__WEBPACK_IMPORTED_MODULE_5__["NOTIFICATION_RECEIVED"]);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].publish('notification:presentedNotification', { patientId: message.data.patientId });
try {
// On Android In order to display a notification while the app
// is in the foreground we have to build out a local
// notification, iOS doesn't require this.
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"] && message.foreground === true) {
var bodyKey = message.data.body_key !== undefined ? message.data.body_key : '';
var bodyArgs = message.data.body_args !== undefined ? JSON.parse(message.data.body_args) || [] : [];
var titleKey = message.data.title_key !== undefined ? message.data.title_key : '';
var titleArgs = message.data.title_args !== undefined ? JSON.parse(message.data.title_args) || [] : [];
var actions = [];
var action_1 = message.data.category || 'default';
var sound = message.data.sound || 'default';
if (action_1 === NO_DATA_ALARM || action_1 === HIGH_ALARM || action_1 === LOW_ALARM) {
actions.push({ type: 'button', id: ACK_ACTION, title: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('dismiss') });
}
// Attach handler for local notifications
nativescript_local_notifications__WEBPACK_IMPORTED_MODULE_1__["LocalNotifications"].addOnMessageReceivedCallback(function (message) {
Object.keys(sentIds).some(function (category) {
// Skip default notifications
if (category === 'default') {
return false;
}
if (sentIds[category].indexOf(message.id) !== -1) {
// Remove the notification
sentIds[category] = sentIds[category].filter(function (i) { return i !== message.id; });
if (DISMISSABLE_ALARMS.indexOf(category) !== -1) {
if ((message.response && message.response === ACK_ACTION) ||
message.event === 'default') {
_dismissAlarm(category, message.data.patientId, message.data.actionTime);
return true;
}
}
else {
return true;
}
}
});
// Finally go to the patient graph
_doPatientNav(message.data.patientId);
});
// Build out notification
nativescript_local_notifications__WEBPACK_IMPORTED_MODULE_1__["LocalNotifications"].schedule([
{
title: titleKey
? nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"].apply(void 0, __spreadArrays([titleKey], titleArgs)) : message.title !== undefined
? message.title
: '',
body: nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"].apply(void 0, __spreadArrays([bodyKey], bodyArgs)),
color: new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Color"]('#ED5B2A'),
icon: 'res://notification_icon',
actions: actions,
bigTextStyle: true,
// Pass through original data
data: message.data,
sound: sound,
channel: sound + '_channel',
},
])
.then(function (ids) {
// Track notification IDs by action for use in the received handler
sentIds[action_1] = __spreadArrays((sentIds[action_1] || []), ids);
})
.catch(function (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error('failedToScheduleLocalNotificaiton:', e);
});
}
// Handle actionable notifications from background tap
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isAndroid"] && message.foreground === false) {
var action = message.data.category;
if (DISMISSABLE_ALARMS.indexOf(action) !== -1) {
_dismissAlarm(action, message.data.patientId, message.data.actionTime);
}
// Finally go to the patient graph
_doPatientNav(message.data.patientId);
}
// Handle iOS notification tapped
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"] && message.notificationTapped) {
_doPatientNav(message.data.patientId);
}
}
catch (error) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error('FailedToHandleNotification:', error);
}
};
var handleInteractiveNotifications = function () {
try {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
// Add interactive notifcations for iOS
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["registerForInteractivePush"]({
onNotificationActionTakenCallback: function (action, message) {
var alarm = message.data.category;
if (DISMISSABLE_ALARMS.indexOf(alarm) !== -1) {
if (action === UNNotificationDefaultActionIdentifier || action === ACK_ACTION) {
_dismissAlarm(alarm, message.data.patientId, message.data.actionTime);
}
}
},
iosSettings: {
interactiveSettings: {
actions: [
{
identifier: ACK_ACTION,
title: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('dismiss'),
},
],
categories: [
{ identifier: NO_DATA_ALARM },
{ identifier: HIGH_ALARM },
{ identifier: LOW_ALARM },
],
},
},
});
}
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].warn('failedToSetupIosInteractiveNotifications:', e);
}
};
var handleRefreshToken = function () {
// We need to get the current token from firebase
// to ensure that we're not storing an expired version.
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["getCurrentPushToken"]().then(function (newToken) {
if (newToken) {
_saveNotificationToken(newToken, true);
}
else {
handleSubscribeToNotifications();
}
}, function (error) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_7__["Logger"].error('refreshNotificationTokenFailed:', error);
handleSubscribeToNotifications();
});
};
var handleSubscribeToNotifications = function () {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["addOnPushTokenReceivedCallback"](function (fcmToken) {
_saveNotificationToken(fcmToken);
});
// Add a callback to run some additional processing on notifications that are received.
// addOnMessageReceivedCallback can only be ran once per app lifecycle
// to reregister after an unregister, use registerForPushNotifications
if (_registeredThisSession) {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["registerForPushNotifications"]();
}
else {
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["addOnMessageReceivedCallback"](function (message) {
_receivedMessageHandler(message);
});
}
handleInteractiveNotifications();
_registeredThisSession = true;
};
var handleUnsubscribeFromNotifications = function () {
// Unregister the message callbacks
// On Android rotates the token for subsequent subscribes
nativescript_plugin_firebase__WEBPACK_IMPORTED_MODULE_3__["unregisterForPushNotifications"]().then(function () {
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_5__["logEvent"])(_services_analytics__WEBPACK_IMPORTED_MODULE_5__["NOTIFICATION_UNSUBSCRIBE"]);
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].subscribe('fcm:refreshToken', handleRefreshToken);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].subscribe('fcm:registerInteractive', handleInteractiveNotifications);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].subscribe('fcm:subscribe', handleSubscribeToNotifications);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_8__["default"].subscribe('fcm:unsubscribe', handleUnsubscribeFromNotifications);
;
if (false ) {}
/***/ }),
/* 358 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _account__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(352);
/* harmony import */ var _alarm__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(353);
/* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(354);
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(355);
/* harmony import */ var _connection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(356);
/* harmony import */ var _fcm__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(357);
/* harmony import */ var _invitation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(359);
/* harmony import */ var _measurement__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(360);
/* harmony import */ var _notification_settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(361);
/* harmony import */ var _notification_token__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(362);
;
if (false ) {}
/***/ }),
/* 359 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
var handleGetInvites = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + ("llu/invitations/receiver/" + request.accountId),
})
.then(function (result) {
if (result.status === 0) {
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
var handleAcceptInvite = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + ("llu/invitations/accept/" + request.invitationId),
})
.then(function (result) {
if (result.status === 0) {
var connection = result.data;
_store_store__WEBPACK_IMPORTED_MODULE_2__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["ADD_CONNECTION"],
connection: connection,
});
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["logConnectionAdded"])();
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
var handleDeclineInvite = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'DELETE',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["urls"].lslApi + ("/sharing/llu/invitations/" + request.invitationId),
})
.then(function (result) {
if (result.status === 0) {
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["logEvent"])(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["CONNECTION_REJECTED"]);
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('invitation:getInvites', handleGetInvites);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('invitation:acceptInvite', handleAcceptInvite);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('invitation:declineInvite', handleDeclineInvite);
;
if (false ) {}
/***/ }),
/* 360 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
var handleGetGraph = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + ("llu/connections/" + request.patientId + "/graph"),
})
.then(function (result) {
if (result.status === 0) {
result.data.connection.activeSensors = result.data.activeSensors;
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["UPDATE_CONNECTION"],
connection: result.data.connection,
});
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
var handleGetLogbook = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + ("llu/connections/" + request.patientId + "/logbook"),
})
.then(function (result) {
if (result.status === 0) {
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('measurements:getGraph', handleGetGraph);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('measurements:getLogbook', handleGetLogbook);
;
if (false ) {}
/***/ }),
/* 361 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
var handleGetSettings = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'GET',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + 'llu/notification/settings/' + request.id,
})
.then(function (result) {
if (result.status === 0) {
// Update store with the new settings
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["UPDATE_CONNECTION_SETTINGS"],
alarmRules: result.data.alarmRules,
connectionId: request.id,
});
resolve(result.data);
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject();
});
});
};
var handleSaveSettings = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + 'llu/notification/savesettings',
data: {
connectionId: request.connectionId,
alarmRules: request.alarmRules,
},
})
.then(function (result) {
if (result.status === 0) {
// Update store with the new settings
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({
type: _reducers_connections_types__WEBPACK_IMPORTED_MODULE_0__["UPDATE_CONNECTION_SETTINGS"],
alarmRules: request.alarmRules,
connectionId: request.connectionId,
});
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].publish('notification:newSettings', { alarmRules: request.alarmRules });
resolve();
}
else {
reject();
}
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject();
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('notificationSettings:getSettings', handleGetSettings);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('notificationSettings:saveSettings', handleSaveSettings);
;
if (false ) {}
/***/ }),
/* 362 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _reducers_notifications_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(54);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(10);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
var handleSaveNotificationToken = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'POST',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + 'llu/notification/storepushtoken',
data: {
deviceId: request.deviceId,
token: request.token,
},
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({
type: _reducers_notifications_types__WEBPACK_IMPORTED_MODULE_0__["NOTIFICATION_TOKEN"],
token: request.token,
});
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
var handleDeleteNotificationToken = function (request) {
request.response = new Promise(function (resolve, reject) {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('api:invoke', {
method: 'DELETE',
url: _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["urls"].lslApi + 'llu/notification/deletepushtoken',
data: {
token: request.token,
},
})
.then(function (result) {
if (result.status === 0) {
_store_store__WEBPACK_IMPORTED_MODULE_1__["store"].dispatch({
type: _reducers_notifications_types__WEBPACK_IMPORTED_MODULE_0__["NOTIFICATION_DELETE_TOKEN"],
});
resolve(result);
return;
}
reject(result);
})
.catch(function (err) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_3__["Logger"].error(err);
reject(err);
});
});
};
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('notification:saveToken', handleSaveNotificationToken);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].subscribe('notification:deleteToken', handleDeleteNotificationToken);
;
if (false ) {}
/***/ }),
/* 363 */,
/* 364 */,
/* 365 */,
/* 366 */,
/* 367 */,
/* 368 */,
/* 369 */,
/* 370 */,
/* 371 */,
/* 372 */,
/* 373 */,
/* 374 */,
/* 375 */,
/* 376 */,
/* 377 */,
/* 378 */,
/* 379 */,
/* 380 */,
/* 381 */,
/* 382 */,
/* 383 */,
/* 384 */,
/* 385 */,
/* 386 */,
/* 387 */,
/* 388 */,
/* 389 */,
/* 390 */,
/* 391 */,
/* 392 */,
/* 393 */,
/* 394 */,
/* 395 */,
/* 396 */,
/* 397 */,
/* 398 */,
/* 399 */,
/* 400 */,
/* 401 */,
/* 402 */,
/* 403 */,
/* 404 */,
/* 405 */,
/* 406 */,
/* 407 */,
/* 408 */,
/* 409 */,
/* 410 */,
/* 411 */,
/* 412 */,
/* 413 */,
/* 414 */,
/* 415 */,
/* 416 */,
/* 417 */,
/* 418 */,
/* 419 */,
/* 420 */,
/* 421 */,
/* 422 */,
/* 423 */,
/* 424 */,
/* 425 */,
/* 426 */,
/* 427 */,
/* 428 */,
/* 429 */,
/* 430 */,
/* 431 */,
/* 432 */,
/* 433 */,
/* 434 */,
/* 435 */,
/* 436 */,
/* 437 */,
/* 438 */,
/* 439 */,
/* 440 */,
/* 441 */,
/* 442 */,
/* 443 */,
/* 444 */,
/* 445 */,
/* 446 */,
/* 447 */,
/* 448 */,
/* 449 */,
/* 450 */,
/* 451 */,
/* 452 */,
/* 453 */,
/* 454 */,
/* 455 */,
/* 456 */,
/* 457 */,
/* 458 */,
/* 459 */,
/* 460 */,
/* 461 */,
/* 462 */,
/* 463 */,
/* 464 */,
/* 465 */,
/* 466 */,
/* 467 */,
/* 468 */,
/* 469 */,
/* 470 */,
/* 471 */,
/* 472 */,
/* 473 */,
/* 474 */,
/* 475 */,
/* 476 */,
/* 477 */,
/* 478 */,
/* 479 */,
/* 480 */,
/* 481 */,
/* 482 */,
/* 483 */,
/* 484 */,
/* 485 */,
/* 486 */,
/* 487 */,
/* 488 */,
/* 489 */,
/* 490 */,
/* 491 */,
/* 492 */,
/* 493 */,
/* 494 */,
/* 495 */,
/* 496 */,
/* 497 */,
/* 498 */,
/* 499 */,
/* 500 */,
/* 501 */,
/* 502 */,
/* 503 */,
/* 504 */,
/* 505 */,
/* 506 */,
/* 507 */,
/* 508 */,
/* 509 */,
/* 510 */,
/* 511 */,
/* 512 */,
/* 513 */,
/* 514 */,
/* 515 */,
/* 516 */,
/* 517 */,
/* 518 */,
/* 519 */,
/* 520 */,
/* 521 */,
/* 522 */,
/* 523 */,
/* 524 */,
/* 525 */,
/* 526 */,
/* 527 */,
/* 528 */,
/* 529 */,
/* 530 */,
/* 531 */,
/* 532 */,
/* 533 */,
/* 534 */,
/* 535 */,
/* 536 */,
/* 537 */,
/* 538 */,
/* 539 */,
/* 540 */
/***/ (function(module, exports) {
function webpackEmptyContext(req) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
webpackEmptyContext.keys = function() { return []; };
webpackEmptyContext.resolve = webpackEmptyContext;
module.exports = webpackEmptyContext;
webpackEmptyContext.id = 540;
/***/ }),
/* 541 */
/***/ (function(module, exports, __webpack_require__) {
var map = {
"./app.ts": 196,
"./components/action-bar/action-bar.scss": 542,
"./components/action-bar/action-bar.ts": 14,
"./components/alarm/alarm.scss": 163,
"./components/alarm/alarm.xml": 348,
"./components/aware-image/aware-image.ts": 50,
"./components/aware-lottie/aware-lottie.ts": 24,
"./components/drawer-content/drawer-content.common.scss": 728,
"./components/drawer-content/drawer-content.scss": 729,
"./components/drawer-content/drawer-content.ts": 96,
"./components/drawer-content/drawer-content.xml": 349,
"./components/float-label/float-label.ts": 43,
"./components/getting-started-banner/getting-started-banner-common.scss": 730,
"./components/getting-started-banner/getting-started-banner.scss": 731,
"./components/getting-started-banner/getting-started-banner.ts": 164,
"./components/getting-started-banner/getting-started-banner.xml": 350,
"./components/glucose-chart/glucose-chart-common.ts": 19,
"./components/glucose-chart/glucose-chart.ts": 170,
"./components/glucose-measurement/glucose-measurement.scss": 94,
"./components/glucose-measurement/glucose-measurement.xml": 171,
"./components/loading-button/loading-button.ts": 48,
"./components/measurement-item/measurement-item.xml": 733,
"./components/safety-banner/safety-banner-common.scss": 734,
"./components/safety-banner/safety-banner.scss": 735,
"./components/safety-banner/safety-banner.ts": 172,
"./components/safety-banner/safety-banner.xml": 351,
"./components/summary-card/summary-card-view.scss": 736,
"./components/summary-card/summary-card-view.xml": 737,
"./components/summary-card/summary-card.ts": 63,
"./config/config.ts": 30,
"./constants/cache-keys.ts": 162,
"./constants/enums/api-status.ts": 167,
"./constants/enums/index.ts": 45,
"./constants/enums/log-level.ts": 53,
"./constants/enums/measurements-color.ts": 165,
"./constants/enums/mobile-platform.ts": 166,
"./constants/enums/trend.ts": 168,
"./constants/enums/uom.ts": 169,
"./constants/index.ts": 4,
"./constants/routes.ts": 52,
"./models/connection-response.model.ts": 738,
"./models/types.ts": 16,
"./models/user.model.ts": 739,
"./reducers/auth/reducer.ts": 176,
"./reducers/auth/types.ts": 41,
"./reducers/config/reducer.ts": 177,
"./reducers/config/types.ts": 78,
"./reducers/connections/reducer.ts": 178,
"./reducers/connections/types.ts": 34,
"./reducers/index.ts": 121,
"./reducers/nav/reducer.ts": 179,
"./reducers/nav/types.ts": 60,
"./reducers/notifications/reducer.ts": 180,
"./reducers/notifications/types.ts": 54,
"./reducers/user/reducer.ts": 181,
"./reducers/user/types.ts": 18,
"./services/account.ts": 352,
"./services/alarm.ts": 353,
"./services/analytics.ts": 22,
"./services/api-cache.ts": 122,
"./services/api.ts": 354,
"./services/config.ts": 355,
"./services/connection.ts": 356,
"./services/dialogs.ts": 7,
"./services/fcm.ts": 357,
"./services/index.ts": 358,
"./services/invitation.ts": 359,
"./services/measurement.ts": 360,
"./services/navigator.ts": 9,
"./services/network.ts": 87,
"./services/notification-settings.ts": 361,
"./services/notification-token.ts": 362,
"./store/store.ts": 3,
"./styles/app.scss": 741,
"./utilities/android.ts": 99,
"./utilities/app.util.ts": 5,
"./utilities/cache.ts": 23,
"./utilities/date.util.ts": 35,
"./utilities/logger.ts": 10,
"./utilities/mediator.ts": 1,
"./utilities/validation.ts": 31,
"./utilities/value-list.ts": 182,
"./utilities/version.ts": 39,
"./view-models/account.ts": 183,
"./view-models/app-info.ts": 184,
"./view-models/app-root.ts": 185,
"./view-models/base.ts": 17,
"./view-models/change-password.ts": 186,
"./view-models/connection-list.ts": 187,
"./view-models/connection.ts": 188,
"./view-models/delete-account.ts": 189,
"./view-models/forgot-password.ts": 190,
"./view-models/graph-tutorial.ts": 58,
"./view-models/invitation.ts": 76,
"./view-models/logbook.ts": 191,
"./view-models/login.ts": 192,
"./view-models/notification-settings.ts": 193,
"./view-models/policies.ts": 77,
"./view-models/registration.ts": 97,
"./views/account/account.scss": 815,
"./views/account/account.ts": 816,
"./views/account/account.xml": 817,
"./views/app-info/app-info-common.scss": 818,
"./views/app-info/app-info.scss": 819,
"./views/app-info/app-info.ts": 820,
"./views/app-info/app-info.xml": 821,
"./views/app-root/app-root.ts": 822,
"./views/app-root/app-root.xml": 823,
"./views/change-password/change-password.scss": 824,
"./views/change-password/change-password.ts": 825,
"./views/change-password/change-password.xml": 826,
"./views/connections/connection-list.common.scss": 827,
"./views/connections/connection-list.scss": 828,
"./views/connections/connection-list.ts": 829,
"./views/connections/connection-list.xml": 830,
"./views/country-select/country-select.common.scss": 831,
"./views/country-select/country-select.scss": 832,
"./views/country-select/country-select.ts": 833,
"./views/country-select/country-select.xml": 834,
"./views/delete-account/delete-account.scss": 835,
"./views/delete-account/delete-account.ts": 836,
"./views/delete-account/delete-account.xml": 837,
"./views/finish-login/finish-login.ts": 838,
"./views/finish-login/finish-login.xml": 839,
"./views/finish-login/placeholder.xml": 840,
"./views/forgot-password/forgot-password.scss": 841,
"./views/forgot-password/forgot-password.ts": 842,
"./views/forgot-password/forgot-password.xml": 843,
"./views/glucose-graph/glucose-graph.common.scss": 844,
"./views/glucose-graph/glucose-graph.scss": 845,
"./views/glucose-graph/glucose-graph.ts": 846,
"./views/glucose-graph/glucose-graph.xml": 847,
"./views/graph-tutorial/graph-tutorial-common.scss": 848,
"./views/graph-tutorial/graph-tutorial-dashed-lines.scss": 849,
"./views/graph-tutorial/graph-tutorial-dashed-lines.ts": 850,
"./views/graph-tutorial/graph-tutorial-dashed-lines.xml": 851,
"./views/graph-tutorial/graph-tutorial-green-area.scss": 852,
"./views/graph-tutorial/graph-tutorial-green-area.ts": 853,
"./views/graph-tutorial/graph-tutorial-green-area.xml": 854,
"./views/graph-tutorial/graph-tutorial-modal-root.xml": 855,
"./views/graph-tutorial/graph-tutorial-tap-anywhere.scss": 856,
"./views/graph-tutorial/graph-tutorial-tap-anywhere.ts": 857,
"./views/graph-tutorial/graph-tutorial-tap-anywhere.xml": 858,
"./views/graph-tutorial/graph-tutorial-your-connection.scss": 859,
"./views/graph-tutorial/graph-tutorial-your-connection.ts": 860,
"./views/graph-tutorial/graph-tutorial-your-connection.xml": 861,
"./views/help/help-common.scss": 862,
"./views/help/help.scss": 863,
"./views/help/help.ts": 864,
"./views/help/help.xml": 865,
"./views/home/home.scss": 866,
"./views/home/home.ts": 867,
"./views/home/home.xml": 868,
"./views/loader/loader.scss": 869,
"./views/loader/loader.ts": 870,
"./views/loader/loader.xml": 871,
"./views/logbook/logbook.scss": 872,
"./views/logbook/logbook.ts": 873,
"./views/logbook/logbook.xml": 874,
"./views/login/login.scss": 875,
"./views/login/login.ts": 876,
"./views/login/login.xml": 877,
"./views/new-feature-modal/new-feature-modal.scss": 878,
"./views/new-feature-modal/new-feature-modal.ts": 879,
"./views/new-feature-modal/new-feature-modal.xml": 880,
"./views/notification-settings/high-glucose/high-glucose-alarm.scss": 881,
"./views/notification-settings/high-glucose/high-glucose-alarm.ts": 882,
"./views/notification-settings/high-glucose/high-glucose-alarm.xml": 883,
"./views/notification-settings/high-glucose/high-glucose-picker.scss": 884,
"./views/notification-settings/high-glucose/high-glucose-picker.ts": 885,
"./views/notification-settings/high-glucose/high-glucose-picker.xml": 886,
"./views/notification-settings/low-glucose/low-glucose-alarm.scss": 887,
"./views/notification-settings/low-glucose/low-glucose-alarm.ts": 888,
"./views/notification-settings/low-glucose/low-glucose-alarm.xml": 889,
"./views/notification-settings/low-glucose/low-glucose-picker.scss": 890,
"./views/notification-settings/low-glucose/low-glucose-picker.ts": 891,
"./views/notification-settings/low-glucose/low-glucose-picker.xml": 892,
"./views/notification-settings/no-recent-data/no-recent-data-picker.scss": 893,
"./views/notification-settings/no-recent-data/no-recent-data-picker.ts": 894,
"./views/notification-settings/no-recent-data/no-recent-data-picker.xml": 895,
"./views/notification-settings/no-recent-data/no-recent-data.scss": 896,
"./views/notification-settings/no-recent-data/no-recent-data.ts": 897,
"./views/notification-settings/no-recent-data/no-recent-data.xml": 898,
"./views/notification-settings/notification-picker-common.scss": 899,
"./views/notification-settings/notification-setting-details.scss": 900,
"./views/notification-settings/notification-settings-common.scss": 901,
"./views/notification-settings/notification-settings.scss": 902,
"./views/notification-settings/notification-settings.ts": 903,
"./views/notification-settings/notification-settings.xml": 904,
"./views/notification-settings/urgent-low-glucose/urgent-low-glucose-alarm.scss": 905,
"./views/notification-settings/urgent-low-glucose/urgent-low-glucose-alarm.ts": 906,
"./views/notification-settings/urgent-low-glucose/urgent-low-glucose-alarm.xml": 907,
"./views/onboarding/onboarding-greeting.scss": 908,
"./views/onboarding/onboarding-greeting.ts": 909,
"./views/onboarding/onboarding-greeting.xml": 910,
"./views/onboarding/onboarding-internet-req.scss": 911,
"./views/onboarding/onboarding-internet-req.ts": 912,
"./views/onboarding/onboarding-internet-req.xml": 913,
"./views/onboarding/onboarding-notifications.scss": 914,
"./views/onboarding/onboarding-notifications.ts": 915,
"./views/onboarding/onboarding-notifications.xml": 916,
"./views/onboarding/onboarding-warning.scss": 917,
"./views/onboarding/onboarding-warning.ts": 918,
"./views/onboarding/onboarding-warning.xml": 919,
"./views/onboarding/onboarding.scss": 920,
"./views/policies/eula.scss": 921,
"./views/policies/eula.ts": 922,
"./views/policies/eula.xml": 923,
"./views/policies/privacy.scss": 924,
"./views/policies/privacy.ts": 925,
"./views/policies/privacy.xml": 926,
"./views/registration/register.common.scss": 927,
"./views/registration/register.scss": 928,
"./views/registration/register.ts": 929,
"./views/registration/register.xml": 930,
"./views/registration/verify-email.scss": 931,
"./views/registration/verify-email.ts": 932,
"./views/registration/verify-email.xml": 933,
"./views/registration/welcome-overview.scss": 934,
"./views/registration/welcome-overview.ts": 935,
"./views/registration/welcome-overview.xml": 936,
"./views/summary/measurements-summary.scss": 937,
"./views/summary/measurements-summary.ts": 938,
"./views/summary/measurements-summary.xml": 939
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
var id = map[req];
if(!(id + 1)) { // check for number or string
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return id;
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 541;
/***/ }),
/* 542 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#actionBar"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".ns-root.ns-dark #actionBar"],"declarations":[{"type":"declaration","property":"background-color","value":"#242424"},{"type":"declaration","property":"color","value":"#e95526"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 543 */,
/* 544 */,
/* 545 */,
/* 546 */,
/* 547 */,
/* 548 */,
/* 549 */,
/* 550 */,
/* 551 */,
/* 552 */,
/* 553 */,
/* 554 */,
/* 555 */,
/* 556 */,
/* 557 */,
/* 558 */,
/* 559 */,
/* 560 */,
/* 561 */,
/* 562 */,
/* 563 */,
/* 564 */,
/* 565 */,
/* 566 */,
/* 567 */,
/* 568 */,
/* 569 */,
/* 570 */,
/* 571 */
/***/ (function(module, exports, __webpack_require__) {
module.exports.randombytes = __webpack_require__(572);
/***/ }),
/* 572 */,
/* 573 */,
/* 574 */,
/* 575 */,
/* 576 */,
/* 577 */,
/* 578 */,
/* 579 */,
/* 580 */,
/* 581 */,
/* 582 */,
/* 583 */,
/* 584 */,
/* 585 */,
/* 586 */,
/* 587 */,
/* 588 */,
/* 589 */,
/* 590 */,
/* 591 */,
/* 592 */,
/* 593 */,
/* 594 */,
/* 595 */,
/* 596 */,
/* 597 */,
/* 598 */,
/* 599 */,
/* 600 */,
/* 601 */,
/* 602 */,
/* 603 */,
/* 604 */,
/* 605 */,
/* 606 */,
/* 607 */,
/* 608 */,
/* 609 */,
/* 610 */,
/* 611 */,
/* 612 */,
/* 613 */,
/* 614 */,
/* 615 */,
/* 616 */,
/* 617 */,
/* 618 */,
/* 619 */,
/* 620 */,
/* 621 */,
/* 622 */,
/* 623 */,
/* 624 */,
/* 625 */,
/* 626 */,
/* 627 */,
/* 628 */,
/* 629 */,
/* 630 */,
/* 631 */,
/* 632 */,
/* 633 */,
/* 634 */,
/* 635 */,
/* 636 */,
/* 637 */,
/* 638 */,
/* 639 */,
/* 640 */,
/* 641 */,
/* 642 */,
/* 643 */,
/* 644 */,
/* 645 */,
/* 646 */,
/* 647 */,
/* 648 */,
/* 649 */,
/* 650 */,
/* 651 */,
/* 652 */,
/* 653 */,
/* 654 */,
/* 655 */,
/* 656 */,
/* 657 */,
/* 658 */,
/* 659 */,
/* 660 */,
/* 661 */,
/* 662 */,
/* 663 */,
/* 664 */,
/* 665 */,
/* 666 */,
/* 667 */,
/* 668 */,
/* 669 */,
/* 670 */,
/* 671 */,
/* 672 */,
/* 673 */,
/* 674 */,
/* 675 */,
/* 676 */,
/* 677 */,
/* 678 */,
/* 679 */,
/* 680 */,
/* 681 */,
/* 682 */,
/* 683 */
/***/ (function(module) {
module.exports = {"environment":"PROD","apiEndpoint":"https://api-eu.libreview.io/lsl/api/","lslApi":"https://api.libreview.io/","logLevel":"Debug","logsEnabled":false,"analyticsEnabled":true,"domain":"Libreview","timeout":20000};
/***/ }),
/* 684 */,
/* 685 */,
/* 686 */,
/* 687 */,
/* 688 */,
/* 689 */,
/* 690 */,
/* 691 */,
/* 692 */,
/* 693 */,
/* 694 */,
/* 695 */,
/* 696 */,
/* 697 */,
/* 698 */,
/* 699 */,
/* 700 */,
/* 701 */,
/* 702 */,
/* 703 */,
/* 704 */,
/* 705 */,
/* 706 */,
/* 707 */,
/* 708 */,
/* 709 */,
/* 710 */,
/* 711 */,
/* 712 */,
/* 713 */,
/* 714 */
/***/ (function(module, exports, __webpack_require__) {
var map = {
"./ar": 320,
"./ar-sa": 321,
"./ar-sa.js": 321,
"./ar.js": 320,
"./cs": 322,
"./cs.js": 322,
"./da": 323,
"./da.js": 323,
"./de": 324,
"./de.js": 324,
"./el": 325,
"./el.js": 325,
"./en-gb": 326,
"./en-gb.js": 326,
"./es": 327,
"./es-mx": 328,
"./es-mx.js": 328,
"./es.js": 327,
"./fi": 329,
"./fi.js": 329,
"./fr": 330,
"./fr-ca": 331,
"./fr-ca.js": 331,
"./fr.js": 330,
"./he": 332,
"./he.js": 332,
"./hr": 333,
"./hr.js": 333,
"./it": 334,
"./it.js": 334,
"./ja": 335,
"./ja.js": 335,
"./ko": 336,
"./ko.js": 336,
"./nb": 337,
"./nb.js": 337,
"./nl": 338,
"./nl.js": 338,
"./pl": 339,
"./pl.js": 339,
"./pt": 340,
"./pt-br": 341,
"./pt-br.js": 341,
"./pt.js": 340,
"./ru": 342,
"./ru.js": 342,
"./sl": 343,
"./sl.js": 343,
"./sv": 344,
"./sv.js": 344,
"./tr": 345,
"./tr.js": 345,
"./zh-cn": 346,
"./zh-cn.js": 346
};
function webpackContext(req) {
var id = webpackContextResolve(req);
return __webpack_require__(id);
}
function webpackContextResolve(req) {
var id = map[req];
if(!(id + 1)) { // check for number or string
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
return id;
}
webpackContext.keys = function webpackContextKeys() {
return Object.keys(map);
};
webpackContext.resolve = webpackContextResolve;
module.exports = webpackContext;
webpackContext.id = 714;
/***/ }),
/* 715 */,
/* 716 */,
/* 717 */,
/* 718 */,
/* 719 */,
/* 720 */,
/* 721 */,
/* 722 */,
/* 723 */,
/* 724 */,
/* 725 */,
/* 726 */,
/* 727 */,
/* 728 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#logo-col"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"32"}]},{"type":"rule","selectors":["#drawer-content"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-start"},{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"padding-top","value":"28"}]},{"type":"rule","selectors":["#env-label","#drawer-logo",".drawer-icon"],"declarations":[{"type":"declaration","property":"margin","value":"0 14"}]},{"type":"rule","selectors":[".drawer-row"],"declarations":[{"type":"declaration","property":"padding","value":"9 0"},{"type":"declaration","property":"margin-bottom","value":"8"},{"type":"declaration","property":"width","value":"100%"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 729 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#logo-col"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"32"}]},{"type":"rule","selectors":["#drawer-content"],"declarations":[{"type":"declaration","property":"align-items","value":"flex-start"},{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"padding-top","value":"28"}]},{"type":"rule","selectors":["#env-label","#drawer-logo",".drawer-icon"],"declarations":[{"type":"declaration","property":"margin","value":"0 14"}]},{"type":"rule","selectors":[".drawer-row"],"declarations":[{"type":"declaration","property":"padding","value":"9 0"},{"type":"declaration","property":"margin-bottom","value":"8"},{"type":"declaration","property":"width","value":"100%"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 730 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#banner-container"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":["#banner-header"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#banner-message"],"declarations":[{"type":"declaration","property":"margin","value":"10 16"}]},{"type":"rule","selectors":["#banner-title"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":["#getting-started-banner"],"declarations":[{"type":"declaration","property":"background-color","value":"#f9f9f9"},{"type":"declaration","property":"height","value":"180"},{"type":"declaration","property":"vertical-align","value":"bottom"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 731 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#banner-container"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":["#banner-header"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#banner-message"],"declarations":[{"type":"declaration","property":"margin","value":"10 16"}]},{"type":"rule","selectors":["#banner-title"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":["#getting-started-banner"],"declarations":[{"type":"declaration","property":"background-color","value":"#f9f9f9"},{"type":"declaration","property":"height","value":"180"},{"type":"declaration","property":"vertical-align","value":"bottom"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 732 */,
/* 733 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/glucose-measurement", function() { return __webpack_require__(94); });
global.registerModule("components/glucose-measurement/glucose-measurement", function() { return __webpack_require__(94); });
global.registerModule("components/glucose-measurement/glucose-measurement.xml", function() { return __webpack_require__(171); });
module.exports = "<StackLayout\n xmlns:Alarm=\"components/alarm\"\n xmlns:GlucoseMeasurement=\"components/glucose-measurement\"\n >\n\n <GlucoseMeasurement:glucose-measurement visibility=\"{{Alarm, !!Alarm &amp;&amp; !!Alarm.AlarmType ? 'collapsed' : 'visible'}}\" />\n\n <!-- <Alarm:alarm visibility=\"{{ Alarm, !!Alarm &amp;&amp; !!Alarm.AlarmType ? 'visible' : 'collapsed' }}\" /> -->\n\n</StackLayout>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 734 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#banner-container"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"padding","value":"16"}]},{"type":"rule","selectors":["#banner-header"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":["#banner-message"],"declarations":[{"type":"declaration","property":"margin-top","value":"8"}]},{"type":"rule","selectors":["#banner-title"],"declarations":[{"type":"declaration","property":"margin","value":"0 6"},{"type":"declaration","property":"width","value":"80%"}]},{"type":"rule","selectors":["#close-button"],"declarations":[{"type":"declaration","property":"align-self","value":"flex-start"},{"type":"declaration","property":"flex","value":"none"}]},{"type":"rule","selectors":["#safety-banner"],"declarations":[{"type":"declaration","property":"background-color","value":"#f9f9f9"},{"type":"declaration","property":"margin-bottom","value":"20"},{"type":"declaration","property":"vertical-align","value":"bottom"},{"type":"declaration","property":"width","value":"92%"}]},{"type":"rule","selectors":["#warning-img"],"declarations":[{"type":"declaration","property":"margin-top","value":"2"},{"type":"declaration","property":"flex","value":"none"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 735 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#banner-container"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"padding","value":"16"}]},{"type":"rule","selectors":["#banner-header"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":["#banner-message"],"declarations":[{"type":"declaration","property":"margin-top","value":"8"}]},{"type":"rule","selectors":["#banner-title"],"declarations":[{"type":"declaration","property":"margin","value":"0 6"},{"type":"declaration","property":"width","value":"80%"}]},{"type":"rule","selectors":["#close-button"],"declarations":[{"type":"declaration","property":"align-self","value":"flex-start"},{"type":"declaration","property":"flex","value":"none"}]},{"type":"rule","selectors":["#safety-banner"],"declarations":[{"type":"declaration","property":"background-color","value":"#f9f9f9"},{"type":"declaration","property":"margin-bottom","value":"20"},{"type":"declaration","property":"vertical-align","value":"bottom"},{"type":"declaration","property":"width","value":"92%"}]},{"type":"rule","selectors":["#warning-img"],"declarations":[{"type":"declaration","property":"margin-top","value":"2"},{"type":"declaration","property":"flex","value":"none"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 736 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".summary-card #iconfont-info"],"declarations":[{"type":"declaration","property":"flex","value":"none"}]},{"type":"rule","selectors":[".summary-card .alarm",".summary-card .measurement",".summary-card .no-reading"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".summary-card .alarm-icon"],"declarations":[{"type":"declaration","property":"color","value":"#757575"},{"type":"declaration","property":"margin-right","value":"8"}]},{"type":"rule","selectors":[".summary-card .card-container"],"declarations":[{"type":"declaration","property":"height","value":"75"}]},{"type":"rule","selectors":[".summary-card .header"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".summary-card .measurement-threshold",".summary-card .measurement-value",".summary-card .no-reading-text"],"declarations":[{"type":"declaration","property":"font-size","value":"68"},{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"-12 0 0 0"}]},{"type":"rule","selectors":[".summary-card .measurement-threshold .fractional",".summary-card .measurement-value .fractional",".summary-card .no-reading-text .fractional"],"declarations":[{"type":"declaration","property":"font-size","value":"48"}]},{"type":"rule","selectors":[".summary-card .no-reading-text"],"declarations":[{"type":"declaration","property":"margin-top","value":"-20"}]},{"type":"rule","selectors":[".summary-card .reading-details"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-left","value":"5"}]},{"type":"rule","selectors":[".summary-card .structure"],"declarations":[{"type":"declaration","property":"padding","value":"8 12 0 12"}]},{"type":"rule","selectors":[".summary-card .time"],"declarations":[{"type":"declaration","property":"font-size","value":"18"}]},{"type":"rule","selectors":[".summary-card .trend-border"],"declarations":[{"type":"declaration","property":"height","value":"12"},{"type":"declaration","property":"border-bottom-left-radius","value":"8"},{"type":"declaration","property":"border-bottom-right-radius","value":"8"}]},{"type":"rule","selectors":["[class*=\"lang-ar\"] .summary-card .reading-details"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"15"}]},{"type":"rule","selectors":[".ns-root.ns-dark .summary-card .alarm-icon"],"declarations":[{"type":"declaration","property":"color","value":"#e6e5e4"}]},{"type":"rule","selectors":[".summary-card .reading-details"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"5"}]},{"type":"rule","selectors":[".rtl .summary-card #info-msg",".rtl .summary-card .alarm",".rtl .summary-card .header",".rtl .summary-card .measurement"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row-reverse"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 737 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = "<StackLayout>\n <FlexboxLayout class=\"structure flex-row\">\n\n <!-- Header -->\n <FlexboxLayout class=\"header flex-row\">\n <!-- Patient Name -->\n <Label\n class=\"bold xlg\"\n textWrap=\"false\"\n text=\"{{patient, patient &amp;&amp; patient.firstName !== undefined ? patient.firstName + ' ' + patient.lastName : ' ' | shortenedName}}\"\n />\n\n <StackLayout>\n <!-- Info message -->\n <FlexboxLayout id=\"info-msg\" visibility=\"{{measurement, measurementHasAlert() ? 'visible' : 'collapsed'}}\" tap=\"{{showAlert}}\">\n <Label fontSize=\"14\" text=\"{{measurement, alertType + ' '}}\" />\n <Label id=\"iconfont-info\" class=\"icfont\" color=\"gray\" fontSize=\"20\" text=\"info\" />\n </FlexboxLayout>\n\n <!-- Time stamp -->\n <Label\n class=\"time\"\n text=\"{{measurement, measurement.FactoryTimestamp | dateTimeStamp}}\"\n textWrap=\"true\"\n visibility=\"{{measurement, isHistoricMeasurement &amp;&amp; measurement &amp;&amp; measurement.FactoryTimestamp ? 'visible' : 'collapsed'}}\"\n />\n\n <!-- Recent -->\n <Label\n class=\"time\"\n text=\"{{L('Summary.now')}}\"\n textWrap=\"true\"\n visibility=\"{{measurement, !isHistoricMeasurement &amp;&amp; !measurementHasAlert() ? 'visible' : 'collapsed'}}\"\n />\n </StackLayout>\n </FlexboxLayout>\n\n <!-- Measurement -->\n <FlexboxLayout class=\"measurement card-container flex-row\" visibility=\"{{measurement, measurement &amp;&amp; (isHistoricMeasurement || isMeasurementRecent) &amp;&amp; measurement.Value !== undefined ? 'visible' : 'collapsed'}}\">\n <!-- Value -->\n <Label class=\"measurement-value bold\" visibility=\"{{measurement, measurement.isHigh || measurement.isLow ? 'collapsed' : 'visible'}}\" textWrap=\"true\">\n <FormattedString>\n <Span text=\"{{measurement, displayValue}}\" />\n <Span class=\"fractional\" text=\"{{measurement, displayValueFractional}}\" />\n </FormattedString>\n </Label>\n <!-- Threshold -->\n <Label class=\"measurement-threshold\" text=\"{{measurement, L(measurement.isHigh ? 'Summary.high' : 'Summary.low')}}\"\n visibility=\"{{measurement, measurement.isHigh || measurement.isLow ? 'visible' : 'collapsed'}}\" textWrap=\"true\" />\n\n <!-- Reading Details -->\n <FlexboxLayout class=\"reading-details flex-col\" visibility=\"{{measurement, measurement.isHigh || measurement.isLow ? 'collapsed' : 'visible'}}\">\n <!-- Arrow -->\n <Label class=\"icfont iclg trend-arrow\" text=\"{{measurement, arrow}}\" />\n\n <!-- UOM -->\n <Label class=\"body black-1 sm\" text=\"{{measurement, measurement.GlucoseUnits | getUOMFromGlucoseType}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n\n <!-- Alarm -->\n <FlexboxLayout class=\"alarm card-container flex-row\" visibility=\"{{measurement, (isHistoricMeasurement || isMeasurementRecent) &amp;&amp; measurement &amp;&amp; measurement.type === 2 ? 'visible' : 'collapsed'}}\">\n <Label class=\"alarm-icon icfont icmd\" text=\"alarm\"/>\n <Label class=\"alarm-text bold xlg\" text=\"{{measurement, deviceAlarmType}}\" textWrap=\"true\" />\n </FlexboxLayout>\n\n <!-- No Readings -->\n <FlexboxLayout class=\"no-reading card-container flex-row\"\n visibility=\"{{measurement, !measurement || (!isHistoricMeasurement &amp;&amp; !isMeasurementRecent) || (measurement.Value === undefined &amp;&amp; measurement.type !== 2) ? 'visible' : 'collapsed'}}\"\n >\n <Label class=\"no-reading-text\" text=\"_ _ _\"/>\n </FlexboxLayout>\n </FlexboxLayout>\n <!-- Border -->\n <Label class=\"{{measurement, 'trend-border trend-border-' + (measurement &amp;&amp; (isHistoricMeasurement || isMeasurementRecent) ? measurement.MeasurementColor || 0 : 0)}}\" />\n</StackLayout>\n";
if (false ) {}
/***/ }),
/* 738 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ConnectionResponse", function() { return ConnectionResponse; });
var ConnectionResponse = /** @class */ (function () {
function ConnectionResponse(response) {
var json = response && response.content.toJSON();
if (json) {
this.message = json.Message || json.message;
this.result = json.Result || json.result;
this.status = json.Status || json.status;
}
else {
this.status = -1;
}
}
ConnectionResponse.prototype.getConnections = function () {
if (!this.statusOk()) {
console.log('>>> Unable to get connections. ConnectionResponse.Status: ' + this.status);
return [];
}
return this.result;
};
ConnectionResponse.prototype.statusOk = function () {
return this.status === 0;
};
return ConnectionResponse;
}());
;
if (false ) {}
/***/ }),
/* 739 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "User", function() { return User; });
var User = /** @class */ (function () {
function User(data) {
this.AccountId = data.AccountId;
this.UserName = data.UserName;
this.Email = data.Email;
this.FirstName = data.FirstName;
this.LastName = data.LastName;
this.DateOfBirth = data.DateOfBirth;
this.Country = data.Country;
this.Culture = data.Culture;
this.UserToken = data.UserToken;
this.IsHCP = data.IsHcp !== undefined ? data.IsHcp : false;
this.Validated = data.Validated !== undefined ? data.Validated : true;
this.NeedToAcceptPolicies =
data.NeedToAcceptPolicies !== undefined ? data.NeedToAcceptPolicies : false;
}
return User;
}());
;
if (false ) {}
/***/ }),
/* 740 */,
/* 741 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"comment","comment":"!\n * NativeScript Compatibility Theme __VERSION__ (https://nativescript.org)\n * Copyright 2016-2016 The Theme Authors\n * Copyright 2016-2019 Progress Software\n * Licensed under Apache 2.0 (https://github.com/NativeScript/theme/blob/master/LICENSE)\n "},{"type":"comment","comment":"!\n * NativeScript Theme __VERSION__ (https://nativescript.org)\n * Copyright 2016-2016 The Theme Authors\n * Copyright 2016-2019 Progress Software\n * Licensed under Apache 2.0 (https://github.com/NativeScript/theme/blob/master/LICENSE)\n "},{"type":"keyframes","name":"empty","keyframes":[]},{"type":"comment","comment":" Forms "},{"type":"comment","comment":"*\n * Color classes\n * The following creates this pattern:\n * .c-grey{color:#e0e0e0}.c-bg-grey{background-color:#e0e0e0}\n*"},{"type":"rule","selectors":[".c-black"],"declarations":[{"type":"declaration","property":"color","value":"#000"}]},{"type":"rule","selectors":[".c-bg-black"],"declarations":[{"type":"declaration","property":"background-color","value":"#000"}]},{"type":"rule","selectors":[".c-white"],"declarations":[{"type":"declaration","property":"color","value":"#fff"}]},{"type":"rule","selectors":[".c-bg-white"],"declarations":[{"type":"declaration","property":"background-color","value":"#fff"}]},{"type":"rule","selectors":[".c-grey"],"declarations":[{"type":"declaration","property":"color","value":"#e0e0e0"}]},{"type":"rule","selectors":[".c-bg-grey"],"declarations":[{"type":"declaration","property":"background-color","value":"#e0e0e0"}]},{"type":"rule","selectors":[".c-grey-light"],"declarations":[{"type":"declaration","property":"color","value":"#bababa"}]},{"type":"rule","selectors":[".c-bg-grey-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#bababa"}]},{"type":"rule","selectors":[".c-charcoal"],"declarations":[{"type":"declaration","property":"color","value":"#303030"}]},{"type":"rule","selectors":[".c-bg-charcoal"],"declarations":[{"type":"declaration","property":"background-color","value":"#303030"}]},{"type":"rule","selectors":[".c-transparent"],"declarations":[{"type":"declaration","property":"color","value":"transparent"}]},{"type":"rule","selectors":[".c-bg-transparent"],"declarations":[{"type":"declaration","property":"background-color","value":"transparent"}]},{"type":"rule","selectors":[".c-aqua"],"declarations":[{"type":"declaration","property":"color","value":"#00caab"}]},{"type":"rule","selectors":[".c-bg-aqua"],"declarations":[{"type":"declaration","property":"background-color","value":"#00caab"}]},{"type":"rule","selectors":[".c-blue"],"declarations":[{"type":"declaration","property":"color","value":"#3a53ff"}]},{"type":"rule","selectors":[".c-bg-blue"],"declarations":[{"type":"declaration","property":"background-color","value":"#3a53ff"}]},{"type":"rule","selectors":[".c-brown"],"declarations":[{"type":"declaration","property":"color","value":"#795548"}]},{"type":"rule","selectors":[".c-bg-brown"],"declarations":[{"type":"declaration","property":"background-color","value":"#795548"}]},{"type":"rule","selectors":[".c-forest"],"declarations":[{"type":"declaration","property":"color","value":"#006968"}]},{"type":"rule","selectors":[".c-bg-forest"],"declarations":[{"type":"declaration","property":"background-color","value":"#006968"}]},{"type":"rule","selectors":[".c-grey-dark"],"declarations":[{"type":"declaration","property":"color","value":"#5c687c"}]},{"type":"rule","selectors":[".c-bg-grey-dark"],"declarations":[{"type":"declaration","property":"background-color","value":"#5c687c"}]},{"type":"rule","selectors":[".c-purple"],"declarations":[{"type":"declaration","property":"color","value":"#8130ff"}]},{"type":"rule","selectors":[".c-bg-purple"],"declarations":[{"type":"declaration","property":"background-color","value":"#8130ff"}]},{"type":"rule","selectors":[".c-lemon"],"declarations":[{"type":"declaration","property":"color","value":"#ffea00"}]},{"type":"rule","selectors":[".c-bg-lemon"],"declarations":[{"type":"declaration","property":"background-color","value":"#ffea00"}]},{"type":"rule","selectors":[".c-lime"],"declarations":[{"type":"declaration","property":"color","value":"#aee406"}]},{"type":"rule","selectors":[".c-bg-lime"],"declarations":[{"type":"declaration","property":"background-color","value":"#aee406"}]},{"type":"rule","selectors":[".c-orange"],"declarations":[{"type":"declaration","property":"color","value":"#f57c00"}]},{"type":"rule","selectors":[".c-bg-orange"],"declarations":[{"type":"declaration","property":"background-color","value":"#f57c00"}]},{"type":"rule","selectors":[".c-ruby"],"declarations":[{"type":"declaration","property":"color","value":"#ff1744"}]},{"type":"rule","selectors":[".c-bg-ruby"],"declarations":[{"type":"declaration","property":"background-color","value":"#ff1744"}]},{"type":"rule","selectors":[".c-sky"],"declarations":[{"type":"declaration","property":"color","value":"#30bcff"}]},{"type":"rule","selectors":[".c-bg-sky"],"declarations":[{"type":"declaration","property":"background-color","value":"#30bcff"}]},{"type":"rule","selectors":[".c-error"],"declarations":[{"type":"declaration","property":"color","value":"#d50000"}]},{"type":"rule","selectors":[".c-bg-error"],"declarations":[{"type":"declaration","property":"background-color","value":"#d50000"}]},{"type":"comment","comment":" Width/Height "},{"type":"rule","selectors":[".w-full"],"declarations":[{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".w-100"],"declarations":[{"type":"declaration","property":"width","value":"100"}]},{"type":"rule","selectors":[".h-full"],"declarations":[{"type":"declaration","property":"height","value":"100%"}]},{"type":"rule","selectors":[".h-100"],"declarations":[{"type":"declaration","property":"height","value":"100"}]},{"type":"comment","comment":"*\n * Margin and Padding\n * The following creates this pattern:\n * .m-0{margin:0}.m-t-0{margin-top:0}.m-r-0{margin-right:0}.m-b-0{margin-bottom:0}.m-l-0{margin-left:0}.m-x-0{margin-right:0;margin-left:0}.m-y-0{margin-top:0;margin-bottom:0}\n * Same for Padding (using the 'p' abbreviation)\n * From 0, 2, 5, 10, 15, 20, 25, 30\n*"},{"type":"rule","selectors":[".m-0"],"declarations":[{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":[".m-t-0"],"declarations":[{"type":"declaration","property":"margin-top","value":"0"}]},{"type":"rule","selectors":[".m-r-0"],"declarations":[{"type":"declaration","property":"margin-right","value":"0"}]},{"type":"rule","selectors":[".m-b-0"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"0"}]},{"type":"rule","selectors":[".m-l-0"],"declarations":[{"type":"declaration","property":"margin-left","value":"0"}]},{"type":"rule","selectors":[".m-x-0"],"declarations":[{"type":"declaration","property":"margin-right","value":"0"},{"type":"declaration","property":"margin-left","value":"0"}]},{"type":"rule","selectors":[".m-y-0"],"declarations":[{"type":"declaration","property":"margin-top","value":"0"},{"type":"declaration","property":"margin-bottom","value":"0"}]},{"type":"rule","selectors":[".m-2"],"declarations":[{"type":"declaration","property":"margin","value":"2"}]},{"type":"rule","selectors":[".m-t-2"],"declarations":[{"type":"declaration","property":"margin-top","value":"2"}]},{"type":"rule","selectors":[".m-r-2"],"declarations":[{"type":"declaration","property":"margin-right","value":"2"}]},{"type":"rule","selectors":[".m-b-2"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"2"}]},{"type":"rule","selectors":[".m-l-2"],"declarations":[{"type":"declaration","property":"margin-left","value":"2"}]},{"type":"rule","selectors":[".m-x-2"],"declarations":[{"type":"declaration","property":"margin-right","value":"2"},{"type":"declaration","property":"margin-left","value":"2"}]},{"type":"rule","selectors":[".m-y-2"],"declarations":[{"type":"declaration","property":"margin-top","value":"2"},{"type":"declaration","property":"margin-bottom","value":"2"}]},{"type":"rule","selectors":[".m-4"],"declarations":[{"type":"declaration","property":"margin","value":"4"}]},{"type":"rule","selectors":[".m-t-4"],"declarations":[{"type":"declaration","property":"margin-top","value":"4"}]},{"type":"rule","selectors":[".m-r-4"],"declarations":[{"type":"declaration","property":"margin-right","value":"4"}]},{"type":"rule","selectors":[".m-b-4"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"4"}]},{"type":"rule","selectors":[".m-l-4"],"declarations":[{"type":"declaration","property":"margin-left","value":"4"}]},{"type":"rule","selectors":[".m-x-4"],"declarations":[{"type":"declaration","property":"margin-right","value":"4"},{"type":"declaration","property":"margin-left","value":"4"}]},{"type":"rule","selectors":[".m-y-4"],"declarations":[{"type":"declaration","property":"margin-top","value":"4"},{"type":"declaration","property":"margin-bottom","value":"4"}]},{"type":"rule","selectors":[".m-5"],"declarations":[{"type":"declaration","property":"margin","value":"5"}]},{"type":"rule","selectors":[".m-t-5"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".m-r-5"],"declarations":[{"type":"declaration","property":"margin-right","value":"5"}]},{"type":"rule","selectors":[".m-b-5"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"5"}]},{"type":"rule","selectors":[".m-l-5"],"declarations":[{"type":"declaration","property":"margin-left","value":"5"}]},{"type":"rule","selectors":[".m-x-5"],"declarations":[{"type":"declaration","property":"margin-right","value":"5"},{"type":"declaration","property":"margin-left","value":"5"}]},{"type":"rule","selectors":[".m-y-5"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"},{"type":"declaration","property":"margin-bottom","value":"5"}]},{"type":"rule","selectors":[".m-8"],"declarations":[{"type":"declaration","property":"margin","value":"8"}]},{"type":"rule","selectors":[".m-t-8"],"declarations":[{"type":"declaration","property":"margin-top","value":"8"}]},{"type":"rule","selectors":[".m-r-8"],"declarations":[{"type":"declaration","property":"margin-right","value":"8"}]},{"type":"rule","selectors":[".m-b-8"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"8"}]},{"type":"rule","selectors":[".m-l-8"],"declarations":[{"type":"declaration","property":"margin-left","value":"8"}]},{"type":"rule","selectors":[".m-x-8"],"declarations":[{"type":"declaration","property":"margin-right","value":"8"},{"type":"declaration","property":"margin-left","value":"8"}]},{"type":"rule","selectors":[".m-y-8"],"declarations":[{"type":"declaration","property":"margin-top","value":"8"},{"type":"declaration","property":"margin-bottom","value":"8"}]},{"type":"rule","selectors":[".m-10"],"declarations":[{"type":"declaration","property":"margin","value":"10"}]},{"type":"rule","selectors":[".m-t-10"],"declarations":[{"type":"declaration","property":"margin-top","value":"10"}]},{"type":"rule","selectors":[".m-r-10"],"declarations":[{"type":"declaration","property":"margin-right","value":"10"}]},{"type":"rule","selectors":[".m-b-10"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".m-l-10"],"declarations":[{"type":"declaration","property":"margin-left","value":"10"}]},{"type":"rule","selectors":[".m-x-10"],"declarations":[{"type":"declaration","property":"margin-right","value":"10"},{"type":"declaration","property":"margin-left","value":"10"}]},{"type":"rule","selectors":[".m-y-10"],"declarations":[{"type":"declaration","property":"margin-top","value":"10"},{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".m-12"],"declarations":[{"type":"declaration","property":"margin","value":"12"}]},{"type":"rule","selectors":[".m-t-12"],"declarations":[{"type":"declaration","property":"margin-top","value":"12"}]},{"type":"rule","selectors":[".m-r-12"],"declarations":[{"type":"declaration","property":"margin-right","value":"12"}]},{"type":"rule","selectors":[".m-b-12"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"12"}]},{"type":"rule","selectors":[".m-l-12"],"declarations":[{"type":"declaration","property":"margin-left","value":"12"}]},{"type":"rule","selectors":[".m-x-12"],"declarations":[{"type":"declaration","property":"margin-right","value":"12"},{"type":"declaration","property":"margin-left","value":"12"}]},{"type":"rule","selectors":[".m-y-12"],"declarations":[{"type":"declaration","property":"margin-top","value":"12"},{"type":"declaration","property":"margin-bottom","value":"12"}]},{"type":"rule","selectors":[".m-15"],"declarations":[{"type":"declaration","property":"margin","value":"15"}]},{"type":"rule","selectors":[".m-t-15"],"declarations":[{"type":"declaration","property":"margin-top","value":"15"}]},{"type":"rule","selectors":[".m-r-15"],"declarations":[{"type":"declaration","property":"margin-right","value":"15"}]},{"type":"rule","selectors":[".m-b-15"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"15"}]},{"type":"rule","selectors":[".m-l-15"],"declarations":[{"type":"declaration","property":"margin-left","value":"15"}]},{"type":"rule","selectors":[".m-x-15"],"declarations":[{"type":"declaration","property":"margin-right","value":"15"},{"type":"declaration","property":"margin-left","value":"15"}]},{"type":"rule","selectors":[".m-y-15"],"declarations":[{"type":"declaration","property":"margin-top","value":"15"},{"type":"declaration","property":"margin-bottom","value":"15"}]},{"type":"rule","selectors":[".m-16"],"declarations":[{"type":"declaration","property":"margin","value":"16"}]},{"type":"rule","selectors":[".m-t-16"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]},{"type":"rule","selectors":[".m-r-16"],"declarations":[{"type":"declaration","property":"margin-right","value":"16"}]},{"type":"rule","selectors":[".m-b-16"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"16"}]},{"type":"rule","selectors":[".m-l-16"],"declarations":[{"type":"declaration","property":"margin-left","value":"16"}]},{"type":"rule","selectors":[".m-x-16"],"declarations":[{"type":"declaration","property":"margin-right","value":"16"},{"type":"declaration","property":"margin-left","value":"16"}]},{"type":"rule","selectors":[".m-y-16"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"},{"type":"declaration","property":"margin-bottom","value":"16"}]},{"type":"rule","selectors":[".m-20"],"declarations":[{"type":"declaration","property":"margin","value":"20"}]},{"type":"rule","selectors":[".m-t-20"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"}]},{"type":"rule","selectors":[".m-r-20"],"declarations":[{"type":"declaration","property":"margin-right","value":"20"}]},{"type":"rule","selectors":[".m-b-20"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"20"}]},{"type":"rule","selectors":[".m-l-20"],"declarations":[{"type":"declaration","property":"margin-left","value":"20"}]},{"type":"rule","selectors":[".m-x-20"],"declarations":[{"type":"declaration","property":"margin-right","value":"20"},{"type":"declaration","property":"margin-left","value":"20"}]},{"type":"rule","selectors":[".m-y-20"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"margin-bottom","value":"20"}]},{"type":"rule","selectors":[".m-24"],"declarations":[{"type":"declaration","property":"margin","value":"24"}]},{"type":"rule","selectors":[".m-t-24"],"declarations":[{"type":"declaration","property":"margin-top","value":"24"}]},{"type":"rule","selectors":[".m-r-24"],"declarations":[{"type":"declaration","property":"margin-right","value":"24"}]},{"type":"rule","selectors":[".m-b-24"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"24"}]},{"type":"rule","selectors":[".m-l-24"],"declarations":[{"type":"declaration","property":"margin-left","value":"24"}]},{"type":"rule","selectors":[".m-x-24"],"declarations":[{"type":"declaration","property":"margin-right","value":"24"},{"type":"declaration","property":"margin-left","value":"24"}]},{"type":"rule","selectors":[".m-y-24"],"declarations":[{"type":"declaration","property":"margin-top","value":"24"},{"type":"declaration","property":"margin-bottom","value":"24"}]},{"type":"rule","selectors":[".m-25"],"declarations":[{"type":"declaration","property":"margin","value":"25"}]},{"type":"rule","selectors":[".m-t-25"],"declarations":[{"type":"declaration","property":"margin-top","value":"25"}]},{"type":"rule","selectors":[".m-r-25"],"declarations":[{"type":"declaration","property":"margin-right","value":"25"}]},{"type":"rule","selectors":[".m-b-25"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"25"}]},{"type":"rule","selectors":[".m-l-25"],"declarations":[{"type":"declaration","property":"margin-left","value":"25"}]},{"type":"rule","selectors":[".m-x-25"],"declarations":[{"type":"declaration","property":"margin-right","value":"25"},{"type":"declaration","property":"margin-left","value":"25"}]},{"type":"rule","selectors":[".m-y-25"],"declarations":[{"type":"declaration","property":"margin-top","value":"25"},{"type":"declaration","property":"margin-bottom","value":"25"}]},{"type":"rule","selectors":[".m-28"],"declarations":[{"type":"declaration","property":"margin","value":"28"}]},{"type":"rule","selectors":[".m-t-28"],"declarations":[{"type":"declaration","property":"margin-top","value":"28"}]},{"type":"rule","selectors":[".m-r-28"],"declarations":[{"type":"declaration","property":"margin-right","value":"28"}]},{"type":"rule","selectors":[".m-b-28"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"28"}]},{"type":"rule","selectors":[".m-l-28"],"declarations":[{"type":"declaration","property":"margin-left","value":"28"}]},{"type":"rule","selectors":[".m-x-28"],"declarations":[{"type":"declaration","property":"margin-right","value":"28"},{"type":"declaration","property":"margin-left","value":"28"}]},{"type":"rule","selectors":[".m-y-28"],"declarations":[{"type":"declaration","property":"margin-top","value":"28"},{"type":"declaration","property":"margin-bottom","value":"28"}]},{"type":"rule","selectors":[".m-30"],"declarations":[{"type":"declaration","property":"margin","value":"30"}]},{"type":"rule","selectors":[".m-t-30"],"declarations":[{"type":"declaration","property":"margin-top","value":"30"}]},{"type":"rule","selectors":[".m-r-30"],"declarations":[{"type":"declaration","property":"margin-right","value":"30"}]},{"type":"rule","selectors":[".m-b-30"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"30"}]},{"type":"rule","selectors":[".m-l-30"],"declarations":[{"type":"declaration","property":"margin-left","value":"30"}]},{"type":"rule","selectors":[".m-x-30"],"declarations":[{"type":"declaration","property":"margin-right","value":"30"},{"type":"declaration","property":"margin-left","value":"30"}]},{"type":"rule","selectors":[".m-y-30"],"declarations":[{"type":"declaration","property":"margin-top","value":"30"},{"type":"declaration","property":"margin-bottom","value":"30"}]},{"type":"rule","selectors":[".p-0"],"declarations":[{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".p-t-0"],"declarations":[{"type":"declaration","property":"padding-top","value":"0"}]},{"type":"rule","selectors":[".p-r-0"],"declarations":[{"type":"declaration","property":"padding-right","value":"0"}]},{"type":"rule","selectors":[".p-b-0"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"0"}]},{"type":"rule","selectors":[".p-l-0"],"declarations":[{"type":"declaration","property":"padding-left","value":"0"}]},{"type":"rule","selectors":[".p-x-0"],"declarations":[{"type":"declaration","property":"padding-right","value":"0"},{"type":"declaration","property":"padding-left","value":"0"}]},{"type":"rule","selectors":[".p-y-0"],"declarations":[{"type":"declaration","property":"padding-top","value":"0"},{"type":"declaration","property":"padding-bottom","value":"0"}]},{"type":"rule","selectors":[".p-2"],"declarations":[{"type":"declaration","property":"padding","value":"2"}]},{"type":"rule","selectors":[".p-t-2"],"declarations":[{"type":"declaration","property":"padding-top","value":"2"}]},{"type":"rule","selectors":[".p-r-2"],"declarations":[{"type":"declaration","property":"padding-right","value":"2"}]},{"type":"rule","selectors":[".p-b-2"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"2"}]},{"type":"rule","selectors":[".p-l-2"],"declarations":[{"type":"declaration","property":"padding-left","value":"2"}]},{"type":"rule","selectors":[".p-x-2"],"declarations":[{"type":"declaration","property":"padding-right","value":"2"},{"type":"declaration","property":"padding-left","value":"2"}]},{"type":"rule","selectors":[".p-y-2"],"declarations":[{"type":"declaration","property":"padding-top","value":"2"},{"type":"declaration","property":"padding-bottom","value":"2"}]},{"type":"rule","selectors":[".p-4"],"declarations":[{"type":"declaration","property":"padding","value":"4"}]},{"type":"rule","selectors":[".p-t-4"],"declarations":[{"type":"declaration","property":"padding-top","value":"4"}]},{"type":"rule","selectors":[".p-r-4"],"declarations":[{"type":"declaration","property":"padding-right","value":"4"}]},{"type":"rule","selectors":[".p-b-4"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"4"}]},{"type":"rule","selectors":[".p-l-4"],"declarations":[{"type":"declaration","property":"padding-left","value":"4"}]},{"type":"rule","selectors":[".p-x-4"],"declarations":[{"type":"declaration","property":"padding-right","value":"4"},{"type":"declaration","property":"padding-left","value":"4"}]},{"type":"rule","selectors":[".p-y-4"],"declarations":[{"type":"declaration","property":"padding-top","value":"4"},{"type":"declaration","property":"padding-bottom","value":"4"}]},{"type":"rule","selectors":[".p-5"],"declarations":[{"type":"declaration","property":"padding","value":"5"}]},{"type":"rule","selectors":[".p-t-5"],"declarations":[{"type":"declaration","property":"padding-top","value":"5"}]},{"type":"rule","selectors":[".p-r-5"],"declarations":[{"type":"declaration","property":"padding-right","value":"5"}]},{"type":"rule","selectors":[".p-b-5"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"5"}]},{"type":"rule","selectors":[".p-l-5"],"declarations":[{"type":"declaration","property":"padding-left","value":"5"}]},{"type":"rule","selectors":[".p-x-5"],"declarations":[{"type":"declaration","property":"padding-right","value":"5"},{"type":"declaration","property":"padding-left","value":"5"}]},{"type":"rule","selectors":[".p-y-5"],"declarations":[{"type":"declaration","property":"padding-top","value":"5"},{"type":"declaration","property":"padding-bottom","value":"5"}]},{"type":"rule","selectors":[".p-8"],"declarations":[{"type":"declaration","property":"padding","value":"8"}]},{"type":"rule","selectors":[".p-t-8"],"declarations":[{"type":"declaration","property":"padding-top","value":"8"}]},{"type":"rule","selectors":[".p-r-8"],"declarations":[{"type":"declaration","property":"padding-right","value":"8"}]},{"type":"rule","selectors":[".p-b-8"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"8"}]},{"type":"rule","selectors":[".p-l-8"],"declarations":[{"type":"declaration","property":"padding-left","value":"8"}]},{"type":"rule","selectors":[".p-x-8"],"declarations":[{"type":"declaration","property":"padding-right","value":"8"},{"type":"declaration","property":"padding-left","value":"8"}]},{"type":"rule","selectors":[".p-y-8"],"declarations":[{"type":"declaration","property":"padding-top","value":"8"},{"type":"declaration","property":"padding-bottom","value":"8"}]},{"type":"rule","selectors":[".p-10"],"declarations":[{"type":"declaration","property":"padding","value":"10"}]},{"type":"rule","selectors":[".p-t-10"],"declarations":[{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".p-r-10"],"declarations":[{"type":"declaration","property":"padding-right","value":"10"}]},{"type":"rule","selectors":[".p-b-10"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"10"}]},{"type":"rule","selectors":[".p-l-10"],"declarations":[{"type":"declaration","property":"padding-left","value":"10"}]},{"type":"rule","selectors":[".p-x-10"],"declarations":[{"type":"declaration","property":"padding-right","value":"10"},{"type":"declaration","property":"padding-left","value":"10"}]},{"type":"rule","selectors":[".p-y-10"],"declarations":[{"type":"declaration","property":"padding-top","value":"10"},{"type":"declaration","property":"padding-bottom","value":"10"}]},{"type":"rule","selectors":[".p-12"],"declarations":[{"type":"declaration","property":"padding","value":"12"}]},{"type":"rule","selectors":[".p-t-12"],"declarations":[{"type":"declaration","property":"padding-top","value":"12"}]},{"type":"rule","selectors":[".p-r-12"],"declarations":[{"type":"declaration","property":"padding-right","value":"12"}]},{"type":"rule","selectors":[".p-b-12"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"12"}]},{"type":"rule","selectors":[".p-l-12"],"declarations":[{"type":"declaration","property":"padding-left","value":"12"}]},{"type":"rule","selectors":[".p-x-12"],"declarations":[{"type":"declaration","property":"padding-right","value":"12"},{"type":"declaration","property":"padding-left","value":"12"}]},{"type":"rule","selectors":[".p-y-12"],"declarations":[{"type":"declaration","property":"padding-top","value":"12"},{"type":"declaration","property":"padding-bottom","value":"12"}]},{"type":"rule","selectors":[".p-15"],"declarations":[{"type":"declaration","property":"padding","value":"15"}]},{"type":"rule","selectors":[".p-t-15"],"declarations":[{"type":"declaration","property":"padding-top","value":"15"}]},{"type":"rule","selectors":[".p-r-15"],"declarations":[{"type":"declaration","property":"padding-right","value":"15"}]},{"type":"rule","selectors":[".p-b-15"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"15"}]},{"type":"rule","selectors":[".p-l-15"],"declarations":[{"type":"declaration","property":"padding-left","value":"15"}]},{"type":"rule","selectors":[".p-x-15"],"declarations":[{"type":"declaration","property":"padding-right","value":"15"},{"type":"declaration","property":"padding-left","value":"15"}]},{"type":"rule","selectors":[".p-y-15"],"declarations":[{"type":"declaration","property":"padding-top","value":"15"},{"type":"declaration","property":"padding-bottom","value":"15"}]},{"type":"rule","selectors":[".p-16"],"declarations":[{"type":"declaration","property":"padding","value":"16"}]},{"type":"rule","selectors":[".p-t-16"],"declarations":[{"type":"declaration","property":"padding-top","value":"16"}]},{"type":"rule","selectors":[".p-r-16"],"declarations":[{"type":"declaration","property":"padding-right","value":"16"}]},{"type":"rule","selectors":[".p-b-16"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"16"}]},{"type":"rule","selectors":[".p-l-16"],"declarations":[{"type":"declaration","property":"padding-left","value":"16"}]},{"type":"rule","selectors":[".p-x-16"],"declarations":[{"type":"declaration","property":"padding-right","value":"16"},{"type":"declaration","property":"padding-left","value":"16"}]},{"type":"rule","selectors":[".p-y-16"],"declarations":[{"type":"declaration","property":"padding-top","value":"16"},{"type":"declaration","property":"padding-bottom","value":"16"}]},{"type":"rule","selectors":[".p-20"],"declarations":[{"type":"declaration","property":"padding","value":"20"}]},{"type":"rule","selectors":[".p-t-20"],"declarations":[{"type":"declaration","property":"padding-top","value":"20"}]},{"type":"rule","selectors":[".p-r-20"],"declarations":[{"type":"declaration","property":"padding-right","value":"20"}]},{"type":"rule","selectors":[".p-b-20"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"20"}]},{"type":"rule","selectors":[".p-l-20"],"declarations":[{"type":"declaration","property":"padding-left","value":"20"}]},{"type":"rule","selectors":[".p-x-20"],"declarations":[{"type":"declaration","property":"padding-right","value":"20"},{"type":"declaration","property":"padding-left","value":"20"}]},{"type":"rule","selectors":[".p-y-20"],"declarations":[{"type":"declaration","property":"padding-top","value":"20"},{"type":"declaration","property":"padding-bottom","value":"20"}]},{"type":"rule","selectors":[".p-24"],"declarations":[{"type":"declaration","property":"padding","value":"24"}]},{"type":"rule","selectors":[".p-t-24"],"declarations":[{"type":"declaration","property":"padding-top","value":"24"}]},{"type":"rule","selectors":[".p-r-24"],"declarations":[{"type":"declaration","property":"padding-right","value":"24"}]},{"type":"rule","selectors":[".p-b-24"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"24"}]},{"type":"rule","selectors":[".p-l-24"],"declarations":[{"type":"declaration","property":"padding-left","value":"24"}]},{"type":"rule","selectors":[".p-x-24"],"declarations":[{"type":"declaration","property":"padding-right","value":"24"},{"type":"declaration","property":"padding-left","value":"24"}]},{"type":"rule","selectors":[".p-y-24"],"declarations":[{"type":"declaration","property":"padding-top","value":"24"},{"type":"declaration","property":"padding-bottom","value":"24"}]},{"type":"rule","selectors":[".p-25"],"declarations":[{"type":"declaration","property":"padding","value":"25"}]},{"type":"rule","selectors":[".p-t-25"],"declarations":[{"type":"declaration","property":"padding-top","value":"25"}]},{"type":"rule","selectors":[".p-r-25"],"declarations":[{"type":"declaration","property":"padding-right","value":"25"}]},{"type":"rule","selectors":[".p-b-25"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"25"}]},{"type":"rule","selectors":[".p-l-25"],"declarations":[{"type":"declaration","property":"padding-left","value":"25"}]},{"type":"rule","selectors":[".p-x-25"],"declarations":[{"type":"declaration","property":"padding-right","value":"25"},{"type":"declaration","property":"padding-left","value":"25"}]},{"type":"rule","selectors":[".p-y-25"],"declarations":[{"type":"declaration","property":"padding-top","value":"25"},{"type":"declaration","property":"padding-bottom","value":"25"}]},{"type":"rule","selectors":[".p-28"],"declarations":[{"type":"declaration","property":"padding","value":"28"}]},{"type":"rule","selectors":[".p-t-28"],"declarations":[{"type":"declaration","property":"padding-top","value":"28"}]},{"type":"rule","selectors":[".p-r-28"],"declarations":[{"type":"declaration","property":"padding-right","value":"28"}]},{"type":"rule","selectors":[".p-b-28"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"28"}]},{"type":"rule","selectors":[".p-l-28"],"declarations":[{"type":"declaration","property":"padding-left","value":"28"}]},{"type":"rule","selectors":[".p-x-28"],"declarations":[{"type":"declaration","property":"padding-right","value":"28"},{"type":"declaration","property":"padding-left","value":"28"}]},{"type":"rule","selectors":[".p-y-28"],"declarations":[{"type":"declaration","property":"padding-top","value":"28"},{"type":"declaration","property":"padding-bottom","value":"28"}]},{"type":"rule","selectors":[".p-30"],"declarations":[{"type":"declaration","property":"padding","value":"30"}]},{"type":"rule","selectors":[".p-t-30"],"declarations":[{"type":"declaration","property":"padding-top","value":"30"}]},{"type":"rule","selectors":[".p-r-30"],"declarations":[{"type":"declaration","property":"padding-right","value":"30"}]},{"type":"rule","selectors":[".p-b-30"],"declarations":[{"type":"declaration","property":"padding-bottom","value":"30"}]},{"type":"rule","selectors":[".p-l-30"],"declarations":[{"type":"declaration","property":"padding-left","value":"30"}]},{"type":"rule","selectors":[".p-x-30"],"declarations":[{"type":"declaration","property":"padding-right","value":"30"},{"type":"declaration","property":"padding-left","value":"30"}]},{"type":"rule","selectors":[".p-y-30"],"declarations":[{"type":"declaration","property":"padding-top","value":"30"},{"type":"declaration","property":"padding-bottom","value":"30"}]},{"type":"comment","comment":" Alignment "},{"type":"rule","selectors":[".text-left"],"declarations":[{"type":"declaration","property":"text-align","value":"left"}]},{"type":"rule","selectors":[".text-right"],"declarations":[{"type":"declaration","property":"text-align","value":"right"}]},{"type":"rule","selectors":[".text-center"],"declarations":[{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".text-lowercase"],"declarations":[{"type":"declaration","property":"text-transform","value":"lowercase"}]},{"type":"rule","selectors":[".text-uppercase"],"declarations":[{"type":"declaration","property":"text-transform","value":"uppercase"}]},{"type":"rule","selectors":[".text-capitalize"],"declarations":[{"type":"declaration","property":"text-transform","value":"capitalize"}]},{"type":"rule","selectors":[".font-weight-normal"],"declarations":[{"type":"declaration","property":"font-weight","value":"normal"}]},{"type":"rule","selectors":[".font-weight-bold"],"declarations":[{"type":"declaration","property":"font-weight","value":"bold"}]},{"type":"rule","selectors":[".font-italic"],"declarations":[{"type":"declaration","property":"font-style","value":"italic"}]},{"type":"comment","comment":"*\n * Font size\n * The following creates this pattern:\n * .t-10{font-size:10}\n * From 10, 12, 14, 15, 16, 17, 18, 19, 20\n*"},{"type":"rule","selectors":[".t-10"],"declarations":[{"type":"declaration","property":"font-size","value":"10"}]},{"type":"rule","selectors":[".t-12"],"declarations":[{"type":"declaration","property":"font-size","value":"12"}]},{"type":"rule","selectors":[".t-14"],"declarations":[{"type":"declaration","property":"font-size","value":"14"}]},{"type":"rule","selectors":[".t-15"],"declarations":[{"type":"declaration","property":"font-size","value":"15"}]},{"type":"rule","selectors":[".t-16"],"declarations":[{"type":"declaration","property":"font-size","value":"16"}]},{"type":"rule","selectors":[".t-17"],"declarations":[{"type":"declaration","property":"font-size","value":"17"}]},{"type":"rule","selectors":[".t-18"],"declarations":[{"type":"declaration","property":"font-size","value":"18"}]},{"type":"rule","selectors":[".t-19"],"declarations":[{"type":"declaration","property":"font-size","value":"19"}]},{"type":"rule","selectors":[".t-20"],"declarations":[{"type":"declaration","property":"font-size","value":"20"}]},{"type":"rule","selectors":[".t-25"],"declarations":[{"type":"declaration","property":"font-size","value":"25"}]},{"type":"rule","selectors":[".t-30"],"declarations":[{"type":"declaration","property":"font-size","value":"30"}]},{"type":"rule","selectors":[".t-36"],"declarations":[{"type":"declaration","property":"font-size","value":"36"}]},{"type":"rule","selectors":[".h1",".h2",".h3",".h4",".h5",".h6"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"4"},{"type":"declaration","property":"font-weight","value":"normal"},{"type":"declaration","property":"color","value":"#262626"}]},{"type":"rule","selectors":[".ns-dark .h1",".ns-dark .h2",".ns-dark .h3",".ns-dark .h4",".ns-dark .h5",".ns-dark .h6"],"declarations":[{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".body",".body2",".footnote"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"font-weight","value":"normal"}]},{"type":"rule","selectors":[".ns-dark .body",".ns-dark .body2",".ns-dark .footnote"],"declarations":[{"type":"declaration","property":"color","value":"#b3b3b3"}]},{"type":"rule","selectors":[".h1"],"declarations":[{"type":"declaration","property":"font-size","value":"32"}]},{"type":"rule","selectors":[".h2"],"declarations":[{"type":"declaration","property":"font-size","value":"22"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"font-size","value":"15"}]},{"type":"rule","selectors":[".h4"],"declarations":[{"type":"declaration","property":"font-size","value":"12"}]},{"type":"rule","selectors":[".h5"],"declarations":[{"type":"declaration","property":"font-size","value":"11"}]},{"type":"rule","selectors":[".h6"],"declarations":[{"type":"declaration","property":"font-size","value":"10"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"font-size","value":"14"}]},{"type":"rule","selectors":[".body2"],"declarations":[{"type":"declaration","property":"font-size","value":"17"}]},{"type":"rule","selectors":[".footnote"],"declarations":[{"type":"declaration","property":"font-size","value":"13"}]},{"type":"rule","selectors":[".img-thumbnail"],"declarations":[{"type":"declaration","property":"border-radius","value":"0"}]},{"type":"rule","selectors":[".invisible"],"declarations":[{"type":"declaration","property":"visibility","value":"collapse"}]},{"type":"rule","selectors":[".pull-left"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"left"}]},{"type":"rule","selectors":[".pull-right"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"right"}]},{"type":"rule","selectors":[".m-x-auto"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"}]},{"type":"rule","selectors":[".m-y-auto"],"declarations":[{"type":"declaration","property":"vertical-align","value":"center"}]},{"type":"rule","selectors":[".fa"],"declarations":[{"type":"declaration","property":"font-family","value":"FontAwesome, fontawesome-webfont"}]},{"type":"rule","selectors":[".ns-modal",".ns-root"],"declarations":[{"type":"declaration","property":"background-color","value":"#fff"},{"type":"declaration","property":"color","value":"#262626"},{"type":"declaration","property":"font-family","value":"sans-serif"},{"type":"declaration","property":"font-size","value":"12"}]},{"type":"rule","selectors":[".ns-dark.ns-modal",".ns-dark.ns-root"],"declarations":[{"type":"declaration","property":"background-color","value":"#303030"},{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".-hidden",".hidden"],"declarations":[{"type":"declaration","property":"visibility","value":"collapsed"}]},{"type":"rule","selectors":[".-rounded",".rounded"],"declarations":[{"type":"declaration","property":"border-radius","value":"4"}]},{"type":"rule","selectors":[".-circle"],"declarations":[{"type":"declaration","property":"border-radius","value":"50%"}]},{"type":"comment","comment":" Dividers "},{"type":"rule","selectors":[".hr"],"declarations":[{"type":"declaration","property":"height","value":"1"},{"type":"declaration","property":"width","value":"100%"},{"type":"declaration","property":"margin","value":"9 0 10"},{"type":"declaration","property":"border-width","value":"0 0 1"},{"type":"declaration","property":"border-style","value":"solid"}]},{"type":"rule","selectors":[".text-muted"],"declarations":[{"type":"declaration","property":"color","value":"#ace4ff"}]},{"type":"rule","selectors":[".ns-dark .text-muted"],"declarations":[{"type":"declaration","property":"color","value":"#446f83"}]},{"type":"rule","selectors":["Label > *","Label > * > *","Button > *","Button > * > *","TextField > *","TextField > * > *","TextView > *","TextView > * > *"],"declarations":[{"type":"declaration","property":"background-color","value":"transparent"}]},{"type":"rule","selectors":["ListView","RadListView"],"declarations":[{"type":"declaration","property":"min-height","value":"100"}]},{"type":"rule","selectors":["Image"],"declarations":[{"type":"declaration","property":"min-height","value":"20"}]},{"type":"rule","selectors":[".nt-icon"],"declarations":[{"type":"declaration","property":"font-size","value":"14"}]},{"type":"rule","selectors":["#login-background"],"declarations":[{"type":"declaration","property":"margin-top","value":"-20"},{"type":"declaration","property":"background-size","value":"cover"},{"type":"declaration","property":"background-position","value":"center"}]},{"type":"rule","selectors":[".login-wrap"],"declarations":[{"type":"declaration","property":"padding","value":"0 40"}]},{"type":"rule","selectors":[".logo-wrap"],"declarations":[{"type":"declaration","property":"margin","value":"60 0 10 0"},{"type":"declaration","property":"padding","value":"20 0"}]},{"type":"rule","selectors":[".logo-wrap .login-logo"],"declarations":[{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"font-size","value":"30"},{"type":"declaration","property":"font-weight","value":"bold"},{"type":"declaration","property":"margin-bottom","value":"10"},{"type":"declaration","property":"opacity","value":".9"}]},{"type":"rule","selectors":[".logo-wrap .login-logo-sub"],"declarations":[{"type":"declaration","property":"opacity","value":".8"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".login-wrapper"],"declarations":[{"type":"declaration","property":"padding","value":"20"},{"type":"declaration","property":"background-color","value":"#fff"},{"type":"declaration","property":"border-radius","value":"3"}]},{"type":"rule","selectors":[".login-wrapper TextField"],"declarations":[{"type":"declaration","property":"padding","value":"10 10"},{"type":"declaration","property":"margin","value":"10 0 0 0"}]},{"type":"rule","selectors":[".go-back"],"declarations":[{"type":"declaration","property":"font-size","value":"14"},{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"margin-top","value":"10"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"text-transform","value":"none"},{"type":"declaration","property":"border-color","value":"transparent"},{"type":"declaration","property":"min-width","value":"64"},{"type":"declaration","property":"height","value":"52"},{"type":"declaration","property":"padding","value":"0 5 0 5"},{"type":"declaration","property":"font-size","value":"14"},{"type":"declaration","property":"margin","value":"8 16 8 16"}]},{"type":"rule","selectors":[".ns-ios .btn"],"declarations":[{"type":"declaration","property":"height","value":"40"},{"type":"declaration","property":"border-width","value":"0"}]},{"type":"rule","selectors":[".ns-android .btn"],"declarations":[{"type":"declaration","property":"margin","value":"4 12"}]},{"type":"rule","selectors":[".btn-outline"],"declarations":[{"type":"declaration","property":"height","value":"40"},{"type":"declaration","property":"border-width","value":"1"}]},{"type":"rule","selectors":[".ns-android .btn-outline"],"declarations":[{"type":"declaration","property":"margin","value":"8 16"}]},{"type":"rule","selectors":[".btn-rounded-sm",".btn-rounded-lg"],"declarations":[{"type":"declaration","property":"height","value":"40"},{"type":"declaration","property":"border-radius","value":"4"}]},{"type":"rule","selectors":[".ns-android .btn-rounded-sm",".ns-android .btn-rounded-lg"],"declarations":[{"type":"declaration","property":"margin","value":"8 16"}]},{"type":"rule","selectors":[".btn-rounded-lg"],"declarations":[{"type":"declaration","property":"border-radius","value":"50%"}]},{"type":"rule","selectors":[".btn[isEnabled=false]"],"declarations":[{"type":"declaration","property":"opacity","value":"0.5"}]},{"type":"rule","selectors":[".btn-simple"],"declarations":[{"type":"declaration","property":"android-elevation","value":"0"},{"type":"declaration","property":"android-dynamic-elevation-offset","value":"0"}]},{"type":"rule","selectors":[".ns-root .btn-aqua.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#00caab"},{"type":"declaration","property":"color","value":"#00caab"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-aqua.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#00caab"},{"type":"declaration","property":"color","value":"#00caab"}]},{"type":"rule","selectors":[".ns-root .btn-aqua.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#fdffff"},{"type":"declaration","property":"background-color","value":"#00caab"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-aqua.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#fdffff"},{"type":"declaration","property":"background-color","value":"#00caab"}]},{"type":"rule","selectors":[".ns-root .btn-blue.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#3a53ff"},{"type":"declaration","property":"color","value":"#3a53ff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-blue.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#3a53ff"},{"type":"declaration","property":"color","value":"#3a53ff"}]},{"type":"rule","selectors":[".ns-root .btn-blue.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#3a53ff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-blue.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#3a53ff"}]},{"type":"rule","selectors":[".ns-root .btn-brown"],"declarations":[{"type":"declaration","property":"border-color","value":"#795548"},{"type":"declaration","property":"color","value":"#795548"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-brown"],"declarations":[{"type":"declaration","property":"border-color","value":"#795548"},{"type":"declaration","property":"color","value":"#795548"}]},{"type":"rule","selectors":[".ns-root .btn-brown.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#fbf9f8"},{"type":"declaration","property":"background-color","value":"#795548"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-brown.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#fbf9f8"},{"type":"declaration","property":"background-color","value":"#795548"}]},{"type":"rule","selectors":[".ns-root .btn-forest"],"declarations":[{"type":"declaration","property":"border-color","value":"#006968"},{"type":"declaration","property":"color","value":"#006968"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-forest"],"declarations":[{"type":"declaration","property":"border-color","value":"#006968"},{"type":"declaration","property":"color","value":"#006968"}]},{"type":"rule","selectors":[".ns-root .btn-forest.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#9cfffe"},{"type":"declaration","property":"background-color","value":"#006968"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-forest.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"#9cfffe"},{"type":"declaration","property":"background-color","value":"#006968"}]},{"type":"rule","selectors":[".ns-root .btn-grey"],"declarations":[{"type":"declaration","property":"border-color","value":"#5c687c"},{"type":"declaration","property":"color","value":"#5c687c"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-grey"],"declarations":[{"type":"declaration","property":"border-color","value":"#5c687c"},{"type":"declaration","property":"color","value":"#5c687c"}]},{"type":"rule","selectors":[".ns-root .btn-grey.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#5c687c"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-grey.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#5c687c"}]},{"type":"rule","selectors":[".ns-root .btn-lemon"],"declarations":[{"type":"declaration","property":"border-color","value":"#ffea00"},{"type":"declaration","property":"color","value":"#ffea00"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-lemon"],"declarations":[{"type":"declaration","property":"border-color","value":"#ffea00"},{"type":"declaration","property":"color","value":"#ffea00"}]},{"type":"rule","selectors":[".ns-root .btn-lemon.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#ffea00"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-lemon.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#ffea00"}]},{"type":"rule","selectors":[".ns-root .btn-lime"],"declarations":[{"type":"declaration","property":"border-color","value":"#aee406"},{"type":"declaration","property":"color","value":"#aee406"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-lime"],"declarations":[{"type":"declaration","property":"border-color","value":"#aee406"},{"type":"declaration","property":"color","value":"#aee406"}]},{"type":"rule","selectors":[".ns-root .btn-lime.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#aee406"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-lime.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#aee406"}]},{"type":"rule","selectors":[".ns-root .btn-orange"],"declarations":[{"type":"declaration","property":"border-color","value":"#f57c00"},{"type":"declaration","property":"color","value":"#f57c00"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-orange"],"declarations":[{"type":"declaration","property":"border-color","value":"#f57c00"},{"type":"declaration","property":"color","value":"#f57c00"}]},{"type":"rule","selectors":[".ns-root .btn-orange.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#f57c00"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-orange.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"background-color","value":"#f57c00"}]},{"type":"rule","selectors":[".ns-root .btn-purple"],"declarations":[{"type":"declaration","property":"border-color","value":"#8130ff"},{"type":"declaration","property":"color","value":"#8130ff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-purple"],"declarations":[{"type":"declaration","property":"border-color","value":"#8130ff"},{"type":"declaration","property":"color","value":"#8130ff"}]},{"type":"rule","selectors":[".ns-root .btn-purple.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#8130ff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-purple.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#8130ff"}]},{"type":"rule","selectors":[".ns-root .btn-ruby.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#ff1744"},{"type":"declaration","property":"color","value":"#ff1744"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-ruby.btn"],"declarations":[{"type":"declaration","property":"border-color","value":"#ff1744"},{"type":"declaration","property":"color","value":"#ff1744"}]},{"type":"rule","selectors":[".ns-root .btn-ruby.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#ff1744"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-ruby.btn.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#ff1744"}]},{"type":"rule","selectors":[".ns-root .btn-sky"],"declarations":[{"type":"declaration","property":"border-color","value":"#30bcff"},{"type":"declaration","property":"color","value":"#30bcff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-sky"],"declarations":[{"type":"declaration","property":"border-color","value":"#30bcff"},{"type":"declaration","property":"color","value":"#30bcff"}]},{"type":"rule","selectors":[".ns-root .btn-sky.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#30bcff"}]},{"type":"rule","selectors":[".ns-dark.ns-root .btn-sky.btn-primary"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#30bcff"}]},{"type":"rule","selectors":[".page"],"declarations":[{"type":"declaration","property":"color","value":"#262626"},{"type":"declaration","property":"background-color","value":"#fff"}]},{"type":"rule","selectors":[".ns-dark .page"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background-color","value":"#303030"}]},{"type":"rule","selectors":[".activity-indicator"],"declarations":[{"type":"declaration","property":"width","value":"30"},{"type":"declaration","property":"height","value":"30"}]},{"type":"rule","selectors":[".slider"],"declarations":[{"type":"declaration","property":"margin","value":"20 16"}]},{"type":"rule","selectors":[".ns-ios .slider"],"declarations":[{"type":"declaration","property":"margin","value":"10 15"}]},{"type":"rule","selectors":[".slider[isEnabled=false]"],"declarations":[{"type":"declaration","property":"background-color","value":"#e0e0e0"},{"type":"declaration","property":"color","value":"#e0e0e0"}]},{"type":"rule","selectors":[".ns-android .switch"],"declarations":[{"type":"declaration","property":"margin","value":"14 16"}]},{"type":"rule","selectors":[".ns-android .switch[isEnabled=false]"],"declarations":[{"type":"declaration","property":"color","value":"#e6e6e6"}]},{"type":"rule","selectors":[".ns-dark.ns-android .switch[isEnabled=false]"],"declarations":[{"type":"declaration","property":"color","value":"#4a4a4a"}]},{"type":"rule","selectors":[".ns-ios .switch"],"declarations":[{"type":"declaration","property":"margin","value":"8 15"}]},{"type":"rule","selectors":[".ns-ios .switch[isEnabled=false]"],"declarations":[{"type":"declaration","property":"background-color","value":"rgba(48, 188, 255, 0.4)"}]},{"type":"rule","selectors":[".ns-dark.ns-ios .switch[isEnabled=false]"],"declarations":[{"type":"declaration","property":"background-color","value":"rgba(99, 205, 255, 0.4)"}]},{"type":"rule","selectors":[".tab-view"],"declarations":[{"type":"declaration","property":"tab-text-font-size","value":"14"},{"type":"declaration","property":"text-transform","value":"capitalize"}]},{"type":"rule","selectors":[".list-group"],"declarations":[{"type":"declaration","property":"background-color","value":"transparent"}]},{"type":"rule","selectors":[".list-group StackLayout"],"declarations":[{"type":"declaration","property":"padding","value":"8"}]},{"type":"rule","selectors":[".list-group .list-group-item"],"declarations":[{"type":"declaration","property":"background-color","value":"transparent"},{"type":"declaration","property":"padding","value":"8"},{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":[".list-group .list-group-item Label"],"declarations":[{"type":"declaration","property":"padding","value":"5"},{"type":"declaration","property":"vertical-align","value":"center"}]},{"type":"rule","selectors":[".list-group .thumb"],"declarations":[{"type":"declaration","property":"stretch","value":"fill"},{"type":"declaration","property":"width","value":"40"},{"type":"declaration","property":"height","value":"40"},{"type":"declaration","property":"min-height","value":"0"},{"type":"declaration","property":"margin-right","value":"16"}]},{"type":"rule","selectors":[".list-group .list-group-item-heading"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"5"}]},{"type":"rule","selectors":[".list-group .list-group-item-text"],"declarations":[{"type":"declaration","property":"font-size","value":"10"}]},{"type":"rule","selectors":[".list-group .nt-icon"],"declarations":[{"type":"declaration","property":"font-size","value":"16"},{"type":"declaration","property":"width","value":"56"},{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":["RadListView > StackLayout"],"declarations":[{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":["RadListView > * > *"],"declarations":[{"type":"declaration","property":"background-color","value":"transparent"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-left .sidedrawer-header-brand",".side-drawer .sidedrawer-left .sidedrawer-header-image"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"left"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-list-item .sidedrawer-list-item-icon"],"declarations":[{"type":"declaration","property":"margin","value":"0 16 0 16"},{"type":"declaration","property":"padding-top","value":"6"},{"type":"declaration","property":"width","value":"24"},{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"font-size","value":"16"},{"type":"declaration","property":"height","value":"48"},{"type":"declaration","property":"vertical-align","value":"center"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-list-item-text"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"left"},{"type":"declaration","property":"text-align","value":"left"},{"type":"declaration","property":"background-color","value":"transparent"},{"type":"declaration","property":"border-width","value":"0"},{"type":"declaration","property":"width","value":"80%"},{"type":"declaration","property":"vertical-align","value":"center"},{"type":"declaration","property":"padding-left","value":"15"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header"],"declarations":[{"type":"declaration","property":"width","value":"100%"},{"type":"declaration","property":"vertical-align","value":"top"},{"type":"declaration","property":"padding","value":"35 0"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header Label"],"declarations":[{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header > Label"],"declarations":[{"type":"declaration","property":"font-size","value":"18"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header-image"],"declarations":[{"type":"declaration","property":"height","value":"74"},{"type":"declaration","property":"width","value":"74"},{"type":"declaration","property":"border-radius","value":"50%"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header-footnote"],"declarations":[{"type":"declaration","property":"opacity","value":".5"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-header > Label",".side-drawer .sidedrawer-header-image"],"declarations":[{"type":"declaration","property":"margin-left","value":"15"},{"type":"declaration","property":"margin-right","value":"15"},{"type":"declaration","property":"horizontal-align","value":"center"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-list-item"],"declarations":[{"type":"declaration","property":"padding-left","value":"15"},{"type":"declaration","property":"height","value":"48"},{"type":"declaration","property":"horizontal-align","value":"left"},{"type":"declaration","property":"width","value":"100%"},{"type":"declaration","property":"orientation","value":"horizontal"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-list-item Label"],"declarations":[{"type":"declaration","property":"vertical-align","value":"center"}]},{"type":"rule","selectors":[".side-drawer .sidedrawer-list-item .nt-icon"],"declarations":[{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"width","value":"30"}]},{"type":"rule","selectors":[".side-drawer.ns-dark .sidedrawer-left",".side-drawer.ns-dark .sidedrawer-center"],"declarations":[{"type":"declaration","property":"color","value":"white"},{"type":"declaration","property":"background","value":"#303030"}]},{"type":"rule","selectors":[".side-drawer.ns-dark .sidedrawer-list-item.active"],"declarations":[{"type":"declaration","property":"color","value":"#c1c1c1"},{"type":"declaration","property":"background-color","value":"rgba(99, 205, 255, 0.15)"}]},{"type":"rule","selectors":[".side-drawer.ns-dark .sidedrawer-list-item.active .side-drawer.ns-dark .sidedrawer-list-item-icon"],"declarations":[{"type":"declaration","property":"color","value":"#c1c1c1"}]},{"type":"rule","selectors":[".side-drawer.ns-dark .sidedrawer-header"],"declarations":[{"type":"declaration","property":"background-color","value":"#1e1e1e"}]},{"type":"rule","selectors":[".side-drawer.ns-dark .sidedrawer-header Label"],"declarations":[{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".form"],"declarations":[{"type":"declaration","property":"padding","value":"16 0 10"}]},{"type":"rule","selectors":[".form .-center"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"}]},{"type":"rule","selectors":[".form .nt-form__or-separator"],"declarations":[{"type":"declaration","property":"margin","value":"20 0"}]},{"type":"rule","selectors":[".form .nt-form__logo"],"declarations":[{"type":"declaration","property":"margin","value":"20 0"},{"type":"declaration","property":"width","value":"50%"}]},{"type":"rule","selectors":[".form .nt-form__validation-message"],"declarations":[{"type":"declaration","property":"margin","value":"1 0 0"},{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"height","value":"19"}]},{"type":"rule","selectors":[".form .nt-form__footer"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"horizontal-align","value":"center"}]},{"type":"rule","selectors":[".form .nt-form__footer Button"],"declarations":[{"type":"declaration","property":"width","value":"50%"},{"type":"declaration","property":"margin","value":"5"}]},{"type":"comment","comment":" Form Validation styling "},{"type":"rule","selectors":[".input.ng-valid"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"20"}]},{"type":"rule","selectors":[".input.ng-invalid.ng-dirty"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"0"},{"type":"declaration","property":"border-color","value":"#d50000"}]},{"type":"comment","comment":" Form fields "},{"type":"rule","selectors":[".input"],"declarations":[{"type":"declaration","property":"border-width","value":"0 0 1"},{"type":"declaration","property":"border-radius","value":"0"},{"type":"declaration","property":"background-color","value":"transparent"},{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"padding","value":"8 0 4"},{"type":"declaration","property":"margin","value":"5 16"}]},{"type":"rule","selectors":[".input.input-rounded",".input.input-border"],"declarations":[{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"padding","value":"12 14"}]},{"type":"rule","selectors":[".input.input-border"],"declarations":[{"type":"declaration","property":"border-radius","value":"4"}]},{"type":"rule","selectors":[".input.input-rounded"],"declarations":[{"type":"declaration","property":"border-radius","value":"50%"}]},{"type":"rule","selectors":[".input[isEnabled=false]"],"declarations":[{"type":"declaration","property":"opacity","value":"0.5"}]},{"type":"rule","selectors":["TextView[editable=false]"],"declarations":[{"type":"declaration","property":"border-width","value":"0"}]},{"type":"rule","selectors":["Label","DataFormEditorLabel"],"declarations":[{"type":"declaration","property":"padding","value":"2 0"}]},{"type":"rule","selectors":["TextView"],"declarations":[{"type":"declaration","property":"min-height","value":"100"}]},{"type":"rule","selectors":["RadAutoCompleteTextView[displayMode=Tokens]"],"declarations":[{"type":"declaration","property":"padding","value":"4 0 8"}]},{"type":"rule","selectors":["RadAutoCompleteTextView Token"],"declarations":[{"type":"declaration","property":"border-radius","value":"50%"}]},{"type":"rule","selectors":[".ns-android TokenClearButton"],"declarations":[{"type":"declaration","property":"width","value":"18"},{"type":"declaration","property":"height","value":"18"},{"type":"declaration","property":"border-radius","value":"50%"},{"type":"declaration","property":"opacity","value":".6"}]},{"type":"comment","comment":" Date Picker "},{"type":"rule","selectors":["PickerField","DatePickerField","TimePickerField","DateTimePickerFields","DataFormEditorCore","RadAutoCompleteTextView"],"declarations":[{"type":"declaration","property":"background-repeat","value":"no-repeat"},{"type":"declaration","property":"background-position","value":"right center"}]},{"type":"rule","selectors":[".ns-ios PickerField",".ns-ios\n DatePickerField",".ns-ios\n TimePickerField",".ns-ios\n DateTimePickerFields",".ns-ios\n DataFormEditorCore",".ns-ios\n RadAutoCompleteTextView"],"declarations":[{"type":"declaration","property":"background-size","value":"28 16"}]},{"type":"rule","selectors":["PropertyEditor[type='Date'] DataFormEditorCore","DatePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAAD1BMVEVHcEwAAAAAAAAAAAAAAADTrAj/AAAABHRSTlMAwBAgU5DCQwAAAFdJREFUSMdjYCAVuLi4oDHop5RJxAUDOCpgVcroggUIYFXKgk2pMw6lChhudXHAoZSBVkrRw26EKcUC6Kt0NAoGkVIWaFSNKh25Sgd7QURCZURCFUcLAAC2I2hEECBYPgAAAABJRU5ErkJggg==\")"}]},{"type":"comment","comment":" Time Picker "},{"type":"rule","selectors":["PropertyEditor[type='Time'] DataFormEditorCore","TimePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAALVBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACttl6nAAAADnRSTlMAYOBAwCAQ0FCAcPCwoEZwdhsAAAE2SURBVEjHY2AYLIB1Td27d89PBRBWyQhUCALPBQiq1HsHBY8IqGX1e/fuyWRjY0sQjd8N3e/eKSaAGGxC797twGs9UCWMDVSLzwly794mwNhs9949xK2SA8UgoBUNOJVGo5oj924rTqV+EEP53sGMfYLbU28ZkJUy3MPpMaZ3aqhKk94p4PS/AKpSRpxhUPeIAVUpg95zHJEKMwOhVO4d9sjlevcMXWneuwVYlfK8c0BXyvLuAI4AmICulPNdAValfO8M0JVyvHtArFJmqiqFACopbSBWKTsssBAAV2DBowABcEUBPGIRAFfEsmImOVzJBZ4IEQBXIoQnbaQc9JBAhoED3BkGlg3hAHc2hGVuhNYn1CgySCiISCjeSCk0SSiKIQX8DGPjTsIFPAnVBimVESlV3IABAKDkz5jHIcToAAAAAElFTkSuQmCC\")"}]},{"type":"comment","comment":" Date/Time Picker "},{"type":"rule","selectors":["DateTimePickerFields"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAwBAMAAAB3UCypAAAALVBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACttl6nAAAADnRSTlMAQGDgwBAg0FCAcPCwoM9Ie+kAAAGcSURBVEjH5Ze/TsMwEMZD2pQWVRUZu0VijxASa8UTVJXYUXYWniDqilhgY+QBmBEjMw9RtTQlU79nICRyrDjxxYkdqYhviYe7X87/7s6WlQqAMDCgPwF15igpWhAOg9cQiD8DCtpHha7k9naYmcQeAZ1UQb/lzBmz2XoUdFFaU2ykc08WK3py3envNyCgVgPoA3CRLrhzBrybgdoJk40TqkdCxRMmg/rY5wfDWeHLBHRYCC4Je2kAeluMzcebAeg8C5S52Ij0oTb2RZeVbKsaQHu4LLpc47zBjdpI9t4rQm3Z/jeAhltxcrNYFzpgcXGoj0BzTU+wE11u8KIJHbOMyF36+NCE9vAouowk268OneBUdBlibR56dPDQTAcMXbaBZtZrCfSYHSmuEe40oeNyO6By+Glofk25VK4pDR2UE51KQqGheerjkqc+ZagvVg8iSStDWTnJRZQTZSgrfLmUCl8NlJVo/hOVEl0HbdVM1EFbtT110E4atG5ayUZNrzI0bc+fXfe+rj2v0E7zIdHJk6eTx5nluCUF1j/RDxQQPw3i9N+zAAAAAElFTkSuQmCC\")"}]},{"type":"rule","selectors":[".ns-ios DateTimePickerFields"],"declarations":[{"type":"declaration","property":"background-size","value":"56 16"}]},{"type":"rule","selectors":["DateTimePickerFields .input","DateTimePickerFields DatePickerField","DateTimePickerFields TimePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"none"},{"type":"declaration","property":"border-width","value":"0"},{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":[".ns-dark DateTimePickerFields .input",".ns-dark\n DateTimePickerFields DatePickerField",".ns-dark\n DateTimePickerFields TimePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"none"},{"type":"declaration","property":"background-color","value":"transparent"}]},{"type":"rule","selectors":["DateTimePickerFields TimePickerField"],"declarations":[{"type":"declaration","property":"margin-left","value":"-30"}]},{"type":"comment","comment":" Picker "},{"type":"rule","selectors":["PickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAAGFBMVEVHcEwAAAAAAAAAAAAAAAAAAAAAAAAAAABoAtTLAAAAB3RSTlMAoPAw0BAgCEJU4wAAAEpJREFUSMdjYBgFgwUwChCtVLyQaEPLy4k1Nqm8nFhjmdWJN9Zo1NghZiwJSol3wKihA2ooCZk7hPj0x+pOdEHEEEJ88TYKBgoAAAC5JRg49rIWAAAAAElFTkSuQmCC\")"}]},{"type":"rule","selectors":["PickerPage.input"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":["PickerPage ListView"],"declarations":[{"type":"declaration","property":"separator-color","value":"transparent"}]},{"type":"rule","selectors":["PickerPage ListView > *"],"declarations":[{"type":"declaration","property":"height","value":"48"},{"type":"declaration","property":"margin-top","value":"0"},{"type":"declaration","property":"padding","value":"10 12"},{"type":"declaration","property":"border-bottom-width","value":"1px"}]},{"type":"rule","selectors":[".ns-dark PickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAYUExURUdwTP///////////////////////////x1LVb4AAAAHdFJOUwCg8DDQECAIQlTjAAAASklEQVRIx2NgGAWDBTAKEK1UvJBoQ8vLiTU2qbycWGOZ1Yk31mjU2CFmLAlKiXfAqKEDaigJmTuE+PTH6k50QcQQQnzxNgoGCgAAALklGDj2shYAAAAASUVORK5CYII=\")"}]},{"type":"rule","selectors":[".ns-dark DatePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAPUExURUdwTP///////////////xPgMRoAAAAEdFJOUwDAECBTkMJDAAAAV0lEQVRIx2NgIBW4uLigMeinlEnEBQM4KmBVyuiCBQhgVcqCTakzDqUKGG51ccChlIFWStHDboQpxQLoq3Q0CgaRUhZoVI0qHblKB3tBREJlREIVRwsAALYjaEQQIFg+AAAAAElFTkSuQmCC\")"}]},{"type":"rule","selectors":[".ns-dark TimePickerField"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAAwBAMAAAB9IEC+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTP///////////////////////////////////////////////////////81e3QIAAAAOdFJOUwBg4EDAIBDQUHDwsKCA4isvJAAAATZJREFUSMdjYBgsgHV23bt3z3cGEFbJCFQIAs8FCKrUewcFjwioZfV79+7JZWNjWxCN3w1d794pJoAYbELv3q3Aaz1QJYwNVIvPCXLv3iTA2Gzn3j3ErZIDxSCgFQ04lUahmiP3bilOpX4QQ/newYx9gttTbxiQlTKcw+kxpndqqEqT3ing9L8AqlJGnGFQ94gBVSmD3nMckQozA6FU7h32yOV89wxdad67CViVcr9zQFfK8m4DjgC4gK6U910BVqV87wzQlXK8e0CsUmaqKoUAKiltIFYpOyywEABXYMGjAAFwRQE8YhEAV8SyYiY5XMkFnggRAFcihCdtpBz0kECGgQPcGQaWDeEAdzaEZW6E1ifUKDJIKIhIKN5IKTRJKIohBfwNY+NewgU8CdUGKZURKVXcgAEAq1LPmF1qDewAAAAASUVORK5CYII=\")"}]},{"type":"rule","selectors":[".ns-dark DateTimePickerFields"],"declarations":[{"type":"declaration","property":"background-image","value":"url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKgAAAAwBAMAAAB3UCypAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUdwTP///////////////////////////////////////////////////////81e3QIAAAAOdFJOUwBAYODAECDQUHDwsKCAaxMi1gAAAZxJREFUSMfll89Kw0AQxmPa1EppMQ9QCHgPIngtPkEpeJecPfkEoWdB8O5dPHr1JYrePLY2NZfyPYMxYbNkk51sshuo+F2yh5lfZv/NzFpWKgDCwID+BNSZo6RoQTgMnkIgfgsoaB8VupLb22FmEnsEdFIF/ZYzZ8xm61HQRWlNsZHOPVms6MN1p7/fgIBaDaD3wEW64M4Z8GIGaidMNk6oHgkVT5gM6mOfHwxnhS8T0GEhuCTspQHobTE2H88GoPMsUOZiI9KH2tgXXVayrWoA7eGy6HKN8wY3aiPZe68ItWX73wAabsXJzWJd6IDFxaE+As01PcFOdLnBoyZ0xDIid+njVRPaw7voMpZsvzp0glPRZYi1eejRwUMzHTB02QaaWa8l0GN2pLjGuNOEjsrtgMrhp6H5NeVSuaY0dFBOdCoJhYbmqY9LnvqUob5YPYgkrQxl5SQXUU6Uoazw5VIqfDVQVqL5T1RKdB20VTNRB23V9tRBO2nQumklGzW9ytC0Pf903Ye69rxCO82HRCdPnk4eZ5bjlhRY/0Q/Hn4/DfXSncYAAAAASUVORK5CYII=\")"}]},{"type":"rule","selectors":[".ns-dark PickerField",".ns-dark DatePickerField",".ns-dark TimePickerField",".ns-dark DateTimePickerFields",".ns-dark RadAutoCompleteTextView"],"declarations":[{"type":"declaration","property":"class","value":"ns-dark"}]},{"type":"rule","selectors":["RadDataForm PropertyEditor"],"declarations":[{"type":"declaration","property":"padding","value":"5 0 0"}]},{"type":"rule","selectors":[".input-field"],"declarations":[{"type":"declaration","property":"margin","value":"10 0"}]},{"type":"rule","selectors":["DataFormEditorLabel",".input-field .label"],"declarations":[{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"color","value":"#bababa"}]},{"type":"rule","selectors":["DataFormEditorLabel",".input-field .label",".input-field .input"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":[".input-field.input-sides"],"declarations":[{"type":"declaration","property":"margin","value":"0 0 10"}]},{"type":"rule","selectors":[".input-field.input-sides .label"],"declarations":[{"type":"declaration","property":"margin","value":"5 16"}]},{"type":"rule","selectors":[".action-bar"],"declarations":[{"type":"declaration","property":"font-size","value":"14"}]},{"type":"rule","selectors":[".ns-ios .action-bar"],"declarations":[{"type":"declaration","property":"margin-left","value":"20"},{"type":"declaration","property":"vertical-align","value":"stretch"},{"type":"declaration","property":"horizontal-align","value":"stretch"}]},{"type":"rule","selectors":[".ns-landscape.ns-ios .action-bar"],"declarations":[{"type":"declaration","property":"margin-left","value":"100"},{"type":"declaration","property":"padding","value":"0 5"}]},{"type":"rule","selectors":[".action-bar .action-item"],"declarations":[{"type":"declaration","property":"android-elevation","value":"0"},{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"padding","value":"12 10 12 0"},{"type":"declaration","property":"margin","value":"0"},{"type":"declaration","property":"min-width","value":"0"},{"type":"declaration","property":"width","value":"auto"},{"type":"declaration","property":"border-width","value":"0"},{"type":"declaration","property":"text-transform","value":"none"},{"type":"declaration","property":"font-weight","value":"normal"}]},{"type":"rule","selectors":[".action-bar .action-item:active"],"declarations":[{"type":"declaration","property":"opacity","value":".7"}]},{"type":"rule","selectors":[".action-bar > Label"],"declarations":[{"type":"declaration","property":"font-weight","value":"bold"},{"type":"declaration","property":"font-size","value":"14"}]},{"type":"rule","selectors":[".ns-statusbar-transparent Page > .action-bar"],"declarations":[{"type":"declaration","property":"padding-top","value":"24"}]},{"type":"rule","selectors":[".ns-android__19.ns-statusbar-transparent Page > .action-bar",".ns-modal.ns-statusbar-transparent Page > .action-bar"],"declarations":[{"type":"declaration","property":"padding-top","value":"0"}]},{"type":"rule","selectors":[".ns-android .action-bar .btn"],"declarations":[{"type":"declaration","property":"padding","value":"0 6"}]},{"type":"rule","selectors":[".ns-android .action-bar > Label"],"declarations":[{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".action-bar .action-bar-title"],"declarations":[{"type":"declaration","property":"font-size","value":"14"},{"type":"declaration","property":"vertical-align","value":"center"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".action-bar > GridLayout"],"declarations":[{"type":"declaration","property":"width","value":"100%"},{"type":"declaration","property":"height","value":"100%"}]},{"type":"rule","selectors":[".action-bar > GridLayout > StackLayout"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"horizontal-align","value":"left"}]},{"type":"rule","selectors":[".action-bar > GridLayout Button"],"declarations":[{"type":"declaration","property":"padding","value":"12 10"},{"type":"declaration","property":"horizontal-align","value":"left"}]},{"type":"rule","selectors":[".action-bar > GridLayout [col=\"2\"]"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"right"}]},{"type":"rule","selectors":[".ns-android .action-bar > GridLayout"],"declarations":[{"type":"declaration","property":"padding","value":"0 4"}]},{"type":"rule","selectors":[".ns-android .action-bar > GridLayout Button"],"declarations":[{"type":"declaration","property":"padding","value":"12 16"},{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":[".ns-modal",".ns-root"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"}]},{"type":"rule","selectors":["Button"],"declarations":[{"type":"declaration","property":"color","value":"#e95526"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-SemiBold'"},{"type":"declaration","property":"font-weight","value":"500"},{"type":"declaration","property":"border-radius","value":"8"},{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"height","value":"42"},{"type":"declaration","property":"z-index","value":"0"}]},{"type":"rule","selectors":[".btn.libre-orange"],"declarations":[{"type":"declaration","property":"background-color","value":"rgba(233, 85, 38, 0.1)"},{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".btn.primary-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#cf4520"},{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".btn.split-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#c9c9c9"},{"type":"declaration","property":"color","value":"black"}]},{"type":"rule","selectors":[".btn.disabled-light"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"},{"type":"declaration","property":"font-weight","value":"300"},{"type":"declaration","property":"background-color","value":"#e6e5e4"},{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"}]},{"type":"rule","selectors":[".bsm"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".bmd"],"declarations":[{"type":"declaration","property":"width","value":"40%"}]},{"type":"rule","selectors":[".blg"],"declarations":[{"type":"declaration","property":"width","value":"90%"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"},{"type":"declaration","property":"font-weight","value":"300"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"}]},{"type":"rule","selectors":[".body.black-2"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".body.black-3"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.8)"}]},{"type":"rule","selectors":[".body.orange-1"],"declarations":[{"type":"declaration","property":"color","value":"#e95526"}]},{"type":"rule","selectors":[".body.orange-2"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".bold"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-SemiBold'"},{"type":"declaration","property":"font-weight","value":"500"},{"type":"declaration","property":"color","value":"black"}]},{"type":"rule","selectors":[".sm"],"declarations":[{"type":"declaration","property":"font-size","value":"13"}]},{"type":"rule","selectors":[".md"],"declarations":[{"type":"declaration","property":"font-size","value":"16"}]},{"type":"rule","selectors":[".lg"],"declarations":[{"type":"declaration","property":"font-size","value":"18"}]},{"type":"rule","selectors":[".xlg"],"declarations":[{"type":"declaration","property":"font-size","value":"20"}]},{"type":"rule","selectors":[".floatLabel"],"declarations":[{"type":"declaration","property":"font-size","value":"18"}]},{"type":"rule","selectors":[".floatLabel.label"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"}]},{"type":"rule","selectors":[".floatLabel.textField"],"declarations":[{"type":"declaration","property":"border-bottom-color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"border-bottom-width","value":".1"},{"type":"declaration","property":"color","value":"black"}]},{"type":"rule","selectors":[".floatLabel.textField.gray-4"],"declarations":[{"type":"declaration","property":"color","value":"#c9c9c9"}]},{"type":"rule","selectors":[".h2"],"declarations":[{"type":"declaration","property":"font-size","value":"24"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".h2.center-light"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"},{"type":"declaration","property":"font-weight","value":"300"},{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.8)"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-SemiBold'"},{"type":"declaration","property":"font-weight","value":"500"},{"type":"declaration","property":"color","value":"black"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"},{"type":"declaration","property":"font-weight","value":"300"},{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".flex-row"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row"},{"type":"declaration","property":"flex-wrap","value":"wrap"}]},{"type":"rule","selectors":[".flex-col"],"declarations":[{"type":"declaration","property":"flex-direction","value":"column"},{"type":"declaration","property":"flex-wrap","value":"wrap"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"font-family","value":"\"LibreLinkUp\""}]},{"type":"rule","selectors":[".icfont.black"],"declarations":[{"type":"declaration","property":"color","value":"black"}]},{"type":"rule","selectors":[".icfont.gray"],"declarations":[{"type":"declaration","property":"color","value":"#757575"}]},{"type":"rule","selectors":[".icfont.orange"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".icfont.icxxsm"],"declarations":[{"type":"declaration","property":"font-size","value":"8"}]},{"type":"rule","selectors":[".icfont.icxsm"],"declarations":[{"type":"declaration","property":"font-size","value":"16"}]},{"type":"rule","selectors":[".icfont.icsm"],"declarations":[{"type":"declaration","property":"font-size","value":"20"}]},{"type":"rule","selectors":[".icfont.icmd"],"declarations":[{"type":"declaration","property":"font-size","value":"28"}]},{"type":"rule","selectors":[".icfont.iclg"],"declarations":[{"type":"declaration","property":"font-size","value":"32"}]},{"type":"rule","selectors":[".icfont.icxlg"],"declarations":[{"type":"declaration","property":"font-size","value":"40"}]},{"type":"rule","selectors":[".icfont.icxxlg"],"declarations":[{"type":"declaration","property":"font-size","value":"60"}]},{"type":"rule","selectors":[".trend-0",".trend[trend='0']"],"declarations":[{"type":"declaration","property":"background-color","value":"#e8e8e8"}]},{"type":"rule","selectors":[".trend-1",".trend[trend='1']"],"declarations":[{"type":"declaration","property":"background-color","value":"#ebf6db"}]},{"type":"rule","selectors":[".trend-2",".trend[trend='2']"],"declarations":[{"type":"declaration","property":"background-color","value":"#fff2d0"}]},{"type":"rule","selectors":[".trend-3",".trend[trend='3']"],"declarations":[{"type":"declaration","property":"background-color","value":"#ffe3cb"}]},{"type":"rule","selectors":[".trend-4",".trend[trend='4']"],"declarations":[{"type":"declaration","property":"background-color","value":"#fcd9da"}]},{"type":"rule","selectors":[".trend-border-0",".severity-0",".severity-color[severity='0']"],"declarations":[{"type":"declaration","property":"background-color","value":"#757575"}]},{"type":"rule","selectors":[".trend-border-1",".severity-1",".severity-color[severity='1']"],"declarations":[{"type":"declaration","property":"background-color","value":"#8fcb3a"}]},{"type":"rule","selectors":[".trend-border-2",".severity-2",".severity-color[severity='2']"],"declarations":[{"type":"declaration","property":"background-color","value":"#ffbc04"}]},{"type":"rule","selectors":[".trend-border-3",".severity-3",".severity-color[severity='3']"],"declarations":[{"type":"declaration","property":"background-color","value":"#ef6c00"}]},{"type":"rule","selectors":[".trend-border-4",".severity-4",".severity-color[severity='4']"],"declarations":[{"type":"declaration","property":"background-color","value":"#ed1c24"}]},{"type":"rule","selectors":[".btm-border"],"declarations":[{"type":"declaration","property":"border-top-width","value":"1"},{"type":"declaration","property":"border-color","value":"#c9c9c9"}]},{"type":"rule","selectors":[".btm-section"],"declarations":[{"type":"declaration","property":"background-color","value":"#f9f9f9"},{"type":"declaration","property":"border-top-color","value":"#f9f9f9"},{"type":"declaration","property":"border-top-width","value":"1"}]},{"type":"rule","selectors":[".text-container"],"declarations":[{"type":"declaration","property":"margin","value":"20 20"}]},{"type":"rule","selectors":[".ns-modal.ns-dark Page",".ns-modal.ns-dark .bg-section-1",".ns-root.ns-dark Page",".ns-root.ns-dark .bg-section-1"],"declarations":[{"type":"declaration","property":"background","value":"#111111"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .bg-section-2",".ns-root.ns-dark .bg-section-2"],"declarations":[{"type":"declaration","property":"background","value":"#111111"}]},{"type":"rule","selectors":[".ns-modal.ns-dark #actionBar",".ns-root.ns-dark #actionBar"],"declarations":[{"type":"declaration","property":"background-color","value":"#242424"},{"type":"declaration","property":"color","value":"#e95526"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .body.black-1",".ns-modal.ns-dark .body.black-2",".ns-root.ns-dark .body.black-1",".ns-root.ns-dark .body.black-2"],"declarations":[{"type":"declaration","property":"color","value":"rgba(255, 255, 255, 0.6)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .body.black-3",".ns-modal.ns-dark .h2",".ns-modal.ns-dark .regulatory-message",".ns-root.ns-dark .body.black-3",".ns-root.ns-dark .h2",".ns-root.ns-dark .regulatory-message"],"declarations":[{"type":"declaration","property":"color","value":"rgba(255, 255, 255, 0.8)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .bold",".ns-root.ns-dark .bold"],"declarations":[{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .bold.sm",".ns-root.ns-dark .bold.sm"],"declarations":[{"type":"declaration","property":"color","value":"rgba(255, 255, 255, 0.8)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btm-border",".ns-root.ns-dark .btm-border"],"declarations":[{"type":"declaration","property":"border-color","value":"#494949"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btm-section",".ns-root.ns-dark .btm-section"],"declarations":[{"type":"declaration","property":"background-color","value":"#222222"},{"type":"declaration","property":"border-top-color","value":"#222222"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btn.libre-orange",".ns-root.ns-dark .btn.libre-orange"],"declarations":[{"type":"declaration","property":"background-color","value":"rgba(233, 85, 38, 0.6)"},{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btn.primary-light",".ns-root.ns-dark .btn.primary-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#e95526"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btn.split-light",".ns-root.ns-dark .btn.split-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#757575"},{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .btn.disabled-light",".ns-root.ns-dark .btn.disabled-light"],"declarations":[{"type":"declaration","property":"background-color","value":"rgba(0, 0, 0, 0.8)"},{"type":"declaration","property":"border-color","value":"#464646"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"color","value":"#464646"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .card-status.off",".ns-root.ns-dark .card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(255, 255, 255, 0.6)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .card-status.on",".ns-root.ns-dark .card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#e95526"}]},{"type":"rule","selectors":[".ns-modal.ns-dark #connection-card",".ns-modal.ns-dark #drawer-content",".ns-modal.ns-dark .notification-card",".ns-modal.ns-dark #getting-started-banner",".ns-modal.ns-dark #safety-banner",".ns-root.ns-dark #connection-card",".ns-root.ns-dark #drawer-content",".ns-root.ns-dark .notification-card",".ns-root.ns-dark #getting-started-banner",".ns-root.ns-dark #safety-banner"],"declarations":[{"type":"declaration","property":"background-color","value":"#222222"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .connection-text-block",".ns-root.ns-dark .connection-text-block"],"declarations":[{"type":"declaration","property":"background","value":"#111111"},{"type":"declaration","property":"border-color","value":"#464646"}]},{"type":"rule","selectors":[".ns-modal.ns-dark #countryDropdown",".ns-modal.ns-dark .h3",".ns-root.ns-dark #countryDropdown",".ns-root.ns-dark .h3"],"declarations":[{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .floatLabel.label",".ns-root.ns-dark .floatLabel.label"],"declarations":[{"type":"declaration","property":"color","value":"rgba(255, 255, 255, 0.6)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .floatLabel.textField",".ns-root.ns-dark .floatLabel.textField"],"declarations":[{"type":"declaration","property":"border-bottom-color","value":"rgba(255, 255, 255, 0.6)"},{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .floatLabel.textField.gray-4",".ns-root.ns-dark .floatLabel.textField.gray-4"],"declarations":[{"type":"declaration","property":"color","value":"#494949"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .help-card",".ns-root.ns-dark .help-card"],"declarations":[{"type":"declaration","property":"border-bottom-color","value":"rgba(255, 255, 255, 0.6)"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .icfont.black",".ns-root.ns-dark .icfont.black"],"declarations":[{"type":"declaration","property":"color","value":"white"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .icfont.gray",".ns-root.ns-dark .icfont.gray"],"declarations":[{"type":"declaration","property":"color","value":"#909090"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .icfont.orange",".ns-root.ns-dark .icfont.orange"],"declarations":[{"type":"declaration","property":"color","value":"#e95526"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .trend-0",".ns-modal.ns-dark .trend[trend='0']",".ns-root.ns-dark .trend-0",".ns-root.ns-dark .trend[trend='0']"],"declarations":[{"type":"declaration","property":"background-color","value":"#424242"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .trend-1",".ns-modal.ns-dark .trend[trend='1']",".ns-root.ns-dark .trend-1",".ns-root.ns-dark .trend[trend='1']"],"declarations":[{"type":"declaration","property":"background-color","value":"#1f2d0c"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .trend-2",".ns-modal.ns-dark .trend[trend='2']",".ns-root.ns-dark .trend-2",".ns-root.ns-dark .trend[trend='2']"],"declarations":[{"type":"declaration","property":"background-color","value":"#372800"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .trend-3",".ns-modal.ns-dark .trend[trend='3']",".ns-root.ns-dark .trend-3",".ns-root.ns-dark .trend[trend='3']"],"declarations":[{"type":"declaration","property":"background-color","value":"#321700"}]},{"type":"rule","selectors":[".ns-modal.ns-dark .trend-4",".ns-modal.ns-dark .trend[trend='4']",".ns-root.ns-dark .trend-4",".ns-root.ns-dark .trend[trend='4']"],"declarations":[{"type":"declaration","property":"background-color","value":"#390406"}]},{"type":"rule","selectors":[".debug"],"declarations":[{"type":"declaration","property":"background-color","value":"yellow"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"border-color","value":"red"}]},{"type":"rule","selectors":["#librelinkLogo[lang='ar']"],"declarations":[{"type":"declaration","property":"height","value":"28"},{"type":"declaration","property":"width","value":"133"}]},{"type":"rule","selectors":["#librelinkLogo"],"declarations":[{"type":"declaration","property":"height","value":"27"},{"type":"declaration","property":"width","value":"134"}]},{"type":"rule","selectors":["#librelinkLogo[lang='zh']"],"declarations":[{"type":"declaration","property":"height","value":"29"},{"type":"declaration","property":"width","value":"95"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 742 */,
/* 743 */,
/* 744 */,
/* 745 */,
/* 746 */,
/* 747 */,
/* 748 */,
/* 749 */,
/* 750 */,
/* 751 */,
/* 752 */,
/* 753 */,
/* 754 */,
/* 755 */,
/* 756 */,
/* 757 */,
/* 758 */,
/* 759 */,
/* 760 */,
/* 761 */,
/* 762 */,
/* 763 */,
/* 764 */,
/* 765 */,
/* 766 */,
/* 767 */,
/* 768 */,
/* 769 */,
/* 770 */,
/* 771 */,
/* 772 */,
/* 773 */,
/* 774 */,
/* 775 */,
/* 776 */,
/* 777 */,
/* 778 */,
/* 779 */,
/* 780 */,
/* 781 */,
/* 782 */,
/* 783 */,
/* 784 */,
/* 785 */,
/* 786 */,
/* 787 */,
/* 788 */,
/* 789 */,
/* 790 */,
/* 791 */,
/* 792 */,
/* 793 */,
/* 794 */,
/* 795 */,
/* 796 */,
/* 797 */,
/* 798 */,
/* 799 */,
/* 800 */,
/* 801 */,
/* 802 */,
/* 803 */,
/* 804 */,
/* 805 */,
/* 806 */,
/* 807 */,
/* 808 */,
/* 809 */,
/* 810 */,
/* 811 */,
/* 812 */,
/* 813 */,
/* 814 */,
/* 815 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".orange-1"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"}]},{"type":"rule","selectors":[".page .btn"],"declarations":[{"type":"declaration","property":"margin","value":"6 0 18 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 816 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showIOSContextMenu", function() { return showIOSContextMenu; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToChangePassword", function() { return goToChangePassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToDeleteAccount", function() { return goToDeleteAccount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToLogout", function() { return goToLogout; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updateProfile", function() { return updateProfile; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
/* harmony import */ var _view_models_account__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(183);
var signOut = function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"].request('auth:signOut').catch(function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.errorOccuredTryAgain'));
});
};
var onNavigatingTo = function (args) {
var page = args.object;
var vm = new _view_models_account__WEBPACK_IMPORTED_MODULE_5__["AccountViewModel"]();
page.bindingContext = vm;
};
var onLoaded = function (args) {
var page = args.object;
var vm = page.bindingContext;
var pwLabel = page.getViewById('password-fl');
var submitButton = page.getViewById('submit-btn');
submitButton.isUserInteractionEnabled = false;
submitButton.className = 'btn disabled-light blg';
pwLabel.on('textChange', function () {
if (pwLabel.text) {
submitButton.isUserInteractionEnabled = true;
submitButton.className = 'btn primary-light blg';
}
else {
submitButton.isUserInteractionEnabled = false;
submitButton.className = 'btn disabled-light blg';
}
});
vm.getUserAccountInfo();
};
var showIOSContextMenu = function (args) {
var page = args.object.page;
var vm = page.bindingContext;
var alertController = UIAlertController.alertControllerWithTitleMessagePreferredStyle(null, null, UIAlertControllerStyle.ActionSheet);
var viewController;
// We don't allow HCPs to delete their accounts
// so we hide the button for them.
if (vm.isHCP === false) {
var deleteAccount = UIAlertAction.actionWithTitleStyleHandler(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.delete_account'), UIAlertActionStyle.Default, function () {
goToDeleteAccount();
});
alertController.addAction(deleteAccount);
}
var logout = UIAlertAction.actionWithTitleStyleHandler(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Account.logout'), UIAlertActionStyle.Default, function () {
signOut();
});
alertController.addAction(logout);
var cancelAction = UIAlertAction.actionWithTitleStyleHandler(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.cancel_label'), UIAlertActionStyle.Cancel, null);
alertController.addAction(cancelAction);
if (page.modal) {
viewController = page.modal.ios;
}
else {
viewController = page.ios;
}
viewController.presentModalViewControllerAnimated(alertController, true);
};
var goToChangePassword = function () {
_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"](_constants__WEBPACK_IMPORTED_MODULE_1__["CHANGE_PASSWORD"]);
};
var goToDeleteAccount = function () {
_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"](_constants__WEBPACK_IMPORTED_MODULE_1__["DELETE_ACCOUNT"]);
};
var goToLogout = function () {
signOut();
};
var updateProfile = function (args) {
var button = args.object;
var context = button.page.bindingContext;
button.handleRunning(context.updateUserProfile());
};
;
if (false ) {}
/***/ }),
/* 817 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/loading-button", function() { return __webpack_require__(48); });
global.registerModule("components/loading-button/LoadingButton", function() { return __webpack_require__(48); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n xmlns:lb=\"components/loading-button\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoaded\"\n actionBarHidden=\"false\"\n rtl=\"{{isRTL}}\"\n class=\"page\">\n\n <ab:action-bar title=\"{{L('Account.account_settings')}}\">\n <ios>\n <ActionItem class=\"icfont icsm\" icon=\"font://overflow\" tap=\"showIOSContextMenu\" ios.position=\"right\" />\n </ios>\n <android>\n <ActionItem visibility=\"{{ isHCP ? 'collapsed' : 'visible'}}\" tap=\"goToDeleteAccount\" text=\"{{L('Common.delete_account')}}\" android.position=\"popup\" />\n <ActionItem tap=\"goToLogout\" text=\"{{L('Account.logout')}}\" android.position=\"popup\" />\n </android>\n </ab:action-bar>\n\n <GridLayout rows=\"auto, *, auto\" >\n <StackLayout row=\"0\" class=\"text-container\">\n <fl:float-label\n text=\"{{firstname}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.first_name')}}\"\n returnKeyType=\"next\"\n />\n <fl:float-label\n text=\"{{lastname}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.last_name')}}\"\n returnKeyType=\"next\"\n />\n <fl:float-label\n text=\"{{email}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n editable=\"false\"\n hint=\"{{L('Common.email')}}\"\n keyboardType=\"email\"\n returnKeyType=\"next\"\n textFieldColor=\"gray-4\"\n />\n <fl:float-label\n id=\"password-fl\"\n text=\"{{password}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.password')}}\"\n returnKeyType=\"done\"\n secure=\"true\"\n />\n <Label\n text=\"{{L('Common.change_password')}}\"\n class=\"body orange-1 md\"\n tap=\"goToChangePassword\"\n textWrap=\"true\"\n />\n </StackLayout>\n <StackLayout row=\"1\" tap=\"{{dismissKeyboard}}\" />\n <StackLayout row=\"2\">\n <Label class=\"body black-3 sm\" text=\"{{L('Account.current_password_required_save')}}\" textWrap=\"true\" />\n <lb:LoadingButton id=\"submit-btn\" text=\"{{L('Account.save_changes')}}\" tap=\"updateProfile\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 818 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["Label"],"declarations":[{"type":"declaration","property":"opacity","value":"0.8"}]},{"type":"rule","selectors":["Label + .flex-col"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":["#container"],"declarations":[{"type":"declaration","property":"margin","value":"20 25 0 25"},{"type":"declaration","property":"text-align","value":"left"},{"type":"declaration","property":"align-items","value":"flex-start"}]},{"type":"rule","selectors":["#icon-reg-section"],"declarations":[{"type":"declaration","property":"margin-top","value":"15"}]},{"type":"rule","selectors":["#no-icon-reg-section"],"declarations":[{"type":"declaration","property":"margin","value":"15 0 0 80"}]},{"type":"rule","selectors":[".app-info-value"],"declarations":[{"type":"declaration","property":"margin","value":"0 5"}]},{"type":"rule","selectors":[".hr-hack"],"declarations":[{"type":"declaration","property":"background-color","value":"lightgray"},{"type":"declaration","property":"height","value":"1"},{"type":"declaration","property":"margin","value":"20 0 10 0"},{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"width","value":"80"}]},{"type":"rule","selectors":[".logo"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"6"}]},{"type":"rule","selectors":[".regulatory-message"],"declarations":[{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".rtl #no-icon-reg-section"],"declarations":[{"type":"declaration","property":"margin","value":"15 80 0 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 819 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["Label"],"declarations":[{"type":"declaration","property":"opacity","value":"0.8"}]},{"type":"rule","selectors":["Label + .flex-col"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":["#container"],"declarations":[{"type":"declaration","property":"margin","value":"20 25 0 25"},{"type":"declaration","property":"text-align","value":"left"},{"type":"declaration","property":"align-items","value":"flex-start"}]},{"type":"rule","selectors":["#icon-reg-section"],"declarations":[{"type":"declaration","property":"margin-top","value":"15"}]},{"type":"rule","selectors":["#no-icon-reg-section"],"declarations":[{"type":"declaration","property":"margin","value":"15 0 0 80"}]},{"type":"rule","selectors":[".app-info-value"],"declarations":[{"type":"declaration","property":"margin","value":"0 5"}]},{"type":"rule","selectors":[".hr-hack"],"declarations":[{"type":"declaration","property":"background-color","value":"lightgray"},{"type":"declaration","property":"height","value":"1"},{"type":"declaration","property":"margin","value":"20 0 10 0"},{"type":"declaration","property":"width","value":"100%"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"width","value":"80"}]},{"type":"rule","selectors":[".logo"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"6"}]},{"type":"rule","selectors":[".regulatory-message"],"declarations":[{"type":"declaration","property":"font-size","value":"12"},{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".rtl #no-icon-reg-section"],"declarations":[{"type":"declaration","property":"margin","value":"15 80 0 0"}]},{"type":"rule","selectors":[".ecrep-icon",".mfg-icon"],"declarations":[{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".rtl .icfont",".rtl .catalog-text",".rtl .ifu-text"],"declarations":[{"type":"declaration","property":"text-align","value":"right"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 820 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openLibreView", function() { return openLibreView; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openLinkUpSite", function() { return openLinkUpSite; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openRegulatoryLink", function() { return openRegulatoryLink; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapCustomLabel", function() { return onTapCustomLabel; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5);
/* harmony import */ var _utilities_version__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(39);
/* harmony import */ var _view_models_app_info__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(184);
function onNavigatingTo(args) {
return __awaiter(this, void 0, Promise, function () {
var page, viewModel, regConfigExists, labels;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
page = args.object;
viewModel = new _view_models_app_info__WEBPACK_IMPORTED_MODULE_5__["AppInfoViewModel"]();
page.bindingContext = viewModel;
return [4 /*yield*/, viewModel.getRegulatoryData()];
case 1:
regConfigExists = _a.sent();
labels = {
'registered-country': _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().user.country,
'os-version': _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Device"].osVersion,
'app-build-version': Object(_utilities_version__WEBPACK_IMPORTED_MODULE_4__["getAppBuildVersion"])(),
};
if (regConfigExists) {
labels['iu-product-version'] = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('AppInfo.IUProductVersion', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])("Common." + viewModel.iuDescription.name), viewModel.iuDescription.version);
labels['regulatory-llu-version'] = Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('AppInfo.versionLLU', viewModel.regulatoryLabels.versionLLU);
}
Object.keys(labels).forEach(function (elemId) {
var text = labels[elemId];
var id = page.getViewById(elemId);
id.text = text;
});
return [2 /*return*/];
}
});
});
}
var openLibreView = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["openConfigLink"])('lv');
};
var openLinkUpSite = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["openConfigLink"])('lluSAM');
};
var openRegulatoryLink = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_3__["openConfigLink"])('lluSAM', 'regulatory');
};
var onTapCustomLabel = function (args) {
var link = args.object.link;
if (link) {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Utils"].openUrl(link);
}
};
;
if (false ) {}
/***/ }),
/* 821 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-image", function() { return __webpack_require__(50); });
global.registerModule("components/aware-image/aware-image", function() { return __webpack_require__(50); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:AwareImage=\"components/aware-image\"\n navigatingTo=\"onNavigatingTo\"\n rtl=\"{{isRTL}}\">\n\n <ab:action-bar title=\"{{L('AppInfo.about')}}\" />\n\n <ScrollView>\n <FlexboxLayout id=\"container\" class=\"flex-col\">\n <!-- About LibreLinkUp -->\n <AwareImage:aware-image class=\"logo\" src=\"res://librelinkup_tiny\" />\n <FlexboxLayout id=\"app-info-section\" class=\"flex-row\">\n <Label class=\"app-info-title body black-3 md\" text=\"{{L('AppInfo.registered_country')}}\" textWrap=\"true\" />\n <Label id=\"registered-country\" class=\"app-info-value body black-3 md\" text=\"\" textWrap=\"true\" />\n </FlexboxLayout>\n <FlexboxLayout id=\"app-info-section\" class=\"flex-row\">\n <Label class=\"app-info-title body black-3 md\" text=\"{{L('AppInfo.phone_os_version')}}\" textWrap=\"true\" />\n <Label id=\"os-version\" class=\"app-info-value body black-3 md\" text=\"\" textWrap=\"true\" />\n </FlexboxLayout>\n <FlexboxLayout id=\"app-info-section\" class=\"flex-row\">\n <Label class=\"app-info-title body black-3 md\" text=\"{{L('AppInfo.software_version')}}\" textWrap=\"true\" />\n <Label id=\"app-build-version\" class=\"app-info-value body black-3 md\" text=\"\" textWrap=\"true\" />\n </FlexboxLayout>\n <!-- Gray line -->\n <FlexboxLayout class=\"hr-hack\"></FlexboxLayout>\n <!-- Regulatory Information -->\n <Label class=\"body orange-2 md\" text=\"{{regulatoryInfo.iuHeader}}\" textWrap=\"true\" tap=\"openRegulatoryLink\"/>\n <Label class=\"body black-3 sm\" text=\"{{L('SystemMessages.unableToLoad')}}\" visibility=\"{{regulatoryConfig == null ? 'visible' : 'collapsed'}}\" textWrap=\"true\" />\n <Label class=\"regulatory-message body black-3 sm\" text=\"{{regulatoryInfo.ecrepMessageLLU1}}\" textWrap=\"true\" />\n <Label class=\"regulatory-message bold sm\" text=\"{{regulatoryInfo.ecrepMessageLLU2}}\" textWrap=\"true\" />\n <!-- About Information -->\n <Label class=\"body orange-2 md\" text=\"{{L('AppInfo.about')}}\" textWrap=\"true\" />\n <Label class=\"body black-3 sm\" text=\"{{L('SystemMessages.unableToLoad')}}\" visibility=\"{{regulatoryConfig == null ? 'visible' : 'collapsed'}}\" textWrap=\"true\" />\n <Label class=\"icfont black icxlg\" text=\"{{regulatoryIconFonts.medicalDevice}}\" visibility=\"{{regSectionIsVisible.medicalDevice ? 'visible' : 'collapsed'}}\" />\n <Label id=\"iu-product-version\" class=\"body black-3 sm\" text=\"\" textWrap=\"true\" />\n <Label id=\"regulatory-llu-version\" class=\"body black-3 sm\" text=\"\" textWrap=\"true\" visibility=\"{{ regSectionIsVisible.iuDescription ? 'visible' : 'collapsed' }}\"/>\n <!-- Catalog -->\n <FlexboxLayout id=\"icon-reg-section\" class=\"flex-row\" visibility=\"{{regSectionIsVisible.catalog ? 'visible' : 'collapsed'}}\" >\n <Label class=\"icfont black icxlg\" text=\"{{regulatoryIconFonts.catalog}}\" />\n <FlexboxLayout class=\"flex-col catalog-text body black-3 sm\">\n <Label id=\"regulatory-catalog-id\" text=\"{{regulatoryLabels.catalogId}}\" visibility=\"{{ regulatoryLabels.catalogId ? 'visible' : 'collapsed' }}\" textWrap=\"true\" />\n <Label id=\"regulatory-release-info\" text=\"{{regulatoryLabels.releaseInfo}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </FlexboxLayout>\n <!-- IFU -->\n <FlexboxLayout id=\"icon-reg-section\" class=\"flex-row\" visibility=\"{{regSectionIsVisible.IFU ? 'visible' : 'collapsed'}}\" >\n <Label class=\"icfont black icxlg\" text=\"{{regulatoryIconFonts.IFU}}\" />\n <FlexboxLayout class=\"flex-col ifu-text body black-3 sm\">\n <Label text=\"{{regulatoryInfo.siteLV}}\" textWrap=\"true\" tap=\"openLibreView\" visibility=\"{{ regSectionIsVisible.lvSupport ? 'visible' : 'collapsed' }}\"/>\n <Label text=\"{{regulatoryInfo.siteLLU}}\" textWrap=\"true\" tap=\"openLinkUpSite\" visibility=\"{{ regSectionIsVisible.lluSupport ? 'visible' : 'collapsed' }}\"/>\n </FlexboxLayout>\n </FlexboxLayout>\n <!-- CE Mark -->\n <FlexboxLayout id=\"icon-reg-section\" class=\"flex-col\" visibility=\"{{regSectionIsVisible.CE ? 'visible' : 'collapsed'}}\" >\n <Label class=\"icfont black icxlg\" text=\"{{regulatoryIconFonts.CE}}\" />\n </FlexboxLayout>\n <!-- MFG -->\n <FlexboxLayout id=\"icon-reg-section\" class=\"flex-row\" visibility=\"{{regSectionIsVisible.MFG ? 'visible' : 'collapsed'}}\" >\n <Label class=\"icfont black icxlg mfg-icon\" text=\"{{regulatoryIconFonts.MFG}}\" />\n <FlexboxLayout class=\"flex-col body black-3 sm\">\n <Label text=\"{{regulatoryInfo.mfgName}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.mfgAddress}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.mfgCity}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </FlexboxLayout>\n <!-- Importer -->\n <FlexboxLayout id=\"no-icon-reg-section\" class=\"flex-col body black-3 sm\" visibility=\"{{regSectionIsVisible.importer ? 'visible' : 'collapsed'}}\" >\n <Label text=\"{{regulatoryInfo.importerTitle}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.importerName}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.importerAddress}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.importerCity}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.importerCountry}}\" textWrap=\"true\" />\n </FlexboxLayout>\n <!-- ECREP -->\n <FlexboxLayout id=\"icon-reg-section\" class=\"flex-row\" visibility=\"{{regSectionIsVisible.ECREP ? 'visible' : 'collapsed'}}\" >\n <Label class=\"icfont black icxxlg ecrep-icon\" text=\"{{regulatoryIconFonts.ECREP}}\" />\n <FlexboxLayout class=\"flex-col body black-3 sm\">\n <Label text=\"{{regulatoryInfo.ecrepName}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.ecrepAddress}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.ecrepCity}}\" textWrap=\"true\" />\n <Label text=\"{{regulatoryInfo.ecrepCountry}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </FlexboxLayout>\n <!-- Custom Labels -->\n <FlexboxLayout id=\"no-icon-reg-section\" class=\"flex-col body black-3 sm\" visibility=\"{{regSectionIsVisible.customLabels ? 'visible' : 'collapsed'}}\">\n <Repeater items=\"{{regulatoryInfo.customLabels}}\">\n <Repeater.itemTemplate>\n <Label text=\"{{$value.key}}\" class=\"{{$value.class}}\" link=\"{{$value.link}}\" tap=\"onTapCustomLabel\" textWrap=\"true\" />\n </Repeater.itemTemplate>\n </Repeater>\n </FlexboxLayout>\n </FlexboxLayout>\n </ScrollView>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 822 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onRootSpinnerLoaded", function() { return onRootSpinnerLoaded; });
/* harmony import */ var nativescript_ui_sidedrawer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(57);
/* harmony import */ var nativescript_ui_sidedrawer__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_ui_sidedrawer__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _utilities_logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(10);
/* harmony import */ var _view_models_app_root__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(185);
var initSideDrawer = function (sideDrawer) {
try {
if (sideDrawer === undefined) {
return;
}
// Begin with gestures off as the drawer is in a closed state
sideDrawer.gesturesEnabled = false;
sideDrawer.on(nativescript_ui_sidedrawer__WEBPACK_IMPORTED_MODULE_0__["RadSideDrawer"].drawerOpeningEvent, function () {
// Enable gestures when sidedrawer is open so that tapping outside can close the drawer
sideDrawer.gesturesEnabled = true;
});
sideDrawer.on(nativescript_ui_sidedrawer__WEBPACK_IMPORTED_MODULE_0__["RadSideDrawer"].drawerClosingEvent, function () {
// Disable gestures when sidedrawer is closed so that edge swiping is disabled
sideDrawer.gesturesEnabled = false;
});
// Apply OS specific settings to sidedrawer
if (sideDrawer.android) {
sideDrawer.android.setTouchTargetThreshold(0);
}
else if (sideDrawer.ios) {
sideDrawer.ios.defaultSideDrawer.allowEdgeSwipe = false;
sideDrawer.ios.defaultSideDrawer.style.shadowMode = 2;
}
}
catch (e) {
_utilities_logger__WEBPACK_IMPORTED_MODULE_2__["Logger"].warn(e);
}
};
var unSub;
var onLoaded = function (args) {
var drawerComponent = args.object;
drawerComponent.bindingContext = new _view_models_app_root__WEBPACK_IMPORTED_MODULE_3__["AppRootViewModel"]();
initSideDrawer(drawerComponent);
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_1__["observeStore"])(function (_a) {
var user = _a.user;
return ({ lang: user.phoneLanguage });
}, function (_a) {
var lang = _a.lang;
drawerComponent.bindingContext.set('lang', lang);
});
};
var onUnloaded = function () {
unSub && unSub();
};
var onRootSpinnerLoaded = function (args) {
var rootSpinner = args.object;
if (rootSpinner) {
if (rootSpinner.ios) {
rootSpinner.ios.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
}
else {
rootSpinner.height = 45;
rootSpinner.width = 45;
}
}
};
;
if (false ) {}
/***/ }),
/* 823 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/drawer-content", function() { return __webpack_require__(96); });
global.registerModule("components/drawer-content/drawer-content", function() { return __webpack_require__(96); });
global.registerModule("components/drawer-content/drawer-content.xml", function() { return __webpack_require__(349); });
global.registerModule("components/safety-banner", function() { return __webpack_require__(172); });
global.registerModule("components/safety-banner/safety-banner", function() { return __webpack_require__(172); });
global.registerModule("components/safety-banner/safety-banner.xml", function() { return __webpack_require__(351); });
global.registerModule("nativescript-ui-sidedrawer", function() { return __webpack_require__(57); });
global.registerModule("nativescript-ui-sidedrawer/RadSideDrawer.drawerTransition", function() { return __webpack_require__(57); });
global.registerModule("nativescript-ui-sidedrawer/RadSideDrawer", function() { return __webpack_require__(57); });
global.registerModule("nativescript-ui-sidedrawer/SlideInOnTopTransition", function() { return __webpack_require__(57); });
global.registerModule("nativescript-ui-sidedrawer/RadSideDrawer.drawerContent", function() { return __webpack_require__(57); });
global.registerModule("nativescript-ui-sidedrawer/RadSideDrawer.mainContent", function() { return __webpack_require__(57); });
module.exports = "<!--\nRadSideDrawer is a UI component part of the Progress NativeScript UI set of components.\nLearn more about the RadSideDrawer UI component and how it can be customized in this documentation article:\nhttps://docs.nativescript.org/ui/professional-ui-components/SideDrawer/getting-started\n-->\n\n<nsDrawer:RadSideDrawer\n xmlns:lluDrawer=\"components/drawer-content\"\n xmlns:nsDrawer=\"nativescript-ui-sidedrawer\"\n xmlns:SafetyBanner=\"components/safety-banner\"\n id=\"sideDrawer\"\n class=\"{{lang, 'lang-' + lang + (isRTL ? ' rtl' : '')}}\"\n drawerLocation=\"{{lang, isRTL ? 'Right' : 'Left'}}\"\n gesturesEnabled=\"false\"\n loaded=\"onLoaded\"\n unloaded=\"onUnloaded\">\n\n <nsDrawer:RadSideDrawer.drawerTransition>\n <nsDrawer:SlideInOnTopTransition/>\n </nsDrawer:RadSideDrawer.drawerTransition>\n\n <nsDrawer:RadSideDrawer.drawerContent>\n <lluDrawer:drawer-content />\n </nsDrawer:RadSideDrawer.drawerContent>\n\n <nsDrawer:RadSideDrawer.mainContent>\n <GridLayout rows=\"*\">\n <Frame row=\"0\" id=\"rootFrame\" defaultPage=\"{{defaultPage}}\"></Frame>\n <ActivityIndicator id=\"rootSpinner\" loaded=\"onRootSpinnerLoaded\" />\n <SafetyBanner:safety-banner row=\"0\" visibility=\"collapsed\" />\n </GridLayout>\n </nsDrawer:RadSideDrawer.mainContent>\n</nsDrawer:RadSideDrawer>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 824 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".body.orange-1"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"}]},{"type":"rule","selectors":[".rtl FlexboxLayout"],"declarations":[{"type":"declaration","property":"flex-direction","value":"row-reverse"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 825 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToResetPassword", function() { return goToResetPassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCancelButtonTap", function() { return onCancelButtonTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "updatePassword", function() { return updatePassword; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _view_models_change_password__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(186);
var onLoad = function (args) {
var page = args.object;
var vm = new _view_models_change_password__WEBPACK_IMPORTED_MODULE_2__["ChangePasswordViewModel"]();
page.bindingContext = vm;
};
var goToResetPassword = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])({ moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["FORGOT_PASSWORD"] });
};
var onCancelButtonTap = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
var updatePassword = function (args) {
var button = args.object;
var context = button.page.bindingContext;
button.handleRunning(context.updatePassword());
};
;
if (false ) {}
/***/ }),
/* 826 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/loading-button", function() { return __webpack_require__(48); });
global.registerModule("components/loading-button/LoadingButton", function() { return __webpack_require__(48); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n xmlns:lb=\"components/loading-button\"\n loaded=\"onLoad\"\n rtl=\"{{isRTL}}\"\n class=\"page\">\n\n <ab:action-bar title=\"{{L('Common.change_password')}}\" showBack=\"false\"/>\n\n <GridLayout rows=\"auto, *, auto\">\n <StackLayout row=\"0\" class=\"text-container\">\n <fl:float-label\n hint=\"{{L('Common.old_passowrd')}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n returnKeyType=\"next\"\n secure=\"true\"\n text=\"{{currentPW}}\"\n />\n <fl:float-label\n hint=\"{{L('ChangePW.new_password')}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n returnKeyType=\"next\"\n secure=\"true\"\n text=\"{{newPW}}\"\n />\n <fl:float-label\n hint=\"{{L('Common.confirmPasswordLabel')}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n returnKeyType=\"done\"\n secure=\"true\"\n text=\"{{newPWConfirm}}\"\n />\n <Label\n text=\"{{L('Common.reset_password_label')}}\"\n class=\"body orange-1 md\"\n tap=\"goToResetPassword\"\n textWrap=\"true\"\n />\n </StackLayout>\n <StackLayout row=\"1\" tap=\"{{dismissKeyboard}}\" />\n <FlexboxLayout row=\"2\">\n <Button class=\"btn split-light bmd\" text=\"{{L('Common.cancel_label')}}\" tap=\"onCancelButtonTap\" />\n <lb:LoadingButton class=\"btn primary-light bmd\" text=\"{{L('Common.save')}}\" tap=\"updatePassword\" />\n </FlexboxLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 827 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#connection-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"height","value":"60"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":["#connection-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".black-2"],"declarations":[{"type":"declaration","property":"margin","value":"0 35"}]},{"type":"rule","selectors":[".bold"],"declarations":[{"type":"declaration","property":"margin","value":"16 0 6 0"}]},{"type":"rule","selectors":[".connection-name"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"},{"type":"declaration","property":"text-align","value":"left"},{"type":"declaration","property":"width","value":"75%"}]},{"type":"rule","selectors":[".connection-text-block"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"border-color","value":"#e6e5e4"},{"type":"declaration","property":"border-radius","value":"8"},{"type":"declaration","property":"border-width","value":"2"},{"type":"declaration","property":"margin","value":"8 16 20 16"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".orange-2"],"declarations":[{"type":"declaration","property":"margin","value":"16 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 828 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#connection-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"height","value":"60"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":["#connection-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".black-2"],"declarations":[{"type":"declaration","property":"margin","value":"0 35"}]},{"type":"rule","selectors":[".bold"],"declarations":[{"type":"declaration","property":"margin","value":"16 0 6 0"}]},{"type":"rule","selectors":[".connection-name"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"},{"type":"declaration","property":"text-align","value":"left"},{"type":"declaration","property":"width","value":"75%"}]},{"type":"rule","selectors":[".connection-text-block"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"border-color","value":"#e6e5e4"},{"type":"declaration","property":"border-radius","value":"8"},{"type":"declaration","property":"border-width","value":"2"},{"type":"declaration","property":"margin","value":"8 16 20 16"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".orange-2"],"declarations":[{"type":"declaration","property":"margin","value":"16 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 829 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingFrom", function() { return onNavigatingFrom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeConnection", function() { return removeConnection; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToAddConnectionSAM", function() { return goToAddConnectionSAM; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8);
/* harmony import */ var _nativescript_core_application__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
/* harmony import */ var _view_models_connection_list__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(187);
/* harmony import */ var _view_models_invitation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(76);
var unSub;
var getConnections = function () {
var viewModel = this.bindingContext;
viewModel.getConnections();
};
function onNavigatingTo(args) {
var page = args.object;
var viewModel = new _view_models_connection_list__WEBPACK_IMPORTED_MODULE_6__["ConnectionListViewModel"]();
page.bindingContext = viewModel;
viewModel.getConnections();
Object(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["on"])(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["resumeEvent"], getConnections, page);
}
function onLoad(args) {
var page = args.object;
var viewModel = page.bindingContext;
var listView = page.getViewById('connection-list');
var inviteViewModel = new _view_models_invitation__WEBPACK_IMPORTED_MODULE_7__["InvitationViewModel"]();
inviteViewModel.getInvites();
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_4__["observeStore"])(function (_a) {
var connection = _a.connection;
return connection;
}, function () {
viewModel.setListView();
if (listView) {
listView.refresh();
}
});
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
listView.ios.scrollEnabled = false;
}
}
function onNavigatingFrom(args) {
var page = args.object;
Object(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["off"])(_nativescript_core_application__WEBPACK_IMPORTED_MODULE_1__["resumeEvent"], getConnections, page);
unSub && unSub();
}
function onUnloaded() {
unSub && unSub();
}
function removeConnection(args) {
var page = args.view.page;
var viewModel = page.bindingContext;
var selectedElement = args.object;
var connection = selectedElement.bindingContext;
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["confirm"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('ManageConnections.remove_connection_alert', connection.firstName, Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["shortenedName"])(connection.lastName)), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('ManageConnections.remove_label'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('Common.cancel_label'), '').then(function (result) {
if (result === true) {
viewModel.removeConnection(connection.id);
}
}, function (error) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_2__["localize"])('SystemMessages.unexpected_error'));
console.error('removeConnection request failed with error >> ' + error.message);
});
}
var goToAddConnectionSAM = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["openConfigLink"])('lluSAM', 'articles/getting-started');
};
;
if (false ) {}
/***/ }),
/* 830 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoad\"\n navigatingFrom=\"onNavigatingFrom\"\n unloaded=\"onUnloaded\"\n rtl=\"{{isRTL}}\">\n\n <ab:action-bar title=\"{{L('ManageConnections.manage_connections')}}\" />\n\n <!-- Connection list view content -->\n <ScrollView>\n <GridLayout rows=\"{{rowsVar}}\" class=\"bg-section-2\">\n <ListView row=\"0\" id=\"connection-list\" class=\"bg-section-2\" items=\"{{connections}}\" separatorColor=\"transparent\" visibility=\"{{(connections.length >= 1) ? 'visible' : 'collapsed'}}\">\n <ListView.itemTemplate>\n <Card:CardView id=\"connection-card\" class=\"h3 center-light\">\n <FlexboxLayout id=\"connection-row\" class=\"flex-row\">\n <Label class=\"connection-name\" text=\"{{firstName + ' ' + lastName | shortenedName}}\" textWrap=\"true\" />\n <Label class=\"icfont gray icsm\" tap=\"removeConnection\" text=\"close\" />\n </FlexboxLayout>\n </Card:CardView>\n </ListView.itemTemplate>\n </ListView>\n\n <StackLayout row=\"1\" class=\"connection-text-block flex-col\" >\n <Label class=\"bold md\" text=\"{{L('ManageConnections.trying_add_connection')}}\" textWrap=\"true\" />\n <Label class=\"body black-2 md\" text=\"{{L('Common.link_by_asking')}}\" textWrap=\"true\" />\n <Label class=\"body orange-2 md\" text=\"{{L('Common.learn_more')}}\" tap=\"goToAddConnectionSAM\" textWrap=\"true\" />\n </StackLayout>\n </GridLayout>\n </ScrollView>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 831 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["GridLayout > StackLayout"],"declarations":[{"type":"declaration","property":"width","value":"80%"}]},{"type":"rule","selectors":["#countryDropdown"],"declarations":[{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"padding","value":"5"}]},{"type":"rule","selectors":["#hr-hack"],"declarations":[{"type":"declaration","property":"border-color","value":"#C3C3C3"},{"type":"declaration","property":"border-width","value":"1"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"margin","value":"15 0 28 0"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 832 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["GridLayout > StackLayout"],"declarations":[{"type":"declaration","property":"width","value":"80%"}]},{"type":"rule","selectors":["#countryDropdown"],"declarations":[{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"color","value":"black"},{"type":"declaration","property":"padding","value":"5"}]},{"type":"rule","selectors":["#hr-hack"],"declarations":[{"type":"declaration","property":"border-color","value":"#C3C3C3"},{"type":"declaration","property":"border-width","value":"1"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"margin","value":"15 0 28 0"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".ns-root.ns-dark #countryDropdown"],"declarations":[{"type":"declaration","property":"background-color","value":"#111111"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 833 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapContinue", function() { return onTapContinue; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCountrySelected", function() { return onCountrySelected; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1);
/* harmony import */ var _view_models_policies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(77);
var onNavigatingTo = function (args) {
var page = args.object;
var policiesViewModel = new _view_models_policies__WEBPACK_IMPORTED_MODULE_5__["PoliciesViewModel"]();
page.bindingContext = policiesViewModel;
};
var onLoaded = function (args) {
var page = args.object;
var viewModel = page.bindingContext;
viewModel.makeCountryList();
viewModel.set('isCountrySelected', false);
var _a = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState(), countryList = _a.config.countryList, country = _a.user.country;
// Preselect the stored country
if (country) {
viewModel.set('isCountrySelected', true);
viewModel.set('selectedCountryIndex', countryList.countries.findIndex(function (c) { return c.ValueMember === country; }));
}
else if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
viewModel.set('isCountrySelected', true);
viewModel.set('selectedCountryIndex', 0);
}
};
var onTapContinue = function (args) {
var page = args.object.page;
var viewModel = page.bindingContext;
var countryList = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().config.countryList;
var selectedCountry = countryList.countries[viewModel.selectedCountryIndex].ValueMember;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('auth:countryChosen', {
country: selectedCountry,
})
.then(function () {
viewModel.set('isCountrySelected', true);
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_2__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_1__["EULA"]);
});
};
var onCountrySelected = function (data) {
var page = data.object.page;
var viewModel = page.bindingContext;
viewModel.set('selectedCountryIndex', data.newIndex);
viewModel.set('isCountrySelected', false);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_4__["default"]
.request('auth:countryChosen', { country: viewModel.countries.getValue(data.newIndex) })
.then(function () {
viewModel.set('isCountrySelected', true);
});
};
;
if (false ) {}
/***/ }),
/* 834 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("nativescript-drop-down", function() { return __webpack_require__(375); });
global.registerModule("nativescript-drop-down/DropDown", function() { return __webpack_require__(375); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:dd=\"nativescript-drop-down\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoaded\">\n\n <ab:action-bar title=\"{{L('CountrySelect.country_region_residence')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <Label class=\"body black-3 md\" text=\"{{L('CountrySelect.select_country_region')}}\" textWrap=\"true\" />\n <dd:DropDown id=\"countryDropdown\" items=\"{{ countries }}\" selectedIndex=\"{{ selectedCountryIndex }}\" selectedIndexChanged=\"onCountrySelected\" />\n <StackLayout id=\"hr-hack\"></StackLayout>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.continue_label')}}\" android:isEnabled=\"{{isCountrySelected}}\" tap=\"onTapContinue\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 835 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#current-pw"],"declarations":[{"type":"declaration","property":"margin","value":"8 0 18 0"}]},{"type":"rule","selectors":[".list-item"],"declarations":[{"type":"declaration","property":"margin","value":"0 15"}]},{"type":"rule","selectors":[".warning"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"8"}]},{"type":"rule","selectors":[".page .btn"],"declarations":[{"type":"declaration","property":"margin","value":"6 0 18 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 836 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "deleteAccount", function() { return deleteAccount; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
/* harmony import */ var _view_models_delete_account__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(189);
var onNavigatingTo = function (args) {
var page = args.object;
var vm = new _view_models_delete_account__WEBPACK_IMPORTED_MODULE_2__["DeleteAccountViewModel"]();
var localizedAppNames = [
Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.libreview'),
Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.librelinkup'),
Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.freestyle_librelink'),
];
page.bindingContext = vm;
var partnerApps = _store_store__WEBPACK_IMPORTED_MODULE_1__["store"].getState().config.PartnerApplicationKeys;
if (partnerApps.length < 1) {
vm.set('viewProperties', localizedAppNames);
return;
}
localizedAppNames.length = 0;
for (var i = 0; i < partnerApps.length; i++) {
localizedAppNames.push(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])("Common." + partnerApps[i]));
}
vm.set('viewProperties', localizedAppNames);
};
var onLoad = function (args) {
var page = args.object;
var pwLabel = page.getViewById('current-pw');
var submitButton = page.getViewById('submit-btn');
submitButton.isUserInteractionEnabled = false;
submitButton.className = 'btn disabled-light blg';
pwLabel.on('textChange', function () {
if (pwLabel.text) {
submitButton.isUserInteractionEnabled = true;
submitButton.className = 'btn primary-light blg';
}
else {
submitButton.isUserInteractionEnabled = false;
submitButton.className = 'btn disabled-light blg';
}
});
};
var deleteAccount = function (args) {
var button = args.object;
var context = button.page.bindingContext;
button.handleRunning(context.deleteAccount());
};
;
if (false ) {}
/***/ }),
/* 837 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/loading-button", function() { return __webpack_require__(48); });
global.registerModule("components/loading-button/LoadingButton", function() { return __webpack_require__(48); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n xmlns:lb=\"components/loading-button\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoad\"\n class=\"page\">\n\n <ab:action-bar title=\"{{L('Common.delete_account')}}\" />\n\n <GridLayout rows=\"auto, *, auto\">\n <StackLayout row=\"0\" class=\"text-container\">\n <StackLayout tap=\"{{dismissKeyboard}}\">\n <Label class=\"warning bold md\" text=\"{{L('DeleteAccount.delete_headline')}}\" textWrap=\"true\" />\n <Label class=\"warning body black-3 md\" text=\"{{L('DeleteAccount.delete_blurb')}}\" textWrap=\"true\" />\n <Repeater items=\"{{ viewProperties }}\">\n <Repeater.itemTemplate>\n <Label class=\"list-item body black-3 md\" text=\"{{ '&#8226; ' + $value }}\" textWrap=\"true\" />\n </Repeater.itemTemplate>\n </Repeater>\n </StackLayout>\n <fl:float-label\n id=\"current-pw\"\n hint=\"{{L('Common.old_passowrd')}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n returnKeyType=\"done\"\n secure=\"true\"\n text=\"{{inputPW}}\"\n />\n <Label class=\"body black-3 sm\" text=\"{{L('DeleteAccount.delete_account_note')}}\" textWrap=\"true\" tap=\"{{dismissKeyboard}}\" />\n </StackLayout>\n <StackLayout row=\"1\" tap=\"{{dismissKeyboard}}\" />\n <StackLayout row=\"2\">\n <Label class=\"body black-3 sm\" text=\"{{L('DeleteAccount.current_password_required_delete')}}\" horizontalAlignment=\"center\" textWrap=\"true\" />\n <lb:LoadingButton id=\"submit-btn\" text=\"{{L('Common.delete_account')}}\" tap=\"deleteAccount\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 838 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony import */ var _nativescript_core_ui_frame_frame__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44);
/* harmony import */ var _nativescript_core_ui_frame_frame__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core_ui_frame_frame__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(17);
var TaskViewModel = /** @class */ (function (_super) {
__extends(TaskViewModel, _super);
function TaskViewModel() {
return _super.call(this) || this;
}
return TaskViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_4__["BaseViewModel"]));
var unSub;
var onNavigatingTo = function (args) {
var page = args.object;
var context = new TaskViewModel();
page.bindingContext = context;
};
var onLoaded = function (args) {
var page = args.object;
var frame = _nativescript_core_ui_frame_frame__WEBPACK_IMPORTED_MODULE_0__["Frame"].getFrameById('finish-login');
var context = page.bindingContext;
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_3__["observeStore"])(function (_a) {
var auth = _a.auth;
return auth.step;
}, function (step) {
if (!step) {
frame.closeModal();
}
var newStep = '';
if (context.currentStep !== step.type) {
switch (step.type) {
case 'verifyEmail':
context.set('title', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Registration.verify_email'));
newStep = _constants__WEBPACK_IMPORTED_MODULE_2__["VERIFY_EMAIL"];
break;
case 'tou':
context.set('title', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Policies.end_user_agreement'));
newStep = _constants__WEBPACK_IMPORTED_MODULE_2__["EULA"];
break;
case 'pp':
context.set('title', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Policies.privacy_policy'));
newStep = _constants__WEBPACK_IMPORTED_MODULE_2__["PRIVACY"];
break;
}
if (newStep !== context.currentStep) {
frame.navigate({
clearHistory: true,
context: Object.assign({ isAuthTask: true }, step.props),
moduleName: newStep,
transition: {
name: 'slide',
},
});
context.currentStep = newStep;
}
}
});
};
var onUnloaded = function () {
unSub && unSub();
};
;
if (false ) {}
/***/ }),
/* 839 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/ActionBar", function() { return __webpack_require__(14); });
module.exports = "<Page\n class=\"page\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoaded\"\n unloaded=\"onUnloaded\"\n actionBarHidden=\"false\"\n xmlns:ab=\"components/action-bar\"\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n >\n <ab:ActionBar navTo=\"logout\" title=\"{{title}}\" />\n <Frame id=\"finish-login\" defaultPage=\"views/finish-login/placeholder\" actionBarVisibility=\"never\" />\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 840 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = "<Page class=\"page\" actionBarHidden=\"true\" xmlns=\"http://schemas.nativescript.org/tns.xsd\" />\n";
if (false ) {}
/***/ }),
/* 841 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#reset-pw-txt"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"14"}]},{"type":"rule","selectors":[".page .btn"],"declarations":[{"type":"declaration","property":"margin-top","value":"10"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 842 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submitResetPassword", function() { return submitResetPassword; });
/* harmony import */ var _view_models_forgot_password__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(190);
function onNavigatingTo(args) {
var page = args.object;
var vm = new _view_models_forgot_password__WEBPACK_IMPORTED_MODULE_0__["ForgotPasswordViewModel"]();
page.bindingContext = vm;
}
var submitResetPassword = function (args) {
var button = args.object;
var context = button.page.bindingContext;
context.resetPassword();
};
;
if (false ) {}
/***/ }),
/* 843 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n navigatingTo=\"onNavigatingTo\"\n class=\"page\">\n\n <ab:action-bar title=\"{{L('Common.reset_password_label')}}\" />\n\n <GridLayout rows=\"auto, auto, *\">\n <StackLayout row=\"0\" class=\"text-container\">\n <Label id=\"reset-pw-txt\" class=\"body black-3 md\" text=\"{{L('ForgotPW.reset_pw_instructions')}}\" textWrap=\"true\"\n tap=\"{{dismissKeyboard}}\" />\n <fl:float-label\n text=\"{{email}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.email_address')}}\"\n keyboardType=\"email\"\n returnKeyType=\"done\"\n />\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('ForgotPW.reset_label')}}\" tap=\"submitResetPassword\" />\n <StackLayout row=\"2\" tap=\"{{dismissKeyboard}}\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 844 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#chart"],"declarations":[{"type":"declaration","property":"margin","value":"0 20 0 0"},{"type":"declaration","property":"padding","value":"0 0 0 4"}]},{"type":"rule","selectors":["#logbook-btn"],"declarations":[{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"line-height","value":"22"},{"type":"declaration","property":"margin","value":"20 0 24 0"},{"type":"declaration","property":"padding","value":"0 15 0 15"}]},{"type":"rule","selectors":[".extended-action-bar"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"border-bottom-width","value":"1"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"height","value":"55"}]},{"type":"rule","selectors":[".ns-root.ns-dark .extended-action-bar"],"declarations":[{"type":"declaration","property":"background-color","value":"#242424"}]},{"type":"rule","selectors":[".unit-label"],"declarations":[{"type":"declaration","property":"font-size","value":"8"},{"type":"declaration","property":"margin","value":"0 5 -5 5"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 845 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#chart"],"declarations":[{"type":"declaration","property":"margin","value":"0 20 0 0"},{"type":"declaration","property":"padding","value":"0 0 0 4"}]},{"type":"rule","selectors":["#logbook-btn"],"declarations":[{"type":"declaration","property":"font-size","value":"18"},{"type":"declaration","property":"line-height","value":"22"},{"type":"declaration","property":"margin","value":"20 0 24 0"},{"type":"declaration","property":"padding","value":"0 15 0 15"}]},{"type":"rule","selectors":[".extended-action-bar"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"border-bottom-width","value":"1"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"height","value":"55"}]},{"type":"rule","selectors":[".ns-root.ns-dark .extended-action-bar"],"declarations":[{"type":"declaration","property":"background-color","value":"#242424"}]},{"type":"rule","selectors":[".unit-label"],"declarations":[{"type":"declaration","property":"font-size","value":"8"},{"type":"declaration","property":"margin","value":"0 5 -5 5"}]},{"type":"rule","selectors":["[class*=\"lang-ar\"] .unit-label"],"declarations":[{"type":"declaration","property":"text-align","value":"right"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 846 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingFrom", function() { return onNavigatingFrom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCardTap", function() { return onCardTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resetGraph", function() { return resetGraph; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToLogbook", function() { return goToLogbook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSettings", function() { return goToSettings; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _components_summary_card_summary_card__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(16);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17);
/* harmony import */ var _view_models_invitation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(76);
function selectedChanged(args) {
if (args.propertyName === 'selectedItem') {
this.set('measurement', __assign({}, (args.value || __assign({}, this.currentGlucose))));
}
}
var GraphViewModel = /** @class */ (function (_super) {
__extends(GraphViewModel, _super);
function GraphViewModel(patient) {
var _this = _super.call(this) || this;
if (patient) {
_this._patient = patient;
_this.currentGlucose = __assign({}, patient.glucoseItem);
_this.isMmolPerL = !patient.uom;
_this.measurement = __assign({}, patient.glucoseItem);
_this.patientId = patient.patientId;
}
_this.items = new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ObservableArray"]([]);
_this.selectedItem = undefined;
_this.reviewing = false;
_this.backNav = _constants__WEBPACK_IMPORTED_MODULE_2__["MEASUREMENTS_SUMMARY"];
_this.timezoneId = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.timezoneId;
_this.updateFromPatientSettings();
return _this;
}
GraphViewModel.prototype.getGraphData = function (onLoadedFetch) {
var _this = this;
if (onLoadedFetch === void 0) { onLoadedFetch = false; }
return new Promise(function (resolve, reject) {
if (_this._fetching) {
reject();
return;
}
var cancelDebounce = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["debounce"])(function () {
_this.spinner.busy = true;
})();
_this._fetching = true;
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"]
.request('measurements:getGraph', {
patientId: _this.patientId,
})
.then(function (result) {
cancelDebounce();
_this._fetching = false;
_this.spinner.busy = false;
if (result.data.connection) {
// If we have new settings, prefer those over the returned ones
if (onLoadedFetch && _this._newSettings) {
_this.updateFromPatientSettings(__assign(__assign({}, result.data.connection), { alarmRules: _this._newSettings }));
// Clear them out as subsequent fetches should now have the proper settings
_this._newSettings = undefined;
}
else {
_this.updateFromPatientSettings(result.data.connection);
}
_this.set('currentGlucose', result.data.connection.glucoseItem);
}
if (result.data.graphData) {
_this.set('items', new _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["ObservableArray"](result.data.graphData));
}
resolve();
})
.catch(function () {
cancelDebounce();
_this._fetching = false;
_this.spinner.busy = false;
reject();
});
});
};
GraphViewModel.prototype.updateFromPatientSettings = function (patient) {
if (patient) {
this._patient = patient;
}
if (this._patient) {
var sens = Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["sensorForConnection"])(this._patient, this._patient.patientDevice);
this.set('isMmolPerL', !this._patient.uom);
if (sens === _models_types__WEBPACK_IMPORTED_MODULE_3__["ProductType"].FSL3) {
this.setFsl3Alarms();
}
else if (sens === _models_types__WEBPACK_IMPORTED_MODULE_3__["ProductType"].FSL2 || sens === _models_types__WEBPACK_IMPORTED_MODULE_3__["ProductType"].UNKNOWN) {
this.setAlarms();
}
else {
this.set('highAlarm', -1);
this.set('lowAlarm', -1);
}
this.set('targetHighThreshold', this.isMmolPerL
? Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["convertMGPerDLToMMOLPerL"])(this._patient.targetHigh)
: this._patient.targetHigh);
this.set('targetLowThreshold', this.isMmolPerL
? Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["convertMGPerDLToMMOLPerL"])(this._patient.targetLow)
: this._patient.targetLow);
}
};
GraphViewModel.prototype.setAlarms = function () {
var _a, _b;
var device = this._patient.patientDevice;
var rules = this._patient.alarmRules;
var alarms = {
h: device.h && device.hl && ((_a = rules.h) === null || _a === void 0 ? void 0 : _a.on),
l: device.l && device.ll && ((_b = rules.l) === null || _b === void 0 ? void 0 : _b.on),
};
if (alarms.h) {
this.set('highAlarm', this.isMmolPerL ? Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["convertMGPerDLToMMOLPerL"])(device.hl) : device.hl);
}
else {
this.set('highAlarm', -1);
}
if (alarms.l) {
this.set('lowAlarm', this.isMmolPerL ? Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["convertMGPerDLToMMOLPerL"])(device.ll) : device.ll);
}
else {
this.set('lowAlarm', -1);
}
};
GraphViewModel.prototype.setFsl3Alarms = function () {
var _a, _b, _c, _d, _e, _f;
var rules = this._patient.alarmRules;
if ((_a = rules.h) === null || _a === void 0 ? void 0 : _a.on) {
this.set('highAlarm', this.isMmolPerL ? (_b = rules.h) === null || _b === void 0 ? void 0 : _b.thmm : (_c = rules.h) === null || _c === void 0 ? void 0 : _c.th);
}
else {
this.set('highAlarm', -1);
}
if ((_d = rules.l) === null || _d === void 0 ? void 0 : _d.on) {
this.set('lowAlarm', this.isMmolPerL ? (_e = rules.l) === null || _e === void 0 ? void 0 : _e.thmm : (_f = rules.l) === null || _f === void 0 ? void 0 : _f.th);
}
else {
this.set('lowAlarm', -1);
}
};
return GraphViewModel;
}(_view_models_base__WEBPACK_IMPORTED_MODULE_8__["BaseViewModel"]));
var highlightCurrentSub;
var newSettingsSub;
var notificationPresentedSub;
var onNavigatingTo = function (args) {
var page = args.object;
var patient;
if (!args.isBackNavigation && args.context) {
var connections = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().connection.connections;
patient = connections.find(function (c) { return c.patientId === args.context.patientId; });
var graph = new GraphViewModel(patient);
page.bindingContext = graph;
}
else {
// On coming back from the connection list, make sure we still have acess to the patient,
var patientId_1 = page.bindingContext.get('patientId');
var connection = _store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().connection;
patient = connection.connections.find(function (c) { return c.patientId === patientId_1; });
// When coming back from the settings, due to background processing there is a chance that the
// first graph fetch will respond back with the old settings. We save the settings that the app
// has after navigating back and hold on to them for the next graph fetch.
var graph_1 = page.bindingContext;
newSettingsSub = _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('notification:newSettings', function (_a) {
var alarmRules = _a.alarmRules;
graph_1._newSettings = alarmRules;
graph_1.updateFromPatientSettings(__assign(__assign({}, patient), { alarmRules: alarmRules }));
});
}
// Dont have the patients data, fallback to summary screen
if (!patient) {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["MEASUREMENTS_SUMMARY"],
clearHistory: true,
transition: {
name: 'slideRight',
},
});
return;
}
// Notification was received, fetch new data
notificationPresentedSub = _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('notification:presentedNotification', function (_a) {
var patientId = _a.patientId;
var graph = page.bindingContext;
if (patientId === graph.patientId) {
graph.getGraphData();
}
});
// Notification was received and tapped, set graph to current and fetch new data
highlightCurrentSub = _utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].subscribe('glucoseGraph:higlightCurrent', function () {
var graph = page.bindingContext;
graph.set('reviewing', false);
graph.getGraphData();
});
};
var onNavigatingFrom = function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].remove('glucoseGraph:higlightCurrent', highlightCurrentSub === null || highlightCurrentSub === void 0 ? void 0 : highlightCurrentSub.id);
unSub && unSub();
};
var interval = 0;
var unSub;
var onLoaded = function (args) {
var inviteViewModel = new _view_models_invitation__WEBPACK_IMPORTED_MODULE_9__["InvitationViewModel"]();
var page = args.object;
var context = page.bindingContext;
var root = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].getRootView();
var main = root.mainContent;
context.spinner = main.getViewById('rootSpinner');
// Setup a listener for the currently highlighted measurement
context.addEventListener(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"].propertyChangeEvent, selectedChanged, context);
var chart = page.getViewById('chart');
var summaryCard = page.getViewById('summary-card');
// Interval to update graph data
interval = setInterval(function () {
context
.getGraphData()
.then(function () {
if (summaryCard) {
// Refresh patient info
summaryCard.setPatient(context.patientId);
// Have the summary card recompute if the current close is "recent"
if (!context.reviewing) {
_components_summary_card_summary_card__WEBPACK_IMPORTED_MODULE_1__["measurementProperty"].coerce(summaryCard);
}
}
})
.catch(function () {
if (!context.reviewing && summaryCard) {
_components_summary_card_summary_card__WEBPACK_IMPORTED_MODULE_1__["measurementProperty"].coerce(summaryCard);
}
// Ensure chart refreshes on failure
if (chart) {
chart.refreshData();
}
});
}, 1000 * 60); // 1 minute refresh
setTimeout(function () {
context
.getGraphData(true)
.then(function () {
if (summaryCard) {
// Refresh patient info
summaryCard.setPatient(context.patientId);
}
})
.catch(function () {
// Ensure chart refreshes on failure
if (chart) {
chart.refreshData();
}
});
}, 100);
setTimeout(function () {
inviteViewModel.getInvites();
}, 200);
// Refresh chart
if (chart) {
chart.refreshData();
}
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_5__["observeStore"])(function (_a) {
var connections = _a.connection.connections, timezoneId = _a.user.timezoneId;
return ({ connections: connections, timezoneId: timezoneId });
}, function (_a) {
var connections = _a.connections, timezoneId = _a.timezoneId;
context.set('showBack', connections.length > 1);
context.set('timezoneId', timezoneId);
});
};
var onUnloaded = function (args) {
var page = args.object;
var context = page.bindingContext;
context.removeEventListener(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Observable"].propertyChangeEvent, selectedChanged, context);
clearInterval(interval);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].remove('notification:newSettings', newSettingsSub === null || newSettingsSub === void 0 ? void 0 : newSettingsSub.id);
_utilities_mediator__WEBPACK_IMPORTED_MODULE_7__["default"].remove('notification:presentedNotification', notificationPresentedSub === null || notificationPresentedSub === void 0 ? void 0 : notificationPresentedSub.id);
unSub && unSub();
};
var onCardTap = function (args) {
var page = args.view.page;
var context = page.bindingContext;
if (context.reviewing) {
resetGraph(args);
}
else {
var summaryCard = page.getViewById('summary-card');
if (summaryCard) {
summaryCard.showAlert();
}
}
};
var resetGraph = function (args) {
var page = args.view.page;
var context = page.bindingContext;
context.set('reviewing', false);
};
var goToLogbook = function (args) {
var page = args.object.page;
var context = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({
context: {
PatientID: context.patientId,
},
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["LOGBOOK"],
});
};
var goToSettings = function (args) {
var page = args.object.page;
var context = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({
context: {
PatientID: context.patientId,
},
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["NOTIFICATION_SETTINGS"],
});
};
;
if (false ) {}
/***/ }),
/* 847 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/summary-card", function() { return __webpack_require__(63); });
global.registerModule("components/summary-card/SummaryCard", function() { return __webpack_require__(63); });
global.registerModule("components/glucose-chart", function() { return __webpack_require__(170); });
global.registerModule("components/glucose-chart/glucose-chart", function() { return __webpack_require__(170); });
global.registerModule("components/getting-started-banner", function() { return __webpack_require__(164); });
global.registerModule("components/getting-started-banner/getting-started-banner", function() { return __webpack_require__(164); });
global.registerModule("components/getting-started-banner/getting-started-banner.xml", function() { return __webpack_require__(350); });
module.exports = "<Page\n class=\"page\"\n navigatingTo=\"onNavigatingTo\"\n navigatingFrom=\"onNavigatingFrom\"\n loaded=\"onLoaded\"\n unloaded=\"onUnloaded\"\n xmlns:ab=\"components/action-bar\"\n xmlns:gc=\"components/glucose-chart\"\n xmlns:sc=\"components/summary-card\"\n xmlns:gsb=\"components/getting-started-banner\"\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n>\n <ab:action-bar fallbackNav=\"{{backNav}}\" showLogo=\"true\" showMenu=\"{{!showBack}}\" flat=\"true\">\n <ActionItem android:class=\"icfont icxxsm\" ios:class=\"icfont icsm\" icon=\"font://settings\" tap=\"goToSettings\" ios.position=\"right\" />\n </ab:action-bar>\n\n <GridLayout columns=\"*, auto, *\" rows=\"auto, auto, *, auto\">\n <StackLayout col=\"0\" row=\"0\" colSpan=\"3\" class=\"extended-action-bar\" verticalAlignment=\"top\" />\n <sc:SummaryCard col=\"0\" row=\"0\" colSpan=\"3\" id=\"summary-card\" margin=\"1 16 25 16\" patientId=\"{{patientId}}\" measurement=\"{{measurement}}\"\n isHistoricMeasurement=\"{{reviewing}}\" showInfoAlerts=\"true\" ripple=\"false\" tap=\"onCardTap\" />\n\n <Label row=\"1\" col=\"0\" class=\"unit-label\" text=\"{{L(isMmolPerL ? 'Common.mmmol' : 'Common.mgdl')}}\" />\n\n <!-- Dummy view to have tapping on the right side of graph reset it -->\n <StackLayout col=\"0\" colSpan=\"3\" row=\"2\" tap=\"resetGraph\" />\n\n <gc:glucose-chart col=\"0\" colSpan=\"3\" row=\"2\" id=\"chart\"\n currentGlucose=\"{{currentGlucose}}\"\n highAlarm=\"{{highAlarm}}\"\n isMmolPerL=\"{{isMmolPerL}}\"\n items=\"{{items}}\"\n lowAlarm=\"{{lowAlarm}}\"\n reviewing=\"{{reviewing}}\"\n selectedItem=\"{{selectedItem}}\"\n targetHighThreshold=\"{{targetHighThreshold}}\"\n targetLowThreshold=\"{{targetLowThreshold}}\"\n timezoneId=\"{{timezoneId}}\"\n />\n\n <Button col=\"1\" row=\"3\" id=\"logbook-btn\" class=\"btn libre-orange\" tap=\"goToLogbook\">\n <FormattedString>\n <Span text=\"logbook\" fontSize=\"20\" class=\"icfont\" />\n <Span text=\"{{' ' + L('Summary.logbook')}}\" />\n </FormattedString>\n </Button>\n <!-- Getting Started Banner -->\n <gsb:getting-started-banner col=\"0\" colSpan=\"3\" row=\"2\" rowSpan=\"2\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 848 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 849 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"margin-top","value":"8"},{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"text-align","value":"center"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 850 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToGraphTutorialGreenArea", function() { return goToGraphTutorialGreenArea; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58);
function onLoaded(args) {
var vm = new _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__["GraphTutorialViewModel"]('3');
var page = args.object;
page.bindingContext = vm;
}
function goToGraphTutorialGreenArea(args) {
var modal = args.object;
var page = modal.page;
page.frame.navigate(_constants__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_GREEN_AREA"]);
}
;
if (false ) {}
/***/ }),
/* 851 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n loaded=\"onLoaded\">\n\n <ab:action-bar title=\"{{L('Help.graph_tutorial')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-graph-tutorial\" src=\"{{graphlottie}}\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h3 center-light\" text=\"{{L('Help.dashed_lines_blurb')}}\" textWrap=\"true\" />\n <Label class=\"body black-2 md\" text=\"{{L('Help.only_compatible_sensors')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.next')}}\" tap=\"goToGraphTutorialGreenArea\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 852 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 853 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closeGraphTutorialModal", function() { return closeGraphTutorialModal; });
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
/* harmony import */ var _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58);
function onLoaded(args) {
var vm = new _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__["GraphTutorialViewModel"]('4');
var page = args.object;
page.bindingContext = vm;
}
function closeGraphTutorialModal() {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_0__["onCloseModal"])();
}
;
if (false ) {}
/***/ }),
/* 854 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n loaded=\"onLoaded\">\n\n <ab:action-bar title=\"{{L('Help.graph_tutorial')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-graph-tutorial\" src=\"{{graphlottie}}\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <Label class=\"h3 center-light\" text=\"{{L('Help.green_area_blurb')}}\" textWrap=\"true\" />\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Help.done')}}\" tap=\"closeGraphTutorialModal\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 855 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = "<Frame defaultPage=\"views/graph-tutorial/graph-tutorial-your-connection\"/>\n";
if (false ) {}
/***/ }),
/* 856 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 857 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToGraphTutorialDashedLines", function() { return goToGraphTutorialDashedLines; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58);
function onLoaded(args) {
var vm = new _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__["GraphTutorialViewModel"]('2');
var page = args.object;
page.bindingContext = vm;
}
function goToGraphTutorialDashedLines(args) {
var modal = args.object;
var page = modal.page;
page.frame.navigate(_constants__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_DASHED_LINES"]);
}
;
if (false ) {}
/***/ }),
/* 858 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n loaded=\"onLoaded\">\n\n <ab:action-bar title=\"{{L('Help.graph_tutorial')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-graph-tutorial\" src=\"{{graphlottie}}\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <Label class=\"h3 center-light\" text=\"{{L('Help.tap_anywhere_blurb')}}\" textWrap=\"true\" />\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.next')}}\" tap=\"goToGraphTutorialDashedLines\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 859 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 860 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToGraphTutorialTapAnywhere", function() { return goToGraphTutorialTapAnywhere; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58);
var onLoaded = function (args) {
var vm = new _view_models_graph_tutorial__WEBPACK_IMPORTED_MODULE_1__["GraphTutorialViewModel"]('1');
var page = args.object;
page.bindingContext = vm;
};
var goToGraphTutorialTapAnywhere = function (args) {
var modal = args.object;
var page = modal.page;
page.frame.navigate(_constants__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_TAP_ANYWHERE"]);
};
;
if (false ) {}
/***/ }),
/* 861 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoaded\">\n\n <ab:action-bar title=\"{{L('Help.graph_tutorial')}}\" fallbackNav=\"onCloseModal\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-graph-tutorial\" src=\"{{graphlottie}}\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <Label class=\"h3 center-light\" text=\"{{L('Help.last_glucose_value_blurb')}}\" textWrap=\"true\" />\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.next')}}\" tap=\"goToGraphTutorialTapAnywhere\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 862 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".help-card"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-bottom-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-bottom-width","value":"1"},{"type":"declaration","property":"height","value":"60"},{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"width","value":"90%"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 863 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".help-card"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-bottom-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-bottom-width","value":"1"},{"type":"declaration","property":"height","value":"60"},{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"width","value":"90%"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 864 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "openModal", function() { return openModal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToAddConnectionSAM", function() { return goToAddConnectionSAM; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToNotificationsSAM", function() { return goToNotificationsSAM; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSupportSAM", function() { return goToSupportSAM; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(17);
var onNavigatingTo = function (args) {
var page = args.object;
var viewModel = new _view_models_base__WEBPACK_IMPORTED_MODULE_2__["BaseViewModel"]();
page.bindingContext = viewModel;
};
var openModal = function (args) {
var mainpage = args.object.page;
var options = {
context: '',
closeCallback: function () {
//
},
fullscreen: true,
};
mainpage.showModal(_constants__WEBPACK_IMPORTED_MODULE_0__["GRAPH_TUTORIAL_MODAL_ROOT"], options);
};
var goToAddConnectionSAM = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["openConfigLink"])('lluSAM', 'articles/getting-started');
};
var goToNotificationsSAM = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["openConfigLink"])('lluSAM', 'articles/notifications');
};
var goToSupportSAM = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_1__["openConfigLink"])('lluSupportMain');
};
;
if (false ) {}
/***/ }),
/* 865 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Help.help')}}\" />\n\n <GridLayout rows=\"auto, auto, auto, auto, *\">\n\n <FlexboxLayout row=\"0\" class=\"help-card\" tap=\"goToAddConnectionSAM\">\n <Label class=\"body black-3 md\" text=\"{{L('Help.add_connection')}}\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n\n <FlexboxLayout row=\"1\" class=\"help-card\" tap=\"openModal\">\n <Label class=\"body black-3 md\" text=\"{{L('Help.graph_tutorial')}}\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n\n <FlexboxLayout row=\"2\" class=\"help-card\" tap=\"goToNotificationsSAM\">\n <Label class=\"body black-3 md\" text=\"{{L('Help.notifications')}}\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n\n <FlexboxLayout row=\"3\" class=\"help-card\" tap=\"goToSupportSAM\">\n <Label class=\"body black-3 md\" text=\"{{L('Help.customer_support')}}\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 866 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["Image"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"}]},{"type":"rule","selectors":["Label"],"declarations":[{"type":"declaration","property":"margin-top","value":"26"}]},{"type":"rule","selectors":["Page"],"declarations":[{"type":"declaration","property":"background","value":"linear-gradient(white, #ffe46b)"}]},{"type":"rule","selectors":["#logo-circle"],"declarations":[{"type":"declaration","property":"margin","value":"20% 0"}]},{"type":"rule","selectors":[".btn.tertiary-light"],"declarations":[{"type":"declaration","property":"font-family","value":"'Source Sans Pro', 'SourceSansPro-Regular'"},{"type":"declaration","property":"font-weight","value":"300"},{"type":"declaration","property":"background-color","value":"rgba(255, 255, 255, 0.9)"},{"type":"declaration","property":"color","value":"#cf4520"},{"type":"declaration","property":"margin","value":"16 0 16 0"},{"type":"declaration","property":"width","value":"90%"}]},{"type":"rule","selectors":[".ns-root.ns-dark .btn.tertiary-light"],"declarations":[{"type":"declaration","property":"background-color","value":"#494949"},{"type":"declaration","property":"color","value":"white"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 867 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToWelcomeOverview", function() { return goToWelcomeOverview; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToLogin", function() { return goToLogin; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
var goToWelcomeOverview = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["WELCOME_OVERVIEW"]);
};
var goToLogin = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["LOGIN"]);
};
;
if (false ) {}
/***/ }),
/* 868 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/aware-image", function() { return __webpack_require__(50); });
global.registerModule("components/aware-image/aware-image", function() { return __webpack_require__(50); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:AwareImage=\"components/aware-image\"\n actionBarHidden=\"true\"\n >\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <AwareImage:aware-image id=\"logo-circle\" src=\"res://logocircle\" />\n <ScrollView>\n <StackLayout>\n <AwareImage:aware-image src=\"res://librelinkup\" />\n <Label class=\"h2 center-light\" text=\"{{L('Home.manage_diabetes')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <StackLayout row=\"1\">\n <Button class=\"btn primary-light blg\" text=\"{{L('Home.get_started_now')}}\" tap=\"goToWelcomeOverview\" />\n <Button class=\"btn tertiary-light\" text=\"{{L('Common.login')}}\" tap=\"goToLogin\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 869 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".ns-root.ns-dark #loader-view"],"declarations":[{"type":"declaration","property":"background","value":"#111111"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 870 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingFrom", function() { return onNavigatingFrom; });
/* harmony import */ var _reducers_nav_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1);
var unSub;
function onLoad() {
var firstGo = true;
var firstNavReady = false;
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_2__["observeStore"])(function (_a) {
var auth = _a.auth, nav = _a.nav, user = _a.user;
return ({
loggedIn: auth.loggedIn,
navReady: nav.ready,
userId: user.id,
view: nav.location,
});
}, function (_a) {
var navReady = _a.navReady, view = _a.view;
if (firstGo) {
firstNavReady = navReady;
}
// If this is the first go and navigation is ready, this means we unexpectedly got back to the loader,
// in this case we should safely navigate back to where ever we were
if (firstGo && view && firstNavReady) {
setTimeout(function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])({ clearHistory: true, moduleName: view });
});
}
firstGo = false;
});
}
function onUnloaded() {
unSub && unSub();
}
function onNavigatingFrom() {
unSub && unSub();
if (!_store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().nav.ready) {
_store_store__WEBPACK_IMPORTED_MODULE_2__["store"].dispatch({ type: _reducers_nav_types__WEBPACK_IMPORTED_MODULE_0__["NAVIGATION_READY"] });
_utilities_mediator__WEBPACK_IMPORTED_MODULE_3__["default"].publish('navigation:ready');
}
}
;
if (false ) {}
/***/ }),
/* 871 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/aware-image", function() { return __webpack_require__(50); });
global.registerModule("components/aware-image/aware-image", function() { return __webpack_require__(50); });
module.exports = "<page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n navigatingTo=\"onNavigatingTo\"\n navigatingFrom=\"onNavigatingFrom\"\n loaded=\"onLoad\"\n unloaded=\"onUnloaded\"\n actionBarHidden=\"true\"\n xmlns:AwareImage=\"components/aware-image\"\n id=\"loader-view\">\n\n <AwareImage:aware-image src=\"res://logocircle\" horizontalAlignment=\"center\" verticalAlignment=\"center\"/>\n</page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 872 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#measurementList"],"declarations":[{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"separator-color","value":"rgba(0, 0, 0, 0.25)"}]},{"type":"rule","selectors":["#measurementListView .structure-no-readings"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"height","value":"100%"},{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":[".date-wrap"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"height","value":"40"},{"type":"declaration","property":"justify-content","value":"center"}]},{"type":"rule","selectors":[".no-readings-label"],"declarations":[{"type":"declaration","property":"margin","value":"10 0 10 0"},{"type":"declaration","property":"opacity","value":"0.8"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 873 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "itemTemplateSelector", function() { return itemTemplateSelector; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onItemLoading", function() { return onItemLoading; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLogbookItemTap", function() { return onLogbookItemTap; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
/* harmony import */ var _utilities_date_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(35);
/* harmony import */ var _view_models_logbook__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(191);
function onNavigatingTo(args) {
var page = args.object;
var patientId = args.context && args.context.PatientID;
var connection = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().connection.connections.find(function (c) { return c.patientId === patientId; });
var viewModel = new _view_models_logbook__WEBPACK_IMPORTED_MODULE_6__["MeasurementViewModel"]();
page.bindingContext = viewModel;
viewModel.setPatientContext(connection);
}
function onLoad(args) {
var page = args.object;
var fontIsScaled = _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["isOSFontScaleEnlarged"]();
var list = page.getViewById('measurementList');
var viewModel = page.bindingContext;
if (list !== undefined) {
var tableView = list.ios;
if (tableView) {
try {
// Adding an empty footer view prevents iOS from showing list separators
// when there aren't enough items to fill the whole screen
tableView.tableFooterView = UIView.new();
}
catch (e) { }
}
}
// Since NS doesn't support dp font sizes
// this hack is required.
if (fontIsScaled) {
page.addCss('.recent-reading {font-size: 38}');
page.addCss('.measurement-value {font-size: 30}');
}
viewModel.init();
}
function itemTemplateSelector(item) {
switch (item.get('type')) {
case -2:
return 'header';
case 2:
return 'alarm';
}
return 'glucose';
}
function onItemLoading(args) {
var cell = args.ios;
if (cell) {
// Disabeles tap highlight
cell.selectionStyle = UITableViewCellSelectionStyle.None;
// Makes separator stretch all the way to the edge
cell.separatorInset = UIEdgeInsetsZero;
}
}
function onLogbookItemTap(args) {
var page = args.object.page;
var viewModel = page.bindingContext;
var item = viewModel.measurements[args.index];
var timezone = _store_store__WEBPACK_IMPORTED_MODULE_3__["store"].getState().user.timezone;
if (item) {
if (item.type === _models_types__WEBPACK_IMPORTED_MODULE_1__["GlucoseItemType"].CaregiverAlarm) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])(item.alarmType === _models_types__WEBPACK_IMPORTED_MODULE_1__["CaregiverAlarmType"].High
? 'Summary.received_high_glucose_alarm_caregiver_set'
: 'Summary.received_low_glucose_alarm_caregiver_set', viewModel.patientFirstName, Object(_utilities_date_util__WEBPACK_IMPORTED_MODULE_5__["dateTimeStamp"])(item.FactoryTimestamp), timezone));
}
else if (item.type === _models_types__WEBPACK_IMPORTED_MODULE_1__["GlucoseItemType"].DeviceAlarm) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])(item.alarmType === 1
? 'Summary.received_high_glucose_alarm_passthrough'
: item.alarmType === 2
? 'Summary.received_urgent_low_glucose_alarm_passthrough'
: 'Summary.received_low_glucose_alarm_passthrough', viewModel.patientFirstName, Object(_utilities_date_util__WEBPACK_IMPORTED_MODULE_5__["dateTimeStamp"])(item.FactoryTimestamp), timezone));
}
else if (item.type !== -2) {
if (item.isHigh || item.isLow) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])(item.isHigh ? 'Summary.very_high_glucose' : 'Summary.very_low_glucose'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Summary.glucose_out_of_range_at', Object(_utilities_date_util__WEBPACK_IMPORTED_MODULE_5__["dateTimeStamp"])(item.FactoryTimestamp), timezone));
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_2__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Summary.scanned_sensor_at', viewModel.patientFirstName, Object(_utilities_date_util__WEBPACK_IMPORTED_MODULE_5__["dateTimeStamp"])(item.FactoryTimestamp), timezone));
}
}
}
}
;
if (false ) {}
/***/ }),
/* 874 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/glucose-measurement", function() { return __webpack_require__(94); });
global.registerModule("components/glucose-measurement/glucose-measurement", function() { return __webpack_require__(94); });
global.registerModule("components/glucose-measurement/glucose-measurement.xml", function() { return __webpack_require__(171); });
global.registerModule("components/alarm", function() { return __webpack_require__(163); });
global.registerModule("components/alarm/alarm", function() { return __webpack_require__(163); });
global.registerModule("components/alarm/alarm.xml", function() { return __webpack_require__(348); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:Alarm=\"components/alarm\"\n xmlns:GlucoseMeasurement=\"components/glucose-measurement\"\n navigatingTo=\"onNavigatingTo\"\n loaded=\"onLoad\"\n rtl=\"{{isRTL}}\"\n class=\"page\"\n>\n\n <ab:action-bar title=\"{{L('Summary.logbook')}}\" />\n\n <!-- Measurement list view content -->\n <StackLayout id=\"measurementListView\">\n <!-- Measurement list box -->\n <ListView id=\"measurementList\" items=\"{{measurements}}\" itemTap=\"onLogbookItemTap\"\n itemLoading=\"onItemLoading\" itemTemplateSelector=\"itemTemplateSelector\"\n visibility=\"{{measurements.length > 0 ? 'visible' : 'collapsed'}}\"\n >\n <ListView.itemTemplates>\n <template key=\"header\">\n <!-- Date header -->\n <FlexboxLayout class=\"date-wrap flex-row\" visibility=\"{{header ? 'visible' : 'collapsed'}}\">\n <Label class=\"date-seperator bold md\" text=\"{{header}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </template>\n <template key=\"glucose\">\n <GlucoseMeasurement:glucose-measurement />\n </template>\n <template key=\"alarm\">\n <Alarm:alarm />\n </template>\n </ListView.itemTemplates>\n </ListView>\n\n <!-- No readings box -->\n <FlexboxLayout class=\"structure-no-readings flex-col\" height=\"100%\" justifyContent=\"center\" visibility=\"{{(readingCount === 0) ? 'visible' : 'collapsed'}}\">\n <Label class=\"icfont icsm\" text=\"logbook\" />\n <Label class=\"no-readings-label md\" text=\"{{L('no_logbook_entries')}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </StackLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 875 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#login-txt"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"14"}]},{"type":"rule","selectors":[".page .btn"],"declarations":[{"type":"declaration","property":"margin","value":"10 0 28 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 876 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToForgotPassword", function() { return goToForgotPassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "login", function() { return login; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _view_models_login__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(192);
function onNavigatingTo(args) {
var page = args.object;
var userViewModel = new _view_models_login__WEBPACK_IMPORTED_MODULE_2__["LoginViewModel"]();
page.bindingContext = userViewModel;
}
var goToForgotPassword = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["FORGOT_PASSWORD"]);
};
var login = function (args) {
var button = args.object;
var context = button.page.bindingContext;
button.handleRunning(context.login());
};
;
if (false ) {}
/***/ }),
/* 877 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/loading-button", function() { return __webpack_require__(48); });
global.registerModule("components/loading-button/LoadingButton", function() { return __webpack_require__(48); });
module.exports = "<page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n xmlns:lb=\"components/loading-button\"\n navigatingTo=\"onNavigatingTo\"\n class=\"page\">\n\n <ab:action-bar title=\"{{L('Common.login')}}\" fallbackNav=\"{{backNav}}\"/>\n\n <GridLayout rows=\"auto, auto, *\">\n <StackLayout row=\"0\" class=\"text-container\">\n <Label id=\"login-txt\" class=\"body black-3 md\" text=\"{{L('Login.login_blurb')}}\" textWrap=\"true\" />\n <fl:float-label\n text=\"{{email}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.email_address')}}\"\n keyboardType=\"email\"\n returnKeyType=\"next\"\n />\n <fl:float-label\n text=\"{{password}}\"\n hint=\"{{L('Common.password')}}\"\n returnKeyType=\"done\"\n secure=\"true\"\n />\n </StackLayout>\n <StackLayout row=\"1\">\n <lb:LoadingButton class=\"btn primary-light blg\" text=\"{{L('Common.login')}}\" tap=\"login\" />\n <Label class=\"body orange-1 md\" text=\"{{L('Login.forgot_password')}}\" textWrap=\"true\" horizontalAlignment=\"center\" tap=\"goToForgotPassword\"/>\n </StackLayout>\n <StackLayout row=\"2\" tap=\"{{dismissKeyboard}}\" />\n </GridLayout>\n</page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 878 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#loti-new-feature"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"16"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"0, 32"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"16 32 0 32"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 879 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToMeasurementsSummary", function() { return goToMeasurementsSummary; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var goToMeasurementsSummary = function () {
// Mark new-feature-modal as seen
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].publish('user:dismissSystemMessage', { messageId: 'lluNewFeatureModal' });
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])({ clearHistory: true, moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["MEASUREMENTS_SUMMARY"] }, true);
// We can now subscribe
setTimeout(function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].publish('fcm:subscribe');
}, 0);
};
;
if (false ) {}
/***/ }),
/* 880 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\">\n\n <ab:action-bar showLogo=\"true\" showBack=\"false\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-new-feature\" src=\"res://lluinfo.json\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('NewFeatureModal.new_features')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('NewFeatureModal.listened_to_comments')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('NewFeatureModal.get_started')}}\" tap=\"goToMeasurementsSummary\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 881 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]},{"type":"rule","selectors":["#learn-more-link"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".alarm-settings-title"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 882 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapAlarmCard", function() { return onTapAlarmCard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSAMSite", function() { return goToSAMSite; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
setupAlarmCard(page, context);
if (context.highThreshold) {
setThresholdText(page, context);
}
context.handleGoogleAnalyticsNS('HGA');
};
var setupAlarmCard = function (page, context) {
var alarmCard = page.getViewById('high-alarm-card');
var alarmSwitch = page.getViewById('high-alarm-switch');
if (context.patHighEnabled) {
alarmSwitch.on('checkedChange', function (args) {
var sw = args.object;
context.set('cgHighEnabled', sw.checked);
});
}
else {
alarmSwitch.isEnabled = false;
alarmSwitch.isUserInteractionEnabled = false;
alarmCard.on('tap', function () {
var firstName = context.firstName;
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.alarm_off'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.sensor_app_not_support_alarm', firstName, firstName));
});
}
};
var setThresholdText = function (page, context) {
var glucoseLabel = page.getViewById('glucose-value');
var uom = context.isMgdl ? Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mgdl') : Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mmmol');
var threshold = context.isMgdl
? context.highThreshold
: Number(context.highThreshold).toFixed(1);
glucoseLabel.text = threshold + " " + uom;
};
var onTapAlarmCard = function (args) {
var page = args.view.page;
var context = page.bindingContext;
var sensor = context.sensor;
if (sensor === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL3) {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({
bindingContext: context,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["HIGH_GLUCOSE_PICKER"],
});
}
else if (sensor !== _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL1) {
var firstName = context.firstName;
if (context.highThreshold) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.setting_changed_their_app', firstName));
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.settings_appear_after', firstName, firstName));
}
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
}
};
var goToSAMSite = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["openConfigLink"])('lluSAM');
};
;
if (false ) {}
/***/ }),
/* 883 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Common.high_glucose_alarm')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, auto, *\">\n\n <!-- High Glucose Alarm Card -->\n <Card:CardView row=\"0\" id=\"high-alarm-card\" class=\"notification-card medium\">\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"bold md\" text=\"{{L('Common.high_glucose_alarm')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options switch\">\n <Label\n class=\"{{'card-status glucose ' + (cgHighEnabled ? 'on' : 'off')}}\"\n text=\"{{cgHighEnabled? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Switch\n id=\"high-alarm-switch\"\n android:color=\"{{cgHighEnabled ? 'rgb(207, 69, 32)' : '#ECECEC'}}\"\n ios:color=\"white\"\n ios:backgroundColor=\"rgb(207, 69, 32)\"\n ios:offBackgroundColor=\"rgb(230, 229, 228)\"\n checked=\"{{cgHighEnabled}}\"\n />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- Alarm Settings Card -->\n <FlexboxLayout row=\"1\" class=\"flex-col\" visibility=\"{{cgHighEnabled ? 'visible' : 'collapsed'}}\">\n <Label class=\"alarm-settings-title body black-2 md\" text=\"{{L('NotificationSettings.alarm_settings')}}\" textWrap=\"true\" />\n <Card:CardView class=\"notification-card large\" tap=\"onTapAlarmCard\" >\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"alarm-settings-text bold md\"\n text=\"{{ highThreshold ? L('NotificationSettings.receive_notification_glucose_above') : L('NotificationSettings.connection_setting_unknown') }}\"\n textWrap=\"true\"\n />\n <FlexboxLayout class=\"notification-options\">\n <Label id=\"glucose-value\" class=\"card-status on\" text=\"\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{ sensor === 4 ? (isRTL ? 'linkr' : 'link') : 'info' }}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n </FlexboxLayout>\n\n <Label row=\"2\" id=\"learn-more-link\" class=\"body orange-2 md\" text=\"{{L('Common.learn_more')}}\" tap=\"goToSAMSite\" textWrap=\"true\"/>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 884 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"margin","value":"16 40 32 40"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 885 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onListPickerLoaded", function() { return onListPickerLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onSaveButtonTap", function() { return onSaveButtonTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCancelButtonTap", function() { return onCancelButtonTap; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
var isMgdl;
var glucoseValues;
var startingIndex;
var selectedValue;
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
isMgdl = context.isMgdl;
glucoseValues = getGlucoseValues();
startingIndex = getStartingIndex(context.highThreshold);
context.set('highPickerOptions', getPickerOptions());
context.set('highStartingIndex', startingIndex);
};
var getGlucoseValues = function () {
var start = 6.7;
var end = 22.2;
var increment = 0.1;
var vals = [];
if (isMgdl) {
start = 120;
end = 400;
increment = 10;
}
while (start <= end) {
vals.push(start);
start += increment;
if (!isMgdl) {
start = parseFloat(start.toFixed(1));
}
}
return vals;
};
var getPickerOptions = function () {
var measurement = isMgdl ? "" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mgdl') : "" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mmmol');
return glucoseValues.map(function (val) { return (isMgdl ? val.toString() : val.toFixed(1)) + " " + measurement; });
};
var getStartingIndex = function (threshold) {
var index = 0;
// Find the closest value for the current threshold
for (var i = glucoseValues.length - 1; i >= 0; i--) {
if (Math.abs(threshold - glucoseValues[i]) < Math.abs(threshold - glucoseValues[index])) {
index = i;
}
}
return index;
};
var onListPickerLoaded = function (args) {
var listPickerComponent = args.object;
selectedValue = glucoseValues[startingIndex];
listPickerComponent.on('selectedIndexChange', function (fargs) {
var picker = fargs.object;
selectedValue = glucoseValues[picker.selectedIndex];
console.log("index: " + picker.selectedIndex + "; item: " + glucoseValues[picker.selectedIndex]);
});
};
var onSaveButtonTap = function (args) {
var page = args.object;
var context = page.bindingContext;
var threshold = isMgdl ? selectedValue : Number(selectedValue).toFixed(1);
context.set('highThreshold', threshold);
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
var onCancelButtonTap = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
;
if (false ) {}
/***/ }),
/* 886 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar showBack=\"false\" title=\"{{L('Common.high_glucose_alarm')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, *, auto\">\n <Label row=\"0\" class=\"h3 center-light\" text=\"{{L('NotificationSettings.set_high_glucose_value', firstName)}}\" textWrap=\"true\"/>\n\n <ListPicker row=\"1\" class=\"picker\" items=\"{{ highPickerOptions }}\" selectedIndex=\"{{highStartingIndex}}\" loaded=\"onListPickerLoaded\" />\n\n <FlexboxLayout row=\"3\" class=\"flex-row\">\n <Button class=\"btn split-light bmd\" text=\"{{L('Common.cancel_label')}}\" tap=\"onCancelButtonTap\" />\n <Button class=\"btn primary-light bmd\" text=\"{{L('Common.save')}}\" tap=\"onSaveButtonTap\" />\n </FlexboxLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 887 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]},{"type":"rule","selectors":["#learn-more-link"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".alarm-settings-title"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 888 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapAlarmCard", function() { return onTapAlarmCard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSAMSite", function() { return goToSAMSite; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _models_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(16);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5);
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
setupAlarmCard(page, context);
if (context.lowThreshold) {
setThresholdText(page, context);
}
context.handleGoogleAnalyticsNS('LGA');
};
var setupAlarmCard = function (page, context) {
var alarmCard = page.getViewById('low-alarm-card');
var alarmSwitch = page.getViewById('low-alarm-switch');
if (context.patLowEnabled) {
alarmSwitch.on('checkedChange', function (args) {
var sw = args.object;
context.set('cgLowEnabled', sw.checked);
});
}
else {
alarmSwitch.isEnabled = false;
alarmSwitch.isUserInteractionEnabled = false;
alarmCard.on('tap', function () {
var firstName = context.firstName;
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.alarm_off'), Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.sensor_app_not_support_alarm', firstName, firstName));
});
}
};
var setThresholdText = function (page, context) {
var glucoseLabel = page.getViewById('glucose-value');
var uom = context.isMgdl ? Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mgdl') : Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mmmol');
var threshold = context.isMgdl ? context.lowThreshold : Number(context.lowThreshold).toFixed(1);
glucoseLabel.text = threshold + " " + uom;
};
var onTapAlarmCard = function (args) {
var page = args.view.page;
var context = page.bindingContext;
var sensor = context.sensor;
if (sensor === _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL3) {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({
bindingContext: context,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["LOW_GLUCOSE_PICKER"],
});
}
else if (sensor !== _models_types__WEBPACK_IMPORTED_MODULE_2__["ProductType"].FSL1) {
var firstName = context.firstName;
if (context.lowThreshold) {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.setting_changed_their_app', firstName));
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.settings_appear_after', firstName, firstName));
}
}
else {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_3__["alert"])(Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('SystemMessages.unexpected_error'));
}
};
var goToSAMSite = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_5__["openConfigLink"])('lluSAM');
};
;
if (false ) {}
/***/ }),
/* 889 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Common.low_glucose_alarm')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, auto, *\">\n\n <!-- Low Glucose Alarm Card -->\n <Card:CardView row=\"0\" id=\"low-alarm-card\" class=\"notification-card medium\">\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"bold md\" text=\"{{L('Common.low_glucose_alarm')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options switch\">\n <Label\n class=\"{{'card-status glucose ' + (cgLowEnabled ? 'on' : 'off')}}\"\n text=\"{{cgLowEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Switch\n id=\"low-alarm-switch\"\n android:color=\"{{cgLowEnabled ? 'rgb(207, 69, 32)' : '#ECECEC'}}\"\n ios:color=\"white\"\n ios:backgroundColor=\"rgb(207, 69, 32)\"\n ios:offBackgroundColor=\"rgb(230, 229, 228)\"\n checked=\"{{cgLowEnabled}}\"\n />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- Alarm Settings Card -->\n <FlexboxLayout row=\"1\" class=\"flex-col\" visibility=\"{{cgLowEnabled ? 'visible' : 'collapsed'}}\">\n <Label class=\"alarm-settings-title body black-2 md\" text=\"{{L('NotificationSettings.alarm_settings')}}\" textWrap=\"true\" />\n <Card:CardView class=\"notification-card large\" tap=\"onTapAlarmCard\" >\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"alarm-settings-text bold md\"\n text=\"{{ lowThreshold ? L('NotificationSettings.receive_notification_glucose_below') : L('NotificationSettings.connection_setting_unknown') }}\"\n textWrap=\"true\"\n />\n <FlexboxLayout class=\"notification-options\">\n <Label id=\"glucose-value\" class=\"card-status on\" text=\"\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{ sensor === 4 ? (isRTL ? 'linkr' : 'link') : 'info' }}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n </FlexboxLayout>\n\n <Label row=\"2\" id=\"learn-more-link\" class=\"body orange-2 md\" text=\"{{L('Common.learn_more')}}\" tap=\"goToSAMSite\" textWrap=\"true\"/>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 890 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"margin","value":"16 40 32 40"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 891 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onListPickerLoaded", function() { return onListPickerLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onSaveButtonTap", function() { return onSaveButtonTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCancelButtonTap", function() { return onCancelButtonTap; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
var isMgdl;
var glucoseValues;
var startingIndex;
var selectedValue;
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
isMgdl = context.isMgdl;
glucoseValues = getGlucoseValues();
startingIndex = getStartingIndex(context.lowThreshold);
context.set('lowPickerOptions', getPickerOptions());
context.set('lowStartingIndex', startingIndex);
};
var getGlucoseValues = function () {
var start = 3.3;
var end = 5.6;
var increment = 0.1;
var vals = [];
if (isMgdl) {
start = 60;
end = 100;
increment = 5;
}
while (start <= end) {
vals.push(start);
start += increment;
if (!isMgdl) {
start = parseFloat(start.toFixed(1));
}
}
return vals;
};
var getPickerOptions = function () {
var measurement = isMgdl ? "" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mgdl') : "" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mmmol');
return glucoseValues.map(function (val) { return (isMgdl ? val.toString() : val.toFixed(1)) + " " + measurement; });
};
var getStartingIndex = function (threshold) {
var index = 0;
// Find the closest value for the current threshold
for (var i = glucoseValues.length - 1; i >= 0; i--) {
if (Math.abs(threshold - glucoseValues[i]) < Math.abs(threshold - glucoseValues[index])) {
index = i;
}
}
return index;
};
var onListPickerLoaded = function (args) {
var listPickerComponent = args.object;
selectedValue = glucoseValues[startingIndex];
listPickerComponent.on('selectedIndexChange', function (fargs) {
var picker = fargs.object;
selectedValue = glucoseValues[picker.selectedIndex];
console.log("index: " + picker.selectedIndex + "; item: " + glucoseValues[picker.selectedIndex]);
});
};
var onSaveButtonTap = function (args) {
var page = args.object;
var context = page.bindingContext;
var threshold = isMgdl ? selectedValue : Number(selectedValue).toFixed(1);
context.set('lowThreshold', threshold);
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
var onCancelButtonTap = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
;
if (false ) {}
/***/ }),
/* 892 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar showBack=\"false\" title=\"{{L('Common.low_glucose_alarm')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, *, auto\">\n <Label row=\"0\" class=\"h3 center-light\" text=\"{{L('NotificationSettings.set_low_glucose_value', firstName)}}\" textWrap=\"true\"/>\n\n <ListPicker row=\"1\" class=\"picker\" items=\"{{ lowPickerOptions }}\" selectedIndex=\"{{lowStartingIndex}}\" loaded=\"onListPickerLoaded\" />\n\n <FlexboxLayout row=\"3\" class=\"flex-row\">\n <Button class=\"btn split-light bmd\" text=\"{{L('Common.cancel_label')}}\" tap=\"onCancelButtonTap\" />\n <Button class=\"btn primary-light bmd\" text=\"{{L('Common.save')}}\" tap=\"onSaveButtonTap\" />\n </FlexboxLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 893 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"margin","value":"16 40 32 40"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 894 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onListPickerLoaded", function() { return onListPickerLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onSaveButtonTap", function() { return onSaveButtonTap; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onCancelButtonTap", function() { return onCancelButtonTap; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
var glucoseValues;
var startingIndex;
var selectedValue;
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
glucoseValues = getGlucoseValues();
startingIndex = getStartingIndex(context.noRecentInterval);
context.set('noRecentPickerOptions', getPickerOptions());
context.set('noRecentStartingIndex', startingIndex);
};
var getGlucoseValues = function () {
var start = 5;
var end = 60;
var increment = 5;
var vals = [];
for (var i = start; i <= end; i += increment) {
vals.push(i);
}
return vals;
};
var getPickerOptions = function () {
return glucoseValues.map(function (val) { return Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.time_delay_minutes', val.toString()); });
};
var getStartingIndex = function (interval) {
var index = 0;
// Find the closest value for the current interval
for (var i = glucoseValues.length - 1; i >= 0; i--) {
if (Math.abs(interval - glucoseValues[i]) < Math.abs(interval - glucoseValues[index])) {
index = i;
}
}
return index;
};
var onListPickerLoaded = function (args) {
var listPickerComponent = args.object;
selectedValue = glucoseValues[startingIndex];
listPickerComponent.on('selectedIndexChange', function (fargs) {
var picker = fargs.object;
selectedValue = glucoseValues[picker.selectedIndex];
console.log("index: " + picker.selectedIndex + "; item: " + glucoseValues[picker.selectedIndex]);
});
};
var onSaveButtonTap = function (args) {
var page = args.object;
var context = page.bindingContext;
context.set('noRecentInterval', selectedValue);
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
var onCancelButtonTap = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["goBack"])();
};
;
if (false ) {}
/***/ }),
/* 895 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar showBack=\"false\" title=\"{{L('Common.no_recent_data')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, *, auto\">\n <Label row=\"0\" class=\"h3 center-light\" text=\"{{L('NotificationSettings.notification_if_no_readings_within', firstName)}}\" textWrap=\"true\"/>\n\n <ListPicker row=\"1\" class=\"picker\" items=\"{{ noRecentPickerOptions }}\" selectedIndex=\"{{noRecentStartingIndex}}\" loaded=\"onListPickerLoaded\" />\n\n <FlexboxLayout row=\"3\" class=\"flex-row\">\n <Button class=\"btn split-light bmd\" text=\"{{L('Common.cancel_label')}}\" tap=\"onCancelButtonTap\" />\n <Button class=\"btn primary-light bmd\" text=\"{{L('Common.save')}}\" tap=\"onSaveButtonTap\" />\n </FlexboxLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 896 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]},{"type":"rule","selectors":["#learn-more-link"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".alarm-settings-title"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 897 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToNoRecentPicker", function() { return goToNoRecentPicker; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
setIntervalText(page, context);
};
var setIntervalText = function (page, context) {
var glucoseLabel = page.getViewById('interval-value');
var noRecentInterval = context.noRecentInterval.toString();
glucoseLabel.text = "" + Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('NotificationSettings.time_delay_minutes', noRecentInterval);
};
var goToNoRecentPicker = function (args) {
var page = args.view.page;
var ctx = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_2__["navigateTo"])({
bindingContext: ctx,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_1__["NO_RECENT_DATA_PICKER"],
});
};
;
if (false ) {}
/***/ }),
/* 898 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Common.no_recent_data')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, auto, *\">\n\n <!-- No Recent Data Card -->\n <Card:CardView row=\"0\" class=\"notification-card medium\">\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"bold md\" text=\"{{L('Common.no_recent_data')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options switch\">\n <Label\n class=\"{{'card-status glucose ' + (cgNoRecentEnabled ? 'on' : 'off')}}\"\n text=\"{{cgNoRecentEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Switch\n android:color=\"{{cgNoRecentEnabled ? 'rgb(207, 69, 32)' : '#ECECEC'}}\"\n ios:color=\"white\"\n ios:backgroundColor=\"rgb(207, 69, 32)\"\n ios:offBackgroundColor=\"rgb(230, 229, 228)\"\n checked=\"{{cgNoRecentEnabled}}\"\n />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <Label row=\"1\" class=\"body black-1 footer\" text=\"{{L('NotificationSettings.notification_if_no_readings_period', firstName)}}\" textWrap=\"true\"/>\n\n <!-- Alarm Settings Card -->\n <FlexboxLayout row=\"2\" class=\"flex-col\" visibility=\"{{cgNoRecentEnabled ? 'visible' : 'collapsed'}}\">\n <Label class=\"alarm-settings-title body black-2 md\" text=\"{{L('NotificationSettings.alarm_settings')}}\" textWrap=\"true\" />\n <Card:CardView class=\"notification-card medium\" tap=\"goToNoRecentPicker\" >\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"alarm-settings-text bold md\" text=\"{{L('NotificationSettings.receiving_notification_after')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options\">\n <Label id=\"interval-value\" class=\"card-status on\" text=\"\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n </FlexboxLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 899 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"center"},{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"margin","value":"16 40 32 40"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 900 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]},{"type":"rule","selectors":["#learn-more-link"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".alarm-settings-title"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 901 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 902 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 903 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingFrom", function() { return onNavigatingFrom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToUrgentLowGlucoseAlarmSettings", function() { return goToUrgentLowGlucoseAlarmSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToLowGlucoseAlarmSettings", function() { return goToLowGlucoseAlarmSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToHighGlucoseAlarmSettings", function() { return goToHighGlucoseAlarmSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToNoRecentDataSettings", function() { return goToNoRecentDataSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapPhoneSettings", function() { return onTapPhoneSettings; });
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
/* harmony import */ var _nativescript_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(123);
/* harmony import */ var nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3);
/* harmony import */ var _view_models_notification_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(193);
var handleOSNotificationsSwitch = function () {
var vm = this.bindingContext;
var notificationsEnabled = nativescript_plugin_firebase_messaging__WEBPACK_IMPORTED_MODULE_1__["messaging"].areNotificationsEnabled();
vm.set('notificationsEnabled', notificationsEnabled);
if (notificationsEnabled) {
return;
}
if (!_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().canGoBack()) {
return;
}
var notifSettingsBSEntry = _nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().backStack.find(function (bs) {
return bs.entry.moduleName === _constants__WEBPACK_IMPORTED_MODULE_2__["NOTIFICATION_SETTINGS"];
});
if (!notifSettingsBSEntry) {
return;
}
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Frame"].topmost().goBack(notifSettingsBSEntry);
};
var onNavigatingTo = function (args) {
if (args.isBackNavigation) {
return;
}
var page = args.object;
var patID = args.context && args.context.PatientID;
var connection = _store_store__WEBPACK_IMPORTED_MODULE_4__["store"].getState().connection.connections.find(function (c) { return c.patientId === patID; });
var vm = new _view_models_notification_settings__WEBPACK_IMPORTED_MODULE_5__["NotificationSettingsViewModel"](connection);
page.bindingContext = vm;
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].on(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].resumeEvent, handleOSNotificationsSwitch, page);
};
var onLoad = function (args) {
var page = args.object;
var context = page.bindingContext;
context.refreshNotificationSettings().then(function () {
context.handleGoogleAnalyticsNS();
});
};
var onNavigatingFrom = function (args) {
if (!args.isBackNavigation) {
return;
}
var page = args.object;
var context = page.bindingContext;
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].off(_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].resumeEvent, handleOSNotificationsSwitch, page);
if (!context.notificationsEnabled) {
return;
}
context.updateSettings();
};
var goToUrgentLowGlucoseAlarmSettings = function (args) {
var page = args.view.page;
var ctx = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])({
bindingContext: ctx,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["URGENT_LOW_GLUCOSE_ALARM"],
});
};
var goToLowGlucoseAlarmSettings = function (args) {
var page = args.view.page;
var ctx = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])({
bindingContext: ctx,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["LOW_GLUCOSE_ALARM"],
});
};
var goToHighGlucoseAlarmSettings = function (args) {
var page = args.view.page;
var ctx = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])({
bindingContext: ctx,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["HIGH_GLUCOSE_ALARM"],
});
};
var goToNoRecentDataSettings = function (args) {
var page = args.view.page;
var ctx = page.bindingContext;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_3__["navigateTo"])({
bindingContext: ctx,
moduleName: _constants__WEBPACK_IMPORTED_MODULE_2__["NO_RECENT_DATA"],
});
};
var onTapPhoneSettings = function () {
if (_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["isIOS"]) {
iosOpenSettings();
}
else {
androidOpenSettings();
}
};
var iosOpenSettings = function () {
UIApplication.sharedApplication.openURL(NSURL.URLWithString(UIApplicationOpenSettingsURLString));
};
var androidOpenSettings = function () {
_nativescript_core__WEBPACK_IMPORTED_MODULE_0__["Application"].android.foregroundActivity.startActivity(new android.content.Intent(android.provider.Settings.ACTION_SETTINGS));
};
;
if (false ) {}
/***/ }),
/* 904 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n navigatingTo=\"onNavigatingTo\"\n navigatingFrom=\"onNavigatingFrom\"\n loaded=\"onLoad\">\n\n <ab:action-bar title=\"{{L('NotificationSettings.notification_settings')}}\" />\n\n <StackLayout>\n <!-- Notifications Enabled -->\n <GridLayout rows=\"auto, auto, auto, auto, auto, *\" class=\"bg-section-2\" visibility=\"{{notificationsEnabled ? 'visible' : 'collapsed'}}\">\n\n <!-- Glucose Readings Card -->\n <FlexboxLayout row=\"0\" class=\"flex-col\" visibility=\"{{sensor === 4 ? 'collapsed' : 'visible'}}\" >\n <Card:CardView class=\"notification-card medium\">\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"bold md\" text=\"{{L('NotificationSettings.glucose_readings')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options switch\">\n <Label\n class=\"{{'card-status glucose ' + (scansEnabled ? 'on' : 'off')}}\"\n text=\"{{scansEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Switch\n android:color=\"{{scansEnabled ? 'rgb(207, 69, 32)' : '#ECECEC'}}\"\n ios:color=\"white\"\n ios:backgroundColor=\"rgb(207, 69, 32)\"\n ios:offBackgroundColor=\"rgb(230, 229, 228)\"\n checked=\"{{scansEnabled}}\"\n />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n <Label class=\"body black-1 footer\" text=\"{{L('NotificationSettings.glucose_readings_description')}}\" textWrap=\"true\"/>\n </FlexboxLayout>\n\n <!-- Urgent Low Glucose Alarm Card -->\n <Card:CardView row=\"1\" class=\"notification-card large\" visibility=\"{{sensor === 3 &amp;&amp; isfEnabled ? 'visible' : 'collapsed'}}\" tap=\"goToUrgentLowGlucoseAlarmSettings\">\n <FlexboxLayout class=\"card-row flex-row\">\n <StackLayout>\n <Label class=\"bold md\" text=\"{{L('Common.urgent_low_glucose_alarm')}}\" textWrap=\"true\" />\n <Label class=\"body black-1 sm glucose-info\" textWrap=\"true\"\n visibility=\"{{ cgUrgentLowEnabled ? 'visible' : 'collapsed' }}\"\n text=\"{{ urgentLowThreshold , urgentLowThreshold ? L('NotificationSettings.glucose_below', urgentLowThreshold, (isMgdl ? L('Common.mgdl') : L('Common.mmmol')) ) : L('NotificationSettings.threshold_unknown') }}\"\n />\n </StackLayout>\n <FlexboxLayout class=\"notification-options\">\n <Label class=\"{{'card-status ' + (cgUrgentLowEnabled ? 'on' : 'off')}}\"\n text=\"{{cgUrgentLowEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- Low Glucose Alarm Card -->\n <Card:CardView row=\"2\" class=\"notification-card large\" visibility=\"{{sensor === 0 ? 'collapsed' : 'visible'}}\" tap=\"goToLowGlucoseAlarmSettings\">\n <FlexboxLayout class=\"card-row flex-row\">\n <StackLayout>\n <Label class=\"bold md\" text=\"{{L('Common.low_glucose_alarm')}}\" textWrap=\"true\" />\n <Label class=\"body black-1 sm glucose-info\" textWrap=\"true\"\n visibility=\"{{ cgLowEnabled ? 'visible' : 'collapsed' }}\"\n text=\"{{ lowThreshold ? L('NotificationSettings.glucose_below', lowThreshold, (isMgdl ? L('Common.mgdl') : L('Common.mmmol')) ) : L('NotificationSettings.threshold_unknown') }}\"\n />\n </StackLayout>\n <FlexboxLayout class=\"notification-options\">\n <Label class=\"{{'card-status ' + (cgLowEnabled ? 'on' : 'off')}}\"\n text=\"{{cgLowEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- High Glucose Alarm Card -->\n <Card:CardView row=\"3\" class=\"notification-card large\" visibility=\"{{sensor === 0 ? 'collapsed' : 'visible'}}\" tap=\"goToHighGlucoseAlarmSettings\">\n <FlexboxLayout class=\"card-row flex-row\">\n <StackLayout>\n <Label class=\"bold md\" text=\"{{L('Common.high_glucose_alarm')}}\" textWrap=\"true\" />\n <Label class=\"body black-1 sm glucose-info\" textWrap=\"true\"\n visibility=\"{{ cgHighEnabled ? 'visible' : 'collapsed' }}\"\n text=\"{{ highThreshold ? L('NotificationSettings.glucose_above', highThreshold, (isMgdl ? L('Common.mgdl') : L('Common.mmmol')) ) : L('NotificationSettings.threshold_unknown') }}\"\n />\n </StackLayout>\n <FlexboxLayout class=\"notification-options\">\n <Label class=\"{{'card-status ' + (cgHighEnabled ? 'on' : 'off')}}\"\n text=\"{{cgHighEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- No Recent Data Card -->\n <Card:CardView row=\"4\" class=\"notification-card large\" visibility=\"{{sensor === 4 ? 'visible' : 'collapsed'}}\" tap=\"goToNoRecentDataSettings\">\n <FlexboxLayout class=\"card-row flex-row\">\n <StackLayout class=\"flex-col\">\n <Label class=\"bold md\" text=\"{{L('Common.no_recent_data')}}\" textWrap=\"true\" />\n <Label class=\"body black-1 sm glucose-info\" textWrap=\"true\"\n visibility=\"{{ cgNoRecentEnabled ? 'visible' : 'collapsed' }}\"\n text=\"{{ noRecentInterval, noRecentInterval ? L('NotificationSettings.mins_no_readings', noRecentInterval) : '' }}\"\n />\n </StackLayout>\n <FlexboxLayout class=\"notification-options\">\n <Label class=\"{{'card-status ' + (cgNoRecentEnabled ? 'on' : 'off')}}\"\n text=\"{{cgNoRecentEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Label class=\"icfont gray icxsm\" text=\"{{isRTL ? 'linkr' : 'link'}}\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n </GridLayout>\n\n <!-- Notifications Disabled -->\n <GridLayout rows=\"*, auto\" id=\"notifications-off\" visibility=\"{{notificationsEnabled ? 'collapsed' : 'visible'}}\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-notifications-off\" src=\"res://llunotificationsoff.json\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('NotificationSettings.notifications_off')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('NotificationSettings.enable_notification_phone_settings')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('NotificationSettings.phone_settings')}}\" tap=\"onTapPhoneSettings\"/>\n </GridLayout>\n </StackLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 905 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".bg-section-2"],"declarations":[{"type":"declaration","property":"background-color","value":"#f6f6f6"},{"type":"declaration","property":"padding-top","value":"10"}]},{"type":"rule","selectors":[".body",".bold"],"declarations":[{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".card-status.glucose"],"declarations":[{"type":"declaration","property":"margin","value":"0 8"}]},{"type":"rule","selectors":[".card-status.off"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.6)"}]},{"type":"rule","selectors":[".card-status.on"],"declarations":[{"type":"declaration","property":"color","value":"#cf4520"}]},{"type":"rule","selectors":[".card-row"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"border-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"border-width","value":"1"},{"type":"declaration","property":"flex-wrap","value":"nowrap"},{"type":"declaration","property":"justify-content","value":"space-between"}]},{"type":"rule","selectors":[".body.black-1"],"declarations":[{"type":"declaration","property":"color","value":"rgba(0, 0, 0, 0.4)"},{"type":"declaration","property":"padding","value":"0 16"}]},{"type":"rule","selectors":[".body.black-1.glucose-info"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".body.black-1.footer"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"10"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"padding","value":"0 20"}]},{"type":"rule","selectors":[".low-glucose-alarm"],"declarations":[{"type":"declaration","property":"margin-top","value":"5"}]},{"type":"rule","selectors":[".notification-card"],"declarations":[{"type":"declaration","property":"background-color","value":"white"},{"type":"declaration","property":"margin","value":"8 0"},{"type":"declaration","property":"shadow-color","value":"rgba(0, 0, 0, 0.2)"},{"type":"declaration","property":"shadow-opacity","value":"0"}]},{"type":"rule","selectors":[".notification-card.large"],"declarations":[{"type":"declaration","property":"height","value":"72"}]},{"type":"rule","selectors":[".notification-card.medium"],"declarations":[{"type":"declaration","property":"height","value":"60"}]},{"type":"rule","selectors":[".notification-options"],"declarations":[{"type":"declaration","property":"align-items","value":"center"},{"type":"declaration","property":"flex-shrink","value":"0"}]},{"type":"rule","selectors":[".notification-options.switch"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":["#notifications-off #loti-notifications-off"],"declarations":[{"type":"declaration","property":"margin","value":"20, 0"}]},{"type":"rule","selectors":["#notifications-off .btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":["#notifications-off .h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"12 42 0 42"}]},{"type":"rule","selectors":["#learn-more-link"],"declarations":[{"type":"declaration","property":"margin-top","value":"20"},{"type":"declaration","property":"text-align","value":"center"}]},{"type":"rule","selectors":[".alarm-settings-title"],"declarations":[{"type":"declaration","property":"margin-top","value":"16"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 906 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onTapAlarmCard", function() { return onTapAlarmCard; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSAMSite", function() { return goToSAMSite; });
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _services_dialogs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5);
var onNavigatingTo = function (args) {
var page = args.object;
var context = page.bindingContext;
setThresholdText(page, context);
};
var setThresholdText = function (page, context) {
var glucoseLabel = page.getViewById('glucose-value');
var uom = context.isMgdl ? Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mgdl') : Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('Common.mmmol');
glucoseLabel.text = context.urgentLowThreshold + " " + uom;
};
var onTapAlarmCard = function () {
Object(_services_dialogs__WEBPACK_IMPORTED_MODULE_1__["alertWithTitle"])('', Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_0__["localize"])('alarm_cannot_be_modified'));
};
var goToSAMSite = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_2__["openConfigLink"])('lluSAM');
};
;
if (false ) {}
/***/ }),
/* 907 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("@nstudio/nativescript-cardview", function() { return __webpack_require__(29); });
global.registerModule("@nstudio/nativescript-cardview/CardView", function() { return __webpack_require__(29); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:Card=\"@nstudio/nativescript-cardview\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Common.urgent_low_glucose_alarm')}}\" />\n\n <GridLayout class=\"bg-section-2\" rows=\"auto, auto, auto, *\">\n\n <!-- Urgent Low Glucose Alarm Card -->\n <Card:CardView row=\"0\" id=\"urgent-low-alarm-card\" class=\"notification-card medium\">\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"bold md\" text=\"{{L('Common.urgent_low_glucose_alarm')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options switch\">\n <Label\n class=\"{{'card-status glucose ' + (cgUrgentLowEnabled ? 'on' : 'off')}}\"\n text=\"{{cgUrgentLowEnabled ? L('NotificationSettings.notifications_BTN_on') : L('NotificationSettings.notifications_BTN_off')}}\"\n textWrap=\"true\"\n />\n <Switch\n id=\"urgent-low-alarm-switch\"\n android:color=\"{{cgUrgentLowEnabled ? 'rgb(207, 69, 32)' : '#ECECEC'}}\"\n ios:color=\"white\"\n ios:backgroundColor=\"rgb(207, 69, 32)\"\n ios:offBackgroundColor=\"rgb(230, 229, 228)\"\n checked=\"{{cgUrgentLowEnabled}}\"\n />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n\n <!-- Alarm Settings Card -->\n <FlexboxLayout row=\"1\" class=\"flex-col\" visibility=\"{{cgUrgentLowEnabled ? 'visible' : 'collapsed'}}\">\n <Label class=\"alarm-settings-title body black-2 md\" text=\"{{L('NotificationSettings.alarm_settings')}}\" textWrap=\"true\" />\n <Card:CardView class=\"notification-card large\" tap=\"onTapAlarmCard\" >\n <FlexboxLayout class=\"card-row flex-row\">\n <Label class=\"alarm-settings-text bold md\" text=\"{{L('NotificationSettings.receive_notification_glucose_below')}}\" textWrap=\"true\" />\n <FlexboxLayout class=\"notification-options\">\n <Label id=\"glucose-value\" class=\"card-status on\" text=\"\" textWrap=\"true\" />\n <Label class=\"icfont gray icxsm\" text=\"info\" />\n </FlexboxLayout>\n </FlexboxLayout>\n </Card:CardView>\n </FlexboxLayout>\n\n <Label row=\"2\" id=\"learn-more-link\" class=\"body orange-2 md\" text=\"{{L('Common.learn_more')}}\" tap=\"goToSAMSite\" textWrap=\"true\"/>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 908 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"margin","value":"16 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"16 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 909 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoad", function() { return onLoad; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToOnboardingInternetReq", function() { return goToOnboardingInternetReq; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3);
/* harmony import */ var _view_models_base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17);
function onLoad(args) {
var page = args.object;
var vm = new _view_models_base__WEBPACK_IMPORTED_MODULE_3__["BaseViewModel"]();
vm.set('firstName', _store_store__WEBPACK_IMPORTED_MODULE_2__["store"].getState().user.firstName);
page.bindingContext = vm;
}
function goToOnboardingInternetReq() {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_INTERNET_REQ"]);
}
;
if (false ) {}
/***/ }),
/* 910 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n loaded=\"onLoad\">\n\n <ab:action-bar showLogo=\"true\" showBack=\"false\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-connection\" src=\"res://lluinfo.json\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('Onboarding.hi_first_name', firstName)}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Onboarding.important_things_to_know_blurb')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.ok')}}\" tap=\"goToOnboardingInternetReq\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 911 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"margin","value":"16 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"16 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 912 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToOnboardingNotifications", function() { return goToOnboardingNotifications; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
function goToOnboardingNotifications() {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_NOTIFICATIONS"]);
}
;
if (false ) {}
/***/ }),
/* 913 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\">\n\n <ab:action-bar showLogo=\"true\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-connection\" src=\"res://lluinternetrequired.json\" height=\"316\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('Onboarding.internet_required')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Onboarding.wifi_or_cellular')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.next')}}\" tap=\"goToOnboardingNotifications\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 914 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"margin","value":"16 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"16 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 915 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToOnboardingWarning", function() { return goToOnboardingWarning; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var onLoaded = function () {
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].publish('fcm:subscribe');
};
var goToOnboardingWarning = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["ONBOARDING_WARNING"]);
};
;
if (false ) {}
/***/ }),
/* 916 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n loaded=\"onLoaded\">\n\n <ab:action-bar showLogo=\"true\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-connection\" src=\"res://llunotification.json\" width=\"375\" height=\"316\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('Onboarding.enable_notifications')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Onboarding.enable_notifications_blurb')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Common.next')}}\" tap=\"goToOnboardingWarning\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 917 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"margin","value":"16 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"16 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":["Image"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"},{"type":"declaration","property":"margin","value":"10% 0"}]},{"type":"rule","selectors":[".h2"],"declarations":[{"type":"declaration","property":"margin","value":"0 18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 918 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToMeasurementsSummary", function() { return goToMeasurementsSummary; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
/* harmony import */ var _utilities_mediator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1);
var goToMeasurementsSummary = function () {
// Mark onboarding as seen
_utilities_mediator__WEBPACK_IMPORTED_MODULE_2__["default"].publish('user:dismissSystemMessage', { messageId: 'lluOnboarding' });
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])({ moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["MEASUREMENTS_SUMMARY"], clearHistory: true }, true);
};
;
if (false ) {}
/***/ }),
/* 919 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:Lottie=\"nativescript-lottie\">\n\n <ab:action-bar showLogo=\"true\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <Image src=\"res://warning\" stretch=\"none\" horizontalAlignment=\"center\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"h2 center-strong\" text=\"{{L('Onboarding.not_for_treatment')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Common.saftey_message_alert')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <Button row=\"1\" class=\"btn primary-light blg\" text=\"{{L('Onboarding.lets_get_started')}}\" tap=\"goToMeasurementsSummary\" />\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 920 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]},{"type":"rule","selectors":[".h2.center-strong"],"declarations":[{"type":"declaration","property":"margin","value":"16 32 0 32"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"16 32"},{"type":"declaration","property":"padding","value":"0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 921 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"margin","value":"6 0"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 922 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony import */ var _view_models_policies__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
function onNavigatingTo(args) {
var page = args.object;
var viewModel = new _view_models_policies__WEBPACK_IMPORTED_MODULE_0__["PoliciesViewModel"]();
viewModel.getLocalizedEula();
page.bindingContext = viewModel;
}
;
if (false ) {}
/***/ }),
/* 923 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page xmlns=\"http://www.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Policies.end_user_agreement')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <WebView src=\"{{ eulaUrl }}\" />\n <StackLayout row=\"1\" class=\"btm-section\">\n <Label class=\"body black-3 sm\" text=\"{{L('Policies.eula_subtext')}}\" textWrap=\"true\" />\n <Button class=\"btn primary-light blg\" text=\"{{L('Common.Accept')}}\" tap=\"{{ acceptEula }}\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 924 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"margin","value":"6 0"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 925 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony import */ var _view_models_policies__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77);
function onNavigatingTo(args) {
var page = args.object;
var viewModel = new _view_models_policies__WEBPACK_IMPORTED_MODULE_0__["PoliciesViewModel"]();
viewModel.getLocalizedPrivacyPolicy();
page.bindingContext = viewModel;
}
;
if (false ) {}
/***/ }),
/* 926 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
module.exports = "<Page xmlns=\"http://www.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Policies.privacy_policy')}}\" />\n\n <GridLayout rows=\"*, auto\">\n <WebView src=\"{{ privacyPolicyUrl }}\" />\n <StackLayout row=\"1\" class=\"btm-section\">\n <Label class=\"body black-3 sm\" text=\"{{L('Policies.eula_subtext')}}\" textWrap=\"true\" />\n <Button class=\"btn primary-light blg\" text=\"{{L('Common.Accept')}}\" tap=\"{{ acceptPrivacyPolicy }}\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 927 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"margin","value":"0 4 15 4"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 928 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["FlexboxLayout"],"declarations":[{"type":"declaration","property":"justify-content","value":"space-between"},{"type":"declaration","property":"margin","value":"0 4 15 4"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 929 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "displayDatePicker", function() { return displayDatePicker; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToLogin", function() { return goToLogin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "register", function() { return register; });
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(13);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(0);
/* harmony import */ var nativescript_localize__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var nativescript_modal_datetimepicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(383);
/* harmony import */ var nativescript_modal_datetimepicker__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nativescript_modal_datetimepicker__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5);
/* harmony import */ var _view_models_registration__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97);
function onNavigatingTo(args) {
var page = args.object;
var vm = new _view_models_registration__WEBPACK_IMPORTED_MODULE_7__["RegistrationViewModel"]();
// Convert unix time to date format on textview
vm.set('formatDob', { toView: formatDob });
page.bindingContext = vm;
}
var formatDob = function (dob) {
if (dob === '') {
return '';
}
if (_store_store__WEBPACK_IMPORTED_MODULE_5__["store"].getState().user.country === 'US') {
return moment__WEBPACK_IMPORTED_MODULE_0___default.a.unix(dob).utc().format('M-D-YYYY');
}
return moment__WEBPACK_IMPORTED_MODULE_0___default.a.unix(dob).utc().format('D-M-YYYY');
};
var displayDatePicker = function (args) {
var page = args.view.page;
var vm = page.bindingContext;
var datePicker = new nativescript_modal_datetimepicker__WEBPACK_IMPORTED_MODULE_2__["ModalDatetimepicker"]();
var pickerOptions = {
minDate: new Date('1900-01-01'),
// Starting date needs to be midnight "local" time for it to display correctly
startingDate: moment__WEBPACK_IMPORTED_MODULE_0___default.a.unix(Number(vm.dob)).utc().tz(moment__WEBPACK_IMPORTED_MODULE_0___default.a.tz.guess(), true).toDate(),
theme: 'dark',
title: Object(nativescript_localize__WEBPACK_IMPORTED_MODULE_1__["localize"])('Registration.birthday'),
};
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_6__["dismissKeyboard"])();
datePicker
.pickDate(pickerOptions)
.then(function (result) {
if (result) {
// Set dob to UTC midnight unix timestamp
vm.set('dob', moment__WEBPACK_IMPORTED_MODULE_0___default.a.utc(__assign(__assign({}, result), { month: result.month - 1 })).unix());
}
})
.catch(function (error) {
console.error('>>> ERROR: Date picker selection failed.' + error);
});
};
var goToLogin = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_4__["navigateTo"])({ moduleName: _constants__WEBPACK_IMPORTED_MODULE_3__["LOGIN"], clearHistory: true });
};
var register = function (args) {
var button = args.object;
var context = button.page.bindingContext;
button.handleRunning(context.register());
};
;
if (false ) {}
/***/ }),
/* 930 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/float-label/float-label", function() { return __webpack_require__(43); });
global.registerModule("components/loading-button", function() { return __webpack_require__(48); });
global.registerModule("components/loading-button/LoadingButton", function() { return __webpack_require__(48); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:fl=\"components/float-label\"\n xmlns:lb=\"components/loading-button\"\n navigatingTo=\"onNavigatingTo\"\n rtl=\"{{isRTL}}\">\n\n <ab:action-bar title=\"{{L('Registration.create_account')}}\" />\n\n <ScrollView>\n <GridLayout rows=\"auto, *, auto\">\n <ScrollView class=\"text-container\">\n <StackLayout row=\"0\">\n <FlexboxLayout>\n <Label class=\"body black-3 md\" text=\"{{L('Registration.create_subtext')}}\" textWrap=\"true\" />\n <Label class=\"body orange-1 md\" text=\"{{L('Common.login')}}\" textWrap=\"true\" tap=\"goToLogin\" />\n </FlexboxLayout>\n <fl:float-label text=\"{{firstname}}\" hint=\"{{L('Common.first_name')}}\" returnKeyType=\"next\" />\n <fl:float-label text=\"{{lastname}}\" hint=\"{{L('Common.last_name')}}\" returnKeyType=\"next\" />\n <fl:float-label\n text=\"{{dob | formatDob }}\"\n editable=\"false\"\n hint=\"{{L('Registration.birthday')}}\"\n returnKeyType=\"next\"\n tap=\"displayDatePicker\"\n />\n <fl:float-label\n text=\"{{email}}\"\n autocapitalizationType=\"none\"\n autocorrect=\"false\"\n hint=\"{{L('Common.email_address')}}\"\n keyboardType=\"email\"\n returnKeyType=\"next\"\n />\n <fl:float-label text=\"{{password}}\" hint=\"{{L('Common.password')}}\" returnKeyType=\"next\" secure=\"true\" />\n <fl:float-label text=\"{{pwconfirm}}\" hint=\"{{L('Common.confirmPasswordLabel')}}\" returnKeyType=\"done\" secure=\"true\" />\n </StackLayout>\n </ScrollView>\n <StackLayout row=\"1\" tap=\"{{dismissKeyboard}}\" />\n <lb:LoadingButton row=\"2\" class=\"btn primary-light blg\" text=\"{{L('Common.continue_label')}}\" tap=\"register\" />\n </GridLayout>\n </ScrollView>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 931 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["Label"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"},{"type":"declaration","property":"text-align","value":"center"},{"type":"declaration","property":"padding","value":"0"}]},{"type":"rule","selectors":[".bg-section-1"],"declarations":[{"type":"declaration","property":"background","value":"linear-gradient(white, #ffe46b)"},{"type":"declaration","property":"height","value":"35%"},{"type":"declaration","property":"vertical-align","value":"bottom"}]},{"type":"rule","selectors":[".body"],"declarations":[{"type":"declaration","property":"margin","value":"0 16"}]},{"type":"rule","selectors":[".bold"],"declarations":[{"type":"declaration","property":"margin-top","value":"0"},{"type":"declaration","property":"margin-left","value":"24"},{"type":"declaration","property":"margin-right","value":"24"},{"type":"declaration","property":"margin-bottom","value":"16"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"18"},{"type":"declaration","property":"margin-top","value":"16"}]},{"type":"rule","selectors":[".btn.primary-light"],"declarations":[{"type":"declaration","property":"margin-top","value":"12"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"margin","value":"0 24"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 932 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "verifyEmail", function() { return verifyEmail; });
/* harmony import */ var _view_models_registration__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97);
function onNavigatingTo(args) {
var page = args.object;
var vm = new _view_models_registration__WEBPACK_IMPORTED_MODULE_0__["RegistrationViewModel"]();
if (args.context) {
vm.set('email', (args.context.user && args.context.values.email) || args.context.email);
vm.set('values', args.context.values || {});
}
page.bindingContext = vm;
}
var verifyEmail = function (args) {
var page = args.object;
var vm = page.bindingContext;
vm.checkEmailValidation({ values: vm.get('values') });
};
;
if (false ) {}
/***/ }),
/* 933 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n navigatingTo=\"onNavigatingTo\">\n\n <ab:action-bar title=\"{{L('Registration.verify_email')}}\" navTo=\"logout\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-verify\" src=\"res://lluemail.json\" height=\"200\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout>\n <Label class=\"bold md\" text=\"{{ email }}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Registration.checkInboxForVerification')}}\" textWrap=\"true\" />\n <Button class=\"btn libre-orange bsm\" text=\"{{L('Registration.resend')}}\" tap=\"{{resendValidationEmail}}\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <StackLayout row=\"1\" class=\"bg-section-1\">\n <Label class=\"body black-3 sm\" text=\"{{ L('Registration.verify_msg')}}\" textWrap=\"true\" />\n <Button class=\"btn primary-light blg\" text=\"{{L('Common.continue_label')}}\" tap=\"verifyEmail\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 934 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":[".btm-section"],"declarations":[{"type":"declaration","property":"padding","value":"10 0"}]},{"type":"rule","selectors":[".btn"],"declarations":[{"type":"declaration","property":"margin-bottom","value":"6"}]},{"type":"rule","selectors":[".h2.center-light"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"0 32"}]},{"type":"rule","selectors":[".h3.center-light"],"declarations":[{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"0"}]},{"type":"rule","selectors":[".scroll-container"],"declarations":[{"type":"declaration","property":"padding","value":"16 0"}]},{"type":"rule","selectors":[".icfont"],"declarations":[{"type":"declaration","property":"horizontal-align","value":"center"},{"type":"declaration","property":"font-size","value":"32"},{"type":"declaration","property":"padding","value":"0"},{"type":"declaration","property":"margin","value":"32 0 16 0"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 935 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToCountrySelect", function() { return goToCountrySelect; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9);
var goToCountrySelect = function () {
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_1__["navigateTo"])(_constants__WEBPACK_IMPORTED_MODULE_0__["COUNTRY_SELECT"]);
};
;
if (false ) {}
/***/ }),
/* 936 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\">\n\n <ab:action-bar showLogo=\"true\" />\n\n <GridLayout rows=\"*, auto\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-connection\" src=\"res://lluconnection.json\" height=\"200\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <ScrollView>\n <StackLayout class=\"scroll-container\">\n <Label class=\"h2 center-light\" text=\"{{L('Registration.support_blurb')}}\" textWrap=\"true\" />\n <Label class=\"icfont orange iclg\" text=\"ringing\" />\n <Label class=\"h3 center-light\" text=\"{{L('Registration.timely_notifs')}}\" textWrap=\"true\" />\n <Label class=\"icfont orange iclg\" text=\"graph\" />\n <Label class=\"h3 center-light\" text=\"{{L('Registration.review_glucose')}}\" textWrap=\"true\" />\n </StackLayout>\n </ScrollView>\n </StackLayout>\n <StackLayout row=\"1\" class=\"btm-section\">\n <Button class=\"btn primary-light blg\" text=\"{{L('Registration.create_account')}}\" tap=\"goToCountrySelect\" />\n </StackLayout>\n </GridLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 937 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = {"type":"stylesheet","stylesheet":{"rules":[{"type":"rule","selectors":["#loti-connection"],"declarations":[{"type":"declaration","property":"margin","value":"35 0"}]},{"type":"rule","selectors":["#timezoneCallout"],"declarations":[{"type":"declaration","property":"margin","value":"0 16 10 16"}]},{"type":"rule","selectors":["#summary-list"],"declarations":[{"type":"declaration","property":"margin","value":"8 0 2 0"}]},{"type":"rule","selectors":[".h3"],"declarations":[{"type":"declaration","property":"margin","value":"10 50 25 50"}]}],"parsingErrors":[]}};;
if (false ) {}
/***/ }),
/* 938 */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingTo", function() { return onNavigatingTo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onLoaded", function() { return onLoaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSelectedPatientDetail", function() { return goToSelectedPatientDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onUnloaded", function() { return onUnloaded; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "onNavigatingFrom", function() { return onNavigatingFrom; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "goToSAMSite", function() { return goToSAMSite; });
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4);
/* harmony import */ var _services_analytics__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
/* harmony import */ var _services_navigator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9);
/* harmony import */ var _store_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3);
/* harmony import */ var _utilities_app_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5);
/* harmony import */ var _view_models_connection__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(188);
/* harmony import */ var _view_models_invitation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(76);
var loadingPatient = false;
var unSub;
var onNavigatingTo = function (args) {
var page = args.object;
var viewModel = new _view_models_connection__WEBPACK_IMPORTED_MODULE_5__["ConnectionViewModel"]();
page.bindingContext = viewModel;
loadingPatient = false;
};
var onLoaded = function (args) {
var inviteViewModel = new _view_models_invitation__WEBPACK_IMPORTED_MODULE_6__["InvitationViewModel"]();
var page = args.object;
var context = page.bindingContext;
context.getConnections().then(function () {
Object(_services_analytics__WEBPACK_IMPORTED_MODULE_1__["logView"])(context.connections.length === 0 ? 'No Connections Screen' : 'Dashboard');
});
inviteViewModel.getInvites();
unSub = Object(_store_store__WEBPACK_IMPORTED_MODULE_3__["observeStore"])(function (_a) {
var connection = _a.connection, user = _a.user;
return ({ connection: connection, timezone: user.timezone });
}, function (_a) {
var timezone = _a.timezone, connection = _a.connection;
context.setSummaryList();
context.set('loadedOnce', connection.loaded);
context.set('timezone', timezone);
if (connection.connections.length === 1) {
context.navToGraph();
}
});
};
var goToSelectedPatientDetail = function (args) {
if (!loadingPatient) {
loadingPatient = true;
Object(_services_navigator__WEBPACK_IMPORTED_MODULE_2__["navigateTo"])({
context: { patientId: args.view.patientId },
moduleName: _constants__WEBPACK_IMPORTED_MODULE_0__["GLUCOSE_GRAPH"],
});
}
};
var onUnloaded = function () {
unSub && unSub();
};
var onNavigatingFrom = function () {
unSub && unSub();
};
var goToSAMSite = function () {
Object(_utilities_app_util__WEBPACK_IMPORTED_MODULE_4__["openConfigLink"])('lluSAM');
};
;
if (false ) {}
/***/ }),
/* 939 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.registerModule("components/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/action-bar/action-bar", function() { return __webpack_require__(14); });
global.registerModule("components/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/aware-lottie/aware-lottie", function() { return __webpack_require__(24); });
global.registerModule("components/summary-card", function() { return __webpack_require__(63); });
global.registerModule("components/summary-card/SummaryCard", function() { return __webpack_require__(63); });
module.exports = "<Page\n xmlns=\"http://schemas.nativescript.org/tns.xsd\"\n xmlns:ab=\"components/action-bar\"\n xmlns:al=\"components/aware-lottie\"\n xmlns:sc=\"components/summary-card\"\n navigatingTo=\"onNavigatingTo\"\n navigatingFrom=\"onNavigatingFrom\"\n loaded=\"onLoaded\"\n unloaded=\"onUnloaded\"\n actionBarHidden=\"false\"\n rtl=\"{{isRTL}}\"\n class=\"page\">\n\n <ab:action-bar showLogo=\"true\" showMenu=\"true\" />\n\n <!-- Connection list view content -->\n <FlexboxLayout id=\"measurementSummary\" class=\"flex-col\">\n <ScrollView visibility=\"{{(connections.length >= 1) ? 'visible' : 'collapsed'}}\">\n <StackLayout>\n <!-- Repeater instead of ListView since we have a ScrollView wrapper -->\n <Repeater items=\"{{connections}}\">\n <Repeater.itemsLayout>\n <StackLayout id=\"summary-list\" />\n </Repeater.itemsLayout>\n <Repeater.itemTemplate>\n <sc:SummaryCard patient=\"{{$value}}\" measurement=\"{{glucoseItem}}\" margin=\"8 16 8 16\" tap=\"goToSelectedPatientDetail\" />\n </Repeater.itemTemplate>\n </Repeater>\n\n <FlexboxLayout id=\"timezoneCallout\" class=\"flex-row\">\n <Label class=\"body black-3 sm\" text=\"{{L('Summary.timezone_label') + ' ' + timezone}}\" textWrap=\"true\" />\n </FlexboxLayout>\n </StackLayout>\n </ScrollView>\n\n <!-- Null state layout -->\n <GridLayout rows=\"auto, *\" visibility=\"{{(loadedOnce &amp;&amp; connections.length < 1) ? 'visible' : 'collapsed'}}\">\n <StackLayout row=\"0\">\n <al:aware-lottie id=\"loti-connection\" src=\"res://lluconnection.json\" height=\"200\" width=\"375\" loop=\"true\" autoPlay=\"true\" />\n <Label class=\"h2 center-strong\" text=\"{{L('Summary.no_connections_yet')}}\" textWrap=\"true\" />\n <Label class=\"h3 center-light\" text=\"{{L('Common.link_by_asking')}}\" textWrap=\"true\" />\n <Button class=\"btn libre-orange bsm\" text=\"{{L('Common.learn_more')}}\" tap=\"goToSAMSite\" />\n </StackLayout>\n </GridLayout>\n </FlexboxLayout>\n</Page>\n";
if (false ) {}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ }),
/* 940 */,
/* 941 */,
/* 942 */,
/* 943 */,
/* 944 */,
/* 945 */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {global.process.env = global.process.env || {};
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(6)))
/***/ })
],[[196,1,2]]]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment