oro-sdk 3.1.1 → 3.1.2-dev2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/dist/helpers/patient-registration.d.ts +8 -1
- package/dist/oro-sdk.cjs.development.js +1167 -606
- package/dist/oro-sdk.cjs.development.js.map +1 -1
- package/dist/oro-sdk.cjs.production.min.js +1 -1
- package/dist/oro-sdk.cjs.production.min.js.map +1 -1
- package/dist/oro-sdk.esm.js +1166 -607
- package/dist/oro-sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/helpers/patient-registration.ts +131 -5
package/dist/oro-sdk.esm.js
CHANGED
@@ -5,612 +5,1029 @@ import * as oroToolbox from 'oro-toolbox';
|
|
5
5
|
export { oroToolbox as OroToolboxNamespace };
|
6
6
|
import { getMany } from 'idb-keyval';
|
7
7
|
|
8
|
-
function
|
9
|
-
|
8
|
+
function _wrapRegExp() {
|
9
|
+
_wrapRegExp = function (re, groups) {
|
10
|
+
return new BabelRegExp(re, void 0, groups);
|
11
|
+
};
|
12
|
+
|
13
|
+
var _super = RegExp.prototype,
|
14
|
+
_groups = new WeakMap();
|
15
|
+
|
16
|
+
function BabelRegExp(re, flags, groups) {
|
17
|
+
var _this = new RegExp(re, flags);
|
18
|
+
|
19
|
+
return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
|
20
|
+
}
|
21
|
+
|
22
|
+
function buildGroups(result, re) {
|
23
|
+
var g = _groups.get(re);
|
24
|
+
|
25
|
+
return Object.keys(g).reduce(function (groups, name) {
|
26
|
+
return groups[name] = result[g[name]], groups;
|
27
|
+
}, Object.create(null));
|
28
|
+
}
|
29
|
+
|
30
|
+
return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
|
31
|
+
var result = _super.exec.call(this, str);
|
32
|
+
|
33
|
+
return result && (result.groups = buildGroups(result, this)), result;
|
34
|
+
}, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
|
35
|
+
if ("string" == typeof substitution) {
|
36
|
+
var groups = _groups.get(this);
|
37
|
+
|
38
|
+
return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
|
39
|
+
return "$" + groups[name];
|
40
|
+
}));
|
41
|
+
}
|
42
|
+
|
43
|
+
if ("function" == typeof substitution) {
|
44
|
+
var _this = this;
|
45
|
+
|
46
|
+
return _super[Symbol.replace].call(this, str, function () {
|
47
|
+
var args = arguments;
|
48
|
+
return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
|
49
|
+
});
|
50
|
+
}
|
51
|
+
|
52
|
+
return _super[Symbol.replace].call(this, str, substitution);
|
53
|
+
}, _wrapRegExp.apply(this, arguments);
|
54
|
+
}
|
55
|
+
|
56
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
57
|
+
try {
|
58
|
+
var info = gen[key](arg);
|
59
|
+
var value = info.value;
|
60
|
+
} catch (error) {
|
61
|
+
reject(error);
|
62
|
+
return;
|
63
|
+
}
|
64
|
+
|
65
|
+
if (info.done) {
|
66
|
+
resolve(value);
|
67
|
+
} else {
|
68
|
+
Promise.resolve(value).then(_next, _throw);
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
function _asyncToGenerator(fn) {
|
73
|
+
return function () {
|
74
|
+
var self = this,
|
75
|
+
args = arguments;
|
76
|
+
return new Promise(function (resolve, reject) {
|
77
|
+
var gen = fn.apply(self, args);
|
78
|
+
|
79
|
+
function _next(value) {
|
80
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
81
|
+
}
|
82
|
+
|
83
|
+
function _throw(err) {
|
84
|
+
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
85
|
+
}
|
86
|
+
|
87
|
+
_next(undefined);
|
88
|
+
});
|
89
|
+
};
|
90
|
+
}
|
91
|
+
|
92
|
+
function _extends() {
|
93
|
+
_extends = Object.assign || function (target) {
|
94
|
+
for (var i = 1; i < arguments.length; i++) {
|
95
|
+
var source = arguments[i];
|
96
|
+
|
97
|
+
for (var key in source) {
|
98
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
99
|
+
target[key] = source[key];
|
100
|
+
}
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
return target;
|
105
|
+
};
|
106
|
+
|
107
|
+
return _extends.apply(this, arguments);
|
108
|
+
}
|
109
|
+
|
110
|
+
function _inherits(subClass, superClass) {
|
111
|
+
if (typeof superClass !== "function" && superClass !== null) {
|
112
|
+
throw new TypeError("Super expression must either be null or a function");
|
113
|
+
}
|
114
|
+
|
115
|
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
116
|
+
constructor: {
|
117
|
+
value: subClass,
|
118
|
+
writable: true,
|
119
|
+
configurable: true
|
120
|
+
}
|
121
|
+
});
|
122
|
+
Object.defineProperty(subClass, "prototype", {
|
123
|
+
writable: false
|
124
|
+
});
|
125
|
+
if (superClass) _setPrototypeOf(subClass, superClass);
|
126
|
+
}
|
127
|
+
|
128
|
+
function _inheritsLoose(subClass, superClass) {
|
129
|
+
subClass.prototype = Object.create(superClass.prototype);
|
130
|
+
subClass.prototype.constructor = subClass;
|
131
|
+
|
132
|
+
_setPrototypeOf(subClass, superClass);
|
133
|
+
}
|
10
134
|
|
11
|
-
|
12
|
-
|
135
|
+
function _getPrototypeOf(o) {
|
136
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
137
|
+
return o.__proto__ || Object.getPrototypeOf(o);
|
138
|
+
};
|
139
|
+
return _getPrototypeOf(o);
|
140
|
+
}
|
141
|
+
|
142
|
+
function _setPrototypeOf(o, p) {
|
143
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
144
|
+
o.__proto__ = p;
|
145
|
+
return o;
|
13
146
|
};
|
14
147
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
148
|
+
return _setPrototypeOf(o, p);
|
149
|
+
}
|
150
|
+
|
151
|
+
function _isNativeReflectConstruct() {
|
152
|
+
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
153
|
+
if (Reflect.construct.sham) return false;
|
154
|
+
if (typeof Proxy === "function") return true;
|
155
|
+
|
156
|
+
try {
|
157
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
158
|
+
return true;
|
159
|
+
} catch (e) {
|
160
|
+
return false;
|
161
|
+
}
|
162
|
+
}
|
163
|
+
|
164
|
+
function _construct(Parent, args, Class) {
|
165
|
+
if (_isNativeReflectConstruct()) {
|
166
|
+
_construct = Reflect.construct;
|
167
|
+
} else {
|
168
|
+
_construct = function _construct(Parent, args, Class) {
|
169
|
+
var a = [null];
|
170
|
+
a.push.apply(a, args);
|
171
|
+
var Constructor = Function.bind.apply(Parent, a);
|
172
|
+
var instance = new Constructor();
|
173
|
+
if (Class) _setPrototypeOf(instance, Class.prototype);
|
174
|
+
return instance;
|
175
|
+
};
|
176
|
+
}
|
177
|
+
|
178
|
+
return _construct.apply(null, arguments);
|
179
|
+
}
|
180
|
+
|
181
|
+
function _isNativeFunction(fn) {
|
182
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
183
|
+
}
|
184
|
+
|
185
|
+
function _wrapNativeSuper(Class) {
|
186
|
+
var _cache = typeof Map === "function" ? new Map() : undefined;
|
187
|
+
|
188
|
+
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
189
|
+
if (Class === null || !_isNativeFunction(Class)) return Class;
|
190
|
+
|
191
|
+
if (typeof Class !== "function") {
|
192
|
+
throw new TypeError("Super expression must either be null or a function");
|
193
|
+
}
|
194
|
+
|
195
|
+
if (typeof _cache !== "undefined") {
|
196
|
+
if (_cache.has(Class)) return _cache.get(Class);
|
197
|
+
|
198
|
+
_cache.set(Class, Wrapper);
|
199
|
+
}
|
200
|
+
|
201
|
+
function Wrapper() {
|
202
|
+
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
203
|
+
}
|
204
|
+
|
205
|
+
Wrapper.prototype = Object.create(Class.prototype, {
|
206
|
+
constructor: {
|
207
|
+
value: Wrapper,
|
208
|
+
enumerable: false,
|
209
|
+
writable: true,
|
210
|
+
configurable: true
|
211
|
+
}
|
212
|
+
});
|
213
|
+
return _setPrototypeOf(Wrapper, Class);
|
214
|
+
};
|
215
|
+
|
216
|
+
return _wrapNativeSuper(Class);
|
217
|
+
}
|
218
|
+
|
219
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
220
|
+
if (source == null) return {};
|
221
|
+
var target = {};
|
222
|
+
var sourceKeys = Object.keys(source);
|
223
|
+
var key, i;
|
224
|
+
|
225
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
226
|
+
key = sourceKeys[i];
|
227
|
+
if (excluded.indexOf(key) >= 0) continue;
|
228
|
+
target[key] = source[key];
|
229
|
+
}
|
230
|
+
|
231
|
+
return target;
|
232
|
+
}
|
233
|
+
|
234
|
+
function _unsupportedIterableToArray(o, minLen) {
|
235
|
+
if (!o) return;
|
236
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
237
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
238
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
239
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
240
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
241
|
+
}
|
242
|
+
|
243
|
+
function _arrayLikeToArray(arr, len) {
|
244
|
+
if (len == null || len > arr.length) len = arr.length;
|
245
|
+
|
246
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
247
|
+
|
248
|
+
return arr2;
|
249
|
+
}
|
250
|
+
|
251
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) {
|
252
|
+
var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
|
253
|
+
if (it) return (it = it.call(o)).next.bind(it);
|
254
|
+
|
255
|
+
if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
|
256
|
+
if (it) o = it;
|
257
|
+
var i = 0;
|
258
|
+
return function () {
|
259
|
+
if (i >= o.length) return {
|
260
|
+
done: true
|
261
|
+
};
|
262
|
+
return {
|
263
|
+
done: false,
|
264
|
+
value: o[i++]
|
265
|
+
};
|
266
|
+
};
|
267
|
+
}
|
268
|
+
|
269
|
+
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
270
|
+
}
|
271
|
+
|
272
|
+
function createCommonjsModule(fn, module) {
|
273
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
274
|
+
}
|
275
|
+
|
276
|
+
var runtime_1 = createCommonjsModule(function (module) {
|
277
|
+
/**
|
278
|
+
* Copyright (c) 2014-present, Facebook, Inc.
|
279
|
+
*
|
280
|
+
* This source code is licensed under the MIT license found in the
|
281
|
+
* LICENSE file in the root directory of this source tree.
|
282
|
+
*/
|
283
|
+
|
284
|
+
var runtime = (function (exports) {
|
285
|
+
|
286
|
+
var Op = Object.prototype;
|
287
|
+
var hasOwn = Op.hasOwnProperty;
|
288
|
+
var undefined$1; // More compressible than void 0.
|
289
|
+
var $Symbol = typeof Symbol === "function" ? Symbol : {};
|
290
|
+
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
291
|
+
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
292
|
+
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
22
293
|
|
23
294
|
function define(obj, key, value) {
|
24
|
-
|
295
|
+
Object.defineProperty(obj, key, {
|
25
296
|
value: value,
|
26
|
-
enumerable:
|
27
|
-
configurable:
|
28
|
-
writable:
|
29
|
-
})
|
297
|
+
enumerable: true,
|
298
|
+
configurable: true,
|
299
|
+
writable: true
|
300
|
+
});
|
301
|
+
return obj[key];
|
30
302
|
}
|
31
|
-
|
32
303
|
try {
|
304
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
33
305
|
define({}, "");
|
34
306
|
} catch (err) {
|
35
|
-
define = function
|
307
|
+
define = function(obj, key, value) {
|
36
308
|
return obj[key] = value;
|
37
309
|
};
|
38
310
|
}
|
39
311
|
|
40
312
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
var state = "suspendedStart";
|
46
|
-
return function (method, arg) {
|
47
|
-
if ("executing" === state) throw new Error("Generator is already running");
|
48
|
-
|
49
|
-
if ("completed" === state) {
|
50
|
-
if ("throw" === method) throw arg;
|
51
|
-
return doneResult();
|
52
|
-
}
|
53
|
-
|
54
|
-
for (context.method = method, context.arg = arg;;) {
|
55
|
-
var delegate = context.delegate;
|
313
|
+
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
314
|
+
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
|
315
|
+
var generator = Object.create(protoGenerator.prototype);
|
316
|
+
var context = new Context(tryLocsList || []);
|
56
317
|
|
57
|
-
|
58
|
-
|
318
|
+
// The ._invoke method unifies the implementations of the .next,
|
319
|
+
// .throw, and .return methods.
|
320
|
+
generator._invoke = makeInvokeMethod(innerFn, self, context);
|
59
321
|
|
60
|
-
|
61
|
-
if (delegateResult === ContinueSentinel) continue;
|
62
|
-
return delegateResult;
|
63
|
-
}
|
64
|
-
}
|
65
|
-
|
66
|
-
if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
|
67
|
-
if ("suspendedStart" === state) throw state = "completed", context.arg;
|
68
|
-
context.dispatchException(context.arg);
|
69
|
-
} else "return" === context.method && context.abrupt("return", context.arg);
|
70
|
-
state = "executing";
|
71
|
-
var record = tryCatch(innerFn, self, context);
|
72
|
-
|
73
|
-
if ("normal" === record.type) {
|
74
|
-
if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
|
75
|
-
return {
|
76
|
-
value: record.arg,
|
77
|
-
done: context.done
|
78
|
-
};
|
79
|
-
}
|
80
|
-
|
81
|
-
"throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
|
82
|
-
}
|
83
|
-
};
|
84
|
-
}(innerFn, self, context), generator;
|
322
|
+
return generator;
|
85
323
|
}
|
324
|
+
exports.wrap = wrap;
|
86
325
|
|
326
|
+
// Try/catch helper to minimize deoptimizations. Returns a completion
|
327
|
+
// record like context.tryEntries[i].completion. This interface could
|
328
|
+
// have been (and was previously) designed to take a closure to be
|
329
|
+
// invoked without arguments, but in all the cases we care about we
|
330
|
+
// already have an existing method we want to call, so there's no need
|
331
|
+
// to create a new function object. We can even get away with assuming
|
332
|
+
// the method takes exactly one argument, since that happens to be true
|
333
|
+
// in every case, so we don't have to touch the arguments object. The
|
334
|
+
// only additional allocation required is the completion record, which
|
335
|
+
// has a stable shape and so hopefully should be cheap to allocate.
|
87
336
|
function tryCatch(fn, obj, arg) {
|
88
337
|
try {
|
89
|
-
return {
|
90
|
-
type: "normal",
|
91
|
-
arg: fn.call(obj, arg)
|
92
|
-
};
|
338
|
+
return { type: "normal", arg: fn.call(obj, arg) };
|
93
339
|
} catch (err) {
|
94
|
-
return {
|
95
|
-
type: "throw",
|
96
|
-
arg: err
|
97
|
-
};
|
340
|
+
return { type: "throw", arg: err };
|
98
341
|
}
|
99
342
|
}
|
100
343
|
|
101
|
-
|
344
|
+
var GenStateSuspendedStart = "suspendedStart";
|
345
|
+
var GenStateSuspendedYield = "suspendedYield";
|
346
|
+
var GenStateExecuting = "executing";
|
347
|
+
var GenStateCompleted = "completed";
|
348
|
+
|
349
|
+
// Returning this object from the innerFn has the same effect as
|
350
|
+
// breaking out of the dispatch switch statement.
|
102
351
|
var ContinueSentinel = {};
|
103
352
|
|
353
|
+
// Dummy constructor functions that we use as the .constructor and
|
354
|
+
// .constructor.prototype properties for functions that return Generator
|
355
|
+
// objects. For full spec compliance, you may wish to configure your
|
356
|
+
// minifier not to mangle the names of these two functions.
|
104
357
|
function Generator() {}
|
105
|
-
|
106
358
|
function GeneratorFunction() {}
|
107
|
-
|
108
359
|
function GeneratorFunctionPrototype() {}
|
109
360
|
|
361
|
+
// This is a polyfill for %IteratorPrototype% for environments that
|
362
|
+
// don't natively support it.
|
110
363
|
var IteratorPrototype = {};
|
111
364
|
define(IteratorPrototype, iteratorSymbol, function () {
|
112
365
|
return this;
|
113
366
|
});
|
114
|
-
var getProto = Object.getPrototypeOf,
|
115
|
-
NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
116
|
-
NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
|
117
|
-
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
118
367
|
|
368
|
+
var getProto = Object.getPrototypeOf;
|
369
|
+
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
|
370
|
+
if (NativeIteratorPrototype &&
|
371
|
+
NativeIteratorPrototype !== Op &&
|
372
|
+
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
|
373
|
+
// This environment has a native %IteratorPrototype%; use it instead
|
374
|
+
// of the polyfill.
|
375
|
+
IteratorPrototype = NativeIteratorPrototype;
|
376
|
+
}
|
377
|
+
|
378
|
+
var Gp = GeneratorFunctionPrototype.prototype =
|
379
|
+
Generator.prototype = Object.create(IteratorPrototype);
|
380
|
+
GeneratorFunction.prototype = GeneratorFunctionPrototype;
|
381
|
+
define(Gp, "constructor", GeneratorFunctionPrototype);
|
382
|
+
define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
|
383
|
+
GeneratorFunction.displayName = define(
|
384
|
+
GeneratorFunctionPrototype,
|
385
|
+
toStringTagSymbol,
|
386
|
+
"GeneratorFunction"
|
387
|
+
);
|
388
|
+
|
389
|
+
// Helper for defining the .next, .throw, and .return methods of the
|
390
|
+
// Iterator interface in terms of a single ._invoke method.
|
119
391
|
function defineIteratorMethods(prototype) {
|
120
|
-
["next", "throw", "return"].forEach(function
|
121
|
-
define(prototype, method, function
|
392
|
+
["next", "throw", "return"].forEach(function(method) {
|
393
|
+
define(prototype, method, function(arg) {
|
122
394
|
return this._invoke(method, arg);
|
123
395
|
});
|
124
396
|
});
|
125
397
|
}
|
126
398
|
|
399
|
+
exports.isGeneratorFunction = function(genFun) {
|
400
|
+
var ctor = typeof genFun === "function" && genFun.constructor;
|
401
|
+
return ctor
|
402
|
+
? ctor === GeneratorFunction ||
|
403
|
+
// For the native GeneratorFunction constructor, the best we can
|
404
|
+
// do is to check its .name property.
|
405
|
+
(ctor.displayName || ctor.name) === "GeneratorFunction"
|
406
|
+
: false;
|
407
|
+
};
|
408
|
+
|
409
|
+
exports.mark = function(genFun) {
|
410
|
+
if (Object.setPrototypeOf) {
|
411
|
+
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
412
|
+
} else {
|
413
|
+
genFun.__proto__ = GeneratorFunctionPrototype;
|
414
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
415
|
+
}
|
416
|
+
genFun.prototype = Object.create(Gp);
|
417
|
+
return genFun;
|
418
|
+
};
|
419
|
+
|
420
|
+
// Within the body of any async function, `await x` is transformed to
|
421
|
+
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
|
422
|
+
// `hasOwn.call(value, "__await")` to determine if the yielded value is
|
423
|
+
// meant to be awaited.
|
424
|
+
exports.awrap = function(arg) {
|
425
|
+
return { __await: arg };
|
426
|
+
};
|
427
|
+
|
127
428
|
function AsyncIterator(generator, PromiseImpl) {
|
128
429
|
function invoke(method, arg, resolve, reject) {
|
129
430
|
var record = tryCatch(generator[method], generator, arg);
|
431
|
+
if (record.type === "throw") {
|
432
|
+
reject(record.arg);
|
433
|
+
} else {
|
434
|
+
var result = record.arg;
|
435
|
+
var value = result.value;
|
436
|
+
if (value &&
|
437
|
+
typeof value === "object" &&
|
438
|
+
hasOwn.call(value, "__await")) {
|
439
|
+
return PromiseImpl.resolve(value.__await).then(function(value) {
|
440
|
+
invoke("next", value, resolve, reject);
|
441
|
+
}, function(err) {
|
442
|
+
invoke("throw", err, resolve, reject);
|
443
|
+
});
|
444
|
+
}
|
130
445
|
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
}, function (error) {
|
446
|
+
return PromiseImpl.resolve(value).then(function(unwrapped) {
|
447
|
+
// When a yielded Promise is resolved, its final value becomes
|
448
|
+
// the .value of the Promise<{value,done}> result for the
|
449
|
+
// current iteration.
|
450
|
+
result.value = unwrapped;
|
451
|
+
resolve(result);
|
452
|
+
}, function(error) {
|
453
|
+
// If a rejected Promise was yielded, throw the rejection back
|
454
|
+
// into the async generator function so it can be handled there.
|
141
455
|
return invoke("throw", error, resolve, reject);
|
142
456
|
});
|
143
457
|
}
|
144
|
-
|
145
|
-
reject(record.arg);
|
146
458
|
}
|
147
459
|
|
148
460
|
var previousPromise;
|
149
461
|
|
150
|
-
|
462
|
+
function enqueue(method, arg) {
|
151
463
|
function callInvokeWithMethodAndArg() {
|
152
|
-
return new PromiseImpl(function
|
464
|
+
return new PromiseImpl(function(resolve, reject) {
|
153
465
|
invoke(method, arg, resolve, reject);
|
154
466
|
});
|
155
467
|
}
|
156
468
|
|
157
|
-
return previousPromise =
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
469
|
+
return previousPromise =
|
470
|
+
// If enqueue has been called before, then we want to wait until
|
471
|
+
// all previous Promises have been resolved before calling invoke,
|
472
|
+
// so that results are always delivered in the correct order. If
|
473
|
+
// enqueue has not been called before, then it is important to
|
474
|
+
// call invoke immediately, without waiting on a callback to fire,
|
475
|
+
// so that the async generator function has the opportunity to do
|
476
|
+
// any necessary setup in a predictable way. This predictability
|
477
|
+
// is why the Promise constructor synchronously invokes its
|
478
|
+
// executor callback, and why async functions synchronously
|
479
|
+
// execute code before the first await. Since we implement simple
|
480
|
+
// async functions in terms of async generators, it is especially
|
481
|
+
// important to get this right, even though it requires care.
|
482
|
+
previousPromise ? previousPromise.then(
|
483
|
+
callInvokeWithMethodAndArg,
|
484
|
+
// Avoid propagating failures to Promises returned by later
|
485
|
+
// invocations of the iterator.
|
486
|
+
callInvokeWithMethodAndArg
|
487
|
+
) : callInvokeWithMethodAndArg();
|
171
488
|
}
|
172
489
|
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
|
490
|
+
// Define the unified helper method that is used to implement .next,
|
491
|
+
// .throw, and .return (see defineIteratorMethods).
|
492
|
+
this._invoke = enqueue;
|
177
493
|
}
|
178
494
|
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
495
|
+
defineIteratorMethods(AsyncIterator.prototype);
|
496
|
+
define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
497
|
+
return this;
|
498
|
+
});
|
499
|
+
exports.AsyncIterator = AsyncIterator;
|
500
|
+
|
501
|
+
// Note that simple async functions are implemented on top of
|
502
|
+
// AsyncIterator objects; they just return a Promise for the value of
|
503
|
+
// the final result produced by the iterator.
|
504
|
+
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
505
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
506
|
+
|
507
|
+
var iter = new AsyncIterator(
|
508
|
+
wrap(innerFn, outerFn, self, tryLocsList),
|
509
|
+
PromiseImpl
|
510
|
+
);
|
511
|
+
|
512
|
+
return exports.isGeneratorFunction(outerFn)
|
513
|
+
? iter // If outerFn is a generator, return the full iterator.
|
514
|
+
: iter.next().then(function(result) {
|
515
|
+
return result.done ? result.value : iter.next();
|
516
|
+
});
|
517
|
+
};
|
196
518
|
|
197
|
-
function
|
198
|
-
|
199
|
-
var iteratorMethod = iterable[iteratorSymbol];
|
200
|
-
if (iteratorMethod) return iteratorMethod.call(iterable);
|
201
|
-
if ("function" == typeof iterable.next) return iterable;
|
519
|
+
function makeInvokeMethod(innerFn, self, context) {
|
520
|
+
var state = GenStateSuspendedStart;
|
202
521
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
522
|
+
return function invoke(method, arg) {
|
523
|
+
if (state === GenStateExecuting) {
|
524
|
+
throw new Error("Generator is already running");
|
525
|
+
}
|
207
526
|
|
208
|
-
|
209
|
-
|
527
|
+
if (state === GenStateCompleted) {
|
528
|
+
if (method === "throw") {
|
529
|
+
throw arg;
|
530
|
+
}
|
210
531
|
|
211
|
-
|
532
|
+
// Be forgiving, per 25.3.3.3.3 of the spec:
|
533
|
+
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
|
534
|
+
return doneResult();
|
212
535
|
}
|
213
|
-
}
|
214
536
|
|
215
|
-
|
216
|
-
|
217
|
-
};
|
218
|
-
}
|
219
|
-
|
220
|
-
function doneResult() {
|
221
|
-
return {
|
222
|
-
value: undefined,
|
223
|
-
done: !0
|
224
|
-
};
|
225
|
-
}
|
537
|
+
context.method = method;
|
538
|
+
context.arg = arg;
|
226
539
|
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
|
237
|
-
return this;
|
238
|
-
}), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
239
|
-
void 0 === PromiseImpl && (PromiseImpl = Promise);
|
240
|
-
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
241
|
-
return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
|
242
|
-
return result.done ? result.value : iter.next();
|
243
|
-
});
|
244
|
-
}, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
|
245
|
-
return this;
|
246
|
-
}), define(Gp, "toString", function () {
|
247
|
-
return "[object Generator]";
|
248
|
-
}), exports.keys = function (object) {
|
249
|
-
var keys = [];
|
540
|
+
while (true) {
|
541
|
+
var delegate = context.delegate;
|
542
|
+
if (delegate) {
|
543
|
+
var delegateResult = maybeInvokeDelegate(delegate, context);
|
544
|
+
if (delegateResult) {
|
545
|
+
if (delegateResult === ContinueSentinel) continue;
|
546
|
+
return delegateResult;
|
547
|
+
}
|
548
|
+
}
|
250
549
|
|
251
|
-
|
550
|
+
if (context.method === "next") {
|
551
|
+
// Setting context._sent for legacy support of Babel's
|
552
|
+
// function.sent implementation.
|
553
|
+
context.sent = context._sent = context.arg;
|
252
554
|
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
555
|
+
} else if (context.method === "throw") {
|
556
|
+
if (state === GenStateSuspendedStart) {
|
557
|
+
state = GenStateCompleted;
|
558
|
+
throw context.arg;
|
559
|
+
}
|
258
560
|
|
259
|
-
|
260
|
-
};
|
261
|
-
}, exports.values = values, Context.prototype = {
|
262
|
-
constructor: Context,
|
263
|
-
reset: function (skipTempReset) {
|
264
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
|
265
|
-
},
|
266
|
-
stop: function () {
|
267
|
-
this.done = !0;
|
268
|
-
var rootRecord = this.tryEntries[0].completion;
|
269
|
-
if ("throw" === rootRecord.type) throw rootRecord.arg;
|
270
|
-
return this.rval;
|
271
|
-
},
|
272
|
-
dispatchException: function (exception) {
|
273
|
-
if (this.done) throw exception;
|
274
|
-
var context = this;
|
561
|
+
context.dispatchException(context.arg);
|
275
562
|
|
276
|
-
|
277
|
-
|
278
|
-
|
563
|
+
} else if (context.method === "return") {
|
564
|
+
context.abrupt("return", context.arg);
|
565
|
+
}
|
279
566
|
|
280
|
-
|
281
|
-
var entry = this.tryEntries[i],
|
282
|
-
record = entry.completion;
|
283
|
-
if ("root" === entry.tryLoc) return handle("end");
|
567
|
+
state = GenStateExecuting;
|
284
568
|
|
285
|
-
|
286
|
-
|
287
|
-
|
569
|
+
var record = tryCatch(innerFn, self, context);
|
570
|
+
if (record.type === "normal") {
|
571
|
+
// If an exception is thrown from innerFn, we leave state ===
|
572
|
+
// GenStateExecuting and loop back for another invocation.
|
573
|
+
state = context.done
|
574
|
+
? GenStateCompleted
|
575
|
+
: GenStateSuspendedYield;
|
288
576
|
|
289
|
-
if (
|
290
|
-
|
291
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
292
|
-
} else if (hasCatch) {
|
293
|
-
if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
|
294
|
-
} else {
|
295
|
-
if (!hasFinally) throw new Error("try statement without catch or finally");
|
296
|
-
if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
|
577
|
+
if (record.arg === ContinueSentinel) {
|
578
|
+
continue;
|
297
579
|
}
|
580
|
+
|
581
|
+
return {
|
582
|
+
value: record.arg,
|
583
|
+
done: context.done
|
584
|
+
};
|
585
|
+
|
586
|
+
} else if (record.type === "throw") {
|
587
|
+
state = GenStateCompleted;
|
588
|
+
// Dispatch the exception by looping back around to the
|
589
|
+
// context.dispatchException(context.arg) call above.
|
590
|
+
context.method = "throw";
|
591
|
+
context.arg = record.arg;
|
298
592
|
}
|
299
593
|
}
|
300
|
-
}
|
301
|
-
|
302
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
303
|
-
var entry = this.tryEntries[i];
|
594
|
+
};
|
595
|
+
}
|
304
596
|
|
305
|
-
|
306
|
-
|
307
|
-
|
597
|
+
// Call delegate.iterator[context.method](context.arg) and handle the
|
598
|
+
// result, either by returning a { value, done } result from the
|
599
|
+
// delegate iterator, or by modifying context.method and context.arg,
|
600
|
+
// setting context.delegate to null, and returning the ContinueSentinel.
|
601
|
+
function maybeInvokeDelegate(delegate, context) {
|
602
|
+
var method = delegate.iterator[context.method];
|
603
|
+
if (method === undefined$1) {
|
604
|
+
// A .throw or .return when the delegate iterator has no .throw
|
605
|
+
// method always terminates the yield* loop.
|
606
|
+
context.delegate = null;
|
607
|
+
|
608
|
+
if (context.method === "throw") {
|
609
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
610
|
+
if (delegate.iterator["return"]) {
|
611
|
+
// If the delegate iterator has a return method, give it a
|
612
|
+
// chance to clean up.
|
613
|
+
context.method = "return";
|
614
|
+
context.arg = undefined$1;
|
615
|
+
maybeInvokeDelegate(delegate, context);
|
616
|
+
|
617
|
+
if (context.method === "throw") {
|
618
|
+
// If maybeInvokeDelegate(context) changed context.method from
|
619
|
+
// "return" to "throw", let that override the TypeError below.
|
620
|
+
return ContinueSentinel;
|
621
|
+
}
|
308
622
|
}
|
309
|
-
}
|
310
623
|
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
},
|
315
|
-
complete: function (record, afterLoc) {
|
316
|
-
if ("throw" === record.type) throw record.arg;
|
317
|
-
return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
|
318
|
-
},
|
319
|
-
finish: function (finallyLoc) {
|
320
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
321
|
-
var entry = this.tryEntries[i];
|
322
|
-
if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
|
624
|
+
context.method = "throw";
|
625
|
+
context.arg = new TypeError(
|
626
|
+
"The iterator does not provide a 'throw' method");
|
323
627
|
}
|
324
|
-
},
|
325
|
-
catch: function (tryLoc) {
|
326
|
-
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
327
|
-
var entry = this.tryEntries[i];
|
328
628
|
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
if ("throw" === record.type) {
|
333
|
-
var thrown = record.arg;
|
334
|
-
resetTryEntry(entry);
|
335
|
-
}
|
629
|
+
return ContinueSentinel;
|
630
|
+
}
|
336
631
|
|
337
|
-
|
338
|
-
}
|
339
|
-
}
|
632
|
+
var record = tryCatch(method, delegate.iterator, context.arg);
|
340
633
|
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
resultName: resultName,
|
347
|
-
nextLoc: nextLoc
|
348
|
-
}, "next" === this.method && (this.arg = undefined), ContinueSentinel;
|
634
|
+
if (record.type === "throw") {
|
635
|
+
context.method = "throw";
|
636
|
+
context.arg = record.arg;
|
637
|
+
context.delegate = null;
|
638
|
+
return ContinueSentinel;
|
349
639
|
}
|
350
|
-
}, exports;
|
351
|
-
}
|
352
640
|
|
353
|
-
|
354
|
-
_wrapRegExp = function (re, groups) {
|
355
|
-
return new BabelRegExp(re, void 0, groups);
|
356
|
-
};
|
641
|
+
var info = record.arg;
|
357
642
|
|
358
|
-
|
359
|
-
|
643
|
+
if (! info) {
|
644
|
+
context.method = "throw";
|
645
|
+
context.arg = new TypeError("iterator result is not an object");
|
646
|
+
context.delegate = null;
|
647
|
+
return ContinueSentinel;
|
648
|
+
}
|
360
649
|
|
361
|
-
|
362
|
-
|
650
|
+
if (info.done) {
|
651
|
+
// Assign the result of the finished delegate to the temporary
|
652
|
+
// variable specified by delegate.resultName (see delegateYield).
|
653
|
+
context[delegate.resultName] = info.value;
|
654
|
+
|
655
|
+
// Resume execution at the desired location (see delegateYield).
|
656
|
+
context.next = delegate.nextLoc;
|
657
|
+
|
658
|
+
// If context.method was "throw" but the delegate handled the
|
659
|
+
// exception, let the outer generator proceed normally. If
|
660
|
+
// context.method was "next", forget context.arg since it has been
|
661
|
+
// "consumed" by the delegate iterator. If context.method was
|
662
|
+
// "return", allow the original .return call to continue in the
|
663
|
+
// outer generator.
|
664
|
+
if (context.method !== "return") {
|
665
|
+
context.method = "next";
|
666
|
+
context.arg = undefined$1;
|
667
|
+
}
|
363
668
|
|
364
|
-
|
669
|
+
} else {
|
670
|
+
// Re-yield the result returned by the delegate method.
|
671
|
+
return info;
|
672
|
+
}
|
673
|
+
|
674
|
+
// The delegate iterator is finished, so forget it and continue with
|
675
|
+
// the outer generator.
|
676
|
+
context.delegate = null;
|
677
|
+
return ContinueSentinel;
|
365
678
|
}
|
366
679
|
|
367
|
-
|
368
|
-
|
680
|
+
// Define Generator.prototype.{next,throw,return} in terms of the
|
681
|
+
// unified ._invoke helper method.
|
682
|
+
defineIteratorMethods(Gp);
|
369
683
|
|
370
|
-
|
371
|
-
return groups[name] = result[g[name]], groups;
|
372
|
-
}, Object.create(null));
|
373
|
-
}
|
684
|
+
define(Gp, toStringTagSymbol, "Generator");
|
374
685
|
|
375
|
-
return
|
376
|
-
|
686
|
+
// A Generator should always return itself as the iterator object when the
|
687
|
+
// @@iterator function is called on it. Some browsers' implementations of the
|
688
|
+
// iterator prototype chain incorrectly implement this, causing the Generator
|
689
|
+
// object to not be returned from this call. This ensures that doesn't happen.
|
690
|
+
// See https://github.com/facebook/regenerator/issues/274 for more details.
|
691
|
+
define(Gp, iteratorSymbol, function() {
|
692
|
+
return this;
|
693
|
+
});
|
377
694
|
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
var groups = _groups.get(this);
|
695
|
+
define(Gp, "toString", function() {
|
696
|
+
return "[object Generator]";
|
697
|
+
});
|
382
698
|
|
383
|
-
|
384
|
-
|
385
|
-
}));
|
386
|
-
}
|
699
|
+
function pushTryEntry(locs) {
|
700
|
+
var entry = { tryLoc: locs[0] };
|
387
701
|
|
388
|
-
if (
|
389
|
-
|
702
|
+
if (1 in locs) {
|
703
|
+
entry.catchLoc = locs[1];
|
704
|
+
}
|
390
705
|
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
});
|
706
|
+
if (2 in locs) {
|
707
|
+
entry.finallyLoc = locs[2];
|
708
|
+
entry.afterLoc = locs[3];
|
395
709
|
}
|
396
710
|
|
397
|
-
|
398
|
-
}
|
399
|
-
}
|
711
|
+
this.tryEntries.push(entry);
|
712
|
+
}
|
400
713
|
|
401
|
-
function
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
reject(error);
|
407
|
-
return;
|
714
|
+
function resetTryEntry(entry) {
|
715
|
+
var record = entry.completion || {};
|
716
|
+
record.type = "normal";
|
717
|
+
delete record.arg;
|
718
|
+
entry.completion = record;
|
408
719
|
}
|
409
720
|
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
721
|
+
function Context(tryLocsList) {
|
722
|
+
// The root entry object (effectively a try statement without a catch
|
723
|
+
// or a finally block) gives us a place to store values thrown from
|
724
|
+
// locations where there is no enclosing try statement.
|
725
|
+
this.tryEntries = [{ tryLoc: "root" }];
|
726
|
+
tryLocsList.forEach(pushTryEntry, this);
|
727
|
+
this.reset(true);
|
414
728
|
}
|
415
|
-
}
|
416
729
|
|
417
|
-
function
|
418
|
-
|
419
|
-
var
|
420
|
-
|
421
|
-
|
422
|
-
|
730
|
+
exports.keys = function(object) {
|
731
|
+
var keys = [];
|
732
|
+
for (var key in object) {
|
733
|
+
keys.push(key);
|
734
|
+
}
|
735
|
+
keys.reverse();
|
423
736
|
|
424
|
-
|
425
|
-
|
737
|
+
// Rather than returning an object with a next method, we keep
|
738
|
+
// things simple and return the next function itself.
|
739
|
+
return function next() {
|
740
|
+
while (keys.length) {
|
741
|
+
var key = keys.pop();
|
742
|
+
if (key in object) {
|
743
|
+
next.value = key;
|
744
|
+
next.done = false;
|
745
|
+
return next;
|
746
|
+
}
|
426
747
|
}
|
427
748
|
|
428
|
-
|
429
|
-
|
749
|
+
// To avoid creating an additional object, we just hang the .value
|
750
|
+
// and .done properties off the next function object itself. This
|
751
|
+
// also ensures that the minifier will not anonymize the function.
|
752
|
+
next.done = true;
|
753
|
+
return next;
|
754
|
+
};
|
755
|
+
};
|
756
|
+
|
757
|
+
function values(iterable) {
|
758
|
+
if (iterable) {
|
759
|
+
var iteratorMethod = iterable[iteratorSymbol];
|
760
|
+
if (iteratorMethod) {
|
761
|
+
return iteratorMethod.call(iterable);
|
430
762
|
}
|
431
763
|
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
}
|
764
|
+
if (typeof iterable.next === "function") {
|
765
|
+
return iterable;
|
766
|
+
}
|
436
767
|
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
768
|
+
if (!isNaN(iterable.length)) {
|
769
|
+
var i = -1, next = function next() {
|
770
|
+
while (++i < iterable.length) {
|
771
|
+
if (hasOwn.call(iterable, i)) {
|
772
|
+
next.value = iterable[i];
|
773
|
+
next.done = false;
|
774
|
+
return next;
|
775
|
+
}
|
776
|
+
}
|
777
|
+
|
778
|
+
next.value = undefined$1;
|
779
|
+
next.done = true;
|
780
|
+
|
781
|
+
return next;
|
782
|
+
};
|
441
783
|
|
442
|
-
|
443
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
444
|
-
target[key] = source[key];
|
445
|
-
}
|
784
|
+
return next.next = next;
|
446
785
|
}
|
447
786
|
}
|
448
787
|
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
788
|
+
// Return an iterator with no values.
|
789
|
+
return { next: doneResult };
|
790
|
+
}
|
791
|
+
exports.values = values;
|
453
792
|
|
454
|
-
function
|
455
|
-
|
456
|
-
throw new TypeError("Super expression must either be null or a function");
|
793
|
+
function doneResult() {
|
794
|
+
return { value: undefined$1, done: true };
|
457
795
|
}
|
458
796
|
|
459
|
-
|
460
|
-
constructor:
|
461
|
-
value: subClass,
|
462
|
-
writable: true,
|
463
|
-
configurable: true
|
464
|
-
}
|
465
|
-
});
|
466
|
-
Object.defineProperty(subClass, "prototype", {
|
467
|
-
writable: false
|
468
|
-
});
|
469
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
470
|
-
}
|
797
|
+
Context.prototype = {
|
798
|
+
constructor: Context,
|
471
799
|
|
472
|
-
function
|
473
|
-
|
474
|
-
|
800
|
+
reset: function(skipTempReset) {
|
801
|
+
this.prev = 0;
|
802
|
+
this.next = 0;
|
803
|
+
// Resetting context._sent for legacy support of Babel's
|
804
|
+
// function.sent implementation.
|
805
|
+
this.sent = this._sent = undefined$1;
|
806
|
+
this.done = false;
|
807
|
+
this.delegate = null;
|
808
|
+
|
809
|
+
this.method = "next";
|
810
|
+
this.arg = undefined$1;
|
811
|
+
|
812
|
+
this.tryEntries.forEach(resetTryEntry);
|
813
|
+
|
814
|
+
if (!skipTempReset) {
|
815
|
+
for (var name in this) {
|
816
|
+
// Not sure about the optimal order of these conditions:
|
817
|
+
if (name.charAt(0) === "t" &&
|
818
|
+
hasOwn.call(this, name) &&
|
819
|
+
!isNaN(+name.slice(1))) {
|
820
|
+
this[name] = undefined$1;
|
821
|
+
}
|
822
|
+
}
|
823
|
+
}
|
824
|
+
},
|
475
825
|
|
476
|
-
|
477
|
-
|
826
|
+
stop: function() {
|
827
|
+
this.done = true;
|
478
828
|
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
}
|
829
|
+
var rootEntry = this.tryEntries[0];
|
830
|
+
var rootRecord = rootEntry.completion;
|
831
|
+
if (rootRecord.type === "throw") {
|
832
|
+
throw rootRecord.arg;
|
833
|
+
}
|
485
834
|
|
486
|
-
|
487
|
-
|
488
|
-
o.__proto__ = p;
|
489
|
-
return o;
|
490
|
-
};
|
491
|
-
return _setPrototypeOf(o, p);
|
492
|
-
}
|
835
|
+
return this.rval;
|
836
|
+
},
|
493
837
|
|
494
|
-
function
|
495
|
-
|
496
|
-
|
497
|
-
|
838
|
+
dispatchException: function(exception) {
|
839
|
+
if (this.done) {
|
840
|
+
throw exception;
|
841
|
+
}
|
498
842
|
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
843
|
+
var context = this;
|
844
|
+
function handle(loc, caught) {
|
845
|
+
record.type = "throw";
|
846
|
+
record.arg = exception;
|
847
|
+
context.next = loc;
|
848
|
+
|
849
|
+
if (caught) {
|
850
|
+
// If the dispatched exception was caught by a catch block,
|
851
|
+
// then let that catch block handle the exception normally.
|
852
|
+
context.method = "next";
|
853
|
+
context.arg = undefined$1;
|
854
|
+
}
|
506
855
|
|
507
|
-
|
508
|
-
|
509
|
-
_construct = Reflect.construct.bind();
|
510
|
-
} else {
|
511
|
-
_construct = function _construct(Parent, args, Class) {
|
512
|
-
var a = [null];
|
513
|
-
a.push.apply(a, args);
|
514
|
-
var Constructor = Function.bind.apply(Parent, a);
|
515
|
-
var instance = new Constructor();
|
516
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
517
|
-
return instance;
|
518
|
-
};
|
519
|
-
}
|
856
|
+
return !! caught;
|
857
|
+
}
|
520
858
|
|
521
|
-
|
522
|
-
|
859
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
860
|
+
var entry = this.tryEntries[i];
|
861
|
+
var record = entry.completion;
|
523
862
|
|
524
|
-
|
525
|
-
|
526
|
-
|
863
|
+
if (entry.tryLoc === "root") {
|
864
|
+
// Exception thrown outside of any try block that could handle
|
865
|
+
// it, so set the completion value of the entire function to
|
866
|
+
// throw the exception.
|
867
|
+
return handle("end");
|
868
|
+
}
|
527
869
|
|
528
|
-
|
529
|
-
|
870
|
+
if (entry.tryLoc <= this.prev) {
|
871
|
+
var hasCatch = hasOwn.call(entry, "catchLoc");
|
872
|
+
var hasFinally = hasOwn.call(entry, "finallyLoc");
|
530
873
|
|
531
|
-
|
532
|
-
|
874
|
+
if (hasCatch && hasFinally) {
|
875
|
+
if (this.prev < entry.catchLoc) {
|
876
|
+
return handle(entry.catchLoc, true);
|
877
|
+
} else if (this.prev < entry.finallyLoc) {
|
878
|
+
return handle(entry.finallyLoc);
|
879
|
+
}
|
533
880
|
|
534
|
-
|
535
|
-
|
536
|
-
|
881
|
+
} else if (hasCatch) {
|
882
|
+
if (this.prev < entry.catchLoc) {
|
883
|
+
return handle(entry.catchLoc, true);
|
884
|
+
}
|
537
885
|
|
538
|
-
|
539
|
-
|
886
|
+
} else if (hasFinally) {
|
887
|
+
if (this.prev < entry.finallyLoc) {
|
888
|
+
return handle(entry.finallyLoc);
|
889
|
+
}
|
540
890
|
|
541
|
-
|
542
|
-
|
891
|
+
} else {
|
892
|
+
throw new Error("try statement without catch or finally");
|
893
|
+
}
|
894
|
+
}
|
895
|
+
}
|
896
|
+
},
|
543
897
|
|
544
|
-
function
|
545
|
-
|
546
|
-
|
898
|
+
abrupt: function(type, arg) {
|
899
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
900
|
+
var entry = this.tryEntries[i];
|
901
|
+
if (entry.tryLoc <= this.prev &&
|
902
|
+
hasOwn.call(entry, "finallyLoc") &&
|
903
|
+
this.prev < entry.finallyLoc) {
|
904
|
+
var finallyEntry = entry;
|
905
|
+
break;
|
906
|
+
}
|
907
|
+
}
|
547
908
|
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
909
|
+
if (finallyEntry &&
|
910
|
+
(type === "break" ||
|
911
|
+
type === "continue") &&
|
912
|
+
finallyEntry.tryLoc <= arg &&
|
913
|
+
arg <= finallyEntry.finallyLoc) {
|
914
|
+
// Ignore the finally entry if control is not jumping to a
|
915
|
+
// location outside the try/catch block.
|
916
|
+
finallyEntry = null;
|
554
917
|
}
|
555
|
-
});
|
556
|
-
return _setPrototypeOf(Wrapper, Class);
|
557
|
-
};
|
558
918
|
|
559
|
-
|
560
|
-
|
919
|
+
var record = finallyEntry ? finallyEntry.completion : {};
|
920
|
+
record.type = type;
|
921
|
+
record.arg = arg;
|
561
922
|
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
923
|
+
if (finallyEntry) {
|
924
|
+
this.method = "next";
|
925
|
+
this.next = finallyEntry.finallyLoc;
|
926
|
+
return ContinueSentinel;
|
927
|
+
}
|
567
928
|
|
568
|
-
|
569
|
-
|
570
|
-
if (excluded.indexOf(key) >= 0) continue;
|
571
|
-
target[key] = source[key];
|
572
|
-
}
|
929
|
+
return this.complete(record);
|
930
|
+
},
|
573
931
|
|
574
|
-
|
575
|
-
|
932
|
+
complete: function(record, afterLoc) {
|
933
|
+
if (record.type === "throw") {
|
934
|
+
throw record.arg;
|
935
|
+
}
|
576
936
|
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
}
|
937
|
+
if (record.type === "break" ||
|
938
|
+
record.type === "continue") {
|
939
|
+
this.next = record.arg;
|
940
|
+
} else if (record.type === "return") {
|
941
|
+
this.rval = this.arg = record.arg;
|
942
|
+
this.method = "return";
|
943
|
+
this.next = "end";
|
944
|
+
} else if (record.type === "normal" && afterLoc) {
|
945
|
+
this.next = afterLoc;
|
946
|
+
}
|
585
947
|
|
586
|
-
|
587
|
-
|
948
|
+
return ContinueSentinel;
|
949
|
+
},
|
588
950
|
|
589
|
-
|
951
|
+
finish: function(finallyLoc) {
|
952
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
953
|
+
var entry = this.tryEntries[i];
|
954
|
+
if (entry.finallyLoc === finallyLoc) {
|
955
|
+
this.complete(entry.completion, entry.afterLoc);
|
956
|
+
resetTryEntry(entry);
|
957
|
+
return ContinueSentinel;
|
958
|
+
}
|
959
|
+
}
|
960
|
+
},
|
590
961
|
|
591
|
-
|
592
|
-
|
962
|
+
"catch": function(tryLoc) {
|
963
|
+
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
|
964
|
+
var entry = this.tryEntries[i];
|
965
|
+
if (entry.tryLoc === tryLoc) {
|
966
|
+
var record = entry.completion;
|
967
|
+
if (record.type === "throw") {
|
968
|
+
var thrown = record.arg;
|
969
|
+
resetTryEntry(entry);
|
970
|
+
}
|
971
|
+
return thrown;
|
972
|
+
}
|
973
|
+
}
|
593
974
|
|
594
|
-
|
595
|
-
|
596
|
-
|
975
|
+
// The context.catch method must only be called with a location
|
976
|
+
// argument that corresponds to a known catch block.
|
977
|
+
throw new Error("illegal catch attempt");
|
978
|
+
},
|
597
979
|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
done: true
|
604
|
-
};
|
605
|
-
return {
|
606
|
-
done: false,
|
607
|
-
value: o[i++]
|
980
|
+
delegateYield: function(iterable, resultName, nextLoc) {
|
981
|
+
this.delegate = {
|
982
|
+
iterator: values(iterable),
|
983
|
+
resultName: resultName,
|
984
|
+
nextLoc: nextLoc
|
608
985
|
};
|
609
|
-
};
|
610
|
-
}
|
611
986
|
|
612
|
-
|
987
|
+
if (this.method === "next") {
|
988
|
+
// Deliberately forget the last sent value so that we don't
|
989
|
+
// accidentally pass it on to the delegate.
|
990
|
+
this.arg = undefined$1;
|
991
|
+
}
|
992
|
+
|
993
|
+
return ContinueSentinel;
|
994
|
+
}
|
995
|
+
};
|
996
|
+
|
997
|
+
// Regardless of whether this script is executing as a CommonJS module
|
998
|
+
// or not, return the runtime object so that we can declare the variable
|
999
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
1000
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
1001
|
+
return exports;
|
1002
|
+
|
1003
|
+
}(
|
1004
|
+
// If this script is executing as a CommonJS module, use module.exports
|
1005
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
1006
|
+
// object. Either way, the resulting object will be used to initialize
|
1007
|
+
// the regeneratorRuntime variable at the top of this file.
|
1008
|
+
module.exports
|
1009
|
+
));
|
1010
|
+
|
1011
|
+
try {
|
1012
|
+
regeneratorRuntime = runtime;
|
1013
|
+
} catch (accidentalStrictMode) {
|
1014
|
+
// This module should not be running in strict mode, so the above
|
1015
|
+
// assignment should always work unless something is misconfigured. Just
|
1016
|
+
// in case runtime.js accidentally runs in strict mode, in modern engines
|
1017
|
+
// we can explicitly access globalThis. In older engines we can escape
|
1018
|
+
// strict mode using a global Function call. This could conceivably fail
|
1019
|
+
// if a Content Security Policy forbids using Function, but in that case
|
1020
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
1021
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
1022
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
1023
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
1024
|
+
if (typeof globalThis === "object") {
|
1025
|
+
globalThis.regeneratorRuntime = runtime;
|
1026
|
+
} else {
|
1027
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
1028
|
+
}
|
613
1029
|
}
|
1030
|
+
});
|
614
1031
|
|
615
1032
|
var _personalMetaToPrefix;
|
616
1033
|
var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
|
@@ -831,9 +1248,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
|
|
831
1248
|
*/
|
832
1249
|
|
833
1250
|
function _filterTriggeredAnsweredWithKind() {
|
834
|
-
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/
|
1251
|
+
_filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
|
835
1252
|
var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
|
836
|
-
return
|
1253
|
+
return runtime_1.wrap(function _callee$(_context) {
|
837
1254
|
while (1) {
|
838
1255
|
switch (_context.prev = _context.next) {
|
839
1256
|
case 0:
|
@@ -877,9 +1294,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
|
|
877
1294
|
}
|
878
1295
|
|
879
1296
|
function _getWorkflowDataByCategory() {
|
880
|
-
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/
|
1297
|
+
_getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
|
881
1298
|
var flattenedAnswers, triggeredQuestions, fields;
|
882
|
-
return
|
1299
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
883
1300
|
while (1) {
|
884
1301
|
switch (_context2.prev = _context2.next) {
|
885
1302
|
case 0:
|
@@ -950,8 +1367,8 @@ function getImagesFromIndexDb(_x5) {
|
|
950
1367
|
*/
|
951
1368
|
|
952
1369
|
function _getImagesFromIndexDb() {
|
953
|
-
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/
|
954
|
-
return
|
1370
|
+
_getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
|
1371
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
955
1372
|
while (1) {
|
956
1373
|
switch (_context3.prev = _context3.next) {
|
957
1374
|
case 0:
|
@@ -980,9 +1397,9 @@ function populateWorkflowField(_x6, _x7) {
|
|
980
1397
|
}
|
981
1398
|
|
982
1399
|
function _populateWorkflowField() {
|
983
|
-
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/
|
1400
|
+
_populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
|
984
1401
|
var answer, displayedAnswer;
|
985
|
-
return
|
1402
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
986
1403
|
while (1) {
|
987
1404
|
switch (_context4.prev = _context4.next) {
|
988
1405
|
case 0:
|
@@ -1160,10 +1577,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
1160
1577
|
*/
|
1161
1578
|
|
1162
1579
|
function _registerPatient() {
|
1163
|
-
_registerPatient = _asyncToGenerator( /*#__PURE__*/
|
1580
|
+
_registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA) {
|
1164
1581
|
var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
|
1165
1582
|
|
1166
|
-
return
|
1583
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
1167
1584
|
while (1) {
|
1168
1585
|
switch (_context4.prev = _context4.next) {
|
1169
1586
|
case 0:
|
@@ -1181,11 +1598,11 @@ function _registerPatient() {
|
|
1181
1598
|
}
|
1182
1599
|
|
1183
1600
|
_context4.prev = 7;
|
1184
|
-
return _context4.delegateYield( /*#__PURE__*/
|
1601
|
+
return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
|
1185
1602
|
var _consultIndex, _identity, _identity2;
|
1186
1603
|
|
1187
1604
|
var practitioners, grantPromises, consultIndex, consultIndexPromises;
|
1188
|
-
return
|
1605
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
1189
1606
|
while (1) {
|
1190
1607
|
switch (_context3.prev = _context3.next) {
|
1191
1608
|
case 0:
|
@@ -1256,6 +1673,7 @@ function _registerPatient() {
|
|
1256
1673
|
return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
|
1257
1674
|
console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
|
1258
1675
|
|
1676
|
+
// if we cannot grant to the admin, then the registration will fail
|
1259
1677
|
errorsThrown.push(err);
|
1260
1678
|
});
|
1261
1679
|
|
@@ -1264,14 +1682,15 @@ function _registerPatient() {
|
|
1264
1682
|
grantPromises = practitioners.filter(function (practitioner) {
|
1265
1683
|
return practitioner.uuid !== practitionerAdmin;
|
1266
1684
|
}).map( /*#__PURE__*/function () {
|
1267
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/
|
1268
|
-
return
|
1685
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
|
1686
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1269
1687
|
while (1) {
|
1270
1688
|
switch (_context.prev = _context.next) {
|
1271
1689
|
case 0:
|
1272
1690
|
return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
|
1273
1691
|
console.error("Error while granting lockbox to practitioner", err); // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1274
1692
|
|
1693
|
+
// Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
|
1275
1694
|
if (retry <= 1) return;
|
1276
1695
|
errorsThrown.push(err);
|
1277
1696
|
}));
|
@@ -1284,7 +1703,7 @@ function _registerPatient() {
|
|
1284
1703
|
}, _callee);
|
1285
1704
|
}));
|
1286
1705
|
|
1287
|
-
return function (
|
1706
|
+
return function (_x28) {
|
1288
1707
|
return _ref.apply(this, arguments);
|
1289
1708
|
};
|
1290
1709
|
}());
|
@@ -1297,14 +1716,15 @@ function _registerPatient() {
|
|
1297
1716
|
}], _consultIndex); // the index will identify in which lockbox a consultation resides
|
1298
1717
|
|
1299
1718
|
consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
|
1300
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
1301
|
-
return
|
1719
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
|
1720
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1302
1721
|
while (1) {
|
1303
1722
|
switch (_context2.prev = _context2.next) {
|
1304
1723
|
case 0:
|
1305
1724
|
return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
|
1306
1725
|
console.error("[SDK: registration] Error while adding to the practitioner's index " + practitioner.uuid, err); // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1307
1726
|
|
1727
|
+
// Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
|
1308
1728
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1309
1729
|
}));
|
1310
1730
|
|
@@ -1316,7 +1736,7 @@ function _registerPatient() {
|
|
1316
1736
|
}, _callee2);
|
1317
1737
|
}));
|
1318
1738
|
|
1319
|
-
return function (
|
1739
|
+
return function (_x29) {
|
1320
1740
|
return _ref2.apply(this, arguments);
|
1321
1741
|
};
|
1322
1742
|
}());
|
@@ -1324,6 +1744,7 @@ function _registerPatient() {
|
|
1324
1744
|
return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
|
1325
1745
|
console.error('[SDK: registration] Some errors happened during image upload', err); // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1326
1746
|
|
1747
|
+
// Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
|
1327
1748
|
if (retry <= 1) return;else errorsThrown.push(err);
|
1328
1749
|
});
|
1329
1750
|
|
@@ -1344,6 +1765,7 @@ function _registerPatient() {
|
|
1344
1765
|
return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
|
1345
1766
|
console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
|
1346
1767
|
|
1768
|
+
/// it's acceptable to continue registration (return old identity)
|
1347
1769
|
if (retry <= 1) return;
|
1348
1770
|
errorsThrown.push(err);
|
1349
1771
|
return identity;
|
@@ -1368,6 +1790,7 @@ function _registerPatient() {
|
|
1368
1790
|
return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
|
1369
1791
|
console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
|
1370
1792
|
|
1793
|
+
/// it's acceptable to continue registration (return old identity)
|
1371
1794
|
if (retry <= 1) return;
|
1372
1795
|
errorsThrown.push(err);
|
1373
1796
|
return identity;
|
@@ -1395,9 +1818,16 @@ function _registerPatient() {
|
|
1395
1818
|
});
|
1396
1819
|
|
1397
1820
|
case 47:
|
1821
|
+
_context3.next = 49;
|
1822
|
+
return searchIndexConsultation(consult.uuid, oroClient)["catch"](function (err) {
|
1823
|
+
console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
|
1824
|
+
errorsThrown.push(err);
|
1825
|
+
});
|
1826
|
+
|
1827
|
+
case 49:
|
1398
1828
|
return _context3.abrupt("return", "break");
|
1399
1829
|
|
1400
|
-
case
|
1830
|
+
case 50:
|
1401
1831
|
case "end":
|
1402
1832
|
return _context3.stop();
|
1403
1833
|
}
|
@@ -1473,9 +1903,9 @@ function getOrCreatePatientConsultationUuid(_x7, _x8) {
|
|
1473
1903
|
|
1474
1904
|
|
1475
1905
|
function _getOrCreatePatientConsultationUuid() {
|
1476
|
-
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/
|
1906
|
+
_getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
|
1477
1907
|
var payment;
|
1478
|
-
return
|
1908
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
1479
1909
|
while (1) {
|
1480
1910
|
switch (_context5.prev = _context5.next) {
|
1481
1911
|
case 0:
|
@@ -1530,9 +1960,9 @@ function getOrCreatePatientLockbox(_x9) {
|
|
1530
1960
|
|
1531
1961
|
|
1532
1962
|
function _getOrCreatePatientLockbox() {
|
1533
|
-
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/
|
1963
|
+
_getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
|
1534
1964
|
var grants;
|
1535
|
-
return
|
1965
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
1536
1966
|
while (1) {
|
1537
1967
|
switch (_context6.prev = _context6.next) {
|
1538
1968
|
case 0:
|
@@ -1575,8 +2005,8 @@ function storePatientData(_x10, _x11, _x12, _x13, _x14) {
|
|
1575
2005
|
}
|
1576
2006
|
|
1577
2007
|
function _storePatientData() {
|
1578
|
-
_storePatientData = _asyncToGenerator( /*#__PURE__*/
|
1579
|
-
return
|
2008
|
+
_storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
|
2009
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
1580
2010
|
while (1) {
|
1581
2011
|
switch (_context7.prev = _context7.next) {
|
1582
2012
|
case 0:
|
@@ -1633,9 +2063,9 @@ function storeImageAliases(_x15, _x16, _x17, _x18) {
|
|
1633
2063
|
|
1634
2064
|
|
1635
2065
|
function _storeImageAliases() {
|
1636
|
-
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/
|
2066
|
+
_storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
|
1637
2067
|
var images, nonNullImages, promises;
|
1638
|
-
return
|
2068
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
1639
2069
|
while (1) {
|
1640
2070
|
switch (_context8.prev = _context8.next) {
|
1641
2071
|
case 0:
|
@@ -1683,8 +2113,8 @@ function extractAndStorePersonalWorkflowData(_x19, _x20, _x21, _x22, _x23) {
|
|
1683
2113
|
}
|
1684
2114
|
|
1685
2115
|
function _extractAndStorePersonalWorkflowData() {
|
1686
|
-
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/
|
1687
|
-
return
|
2116
|
+
_extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
|
2117
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
1688
2118
|
while (1) {
|
1689
2119
|
switch (_context9.prev = _context9.next) {
|
1690
2120
|
case 0:
|
@@ -1707,6 +2137,135 @@ function _extractAndStorePersonalWorkflowData() {
|
|
1707
2137
|
return _extractAndStorePersonalWorkflowData.apply(this, arguments);
|
1708
2138
|
}
|
1709
2139
|
|
2140
|
+
function extractPersonalInfoFromConsultId(_x24, _x25) {
|
2141
|
+
return _extractPersonalInfoFromConsultId.apply(this, arguments);
|
2142
|
+
}
|
2143
|
+
|
2144
|
+
function _extractPersonalInfoFromConsultId() {
|
2145
|
+
_extractPersonalInfoFromConsultId = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(consultUuid, oroClient) {
|
2146
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2147
|
+
while (1) {
|
2148
|
+
switch (_context10.prev = _context10.next) {
|
2149
|
+
case 0:
|
2150
|
+
return _context10.abrupt("return", Promise.all([// Retrieve MetadataCategory.Personal in any case
|
2151
|
+
oroClient.getPersonalInformationsFromConsultId(consultUuid, MetadataCategory.Personal, true).then(function (personalInformations) {
|
2152
|
+
if (!personalInformations[0]) {
|
2153
|
+
console.error(MetadataCategory.Personal + " informations not found for consult:", consultUuid);
|
2154
|
+
throw Error('No self personal information found');
|
2155
|
+
}
|
2156
|
+
|
2157
|
+
return personalInformations[0];
|
2158
|
+
}), // Retrieve MetadataCategory.ChildPersonal in any case in parallel
|
2159
|
+
oroClient.getPersonalInformationsFromConsultId(consultUuid, MetadataCategory.ChildPersonal, true).then(function (childInformations) {
|
2160
|
+
if (!childInformations[0]) {
|
2161
|
+
console.debug(MetadataCategory.ChildPersonal + " informations not found for consult:", consultUuid); // Retrieve MetadataCategory.OtherPersonal only if MetadataCategory.ChildPersonal does not exist
|
2162
|
+
|
2163
|
+
// Retrieve MetadataCategory.OtherPersonal only if MetadataCategory.ChildPersonal does not exist
|
2164
|
+
return oroClient.getPersonalInformationsFromConsultId(consultUuid, MetadataCategory.OtherPersonal, true).then(function (otherInformations) {
|
2165
|
+
if (!otherInformations[0]) {
|
2166
|
+
console.debug(MetadataCategory.OtherPersonal + " informations not found for consult:", consultUuid);
|
2167
|
+
return {};
|
2168
|
+
}
|
2169
|
+
|
2170
|
+
return {
|
2171
|
+
otherPersonalInformations: otherInformations[0]
|
2172
|
+
};
|
2173
|
+
});
|
2174
|
+
}
|
2175
|
+
|
2176
|
+
return {
|
2177
|
+
childPersonalInformations: childInformations[0]
|
2178
|
+
};
|
2179
|
+
})]).then(function (_ref3) {
|
2180
|
+
var personalInformations = _ref3[0],
|
2181
|
+
_ref3$ = _ref3[1],
|
2182
|
+
childPersonalInformations = _ref3$.childPersonalInformations,
|
2183
|
+
otherPersonalInformations = _ref3$.otherPersonalInformations;
|
2184
|
+
return {
|
2185
|
+
consultUuid: consultUuid,
|
2186
|
+
personalInformations: personalInformations,
|
2187
|
+
childPersonalInformations: childPersonalInformations,
|
2188
|
+
otherPersonalInformations: otherPersonalInformations
|
2189
|
+
};
|
2190
|
+
}));
|
2191
|
+
|
2192
|
+
case 1:
|
2193
|
+
case "end":
|
2194
|
+
return _context10.stop();
|
2195
|
+
}
|
2196
|
+
}
|
2197
|
+
}, _callee10);
|
2198
|
+
}));
|
2199
|
+
return _extractPersonalInfoFromConsultId.apply(this, arguments);
|
2200
|
+
}
|
2201
|
+
|
2202
|
+
function searchIndexConsultation(_x26, _x27) {
|
2203
|
+
return _searchIndexConsultation.apply(this, arguments);
|
2204
|
+
}
|
2205
|
+
|
2206
|
+
function _searchIndexConsultation() {
|
2207
|
+
_searchIndexConsultation = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consultUuid, oroClient) {
|
2208
|
+
var terms, _yield$extractPersona, personalInformations, childPersonalInformations, otherPersonalInformations, personalInfo, childPersonalInfo, otherPersonalInfo;
|
2209
|
+
|
2210
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2211
|
+
while (1) {
|
2212
|
+
switch (_context11.prev = _context11.next) {
|
2213
|
+
case 0:
|
2214
|
+
terms = [];
|
2215
|
+
console.log('here');
|
2216
|
+
_context11.next = 4;
|
2217
|
+
return extractPersonalInfoFromConsultId(consultUuid, oroClient);
|
2218
|
+
|
2219
|
+
case 4:
|
2220
|
+
_yield$extractPersona = _context11.sent;
|
2221
|
+
personalInformations = _yield$extractPersona.personalInformations;
|
2222
|
+
childPersonalInformations = _yield$extractPersona.childPersonalInformations;
|
2223
|
+
otherPersonalInformations = _yield$extractPersona.otherPersonalInformations;
|
2224
|
+
console.log('personal=', personalInformations, 'child=', childPersonalInformations, 'other=', otherPersonalInformations);
|
2225
|
+
personalInfo = identificationToPersonalInformations(toActualObject(personalInformations.data), MetadataCategory.Personal);
|
2226
|
+
terms.push({
|
2227
|
+
kind: 'first-name',
|
2228
|
+
value: personalInfo.firstname
|
2229
|
+
}, {
|
2230
|
+
kind: 'last-name',
|
2231
|
+
value: personalInfo.name
|
2232
|
+
});
|
2233
|
+
|
2234
|
+
if (childPersonalInformations) {
|
2235
|
+
childPersonalInfo = identificationToPersonalInformations(toActualObject(childPersonalInformations.data), MetadataCategory.ChildPersonal);
|
2236
|
+
terms.push({
|
2237
|
+
kind: 'first-name',
|
2238
|
+
value: childPersonalInfo.firstname
|
2239
|
+
}, {
|
2240
|
+
kind: 'last-name',
|
2241
|
+
value: childPersonalInfo.name
|
2242
|
+
});
|
2243
|
+
}
|
2244
|
+
|
2245
|
+
if (otherPersonalInformations) {
|
2246
|
+
otherPersonalInfo = identificationToPersonalInformations(toActualObject(otherPersonalInformations.data), MetadataCategory.OtherPersonal);
|
2247
|
+
terms.push({
|
2248
|
+
kind: 'first-name',
|
2249
|
+
value: otherPersonalInfo.firstname
|
2250
|
+
}, {
|
2251
|
+
kind: 'last-name',
|
2252
|
+
value: otherPersonalInfo.name
|
2253
|
+
});
|
2254
|
+
}
|
2255
|
+
|
2256
|
+
_context11.next = 15;
|
2257
|
+
return oroClient.searchClient.index(consultUuid, terms);
|
2258
|
+
|
2259
|
+
case 15:
|
2260
|
+
case "end":
|
2261
|
+
return _context11.stop();
|
2262
|
+
}
|
2263
|
+
}
|
2264
|
+
}, _callee11);
|
2265
|
+
}));
|
2266
|
+
return _searchIndexConsultation.apply(this, arguments);
|
2267
|
+
}
|
2268
|
+
|
1710
2269
|
/**
|
1711
2270
|
* Decrypts and returns the encrypted grants
|
1712
2271
|
* If something went wrong during decryption, that grant will be removed from the list
|
@@ -1776,10 +2335,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2, _x3, _x4) {
|
|
1776
2335
|
*/
|
1777
2336
|
|
1778
2337
|
function _filterGrantsWithLockboxMetadata() {
|
1779
|
-
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/
|
2338
|
+
_filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
|
1780
2339
|
var _vaultIndex$IndexKey$, indexConsults;
|
1781
2340
|
|
1782
|
-
return
|
2341
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1783
2342
|
while (1) {
|
1784
2343
|
switch (_context.prev = _context.next) {
|
1785
2344
|
case 0:
|
@@ -1829,12 +2388,12 @@ function buildLegacyVaultIndex(_x5) {
|
|
1829
2388
|
}
|
1830
2389
|
|
1831
2390
|
function _buildLegacyVaultIndex() {
|
1832
|
-
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/
|
2391
|
+
_buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
|
1833
2392
|
var _vaultIndex;
|
1834
2393
|
|
1835
2394
|
var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
|
1836
2395
|
|
1837
|
-
return
|
2396
|
+
return runtime_1.wrap(function _callee2$(_context3) {
|
1838
2397
|
while (1) {
|
1839
2398
|
switch (_context3.prev = _context3.next) {
|
1840
2399
|
case 0:
|
@@ -1844,9 +2403,9 @@ function _buildLegacyVaultIndex() {
|
|
1844
2403
|
case 2:
|
1845
2404
|
grants = _context3.sent;
|
1846
2405
|
consultGrants = [];
|
1847
|
-
_loop = /*#__PURE__*/
|
2406
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
1848
2407
|
var grant, consults;
|
1849
|
-
return
|
2408
|
+
return runtime_1.wrap(function _loop$(_context2) {
|
1850
2409
|
while (1) {
|
1851
2410
|
switch (_context2.prev = _context2.next) {
|
1852
2411
|
case 0:
|
@@ -1930,8 +2489,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
1930
2489
|
_proto.cleanIndex =
|
1931
2490
|
/*#__PURE__*/
|
1932
2491
|
function () {
|
1933
|
-
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
1934
|
-
return
|
2492
|
+
var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
|
2493
|
+
return runtime_1.wrap(function _callee$(_context) {
|
1935
2494
|
while (1) {
|
1936
2495
|
switch (_context.prev = _context.next) {
|
1937
2496
|
case 0:
|
@@ -1969,9 +2528,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
1969
2528
|
_proto.signUp =
|
1970
2529
|
/*#__PURE__*/
|
1971
2530
|
function () {
|
1972
|
-
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2531
|
+
var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
|
1973
2532
|
var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
|
1974
|
-
return
|
2533
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
1975
2534
|
while (1) {
|
1976
2535
|
switch (_context2.prev = _context2.next) {
|
1977
2536
|
case 0:
|
@@ -2030,9 +2589,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2030
2589
|
_proto.confirmEmail =
|
2031
2590
|
/*#__PURE__*/
|
2032
2591
|
function () {
|
2033
|
-
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2592
|
+
var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
|
2034
2593
|
var claims;
|
2035
|
-
return
|
2594
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
2036
2595
|
while (1) {
|
2037
2596
|
switch (_context3.prev = _context3.next) {
|
2038
2597
|
case 0:
|
@@ -2077,9 +2636,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2077
2636
|
_proto.signIn =
|
2078
2637
|
/*#__PURE__*/
|
2079
2638
|
function () {
|
2080
|
-
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2639
|
+
var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
|
2081
2640
|
var hashedPassword, tokenRequest, userUuid;
|
2082
|
-
return
|
2641
|
+
return runtime_1.wrap(function _callee4$(_context4) {
|
2083
2642
|
while (1) {
|
2084
2643
|
switch (_context4.prev = _context4.next) {
|
2085
2644
|
case 0:
|
@@ -2132,9 +2691,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2132
2691
|
_proto.resumeSession =
|
2133
2692
|
/*#__PURE__*/
|
2134
2693
|
function () {
|
2135
|
-
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2694
|
+
var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
|
2136
2695
|
var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
|
2137
|
-
return
|
2696
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
2138
2697
|
while (1) {
|
2139
2698
|
switch (_context5.prev = _context5.next) {
|
2140
2699
|
case 0:
|
@@ -2235,8 +2794,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2235
2794
|
_proto.signOut =
|
2236
2795
|
/*#__PURE__*/
|
2237
2796
|
function () {
|
2238
|
-
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2239
|
-
return
|
2797
|
+
var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
|
2798
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
2240
2799
|
while (1) {
|
2241
2800
|
switch (_context6.prev = _context6.next) {
|
2242
2801
|
case 0:
|
@@ -2285,8 +2844,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2285
2844
|
_proto.registerPatient =
|
2286
2845
|
/*#__PURE__*/
|
2287
2846
|
function () {
|
2288
|
-
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2289
|
-
return
|
2847
|
+
var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA) {
|
2848
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
2290
2849
|
while (1) {
|
2291
2850
|
switch (_context7.prev = _context7.next) {
|
2292
2851
|
case 0:
|
@@ -2329,8 +2888,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2329
2888
|
_proto.buildVaultIndex =
|
2330
2889
|
/*#__PURE__*/
|
2331
2890
|
function () {
|
2332
|
-
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2333
|
-
return
|
2891
|
+
var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
|
2892
|
+
return runtime_1.wrap(function _callee8$(_context8) {
|
2334
2893
|
while (1) {
|
2335
2894
|
switch (_context8.prev = _context8.next) {
|
2336
2895
|
case 0:
|
@@ -2378,12 +2937,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2378
2937
|
_proto.forceUpdateIndexEntries =
|
2379
2938
|
/*#__PURE__*/
|
2380
2939
|
function () {
|
2381
|
-
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2940
|
+
var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10() {
|
2382
2941
|
var _this = this,
|
2383
2942
|
_this$vaultIndexAdd;
|
2384
2943
|
|
2385
2944
|
var grants, indexConsultLockbox;
|
2386
|
-
return
|
2945
|
+
return runtime_1.wrap(function _callee10$(_context10) {
|
2387
2946
|
while (1) {
|
2388
2947
|
switch (_context10.prev = _context10.next) {
|
2389
2948
|
case 0:
|
@@ -2394,8 +2953,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2394
2953
|
grants = _context10.sent;
|
2395
2954
|
_context10.next = 5;
|
2396
2955
|
return Promise.all(grants.map( /*#__PURE__*/function () {
|
2397
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/
|
2398
|
-
return
|
2956
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(grant) {
|
2957
|
+
return runtime_1.wrap(function _callee9$(_context9) {
|
2399
2958
|
while (1) {
|
2400
2959
|
switch (_context9.prev = _context9.next) {
|
2401
2960
|
case 0:
|
@@ -2471,12 +3030,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
2471
3030
|
_proto.vaultIndexAdd =
|
2472
3031
|
/*#__PURE__*/
|
2473
3032
|
function () {
|
2474
|
-
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3033
|
+
var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entries, indexOwnerUuid) {
|
2475
3034
|
var _this2 = this;
|
2476
3035
|
|
2477
3036
|
var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
|
2478
3037
|
|
2479
|
-
return
|
3038
|
+
return runtime_1.wrap(function _callee11$(_context11) {
|
2480
3039
|
while (1) {
|
2481
3040
|
switch (_context11.prev = _context11.next) {
|
2482
3041
|
case 0:
|
@@ -2598,11 +3157,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
2598
3157
|
_proto.indexSnapshotAdd =
|
2599
3158
|
/*#__PURE__*/
|
2600
3159
|
function () {
|
2601
|
-
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3160
|
+
var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
|
2602
3161
|
var _index$IndexKey$Consu, _cleanedIndex;
|
2603
3162
|
|
2604
3163
|
var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
|
2605
|
-
return
|
3164
|
+
return runtime_1.wrap(function _callee12$(_context12) {
|
2606
3165
|
while (1) {
|
2607
3166
|
switch (_context12.prev = _context12.next) {
|
2608
3167
|
case 0:
|
@@ -2660,9 +3219,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2660
3219
|
_proto.grantLockbox =
|
2661
3220
|
/*#__PURE__*/
|
2662
3221
|
function () {
|
2663
|
-
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3222
|
+
var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
|
2664
3223
|
var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
|
2665
|
-
return
|
3224
|
+
return runtime_1.wrap(function _callee13$(_context13) {
|
2666
3225
|
while (1) {
|
2667
3226
|
switch (_context13.prev = _context13.next) {
|
2668
3227
|
case 0:
|
@@ -2722,9 +3281,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2722
3281
|
_proto.createMessageData =
|
2723
3282
|
/*#__PURE__*/
|
2724
3283
|
function () {
|
2725
|
-
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3284
|
+
var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2726
3285
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2727
|
-
return
|
3286
|
+
return runtime_1.wrap(function _callee14$(_context14) {
|
2728
3287
|
while (1) {
|
2729
3288
|
switch (_context14.prev = _context14.next) {
|
2730
3289
|
case 0:
|
@@ -2794,9 +3353,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2794
3353
|
_proto.createMessageAttachmentData =
|
2795
3354
|
/*#__PURE__*/
|
2796
3355
|
function () {
|
2797
|
-
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3356
|
+
var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
|
2798
3357
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
|
2799
|
-
return
|
3358
|
+
return runtime_1.wrap(function _callee15$(_context15) {
|
2800
3359
|
while (1) {
|
2801
3360
|
switch (_context15.prev = _context15.next) {
|
2802
3361
|
case 0:
|
@@ -2881,8 +3440,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
2881
3440
|
_proto.createConsultationAttachmentData =
|
2882
3441
|
/*#__PURE__*/
|
2883
3442
|
function () {
|
2884
|
-
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
2885
|
-
return
|
3443
|
+
var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
|
3444
|
+
return runtime_1.wrap(function _callee16$(_context16) {
|
2886
3445
|
while (1) {
|
2887
3446
|
switch (_context16.prev = _context16.next) {
|
2888
3447
|
case 0:
|
@@ -2953,9 +3512,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
2953
3512
|
_proto.createJsonData =
|
2954
3513
|
/*#__PURE__*/
|
2955
3514
|
function () {
|
2956
|
-
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3515
|
+
var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
2957
3516
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
2958
|
-
return
|
3517
|
+
return runtime_1.wrap(function _callee17$(_context17) {
|
2959
3518
|
while (1) {
|
2960
3519
|
switch (_context17.prev = _context17.next) {
|
2961
3520
|
case 0:
|
@@ -3009,9 +3568,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3009
3568
|
_proto.getOrInsertJsonData =
|
3010
3569
|
/*#__PURE__*/
|
3011
3570
|
function () {
|
3012
|
-
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3571
|
+
var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
|
3013
3572
|
var manifest;
|
3014
|
-
return
|
3573
|
+
return runtime_1.wrap(function _callee18$(_context18) {
|
3015
3574
|
while (1) {
|
3016
3575
|
switch (_context18.prev = _context18.next) {
|
3017
3576
|
case 0:
|
@@ -3074,9 +3633,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3074
3633
|
_proto.createBytesData =
|
3075
3634
|
/*#__PURE__*/
|
3076
3635
|
function () {
|
3077
|
-
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3636
|
+
var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
|
3078
3637
|
var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
|
3079
|
-
return
|
3638
|
+
return runtime_1.wrap(function _callee19$(_context19) {
|
3080
3639
|
while (1) {
|
3081
3640
|
switch (_context19.prev = _context19.next) {
|
3082
3641
|
case 0:
|
@@ -3132,10 +3691,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3132
3691
|
_proto.getJsonData =
|
3133
3692
|
/*#__PURE__*/
|
3134
3693
|
function () {
|
3135
|
-
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3694
|
+
var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3136
3695
|
var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
|
3137
3696
|
|
3138
|
-
return
|
3697
|
+
return runtime_1.wrap(function _callee20$(_context20) {
|
3139
3698
|
while (1) {
|
3140
3699
|
switch (_context20.prev = _context20.next) {
|
3141
3700
|
case 0:
|
@@ -3182,10 +3741,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
3182
3741
|
_proto.getBytesData =
|
3183
3742
|
/*#__PURE__*/
|
3184
3743
|
function () {
|
3185
|
-
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3744
|
+
var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
|
3186
3745
|
var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
|
3187
3746
|
|
3188
|
-
return
|
3747
|
+
return runtime_1.wrap(function _callee21$(_context21) {
|
3189
3748
|
while (1) {
|
3190
3749
|
switch (_context21.prev = _context21.next) {
|
3191
3750
|
case 0:
|
@@ -3235,9 +3794,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3235
3794
|
_proto.getGrants =
|
3236
3795
|
/*#__PURE__*/
|
3237
3796
|
function () {
|
3238
|
-
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3797
|
+
var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(filter, forceRefresh) {
|
3239
3798
|
var filterString, grantsByConsultLockbox, decryptedConsults, encryptedGrants, decryptedGrants;
|
3240
|
-
return
|
3799
|
+
return runtime_1.wrap(function _callee22$(_context22) {
|
3241
3800
|
while (1) {
|
3242
3801
|
switch (_context22.prev = _context22.next) {
|
3243
3802
|
case 0:
|
@@ -3355,9 +3914,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3355
3914
|
_proto.getCachedSecretCryptor =
|
3356
3915
|
/*#__PURE__*/
|
3357
3916
|
function () {
|
3358
|
-
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3917
|
+
var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
|
3359
3918
|
var index, encryptedSecret, secret, cryptor;
|
3360
|
-
return
|
3919
|
+
return runtime_1.wrap(function _callee23$(_context23) {
|
3361
3920
|
while (1) {
|
3362
3921
|
switch (_context23.prev = _context23.next) {
|
3363
3922
|
case 0:
|
@@ -3422,8 +3981,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3422
3981
|
_proto.getPersonalInformationsFromConsultId =
|
3423
3982
|
/*#__PURE__*/
|
3424
3983
|
function () {
|
3425
|
-
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3426
|
-
return
|
3984
|
+
var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, category, forceRefresh) {
|
3985
|
+
return runtime_1.wrap(function _callee24$(_context24) {
|
3427
3986
|
while (1) {
|
3428
3987
|
switch (_context24.prev = _context24.next) {
|
3429
3988
|
case 0:
|
@@ -3460,8 +4019,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3460
4019
|
_proto.getMedicalDataFromConsultId =
|
3461
4020
|
/*#__PURE__*/
|
3462
4021
|
function () {
|
3463
|
-
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
3464
|
-
return
|
4022
|
+
var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(consultationId, forceRefresh) {
|
4023
|
+
return runtime_1.wrap(function _callee25$(_context25) {
|
3465
4024
|
while (1) {
|
3466
4025
|
switch (_context25.prev = _context25.next) {
|
3467
4026
|
case 0:
|
@@ -3487,12 +4046,12 @@ var OroClient = /*#__PURE__*/function () {
|
|
3487
4046
|
}();
|
3488
4047
|
|
3489
4048
|
_proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
|
3490
|
-
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4049
|
+
var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(consultationId, category, forceRefresh) {
|
3491
4050
|
var _this3 = this;
|
3492
4051
|
|
3493
4052
|
var grants, workflowData, _loop, _iterator, _step;
|
3494
4053
|
|
3495
|
-
return
|
4054
|
+
return runtime_1.wrap(function _callee27$(_context28) {
|
3496
4055
|
while (1) {
|
3497
4056
|
switch (_context28.prev = _context28.next) {
|
3498
4057
|
case 0:
|
@@ -3508,9 +4067,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3508
4067
|
case 3:
|
3509
4068
|
grants = _context28.sent;
|
3510
4069
|
workflowData = [];
|
3511
|
-
_loop = /*#__PURE__*/
|
4070
|
+
_loop = /*#__PURE__*/runtime_1.mark(function _loop() {
|
3512
4071
|
var grant, manifest, data;
|
3513
|
-
return
|
4072
|
+
return runtime_1.wrap(function _loop$(_context27) {
|
3514
4073
|
while (1) {
|
3515
4074
|
switch (_context27.prev = _context27.next) {
|
3516
4075
|
case 0:
|
@@ -3544,8 +4103,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
3544
4103
|
case 8:
|
3545
4104
|
_context27.next = 10;
|
3546
4105
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3547
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/
|
3548
|
-
return
|
4106
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(entry) {
|
4107
|
+
return runtime_1.wrap(function _callee26$(_context26) {
|
3549
4108
|
while (1) {
|
3550
4109
|
switch (_context26.prev = _context26.next) {
|
3551
4110
|
case 0:
|
@@ -3629,9 +4188,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3629
4188
|
_proto.getPersonalInformations =
|
3630
4189
|
/*#__PURE__*/
|
3631
4190
|
function () {
|
3632
|
-
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4191
|
+
var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(userId) {
|
3633
4192
|
var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
3634
|
-
return
|
4193
|
+
return runtime_1.wrap(function _callee28$(_context29) {
|
3635
4194
|
while (1) {
|
3636
4195
|
switch (_context29.prev = _context29.next) {
|
3637
4196
|
case 0:
|
@@ -3717,9 +4276,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3717
4276
|
_proto.getGrantFromConsultId =
|
3718
4277
|
/*#__PURE__*/
|
3719
4278
|
function () {
|
3720
|
-
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4279
|
+
var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
|
3721
4280
|
var grants;
|
3722
|
-
return
|
4281
|
+
return runtime_1.wrap(function _callee29$(_context30) {
|
3723
4282
|
while (1) {
|
3724
4283
|
switch (_context30.prev = _context30.next) {
|
3725
4284
|
case 0:
|
@@ -3765,9 +4324,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3765
4324
|
_proto.getIdentityFromConsultId =
|
3766
4325
|
/*#__PURE__*/
|
3767
4326
|
function () {
|
3768
|
-
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4327
|
+
var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(consultationId) {
|
3769
4328
|
var grant;
|
3770
|
-
return
|
4329
|
+
return runtime_1.wrap(function _callee30$(_context31) {
|
3771
4330
|
while (1) {
|
3772
4331
|
switch (_context31.prev = _context31.next) {
|
3773
4332
|
case 0:
|
@@ -3820,11 +4379,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3820
4379
|
_proto.getLockboxManifest =
|
3821
4380
|
/*#__PURE__*/
|
3822
4381
|
function () {
|
3823
|
-
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4382
|
+
var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
|
3824
4383
|
var _this4 = this;
|
3825
4384
|
|
3826
4385
|
var manifestKey;
|
3827
|
-
return
|
4386
|
+
return runtime_1.wrap(function _callee32$(_context33) {
|
3828
4387
|
while (1) {
|
3829
4388
|
switch (_context33.prev = _context33.next) {
|
3830
4389
|
case 0:
|
@@ -3849,9 +4408,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
3849
4408
|
case 4:
|
3850
4409
|
return _context33.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
|
3851
4410
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
3852
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/
|
4411
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(entry) {
|
3853
4412
|
var privateMeta;
|
3854
|
-
return
|
4413
|
+
return runtime_1.wrap(function _callee31$(_context32) {
|
3855
4414
|
while (1) {
|
3856
4415
|
switch (_context32.prev = _context32.next) {
|
3857
4416
|
case 0:
|
@@ -3912,11 +4471,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3912
4471
|
_proto.createPersonalInformations =
|
3913
4472
|
/*#__PURE__*/
|
3914
4473
|
function () {
|
3915
|
-
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4474
|
+
var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, data, dataUuid) {
|
3916
4475
|
var _yield$this$getGrants;
|
3917
4476
|
|
3918
4477
|
var lockboxUuid;
|
3919
|
-
return
|
4478
|
+
return runtime_1.wrap(function _callee33$(_context34) {
|
3920
4479
|
while (1) {
|
3921
4480
|
switch (_context34.prev = _context34.next) {
|
3922
4481
|
case 0:
|
@@ -3982,11 +4541,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
3982
4541
|
_proto.createUserPreference =
|
3983
4542
|
/*#__PURE__*/
|
3984
4543
|
function () {
|
3985
|
-
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4544
|
+
var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(identity, preference, dataUuid) {
|
3986
4545
|
var _yield$this$getGrants2;
|
3987
4546
|
|
3988
4547
|
var lockboxUuid;
|
3989
|
-
return
|
4548
|
+
return runtime_1.wrap(function _callee34$(_context35) {
|
3990
4549
|
while (1) {
|
3991
4550
|
switch (_context35.prev = _context35.next) {
|
3992
4551
|
case 0:
|
@@ -4050,9 +4609,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4050
4609
|
_proto.getDataFromGrant =
|
4051
4610
|
/*#__PURE__*/
|
4052
4611
|
function () {
|
4053
|
-
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4612
|
+
var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(grant, filter) {
|
4054
4613
|
var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
|
4055
|
-
return
|
4614
|
+
return runtime_1.wrap(function _callee35$(_context36) {
|
4056
4615
|
while (1) {
|
4057
4616
|
switch (_context36.prev = _context36.next) {
|
4058
4617
|
case 0:
|
@@ -4118,9 +4677,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4118
4677
|
_proto.getUserPreferenceFromConsultId =
|
4119
4678
|
/*#__PURE__*/
|
4120
4679
|
function () {
|
4121
|
-
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4680
|
+
var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(consultationId) {
|
4122
4681
|
var grant;
|
4123
|
-
return
|
4682
|
+
return runtime_1.wrap(function _callee36$(_context37) {
|
4124
4683
|
while (1) {
|
4125
4684
|
switch (_context37.prev = _context37.next) {
|
4126
4685
|
case 0:
|
@@ -4167,9 +4726,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4167
4726
|
_proto.getUserPreference =
|
4168
4727
|
/*#__PURE__*/
|
4169
4728
|
function () {
|
4170
|
-
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4729
|
+
var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(identity) {
|
4171
4730
|
var grant;
|
4172
|
-
return
|
4731
|
+
return runtime_1.wrap(function _callee37$(_context38) {
|
4173
4732
|
while (1) {
|
4174
4733
|
switch (_context38.prev = _context38.next) {
|
4175
4734
|
case 0:
|
@@ -4218,9 +4777,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4218
4777
|
_proto.getRecoveryDataFromConsultId =
|
4219
4778
|
/*#__PURE__*/
|
4220
4779
|
function () {
|
4221
|
-
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4780
|
+
var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(consultationId) {
|
4222
4781
|
var grant;
|
4223
|
-
return
|
4782
|
+
return runtime_1.wrap(function _callee38$(_context39) {
|
4224
4783
|
while (1) {
|
4225
4784
|
switch (_context39.prev = _context39.next) {
|
4226
4785
|
case 0:
|
@@ -4267,9 +4826,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4267
4826
|
_proto.getRecoveryData =
|
4268
4827
|
/*#__PURE__*/
|
4269
4828
|
function () {
|
4270
|
-
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4829
|
+
var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(identity) {
|
4271
4830
|
var grant;
|
4272
|
-
return
|
4831
|
+
return runtime_1.wrap(function _callee39$(_context40) {
|
4273
4832
|
while (1) {
|
4274
4833
|
switch (_context40.prev = _context40.next) {
|
4275
4834
|
case 0:
|
@@ -4323,10 +4882,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4323
4882
|
_proto.getAssignedConsultations =
|
4324
4883
|
/*#__PURE__*/
|
4325
4884
|
function () {
|
4326
|
-
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4885
|
+
var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(practiceUuid, forceRefresh) {
|
4327
4886
|
var _this5 = this;
|
4328
4887
|
|
4329
|
-
return
|
4888
|
+
return runtime_1.wrap(function _callee41$(_context42) {
|
4330
4889
|
while (1) {
|
4331
4890
|
switch (_context42.prev = _context42.next) {
|
4332
4891
|
case 0:
|
@@ -4345,8 +4904,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4345
4904
|
documentType: DocumentType.PopulatedWorkflowData
|
4346
4905
|
}, true, undefined, forceRefresh).then(function (manifest) {
|
4347
4906
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4348
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/
|
4349
|
-
return
|
4907
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(entry) {
|
4908
|
+
return runtime_1.wrap(function _callee40$(_context41) {
|
4350
4909
|
while (1) {
|
4351
4910
|
switch (_context41.prev = _context41.next) {
|
4352
4911
|
case 0:
|
@@ -4400,11 +4959,11 @@ var OroClient = /*#__PURE__*/function () {
|
|
4400
4959
|
_proto.getPastConsultationsFromConsultId =
|
4401
4960
|
/*#__PURE__*/
|
4402
4961
|
function () {
|
4403
|
-
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4962
|
+
var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, practiceUuid) {
|
4404
4963
|
var _this6 = this;
|
4405
4964
|
|
4406
4965
|
var grant, consultationsInLockbox;
|
4407
|
-
return
|
4966
|
+
return runtime_1.wrap(function _callee43$(_context44) {
|
4408
4967
|
while (1) {
|
4409
4968
|
switch (_context44.prev = _context44.next) {
|
4410
4969
|
case 0:
|
@@ -4443,8 +5002,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4443
5002
|
case 10:
|
4444
5003
|
_context44.next = 12;
|
4445
5004
|
return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
|
4446
|
-
var _ref6 = _asyncToGenerator( /*#__PURE__*/
|
4447
|
-
return
|
5005
|
+
var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultId) {
|
5006
|
+
return runtime_1.wrap(function _callee42$(_context43) {
|
4448
5007
|
while (1) {
|
4449
5008
|
switch (_context43.prev = _context43.next) {
|
4450
5009
|
case 0:
|
@@ -4495,10 +5054,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4495
5054
|
_proto.getPatientConsultationData =
|
4496
5055
|
/*#__PURE__*/
|
4497
5056
|
function () {
|
4498
|
-
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5057
|
+
var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId, forceRefresh) {
|
4499
5058
|
var _this7 = this;
|
4500
5059
|
|
4501
|
-
return
|
5060
|
+
return runtime_1.wrap(function _callee44$(_context45) {
|
4502
5061
|
while (1) {
|
4503
5062
|
switch (_context45.prev = _context45.next) {
|
4504
5063
|
case 0:
|
@@ -4552,8 +5111,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4552
5111
|
_proto.getPatientPrescriptionsList =
|
4553
5112
|
/*#__PURE__*/
|
4554
5113
|
function () {
|
4555
|
-
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4556
|
-
return
|
5114
|
+
var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
|
5115
|
+
return runtime_1.wrap(function _callee45$(_context46) {
|
4557
5116
|
while (1) {
|
4558
5117
|
switch (_context46.prev = _context46.next) {
|
4559
5118
|
case 0:
|
@@ -4586,8 +5145,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4586
5145
|
_proto.getPatientResultsList =
|
4587
5146
|
/*#__PURE__*/
|
4588
5147
|
function () {
|
4589
|
-
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4590
|
-
return
|
5148
|
+
var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
|
5149
|
+
return runtime_1.wrap(function _callee46$(_context47) {
|
4591
5150
|
while (1) {
|
4592
5151
|
switch (_context47.prev = _context47.next) {
|
4593
5152
|
case 0:
|
@@ -4620,8 +5179,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4620
5179
|
_proto.getPatientTreatmentPlans =
|
4621
5180
|
/*#__PURE__*/
|
4622
5181
|
function () {
|
4623
|
-
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4624
|
-
return
|
5182
|
+
var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId) {
|
5183
|
+
return runtime_1.wrap(function _callee47$(_context48) {
|
4625
5184
|
while (1) {
|
4626
5185
|
switch (_context48.prev = _context48.next) {
|
4627
5186
|
case 0:
|
@@ -4655,8 +5214,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4655
5214
|
_proto.getPatientTreatmentPlanByUuid =
|
4656
5215
|
/*#__PURE__*/
|
4657
5216
|
function () {
|
4658
|
-
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
4659
|
-
return
|
5217
|
+
var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(consultationId, treatmentPlanId) {
|
5218
|
+
return runtime_1.wrap(function _callee48$(_context49) {
|
4660
5219
|
while (1) {
|
4661
5220
|
switch (_context49.prev = _context49.next) {
|
4662
5221
|
case 0:
|
@@ -4694,10 +5253,10 @@ var OroClient = /*#__PURE__*/function () {
|
|
4694
5253
|
_proto.getPatientDocumentsList =
|
4695
5254
|
/*#__PURE__*/
|
4696
5255
|
function () {
|
4697
|
-
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5256
|
+
var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
|
4698
5257
|
var _this8 = this;
|
4699
5258
|
|
4700
|
-
return
|
5259
|
+
return runtime_1.wrap(function _callee50$(_context51) {
|
4701
5260
|
while (1) {
|
4702
5261
|
switch (_context51.prev = _context51.next) {
|
4703
5262
|
case 0:
|
@@ -4713,8 +5272,8 @@ var OroClient = /*#__PURE__*/function () {
|
|
4713
5272
|
consultationId: consultationId
|
4714
5273
|
}), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
|
4715
5274
|
return Promise.all(manifest.map( /*#__PURE__*/function () {
|
4716
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/
|
4717
|
-
return
|
5275
|
+
var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(entry) {
|
5276
|
+
return runtime_1.wrap(function _callee49$(_context50) {
|
4718
5277
|
while (1) {
|
4719
5278
|
switch (_context50.prev = _context50.next) {
|
4720
5279
|
case 0:
|
@@ -4772,9 +5331,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4772
5331
|
_proto.recoverPrivateKeyFromSecurityQuestions =
|
4773
5332
|
/*#__PURE__*/
|
4774
5333
|
function () {
|
4775
|
-
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5334
|
+
var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
4776
5335
|
var shards, answeredShards, privateKey;
|
4777
|
-
return
|
5336
|
+
return runtime_1.wrap(function _callee51$(_context52) {
|
4778
5337
|
while (1) {
|
4779
5338
|
switch (_context52.prev = _context52.next) {
|
4780
5339
|
case 0:
|
@@ -4828,9 +5387,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4828
5387
|
_proto.recoverPrivateKeyFromPassword =
|
4829
5388
|
/*#__PURE__*/
|
4830
5389
|
function () {
|
4831
|
-
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5390
|
+
var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, password) {
|
4832
5391
|
var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
|
4833
|
-
return
|
5392
|
+
return runtime_1.wrap(function _callee52$(_context53) {
|
4834
5393
|
while (1) {
|
4835
5394
|
switch (_context53.prev = _context53.next) {
|
4836
5395
|
case 0:
|
@@ -4876,9 +5435,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4876
5435
|
_proto.recoverPrivateKeyFromMasterKey =
|
4877
5436
|
/*#__PURE__*/
|
4878
5437
|
function () {
|
4879
|
-
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5438
|
+
var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, masterKey) {
|
4880
5439
|
var recoveryPayload, symmetricDecryptor, privateKey;
|
4881
|
-
return
|
5440
|
+
return runtime_1.wrap(function _callee53$(_context54) {
|
4882
5441
|
while (1) {
|
4883
5442
|
switch (_context54.prev = _context54.next) {
|
4884
5443
|
case 0:
|
@@ -4918,9 +5477,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4918
5477
|
_proto.updateSecurityQuestions =
|
4919
5478
|
/*#__PURE__*/
|
4920
5479
|
function () {
|
4921
|
-
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5480
|
+
var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
|
4922
5481
|
var securityQuestionPayload, updateRequest;
|
4923
|
-
return
|
5482
|
+
return runtime_1.wrap(function _callee54$(_context55) {
|
4924
5483
|
while (1) {
|
4925
5484
|
switch (_context55.prev = _context55.next) {
|
4926
5485
|
case 0:
|
@@ -4972,9 +5531,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
4972
5531
|
_proto.updatePassword =
|
4973
5532
|
/*#__PURE__*/
|
4974
5533
|
function () {
|
4975
|
-
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5534
|
+
var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, newPassword, oldPassword) {
|
4976
5535
|
var symmetricEncryptor, passwordPayload, updateRequest;
|
4977
|
-
return
|
5536
|
+
return runtime_1.wrap(function _callee55$(_context56) {
|
4978
5537
|
while (1) {
|
4979
5538
|
switch (_context56.prev = _context56.next) {
|
4980
5539
|
case 0:
|
@@ -5034,9 +5593,9 @@ var OroClient = /*#__PURE__*/function () {
|
|
5034
5593
|
_proto.updateMasterKey =
|
5035
5594
|
/*#__PURE__*/
|
5036
5595
|
function () {
|
5037
|
-
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/
|
5596
|
+
var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(id, masterKey, lockboxUuid) {
|
5038
5597
|
var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
|
5039
|
-
return
|
5598
|
+
return runtime_1.wrap(function _callee56$(_context57) {
|
5040
5599
|
while (1) {
|
5041
5600
|
switch (_context57.prev = _context57.next) {
|
5042
5601
|
case 0:
|
@@ -5178,5 +5737,5 @@ var init = function init(toolbox, tellerBaseURL, vaultBaseURL, guardBaseURL, sea
|
|
5178
5737
|
};
|
5179
5738
|
|
5180
5739
|
export default init;
|
5181
|
-
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5740
|
+
export { AssociatedLockboxNotFound, CliniaService, IncompleteAuthentication, MissingGrant, MissingLockbox, MissingLockboxOwner, OroClient, WorkflowAnswersMissingError, decryptConsultLockboxGrants, decryptGrants, extractAndStorePersonalWorkflowData, extractISOLocalityForConsult, extractPersonalInfoFromConsultId, fillWorkflowFromPopulatedWorkflow, filterTriggeredAnsweredWithKind, flattenSelectedAnswers, getImagesFromIndexDb, getInitialisedSelectedAnswers, getWorkflowDataByCategory, identificationToPersonalInformations, isTriggered, registerPatient, searchIndexConsultation, sessionStorePrivateKeyName, toActualObject, updatePersonalIntoPopulatedWorkflowData, wasmPath };
|
5182
5741
|
//# sourceMappingURL=oro-sdk.esm.js.map
|