oro-sdk 3.11.0 → 3.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,351 @@ import * as oroToolbox from 'oro-toolbox';
5
5
  export { oroToolbox as OroToolboxNamespace };
6
6
  import { getMany } from 'idb-keyval';
7
7
 
8
+ function _regeneratorRuntime() {
9
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
10
+
11
+ _regeneratorRuntime = function () {
12
+ return exports;
13
+ };
14
+
15
+ var exports = {},
16
+ Op = Object.prototype,
17
+ hasOwn = Op.hasOwnProperty,
18
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
19
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
20
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
21
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
22
+
23
+ function define(obj, key, value) {
24
+ return Object.defineProperty(obj, key, {
25
+ value: value,
26
+ enumerable: !0,
27
+ configurable: !0,
28
+ writable: !0
29
+ }), obj[key];
30
+ }
31
+
32
+ try {
33
+ define({}, "");
34
+ } catch (err) {
35
+ define = function (obj, key, value) {
36
+ return obj[key] = value;
37
+ };
38
+ }
39
+
40
+ function wrap(innerFn, outerFn, self, tryLocsList) {
41
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
42
+ generator = Object.create(protoGenerator.prototype),
43
+ context = new Context(tryLocsList || []);
44
+ return generator._invoke = function (innerFn, self, context) {
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;
56
+
57
+ if (delegate) {
58
+ var delegateResult = maybeInvokeDelegate(delegate, context);
59
+
60
+ if (delegateResult) {
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;
85
+ }
86
+
87
+ function tryCatch(fn, obj, arg) {
88
+ try {
89
+ return {
90
+ type: "normal",
91
+ arg: fn.call(obj, arg)
92
+ };
93
+ } catch (err) {
94
+ return {
95
+ type: "throw",
96
+ arg: err
97
+ };
98
+ }
99
+ }
100
+
101
+ exports.wrap = wrap;
102
+ var ContinueSentinel = {};
103
+
104
+ function Generator() {}
105
+
106
+ function GeneratorFunction() {}
107
+
108
+ function GeneratorFunctionPrototype() {}
109
+
110
+ var IteratorPrototype = {};
111
+ define(IteratorPrototype, iteratorSymbol, function () {
112
+ return this;
113
+ });
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
+
119
+ function defineIteratorMethods(prototype) {
120
+ ["next", "throw", "return"].forEach(function (method) {
121
+ define(prototype, method, function (arg) {
122
+ return this._invoke(method, arg);
123
+ });
124
+ });
125
+ }
126
+
127
+ function AsyncIterator(generator, PromiseImpl) {
128
+ function invoke(method, arg, resolve, reject) {
129
+ var record = tryCatch(generator[method], generator, arg);
130
+
131
+ if ("throw" !== record.type) {
132
+ var result = record.arg,
133
+ value = result.value;
134
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
135
+ invoke("next", value, resolve, reject);
136
+ }, function (err) {
137
+ invoke("throw", err, resolve, reject);
138
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
139
+ result.value = unwrapped, resolve(result);
140
+ }, function (error) {
141
+ return invoke("throw", error, resolve, reject);
142
+ });
143
+ }
144
+
145
+ reject(record.arg);
146
+ }
147
+
148
+ var previousPromise;
149
+
150
+ this._invoke = function (method, arg) {
151
+ function callInvokeWithMethodAndArg() {
152
+ return new PromiseImpl(function (resolve, reject) {
153
+ invoke(method, arg, resolve, reject);
154
+ });
155
+ }
156
+
157
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
158
+ };
159
+ }
160
+
161
+ function maybeInvokeDelegate(delegate, context) {
162
+ var method = delegate.iterator[context.method];
163
+
164
+ if (undefined === method) {
165
+ if (context.delegate = null, "throw" === context.method) {
166
+ if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
167
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
168
+ }
169
+
170
+ return ContinueSentinel;
171
+ }
172
+
173
+ var record = tryCatch(method, delegate.iterator, context.arg);
174
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
175
+ var info = record.arg;
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);
177
+ }
178
+
179
+ function pushTryEntry(locs) {
180
+ var entry = {
181
+ tryLoc: locs[0]
182
+ };
183
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
184
+ }
185
+
186
+ function resetTryEntry(entry) {
187
+ var record = entry.completion || {};
188
+ record.type = "normal", delete record.arg, entry.completion = record;
189
+ }
190
+
191
+ function Context(tryLocsList) {
192
+ this.tryEntries = [{
193
+ tryLoc: "root"
194
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
195
+ }
196
+
197
+ function values(iterable) {
198
+ if (iterable) {
199
+ var iteratorMethod = iterable[iteratorSymbol];
200
+ if (iteratorMethod) return iteratorMethod.call(iterable);
201
+ if ("function" == typeof iterable.next) return iterable;
202
+
203
+ if (!isNaN(iterable.length)) {
204
+ var i = -1,
205
+ next = function next() {
206
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
207
+
208
+ return next.value = undefined, next.done = !0, next;
209
+ };
210
+
211
+ return next.next = next;
212
+ }
213
+ }
214
+
215
+ return {
216
+ next: doneResult
217
+ };
218
+ }
219
+
220
+ function doneResult() {
221
+ return {
222
+ value: undefined,
223
+ done: !0
224
+ };
225
+ }
226
+
227
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
228
+ var ctor = "function" == typeof genFun && genFun.constructor;
229
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
230
+ }, exports.mark = function (genFun) {
231
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
232
+ }, exports.awrap = function (arg) {
233
+ return {
234
+ __await: arg
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 = [];
250
+
251
+ for (var key in object) keys.push(key);
252
+
253
+ return keys.reverse(), function next() {
254
+ for (; keys.length;) {
255
+ var key = keys.pop();
256
+ if (key in object) return next.value = key, next.done = !1, next;
257
+ }
258
+
259
+ return next.done = !0, next;
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;
275
+
276
+ function handle(loc, caught) {
277
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
278
+ }
279
+
280
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
281
+ var entry = this.tryEntries[i],
282
+ record = entry.completion;
283
+ if ("root" === entry.tryLoc) return handle("end");
284
+
285
+ if (entry.tryLoc <= this.prev) {
286
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
287
+ hasFinally = hasOwn.call(entry, "finallyLoc");
288
+
289
+ if (hasCatch && hasFinally) {
290
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
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);
297
+ }
298
+ }
299
+ }
300
+ },
301
+ abrupt: function (type, arg) {
302
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
303
+ var entry = this.tryEntries[i];
304
+
305
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
306
+ var finallyEntry = entry;
307
+ break;
308
+ }
309
+ }
310
+
311
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
312
+ var record = finallyEntry ? finallyEntry.completion : {};
313
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
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;
323
+ }
324
+ },
325
+ catch: function (tryLoc) {
326
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
327
+ var entry = this.tryEntries[i];
328
+
329
+ if (entry.tryLoc === tryLoc) {
330
+ var record = entry.completion;
331
+
332
+ if ("throw" === record.type) {
333
+ var thrown = record.arg;
334
+ resetTryEntry(entry);
335
+ }
336
+
337
+ return thrown;
338
+ }
339
+ }
340
+
341
+ throw new Error("illegal catch attempt");
342
+ },
343
+ delegateYield: function (iterable, resultName, nextLoc) {
344
+ return this.delegate = {
345
+ iterator: values(iterable),
346
+ resultName: resultName,
347
+ nextLoc: nextLoc
348
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
349
+ }
350
+ }, exports;
351
+ }
352
+
8
353
  function _wrapRegExp() {
9
354
  _wrapRegExp = function (re, groups) {
10
355
  return new BabelRegExp(re, void 0, groups);
@@ -90,7 +435,7 @@ function _asyncToGenerator(fn) {
90
435
  }
91
436
 
92
437
  function _extends() {
93
- _extends = Object.assign || function (target) {
438
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
94
439
  for (var i = 1; i < arguments.length; i++) {
95
440
  var source = arguments[i];
96
441
 
@@ -103,7 +448,6 @@ function _extends() {
103
448
 
104
449
  return target;
105
450
  };
106
-
107
451
  return _extends.apply(this, arguments);
108
452
  }
109
453
 
@@ -133,18 +477,17 @@ function _inheritsLoose(subClass, superClass) {
133
477
  }
134
478
 
135
479
  function _getPrototypeOf(o) {
136
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
480
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
137
481
  return o.__proto__ || Object.getPrototypeOf(o);
138
482
  };
139
483
  return _getPrototypeOf(o);
140
484
  }
141
485
 
142
486
  function _setPrototypeOf(o, p) {
143
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
487
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
144
488
  o.__proto__ = p;
145
489
  return o;
146
490
  };
147
-
148
491
  return _setPrototypeOf(o, p);
149
492
  }
150
493
 
@@ -163,7 +506,7 @@ function _isNativeReflectConstruct() {
163
506
 
164
507
  function _construct(Parent, args, Class) {
165
508
  if (_isNativeReflectConstruct()) {
166
- _construct = Reflect.construct;
509
+ _construct = Reflect.construct.bind();
167
510
  } else {
168
511
  _construct = function _construct(Parent, args, Class) {
169
512
  var a = [null];
@@ -269,766 +612,6 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
269
612
  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
613
  }
271
614
 
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";
293
-
294
- function define(obj, key, value) {
295
- Object.defineProperty(obj, key, {
296
- value: value,
297
- enumerable: true,
298
- configurable: true,
299
- writable: true
300
- });
301
- return obj[key];
302
- }
303
- try {
304
- // IE 8 has a broken Object.defineProperty that only works on DOM objects.
305
- define({}, "");
306
- } catch (err) {
307
- define = function(obj, key, value) {
308
- return obj[key] = value;
309
- };
310
- }
311
-
312
- function wrap(innerFn, outerFn, self, tryLocsList) {
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 || []);
317
-
318
- // The ._invoke method unifies the implementations of the .next,
319
- // .throw, and .return methods.
320
- generator._invoke = makeInvokeMethod(innerFn, self, context);
321
-
322
- return generator;
323
- }
324
- exports.wrap = wrap;
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.
336
- function tryCatch(fn, obj, arg) {
337
- try {
338
- return { type: "normal", arg: fn.call(obj, arg) };
339
- } catch (err) {
340
- return { type: "throw", arg: err };
341
- }
342
- }
343
-
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.
351
- var ContinueSentinel = {};
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.
357
- function Generator() {}
358
- function GeneratorFunction() {}
359
- function GeneratorFunctionPrototype() {}
360
-
361
- // This is a polyfill for %IteratorPrototype% for environments that
362
- // don't natively support it.
363
- var IteratorPrototype = {};
364
- define(IteratorPrototype, iteratorSymbol, function () {
365
- return this;
366
- });
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.
391
- function defineIteratorMethods(prototype) {
392
- ["next", "throw", "return"].forEach(function(method) {
393
- define(prototype, method, function(arg) {
394
- return this._invoke(method, arg);
395
- });
396
- });
397
- }
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
-
428
- function AsyncIterator(generator, PromiseImpl) {
429
- function invoke(method, arg, resolve, reject) {
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
- }
445
-
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.
455
- return invoke("throw", error, resolve, reject);
456
- });
457
- }
458
- }
459
-
460
- var previousPromise;
461
-
462
- function enqueue(method, arg) {
463
- function callInvokeWithMethodAndArg() {
464
- return new PromiseImpl(function(resolve, reject) {
465
- invoke(method, arg, resolve, reject);
466
- });
467
- }
468
-
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();
488
- }
489
-
490
- // Define the unified helper method that is used to implement .next,
491
- // .throw, and .return (see defineIteratorMethods).
492
- this._invoke = enqueue;
493
- }
494
-
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
- };
518
-
519
- function makeInvokeMethod(innerFn, self, context) {
520
- var state = GenStateSuspendedStart;
521
-
522
- return function invoke(method, arg) {
523
- if (state === GenStateExecuting) {
524
- throw new Error("Generator is already running");
525
- }
526
-
527
- if (state === GenStateCompleted) {
528
- if (method === "throw") {
529
- throw arg;
530
- }
531
-
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();
535
- }
536
-
537
- context.method = method;
538
- context.arg = arg;
539
-
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
- }
549
-
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;
554
-
555
- } else if (context.method === "throw") {
556
- if (state === GenStateSuspendedStart) {
557
- state = GenStateCompleted;
558
- throw context.arg;
559
- }
560
-
561
- context.dispatchException(context.arg);
562
-
563
- } else if (context.method === "return") {
564
- context.abrupt("return", context.arg);
565
- }
566
-
567
- state = GenStateExecuting;
568
-
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;
576
-
577
- if (record.arg === ContinueSentinel) {
578
- continue;
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;
592
- }
593
- }
594
- };
595
- }
596
-
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
- }
622
- }
623
-
624
- context.method = "throw";
625
- context.arg = new TypeError(
626
- "The iterator does not provide a 'throw' method");
627
- }
628
-
629
- return ContinueSentinel;
630
- }
631
-
632
- var record = tryCatch(method, delegate.iterator, context.arg);
633
-
634
- if (record.type === "throw") {
635
- context.method = "throw";
636
- context.arg = record.arg;
637
- context.delegate = null;
638
- return ContinueSentinel;
639
- }
640
-
641
- var info = record.arg;
642
-
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
- }
649
-
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
- }
668
-
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;
678
- }
679
-
680
- // Define Generator.prototype.{next,throw,return} in terms of the
681
- // unified ._invoke helper method.
682
- defineIteratorMethods(Gp);
683
-
684
- define(Gp, toStringTagSymbol, "Generator");
685
-
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
- });
694
-
695
- define(Gp, "toString", function() {
696
- return "[object Generator]";
697
- });
698
-
699
- function pushTryEntry(locs) {
700
- var entry = { tryLoc: locs[0] };
701
-
702
- if (1 in locs) {
703
- entry.catchLoc = locs[1];
704
- }
705
-
706
- if (2 in locs) {
707
- entry.finallyLoc = locs[2];
708
- entry.afterLoc = locs[3];
709
- }
710
-
711
- this.tryEntries.push(entry);
712
- }
713
-
714
- function resetTryEntry(entry) {
715
- var record = entry.completion || {};
716
- record.type = "normal";
717
- delete record.arg;
718
- entry.completion = record;
719
- }
720
-
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);
728
- }
729
-
730
- exports.keys = function(object) {
731
- var keys = [];
732
- for (var key in object) {
733
- keys.push(key);
734
- }
735
- keys.reverse();
736
-
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
- }
747
- }
748
-
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);
762
- }
763
-
764
- if (typeof iterable.next === "function") {
765
- return iterable;
766
- }
767
-
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
- };
783
-
784
- return next.next = next;
785
- }
786
- }
787
-
788
- // Return an iterator with no values.
789
- return { next: doneResult };
790
- }
791
- exports.values = values;
792
-
793
- function doneResult() {
794
- return { value: undefined$1, done: true };
795
- }
796
-
797
- Context.prototype = {
798
- constructor: Context,
799
-
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
- },
825
-
826
- stop: function() {
827
- this.done = true;
828
-
829
- var rootEntry = this.tryEntries[0];
830
- var rootRecord = rootEntry.completion;
831
- if (rootRecord.type === "throw") {
832
- throw rootRecord.arg;
833
- }
834
-
835
- return this.rval;
836
- },
837
-
838
- dispatchException: function(exception) {
839
- if (this.done) {
840
- throw exception;
841
- }
842
-
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
- }
855
-
856
- return !! caught;
857
- }
858
-
859
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
860
- var entry = this.tryEntries[i];
861
- var record = entry.completion;
862
-
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
- }
869
-
870
- if (entry.tryLoc <= this.prev) {
871
- var hasCatch = hasOwn.call(entry, "catchLoc");
872
- var hasFinally = hasOwn.call(entry, "finallyLoc");
873
-
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
- }
880
-
881
- } else if (hasCatch) {
882
- if (this.prev < entry.catchLoc) {
883
- return handle(entry.catchLoc, true);
884
- }
885
-
886
- } else if (hasFinally) {
887
- if (this.prev < entry.finallyLoc) {
888
- return handle(entry.finallyLoc);
889
- }
890
-
891
- } else {
892
- throw new Error("try statement without catch or finally");
893
- }
894
- }
895
- }
896
- },
897
-
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
- }
908
-
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;
917
- }
918
-
919
- var record = finallyEntry ? finallyEntry.completion : {};
920
- record.type = type;
921
- record.arg = arg;
922
-
923
- if (finallyEntry) {
924
- this.method = "next";
925
- this.next = finallyEntry.finallyLoc;
926
- return ContinueSentinel;
927
- }
928
-
929
- return this.complete(record);
930
- },
931
-
932
- complete: function(record, afterLoc) {
933
- if (record.type === "throw") {
934
- throw record.arg;
935
- }
936
-
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
- }
947
-
948
- return ContinueSentinel;
949
- },
950
-
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
- },
961
-
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
- }
974
-
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
- },
979
-
980
- delegateYield: function(iterable, resultName, nextLoc) {
981
- this.delegate = {
982
- iterator: values(iterable),
983
- resultName: resultName,
984
- nextLoc: nextLoc
985
- };
986
-
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
- }
1029
- }
1030
- });
1031
-
1032
615
  var _personalMetaToPrefix;
1033
616
  var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[MetadataCategory.Personal] = 'you', _personalMetaToPrefix[MetadataCategory.ChildPersonal] = 'child', _personalMetaToPrefix[MetadataCategory.OtherPersonal] = 'other', _personalMetaToPrefix);
1034
617
  /**
@@ -1038,7 +621,7 @@ var personalMetaToPrefix = (_personalMetaToPrefix = {}, _personalMetaToPrefix[Me
1038
621
  */
1039
622
 
1040
623
  function identificationToPersonalInformations(data, category) {
1041
- var _data$;
624
+ var _data;
1042
625
 
1043
626
  var prefix = personalMetaToPrefix[category];
1044
627
  return {
@@ -1048,7 +631,7 @@ function identificationToPersonalInformations(data, category) {
1048
631
  name: data[prefix + "Name"],
1049
632
  phone: data[prefix + "Phone"],
1050
633
  zip: data[prefix + "Zip"],
1051
- hid: (_data$ = data[prefix + "HID"]) != null ? _data$ : data[prefix + "ID"],
634
+ hid: (_data = data[prefix + "HID"]) != null ? _data : data[prefix + "ID"],
1052
635
  pharmacy: data[prefix + "Pharmacy"],
1053
636
  address: data[prefix + "Address"]
1054
637
  };
@@ -1248,9 +831,9 @@ function filterTriggeredAnsweredWithKind(_x, _x2) {
1248
831
  */
1249
832
 
1250
833
  function _filterTriggeredAnsweredWithKind() {
1251
- _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(workflowData, kind) {
834
+ _filterTriggeredAnsweredWithKind = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(workflowData, kind) {
1252
835
  var flattenedAnswers, triggeredQuestionsWithKind, samePageAnswers, res;
1253
- return runtime_1.wrap(function _callee$(_context) {
836
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1254
837
  while (1) {
1255
838
  switch (_context.prev = _context.next) {
1256
839
  case 0:
@@ -1294,9 +877,9 @@ function getWorkflowDataByCategory(_x3, _x4) {
1294
877
  }
1295
878
 
1296
879
  function _getWorkflowDataByCategory() {
1297
- _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(workflowData, category) {
880
+ _getWorkflowDataByCategory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(workflowData, category) {
1298
881
  var flattenedAnswers, triggeredQuestions, fields;
1299
- return runtime_1.wrap(function _callee2$(_context2) {
882
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1300
883
  while (1) {
1301
884
  switch (_context2.prev = _context2.next) {
1302
885
  case 0:
@@ -1367,8 +950,8 @@ function getImagesFromIndexDb(_x5) {
1367
950
  */
1368
951
 
1369
952
  function _getImagesFromIndexDb() {
1370
- _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(answer) {
1371
- return runtime_1.wrap(function _callee3$(_context3) {
953
+ _getImagesFromIndexDb = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(answer) {
954
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1372
955
  while (1) {
1373
956
  switch (_context3.prev = _context3.next) {
1374
957
  case 0:
@@ -1395,11 +978,58 @@ function _getImagesFromIndexDb() {
1395
978
  function populateWorkflowField(_x6, _x7) {
1396
979
  return _populateWorkflowField.apply(this, arguments);
1397
980
  }
981
+ /**
982
+ * Determine if a question is triggered by some answers
983
+ *
984
+ * We use the following logical combinations of rules:
985
+ *
986
+ * #### Single string
987
+ *
988
+ * ```
989
+ * // Required: rule1
990
+ * rules: rule1
991
+ * ```
992
+ *
993
+ * #### Array of strings (AND is applied between statements):
994
+ *
995
+ * ```
996
+ * // Required: rule1 AND rule2
997
+ * rules: [ rule1, rule2 ]
998
+ * ```
999
+ *
1000
+ * #### Array of arrays of strings (OR is applied between inner arrays. AND is applied between inner arrays statements)
1001
+ *
1002
+ * ```
1003
+ * // Required: rule1 OR rule2
1004
+ * rules: [
1005
+ * [ rule1 ],
1006
+ * [ rule2 ]
1007
+ * ]
1008
+ *
1009
+ * // Required: rule1 OR (rule2 AND rule3)
1010
+ * rules: [
1011
+ * [ rule1 ],
1012
+ * [ rule2, rule3 ]
1013
+ * ]
1014
+ *
1015
+ * // THIS IS FORBIDDEN
1016
+ * rules: [
1017
+ * rule1, // <-- THIS IS FORBIDDEN. Instead use [ rule1 ]
1018
+ * [ rule2, rule3 ]
1019
+ * ]
1020
+ * ```
1021
+ *
1022
+ * @param triggers the triggering rules
1023
+ * @param answers the answers to check againts triggering rules
1024
+ * @returns `true` if triggers are verified against ansers. Otherwise, returns `false`.
1025
+ * @throws an Error if triggers typing is wrong
1026
+ */
1027
+
1398
1028
 
1399
1029
  function _populateWorkflowField() {
1400
- _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(question, answerValue) {
1030
+ _populateWorkflowField = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(question, answerValue) {
1401
1031
  var answer, displayedAnswer;
1402
- return runtime_1.wrap(function _callee4$(_context4) {
1032
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1403
1033
  while (1) {
1404
1034
  switch (_context4.prev = _context4.next) {
1405
1035
  case 0:
@@ -1473,21 +1103,34 @@ function _populateWorkflowField() {
1473
1103
  }
1474
1104
 
1475
1105
  function isTriggered(triggers, answers) {
1476
- for (var _iterator = _createForOfIteratorHelperLoose(triggers), _step; !(_step = _iterator()).done;) {
1477
- var trigger = _step.value;
1106
+ // is triggers contained in answers
1107
+ if (typeof triggers === 'string') {
1108
+ return answers.includes(triggers);
1109
+ }
1478
1110
 
1479
- if (!answers.includes(trigger)) {
1480
- return false;
1111
+ if (Array.isArray(triggers)) {
1112
+ // rule combination kind: rule1 OR (rule2 AND rule3)
1113
+ if (Array.isArray(triggers[0])) {
1114
+ return triggers.some(function (subSetTriggers) {
1115
+ return subSetTriggers.every(function (trigger) {
1116
+ return answers.includes(trigger);
1117
+ });
1118
+ });
1119
+ } else {
1120
+ // rule combination kind: rule1 AND rule2
1121
+ return triggers.every(function (trigger) {
1122
+ return answers.includes(trigger);
1123
+ });
1481
1124
  }
1482
1125
  }
1483
1126
 
1484
- return true;
1127
+ throw Error('[isTriggered] triggers is not typed well');
1485
1128
  }
1486
1129
  function flattenSelectedAnswers(answers) {
1487
1130
  var linearAnswers = [];
1488
1131
 
1489
- for (var _iterator2 = _createForOfIteratorHelperLoose(answers), _step2; !(_step2 = _iterator2()).done;) {
1490
- var answer = _step2.value;
1132
+ for (var _iterator = _createForOfIteratorHelperLoose(answers), _step; !(_step = _iterator()).done;) {
1133
+ var answer = _step.value;
1491
1134
  linearAnswers.push.apply(linearAnswers, Object.values(answer));
1492
1135
  }
1493
1136
 
@@ -1578,10 +1221,10 @@ function registerPatient(_x, _x2, _x3, _x4, _x5, _x6, _x7) {
1578
1221
  */
1579
1222
 
1580
1223
  function _registerPatient() {
1581
- _registerPatient = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
1224
+ _registerPatient = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(patientUuid, consultRequest, workflow, oroClient, masterKey, recoveryQA, indexSearch) {
1582
1225
  var consult, lockboxUuid, practitionerAdmin, retry, identity, errorsThrown, _ret;
1583
1226
 
1584
- return runtime_1.wrap(function _callee4$(_context4) {
1227
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1585
1228
  while (1) {
1586
1229
  switch (_context4.prev = _context4.next) {
1587
1230
  case 0:
@@ -1603,11 +1246,11 @@ function _registerPatient() {
1603
1246
  }
1604
1247
 
1605
1248
  _context4.prev = 8;
1606
- return _context4.delegateYield( /*#__PURE__*/runtime_1.mark(function _callee3() {
1249
+ return _context4.delegateYield( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1607
1250
  var _consultIndex, _identity, _identity2;
1608
1251
 
1609
1252
  var practitioners, grantPromises, consultIndex, consultIndexPromises;
1610
- return runtime_1.wrap(function _callee3$(_context3) {
1253
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1611
1254
  while (1) {
1612
1255
  switch (_context3.prev = _context3.next) {
1613
1256
  case 0:
@@ -1678,7 +1321,6 @@ function _registerPatient() {
1678
1321
  return oroClient.grantLockbox(practitionerAdmin, lockboxUuid)["catch"](function (err) {
1679
1322
  console.error("Error while granting lockbox to practitioner admin " + practitionerAdmin, err); // if we cannot grant to the admin, then the registration will fail
1680
1323
 
1681
- // if we cannot grant to the admin, then the registration will fail
1682
1324
  errorsThrown.push(err);
1683
1325
  });
1684
1326
 
@@ -1687,15 +1329,14 @@ function _registerPatient() {
1687
1329
  grantPromises = practitioners.filter(function (practitioner) {
1688
1330
  return practitioner.uuid !== practitionerAdmin;
1689
1331
  }).map( /*#__PURE__*/function () {
1690
- var _ref = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(practitioner) {
1691
- return runtime_1.wrap(function _callee$(_context) {
1332
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(practitioner) {
1333
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1692
1334
  while (1) {
1693
1335
  switch (_context.prev = _context.next) {
1694
1336
  case 0:
1695
1337
  return _context.abrupt("return", oroClient.grantLockbox(practitioner.uuid, lockboxUuid)["catch"](function (err) {
1696
1338
  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
1697
1339
 
1698
- // Acceptable to continue as admin has already been granted, but we should still retry until the last retry remains
1699
1340
  if (retry <= 1) return;
1700
1341
  errorsThrown.push(err);
1701
1342
  }));
@@ -1721,15 +1362,14 @@ function _registerPatient() {
1721
1362
  }], _consultIndex); // the index will identify in which lockbox a consultation resides
1722
1363
 
1723
1364
  consultIndexPromises = practitioners.map( /*#__PURE__*/function () {
1724
- var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(practitioner) {
1725
- return runtime_1.wrap(function _callee2$(_context2) {
1365
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(practitioner) {
1366
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1726
1367
  while (1) {
1727
1368
  switch (_context2.prev = _context2.next) {
1728
1369
  case 0:
1729
1370
  return _context2.abrupt("return", oroClient.vaultIndexAdd(consultIndex, practitioner.uuid)["catch"](function (err) {
1730
1371
  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
1731
1372
 
1732
- // Acceptable to continue as the index can be rebuilt, but we should still retry until the last retry remains
1733
1373
  if (retry <= 1) return;else errorsThrown.push(err);
1734
1374
  }));
1735
1375
 
@@ -1749,7 +1389,6 @@ function _registerPatient() {
1749
1389
  return storeImageAliases(consult.uuid, lockboxUuid, workflow, oroClient)["catch"](function (err) {
1750
1390
  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
1751
1391
 
1752
- // Acceptable to continue as images can be requested during the consultation, but we should still retry until the last retry remains
1753
1392
  if (retry <= 1) return;else errorsThrown.push(err);
1754
1393
  });
1755
1394
 
@@ -1770,7 +1409,6 @@ function _registerPatient() {
1770
1409
  return oroClient.updateMasterKey(patientUuid, masterKey, lockboxUuid)["catch"](function (err) {
1771
1410
  console.error("[SDK: registration] Error while updating master key", err); /// it's acceptable to continue registration (return old identity)
1772
1411
 
1773
- /// it's acceptable to continue registration (return old identity)
1774
1412
  if (retry <= 1) return;
1775
1413
  errorsThrown.push(err);
1776
1414
  return identity;
@@ -1795,7 +1433,6 @@ function _registerPatient() {
1795
1433
  return oroClient.updateSecurityQuestions(patientUuid, recoveryQA.recoverySecurityQuestions, recoveryQA.recoverySecurityAnswers, 2)["catch"](function (err) {
1796
1434
  console.error("[SDK: registration] Error while updating security questions", err); /// it's acceptable to continue registration (return old identity)
1797
1435
 
1798
- /// it's acceptable to continue registration (return old identity)
1799
1436
  if (retry <= 1) return;
1800
1437
  errorsThrown.push(err);
1801
1438
  return identity;
@@ -1819,7 +1456,6 @@ function _registerPatient() {
1819
1456
  console.error('[SDK: registration] personal information not found or another error occured during search indexing', err);
1820
1457
  if (retry <= 1) return; // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1821
1458
 
1822
- // this statement is to avoid failing the registration due to the failure in search indexing the consult, this practically implements a soft retry
1823
1459
  errorsThrown.push(err);
1824
1460
  });
1825
1461
 
@@ -1916,9 +1552,9 @@ function getOrCreatePatientConsultationUuid(_x8, _x9) {
1916
1552
 
1917
1553
 
1918
1554
  function _getOrCreatePatientConsultationUuid() {
1919
- _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(consult, oroClient) {
1555
+ _getOrCreatePatientConsultationUuid = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(consult, oroClient) {
1920
1556
  var payment;
1921
- return runtime_1.wrap(function _callee5$(_context5) {
1557
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
1922
1558
  while (1) {
1923
1559
  switch (_context5.prev = _context5.next) {
1924
1560
  case 0:
@@ -1973,9 +1609,9 @@ function getOrCreatePatientLockbox(_x10) {
1973
1609
 
1974
1610
 
1975
1611
  function _getOrCreatePatientLockbox() {
1976
- _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(oroClient) {
1612
+ _getOrCreatePatientLockbox = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(oroClient) {
1977
1613
  var grants;
1978
- return runtime_1.wrap(function _callee6$(_context6) {
1614
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
1979
1615
  while (1) {
1980
1616
  switch (_context6.prev = _context6.next) {
1981
1617
  case 0:
@@ -2018,8 +1654,8 @@ function storePatientData(_x11, _x12, _x13, _x14, _x15) {
2018
1654
  }
2019
1655
 
2020
1656
  function _storePatientData() {
2021
- _storePatientData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
2022
- return runtime_1.wrap(function _callee7$(_context7) {
1657
+ _storePatientData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(consultationId, isoLanguage, lockboxUuid, workflow, oroClient) {
1658
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2023
1659
  while (1) {
2024
1660
  switch (_context7.prev = _context7.next) {
2025
1661
  case 0:
@@ -2076,9 +1712,9 @@ function storeImageAliases(_x16, _x17, _x18, _x19) {
2076
1712
 
2077
1713
 
2078
1714
  function _storeImageAliases() {
2079
- _storeImageAliases = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
1715
+ _storeImageAliases = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(consultationId, lockboxUuid, workflow, oroClient) {
2080
1716
  var images, nonNullImages, promises;
2081
- return runtime_1.wrap(function _callee8$(_context8) {
1717
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2082
1718
  while (1) {
2083
1719
  switch (_context8.prev = _context8.next) {
2084
1720
  case 0:
@@ -2130,8 +1766,8 @@ function extractAndStorePersonalWorkflowData(_x20, _x21, _x22, _x23, _x24) {
2130
1766
  */
2131
1767
 
2132
1768
  function _extractAndStorePersonalWorkflowData() {
2133
- _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
2134
- return runtime_1.wrap(function _callee9$(_context9) {
1769
+ _extractAndStorePersonalWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(workflow, lockboxUuid, consultationId, category, oroClient) {
1770
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2135
1771
  while (1) {
2136
1772
  switch (_context9.prev = _context9.next) {
2137
1773
  case 0:
@@ -2165,8 +1801,8 @@ function extractPersonalInfoFromWorkflowData(_x25) {
2165
1801
  */
2166
1802
 
2167
1803
  function _extractPersonalInfoFromWorkflowData() {
2168
- _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10(workflow) {
2169
- return runtime_1.wrap(function _callee10$(_context10) {
1804
+ _extractPersonalInfoFromWorkflowData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(workflow) {
1805
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2170
1806
  while (1) {
2171
1807
  switch (_context10.prev = _context10.next) {
2172
1808
  case 0:
@@ -2196,10 +1832,10 @@ function buildConsultSearchIndex(_x26, _x27, _x28) {
2196
1832
  }
2197
1833
 
2198
1834
  function _buildConsultSearchIndex() {
2199
- _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(consult, workflow, oroClient) {
1835
+ _buildConsultSearchIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(consult, workflow, oroClient) {
2200
1836
  var terms, _yield$extractPersona, personalInfoPopulatedWfData, childPersonalInfoPopulatedWfData, otherPersonalInfoPopulatedWfData, personalInfo, childPersonalInfo, otherPersonalInfo;
2201
1837
 
2202
- return runtime_1.wrap(function _callee11$(_context11) {
1838
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
2203
1839
  while (1) {
2204
1840
  switch (_context11.prev = _context11.next) {
2205
1841
  case 0:
@@ -2328,10 +1964,10 @@ function filterGrantsWithLockboxMetadata(_x, _x2, _x3, _x4) {
2328
1964
  */
2329
1965
 
2330
1966
  function _filterGrantsWithLockboxMetadata() {
2331
- _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
1967
+ _filterGrantsWithLockboxMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(oroClient, filter, vaultIndex, forceRefresh) {
2332
1968
  var _vaultIndex$IndexKey$, indexConsults;
2333
1969
 
2334
- return runtime_1.wrap(function _callee$(_context) {
1970
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2335
1971
  while (1) {
2336
1972
  switch (_context.prev = _context.next) {
2337
1973
  case 0:
@@ -2381,12 +2017,12 @@ function buildLegacyVaultIndex(_x5) {
2381
2017
  }
2382
2018
 
2383
2019
  function _buildLegacyVaultIndex() {
2384
- _buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(oroClient) {
2020
+ _buildLegacyVaultIndex = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(oroClient) {
2385
2021
  var _vaultIndex;
2386
2022
 
2387
2023
  var grants, consultGrants, _loop, _iterator, _step, vaultIndex;
2388
2024
 
2389
- return runtime_1.wrap(function _callee2$(_context3) {
2025
+ return _regeneratorRuntime().wrap(function _callee2$(_context3) {
2390
2026
  while (1) {
2391
2027
  switch (_context3.prev = _context3.next) {
2392
2028
  case 0:
@@ -2396,9 +2032,9 @@ function _buildLegacyVaultIndex() {
2396
2032
  case 2:
2397
2033
  grants = _context3.sent;
2398
2034
  consultGrants = [];
2399
- _loop = /*#__PURE__*/runtime_1.mark(function _loop() {
2035
+ _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
2400
2036
  var grant, consults;
2401
- return runtime_1.wrap(function _loop$(_context2) {
2037
+ return _regeneratorRuntime().wrap(function _loop$(_context2) {
2402
2038
  while (1) {
2403
2039
  switch (_context2.prev = _context2.next) {
2404
2040
  case 0:
@@ -2482,8 +2118,8 @@ var OroClient = /*#__PURE__*/function () {
2482
2118
  _proto.cleanIndex =
2483
2119
  /*#__PURE__*/
2484
2120
  function () {
2485
- var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee() {
2486
- return runtime_1.wrap(function _callee$(_context) {
2121
+ var _cleanIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2122
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
2487
2123
  while (1) {
2488
2124
  switch (_context.prev = _context.next) {
2489
2125
  case 0:
@@ -2521,9 +2157,9 @@ var OroClient = /*#__PURE__*/function () {
2521
2157
  _proto.signUp =
2522
2158
  /*#__PURE__*/
2523
2159
  function () {
2524
- var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2160
+ var _signUp = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(email, password, practice, tosAndCpAcceptance, tokenData, subscription, skipEmailValidation) {
2525
2161
  var privateKey, symmetricEncryptor, recoveryPassword, hashedPassword, emailConfirmed, signupRequest, identity, symetricEncryptor;
2526
- return runtime_1.wrap(function _callee2$(_context2) {
2162
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
2527
2163
  while (1) {
2528
2164
  switch (_context2.prev = _context2.next) {
2529
2165
  case 0:
@@ -2582,9 +2218,9 @@ var OroClient = /*#__PURE__*/function () {
2582
2218
  _proto.confirmEmail =
2583
2219
  /*#__PURE__*/
2584
2220
  function () {
2585
- var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(accessToken) {
2221
+ var _confirmEmail = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(accessToken) {
2586
2222
  var claims;
2587
- return runtime_1.wrap(function _callee3$(_context3) {
2223
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2588
2224
  while (1) {
2589
2225
  switch (_context3.prev = _context3.next) {
2590
2226
  case 0:
@@ -2629,9 +2265,9 @@ var OroClient = /*#__PURE__*/function () {
2629
2265
  _proto.signIn =
2630
2266
  /*#__PURE__*/
2631
2267
  function () {
2632
- var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee4(practiceUuid, email, password, otp) {
2268
+ var _signIn = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(practiceUuid, email, password, otp) {
2633
2269
  var hashedPassword, tokenRequest, userUuid;
2634
- return runtime_1.wrap(function _callee4$(_context4) {
2270
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2635
2271
  while (1) {
2636
2272
  switch (_context4.prev = _context4.next) {
2637
2273
  case 0:
@@ -2684,9 +2320,9 @@ var OroClient = /*#__PURE__*/function () {
2684
2320
  _proto.resumeSession =
2685
2321
  /*#__PURE__*/
2686
2322
  function () {
2687
- var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5() {
2323
+ var _resumeSession = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
2688
2324
  var id, recoveryPayload, recoveryKey, symmetricDecryptor, privateKey;
2689
- return runtime_1.wrap(function _callee5$(_context5) {
2325
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
2690
2326
  while (1) {
2691
2327
  switch (_context5.prev = _context5.next) {
2692
2328
  case 0:
@@ -2787,8 +2423,8 @@ var OroClient = /*#__PURE__*/function () {
2787
2423
  _proto.signOut =
2788
2424
  /*#__PURE__*/
2789
2425
  function () {
2790
- var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6() {
2791
- return runtime_1.wrap(function _callee6$(_context6) {
2426
+ var _signOut = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
2427
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
2792
2428
  while (1) {
2793
2429
  switch (_context6.prev = _context6.next) {
2794
2430
  case 0:
@@ -2838,8 +2474,8 @@ var OroClient = /*#__PURE__*/function () {
2838
2474
  _proto.registerPatient =
2839
2475
  /*#__PURE__*/
2840
2476
  function () {
2841
- var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
2842
- return runtime_1.wrap(function _callee7$(_context7) {
2477
+ var _registerPatient2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(patientUuid, consult, workflow, recoveryQA, indexSearch) {
2478
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
2843
2479
  while (1) {
2844
2480
  switch (_context7.prev = _context7.next) {
2845
2481
  case 0:
@@ -2886,8 +2522,8 @@ var OroClient = /*#__PURE__*/function () {
2886
2522
  _proto.buildVaultIndex =
2887
2523
  /*#__PURE__*/
2888
2524
  function () {
2889
- var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee8(forceRefresh) {
2890
- return runtime_1.wrap(function _callee8$(_context8) {
2525
+ var _buildVaultIndex = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(forceRefresh) {
2526
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
2891
2527
  while (1) {
2892
2528
  switch (_context8.prev = _context8.next) {
2893
2529
  case 0:
@@ -2935,12 +2571,12 @@ var OroClient = /*#__PURE__*/function () {
2935
2571
  _proto.forceUpdateIndexEntries =
2936
2572
  /*#__PURE__*/
2937
2573
  function () {
2938
- var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee10() {
2574
+ var _forceUpdateIndexEntries = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
2939
2575
  var _this = this,
2940
2576
  _this$vaultIndexAdd;
2941
2577
 
2942
2578
  var grants, indexConsultLockbox;
2943
- return runtime_1.wrap(function _callee10$(_context10) {
2579
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
2944
2580
  while (1) {
2945
2581
  switch (_context10.prev = _context10.next) {
2946
2582
  case 0:
@@ -2951,8 +2587,8 @@ var OroClient = /*#__PURE__*/function () {
2951
2587
  grants = _context10.sent;
2952
2588
  _context10.next = 5;
2953
2589
  return Promise.all(grants.map( /*#__PURE__*/function () {
2954
- var _ref2 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee9(grant) {
2955
- return runtime_1.wrap(function _callee9$(_context9) {
2590
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(grant) {
2591
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
2956
2592
  while (1) {
2957
2593
  switch (_context9.prev = _context9.next) {
2958
2594
  case 0:
@@ -3028,12 +2664,12 @@ var OroClient = /*#__PURE__*/function () {
3028
2664
  _proto.vaultIndexAdd =
3029
2665
  /*#__PURE__*/
3030
2666
  function () {
3031
- var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee11(entries, indexOwnerUuid) {
2667
+ var _vaultIndexAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(entries, indexOwnerUuid) {
3032
2668
  var _this2 = this;
3033
2669
 
3034
2670
  var rsaPub, base64IndexOwnerPubKey, encryptedIndex, _i, _Object$keys, keyString, key;
3035
2671
 
3036
- return runtime_1.wrap(function _callee11$(_context11) {
2672
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
3037
2673
  while (1) {
3038
2674
  switch (_context11.prev = _context11.next) {
3039
2675
  case 0:
@@ -3155,11 +2791,11 @@ var OroClient = /*#__PURE__*/function () {
3155
2791
  _proto.indexSnapshotAdd =
3156
2792
  /*#__PURE__*/
3157
2793
  function () {
3158
- var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee12(index) {
2794
+ var _indexSnapshotAdd = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(index) {
3159
2795
  var _index$IndexKey$Consu, _cleanedIndex;
3160
2796
 
3161
2797
  var rsaPub, cleanedIndex, encryptedIndexEntry, encryptedIndex;
3162
- return runtime_1.wrap(function _callee12$(_context12) {
2798
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
3163
2799
  while (1) {
3164
2800
  switch (_context12.prev = _context12.next) {
3165
2801
  case 0:
@@ -3217,9 +2853,9 @@ var OroClient = /*#__PURE__*/function () {
3217
2853
  _proto.grantLockbox =
3218
2854
  /*#__PURE__*/
3219
2855
  function () {
3220
- var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
2856
+ var _grantLockbox = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(granteeUuid, lockboxUuid, lockboxOwnerUuid) {
3221
2857
  var secret, base64GranteePublicKey, granteePublicKey, granteeEncryptedSecret, request;
3222
- return runtime_1.wrap(function _callee13$(_context13) {
2858
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
3223
2859
  while (1) {
3224
2860
  switch (_context13.prev = _context13.next) {
3225
2861
  case 0:
@@ -3279,9 +2915,9 @@ var OroClient = /*#__PURE__*/function () {
3279
2915
  _proto.createMessageData =
3280
2916
  /*#__PURE__*/
3281
2917
  function () {
3282
- var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
2918
+ var _createMessageData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(lockboxUuid, message, consultationId, lockboxOwnerUuid, previousDataUuid) {
3283
2919
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
3284
- return runtime_1.wrap(function _callee14$(_context14) {
2920
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
3285
2921
  while (1) {
3286
2922
  switch (_context14.prev = _context14.next) {
3287
2923
  case 0:
@@ -3351,9 +2987,9 @@ var OroClient = /*#__PURE__*/function () {
3351
2987
  _proto.createMessageAttachmentData =
3352
2988
  /*#__PURE__*/
3353
2989
  function () {
3354
- var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
2990
+ var _createMessageAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(lockboxUuid, data, consultationId, lockboxOwnerUuid, previousDataUuid) {
3355
2991
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, meta, request;
3356
- return runtime_1.wrap(function _callee15$(_context15) {
2992
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
3357
2993
  while (1) {
3358
2994
  switch (_context15.prev = _context15.next) {
3359
2995
  case 0:
@@ -3438,8 +3074,8 @@ var OroClient = /*#__PURE__*/function () {
3438
3074
  _proto.createConsultationAttachmentData =
3439
3075
  /*#__PURE__*/
3440
3076
  function () {
3441
- var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
3442
- return runtime_1.wrap(function _callee16$(_context16) {
3077
+ var _createConsultationAttachmentData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(lockboxUuid, data, consultationId, documentType, lockboxOwnerUuid, previousDataUuid) {
3078
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
3443
3079
  while (1) {
3444
3080
  switch (_context16.prev = _context16.next) {
3445
3081
  case 0:
@@ -3510,9 +3146,9 @@ var OroClient = /*#__PURE__*/function () {
3510
3146
  _proto.createJsonData =
3511
3147
  /*#__PURE__*/
3512
3148
  function () {
3513
- var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3149
+ var _createJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3514
3150
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3515
- return runtime_1.wrap(function _callee17$(_context17) {
3151
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
3516
3152
  while (1) {
3517
3153
  switch (_context17.prev = _context17.next) {
3518
3154
  case 0:
@@ -3566,9 +3202,9 @@ var OroClient = /*#__PURE__*/function () {
3566
3202
  _proto.getOrInsertJsonData =
3567
3203
  /*#__PURE__*/
3568
3204
  function () {
3569
- var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
3205
+ var _getOrInsertJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(lockboxUuid, data, publicMetadata, privateMetadata, forceReplace) {
3570
3206
  var manifest;
3571
- return runtime_1.wrap(function _callee18$(_context18) {
3207
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
3572
3208
  while (1) {
3573
3209
  switch (_context18.prev = _context18.next) {
3574
3210
  case 0:
@@ -3631,9 +3267,9 @@ var OroClient = /*#__PURE__*/function () {
3631
3267
  _proto.createBytesData =
3632
3268
  /*#__PURE__*/
3633
3269
  function () {
3634
- var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3270
+ var _createBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(lockboxUuid, data, meta, privateMeta, lockboxOwnerUuid, previousDataUuid) {
3635
3271
  var symmetricEncryptor, encryptedData, encryptedPrivateMeta, request;
3636
- return runtime_1.wrap(function _callee19$(_context19) {
3272
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
3637
3273
  while (1) {
3638
3274
  switch (_context19.prev = _context19.next) {
3639
3275
  case 0:
@@ -3689,10 +3325,10 @@ var OroClient = /*#__PURE__*/function () {
3689
3325
  _proto.getJsonData =
3690
3326
  /*#__PURE__*/
3691
3327
  function () {
3692
- var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3328
+ var _getJsonData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3693
3329
  var _yield$Promise$all, encryptedPayload, symmetricDecryptor;
3694
3330
 
3695
- return runtime_1.wrap(function _callee20$(_context20) {
3331
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
3696
3332
  while (1) {
3697
3333
  switch (_context20.prev = _context20.next) {
3698
3334
  case 0:
@@ -3739,10 +3375,10 @@ var OroClient = /*#__PURE__*/function () {
3739
3375
  _proto.getBytesData =
3740
3376
  /*#__PURE__*/
3741
3377
  function () {
3742
- var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3378
+ var _getBytesData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(lockboxUuid, dataUuid, lockboxOwnerUuid) {
3743
3379
  var _yield$Promise$all2, encryptedPayload, symmetricDecryptor;
3744
3380
 
3745
- return runtime_1.wrap(function _callee21$(_context21) {
3381
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
3746
3382
  while (1) {
3747
3383
  switch (_context21.prev = _context21.next) {
3748
3384
  case 0:
@@ -3792,9 +3428,9 @@ var OroClient = /*#__PURE__*/function () {
3792
3428
  _proto.getGrants =
3793
3429
  /*#__PURE__*/
3794
3430
  function () {
3795
- var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee22(filter, forceRefresh) {
3431
+ var _getGrants = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(filter, forceRefresh) {
3796
3432
  var filterString, grantsByConsultLockbox, decryptedConsults, encryptedGrants, decryptedGrants;
3797
- return runtime_1.wrap(function _callee22$(_context22) {
3433
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
3798
3434
  while (1) {
3799
3435
  switch (_context22.prev = _context22.next) {
3800
3436
  case 0:
@@ -3912,9 +3548,9 @@ var OroClient = /*#__PURE__*/function () {
3912
3548
  _proto.getCachedSecretCryptor =
3913
3549
  /*#__PURE__*/
3914
3550
  function () {
3915
- var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
3551
+ var _getCachedSecretCryptor = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(lockboxUuid, lockboxOwnerUuid) {
3916
3552
  var index, encryptedSecret, secret, cryptor;
3917
- return runtime_1.wrap(function _callee23$(_context23) {
3553
+ return _regeneratorRuntime().wrap(function _callee23$(_context23) {
3918
3554
  while (1) {
3919
3555
  switch (_context23.prev = _context23.next) {
3920
3556
  case 0:
@@ -3979,8 +3615,8 @@ var OroClient = /*#__PURE__*/function () {
3979
3615
  _proto.getPersonalInformationsFromConsultId =
3980
3616
  /*#__PURE__*/
3981
3617
  function () {
3982
- var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee24(consultationId, category, forceRefresh) {
3983
- return runtime_1.wrap(function _callee24$(_context24) {
3618
+ var _getPersonalInformationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(consultationId, category, forceRefresh) {
3619
+ return _regeneratorRuntime().wrap(function _callee24$(_context24) {
3984
3620
  while (1) {
3985
3621
  switch (_context24.prev = _context24.next) {
3986
3622
  case 0:
@@ -4017,8 +3653,8 @@ var OroClient = /*#__PURE__*/function () {
4017
3653
  _proto.getMedicalDataFromConsultId =
4018
3654
  /*#__PURE__*/
4019
3655
  function () {
4020
- var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee25(consultationId, forceRefresh) {
4021
- return runtime_1.wrap(function _callee25$(_context25) {
3656
+ var _getMedicalDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(consultationId, forceRefresh) {
3657
+ return _regeneratorRuntime().wrap(function _callee25$(_context25) {
4022
3658
  while (1) {
4023
3659
  switch (_context25.prev = _context25.next) {
4024
3660
  case 0:
@@ -4044,12 +3680,12 @@ var OroClient = /*#__PURE__*/function () {
4044
3680
  }();
4045
3681
 
4046
3682
  _proto.getMetaCategoryFromConsultId = /*#__PURE__*/function () {
4047
- var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee27(consultationId, category, forceRefresh) {
3683
+ var _getMetaCategoryFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(consultationId, category, forceRefresh) {
4048
3684
  var _this3 = this;
4049
3685
 
4050
3686
  var grants, workflowData, _loop, _iterator, _step;
4051
3687
 
4052
- return runtime_1.wrap(function _callee27$(_context28) {
3688
+ return _regeneratorRuntime().wrap(function _callee27$(_context28) {
4053
3689
  while (1) {
4054
3690
  switch (_context28.prev = _context28.next) {
4055
3691
  case 0:
@@ -4065,9 +3701,9 @@ var OroClient = /*#__PURE__*/function () {
4065
3701
  case 3:
4066
3702
  grants = _context28.sent;
4067
3703
  workflowData = [];
4068
- _loop = /*#__PURE__*/runtime_1.mark(function _loop() {
3704
+ _loop = /*#__PURE__*/_regeneratorRuntime().mark(function _loop() {
4069
3705
  var grant, manifest, data;
4070
- return runtime_1.wrap(function _loop$(_context27) {
3706
+ return _regeneratorRuntime().wrap(function _loop$(_context27) {
4071
3707
  while (1) {
4072
3708
  switch (_context27.prev = _context27.next) {
4073
3709
  case 0:
@@ -4101,8 +3737,8 @@ var OroClient = /*#__PURE__*/function () {
4101
3737
  case 8:
4102
3738
  _context27.next = 10;
4103
3739
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4104
- var _ref3 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee26(entry) {
4105
- return runtime_1.wrap(function _callee26$(_context26) {
3740
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(entry) {
3741
+ return _regeneratorRuntime().wrap(function _callee26$(_context26) {
4106
3742
  while (1) {
4107
3743
  switch (_context26.prev = _context26.next) {
4108
3744
  case 0:
@@ -4186,9 +3822,9 @@ var OroClient = /*#__PURE__*/function () {
4186
3822
  _proto.getPersonalInformations =
4187
3823
  /*#__PURE__*/
4188
3824
  function () {
4189
- var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee28(userId) {
3825
+ var _getPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(userId) {
4190
3826
  var grant, lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
4191
- return runtime_1.wrap(function _callee28$(_context29) {
3827
+ return _regeneratorRuntime().wrap(function _callee28$(_context29) {
4192
3828
  while (1) {
4193
3829
  switch (_context29.prev = _context29.next) {
4194
3830
  case 0:
@@ -4274,9 +3910,9 @@ var OroClient = /*#__PURE__*/function () {
4274
3910
  _proto.getGrantFromConsultId =
4275
3911
  /*#__PURE__*/
4276
3912
  function () {
4277
- var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee29(consultationId) {
3913
+ var _getGrantFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(consultationId) {
4278
3914
  var grants;
4279
- return runtime_1.wrap(function _callee29$(_context30) {
3915
+ return _regeneratorRuntime().wrap(function _callee29$(_context30) {
4280
3916
  while (1) {
4281
3917
  switch (_context30.prev = _context30.next) {
4282
3918
  case 0:
@@ -4322,9 +3958,9 @@ var OroClient = /*#__PURE__*/function () {
4322
3958
  _proto.getIdentityFromConsultId =
4323
3959
  /*#__PURE__*/
4324
3960
  function () {
4325
- var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee30(consultationId) {
3961
+ var _getIdentityFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(consultationId) {
4326
3962
  var grant;
4327
- return runtime_1.wrap(function _callee30$(_context31) {
3963
+ return _regeneratorRuntime().wrap(function _callee30$(_context31) {
4328
3964
  while (1) {
4329
3965
  switch (_context31.prev = _context31.next) {
4330
3966
  case 0:
@@ -4377,11 +4013,11 @@ var OroClient = /*#__PURE__*/function () {
4377
4013
  _proto.getLockboxManifest =
4378
4014
  /*#__PURE__*/
4379
4015
  function () {
4380
- var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
4016
+ var _getLockboxManifest = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(lockboxUuid, filter, expandPrivateMetadata, lockboxOwnerUuid, forceRefresh) {
4381
4017
  var _this4 = this;
4382
4018
 
4383
4019
  var manifestKey;
4384
- return runtime_1.wrap(function _callee32$(_context33) {
4020
+ return _regeneratorRuntime().wrap(function _callee32$(_context33) {
4385
4021
  while (1) {
4386
4022
  switch (_context33.prev = _context33.next) {
4387
4023
  case 0:
@@ -4406,9 +4042,9 @@ var OroClient = /*#__PURE__*/function () {
4406
4042
  case 4:
4407
4043
  return _context33.abrupt("return", this.vaultClient.lockboxManifestGet(lockboxUuid, filter, lockboxOwnerUuid).then(function (manifest) {
4408
4044
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4409
- var _ref4 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee31(entry) {
4045
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(entry) {
4410
4046
  var privateMeta;
4411
- return runtime_1.wrap(function _callee31$(_context32) {
4047
+ return _regeneratorRuntime().wrap(function _callee31$(_context32) {
4412
4048
  while (1) {
4413
4049
  switch (_context32.prev = _context32.next) {
4414
4050
  case 0:
@@ -4469,11 +4105,11 @@ var OroClient = /*#__PURE__*/function () {
4469
4105
  _proto.createPersonalInformations =
4470
4106
  /*#__PURE__*/
4471
4107
  function () {
4472
- var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee33(identity, data, dataUuid) {
4108
+ var _createPersonalInformations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(identity, data, dataUuid) {
4473
4109
  var _yield$this$getGrants;
4474
4110
 
4475
4111
  var lockboxUuid;
4476
- return runtime_1.wrap(function _callee33$(_context34) {
4112
+ return _regeneratorRuntime().wrap(function _callee33$(_context34) {
4477
4113
  while (1) {
4478
4114
  switch (_context34.prev = _context34.next) {
4479
4115
  case 0:
@@ -4539,11 +4175,11 @@ var OroClient = /*#__PURE__*/function () {
4539
4175
  _proto.createUserPreference =
4540
4176
  /*#__PURE__*/
4541
4177
  function () {
4542
- var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee34(identity, preference, dataUuid) {
4178
+ var _createUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(identity, preference, dataUuid) {
4543
4179
  var _yield$this$getGrants2;
4544
4180
 
4545
4181
  var lockboxUuid;
4546
- return runtime_1.wrap(function _callee34$(_context35) {
4182
+ return _regeneratorRuntime().wrap(function _callee34$(_context35) {
4547
4183
  while (1) {
4548
4184
  switch (_context35.prev = _context35.next) {
4549
4185
  case 0:
@@ -4607,9 +4243,9 @@ var OroClient = /*#__PURE__*/function () {
4607
4243
  _proto.getDataFromGrant =
4608
4244
  /*#__PURE__*/
4609
4245
  function () {
4610
- var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee35(grant, filter) {
4246
+ var _getDataFromGrant = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(grant, filter) {
4611
4247
  var lockboxUuid, lockboxOwnerUuid, identificationDataUuid;
4612
- return runtime_1.wrap(function _callee35$(_context36) {
4248
+ return _regeneratorRuntime().wrap(function _callee35$(_context36) {
4613
4249
  while (1) {
4614
4250
  switch (_context36.prev = _context36.next) {
4615
4251
  case 0:
@@ -4675,9 +4311,9 @@ var OroClient = /*#__PURE__*/function () {
4675
4311
  _proto.getUserPreferenceFromConsultId =
4676
4312
  /*#__PURE__*/
4677
4313
  function () {
4678
- var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee36(consultationId) {
4314
+ var _getUserPreferenceFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(consultationId) {
4679
4315
  var grant;
4680
- return runtime_1.wrap(function _callee36$(_context37) {
4316
+ return _regeneratorRuntime().wrap(function _callee36$(_context37) {
4681
4317
  while (1) {
4682
4318
  switch (_context37.prev = _context37.next) {
4683
4319
  case 0:
@@ -4724,9 +4360,9 @@ var OroClient = /*#__PURE__*/function () {
4724
4360
  _proto.getUserPreference =
4725
4361
  /*#__PURE__*/
4726
4362
  function () {
4727
- var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee37(identity) {
4363
+ var _getUserPreference = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(identity) {
4728
4364
  var grant;
4729
- return runtime_1.wrap(function _callee37$(_context38) {
4365
+ return _regeneratorRuntime().wrap(function _callee37$(_context38) {
4730
4366
  while (1) {
4731
4367
  switch (_context38.prev = _context38.next) {
4732
4368
  case 0:
@@ -4775,9 +4411,9 @@ var OroClient = /*#__PURE__*/function () {
4775
4411
  _proto.getRecoveryDataFromConsultId =
4776
4412
  /*#__PURE__*/
4777
4413
  function () {
4778
- var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee38(consultationId) {
4414
+ var _getRecoveryDataFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(consultationId) {
4779
4415
  var grant;
4780
- return runtime_1.wrap(function _callee38$(_context39) {
4416
+ return _regeneratorRuntime().wrap(function _callee38$(_context39) {
4781
4417
  while (1) {
4782
4418
  switch (_context39.prev = _context39.next) {
4783
4419
  case 0:
@@ -4824,9 +4460,9 @@ var OroClient = /*#__PURE__*/function () {
4824
4460
  _proto.getRecoveryData =
4825
4461
  /*#__PURE__*/
4826
4462
  function () {
4827
- var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee39(identity) {
4463
+ var _getRecoveryData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(identity) {
4828
4464
  var grant;
4829
- return runtime_1.wrap(function _callee39$(_context40) {
4465
+ return _regeneratorRuntime().wrap(function _callee39$(_context40) {
4830
4466
  while (1) {
4831
4467
  switch (_context40.prev = _context40.next) {
4832
4468
  case 0:
@@ -4880,10 +4516,10 @@ var OroClient = /*#__PURE__*/function () {
4880
4516
  _proto.getAssignedConsultations =
4881
4517
  /*#__PURE__*/
4882
4518
  function () {
4883
- var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee41(practiceUuid, forceRefresh) {
4519
+ var _getAssignedConsultations = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(practiceUuid, forceRefresh) {
4884
4520
  var _this5 = this;
4885
4521
 
4886
- return runtime_1.wrap(function _callee41$(_context42) {
4522
+ return _regeneratorRuntime().wrap(function _callee41$(_context42) {
4887
4523
  while (1) {
4888
4524
  switch (_context42.prev = _context42.next) {
4889
4525
  case 0:
@@ -4902,8 +4538,8 @@ var OroClient = /*#__PURE__*/function () {
4902
4538
  documentType: DocumentType.PopulatedWorkflowData
4903
4539
  }, true, undefined, forceRefresh).then(function (manifest) {
4904
4540
  return Promise.all(manifest.map( /*#__PURE__*/function () {
4905
- var _ref5 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee40(entry) {
4906
- return runtime_1.wrap(function _callee40$(_context41) {
4541
+ var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(entry) {
4542
+ return _regeneratorRuntime().wrap(function _callee40$(_context41) {
4907
4543
  while (1) {
4908
4544
  switch (_context41.prev = _context41.next) {
4909
4545
  case 0:
@@ -4957,11 +4593,11 @@ var OroClient = /*#__PURE__*/function () {
4957
4593
  _proto.getPastConsultationsFromConsultId =
4958
4594
  /*#__PURE__*/
4959
4595
  function () {
4960
- var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee43(consultationId, practiceUuid) {
4596
+ var _getPastConsultationsFromConsultId = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(consultationId, practiceUuid) {
4961
4597
  var _this6 = this;
4962
4598
 
4963
4599
  var grant, consultationsInLockbox;
4964
- return runtime_1.wrap(function _callee43$(_context44) {
4600
+ return _regeneratorRuntime().wrap(function _callee43$(_context44) {
4965
4601
  while (1) {
4966
4602
  switch (_context44.prev = _context44.next) {
4967
4603
  case 0:
@@ -5000,8 +4636,8 @@ var OroClient = /*#__PURE__*/function () {
5000
4636
  case 10:
5001
4637
  _context44.next = 12;
5002
4638
  return Promise.all(consultationsInLockbox.map( /*#__PURE__*/function () {
5003
- var _ref6 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee42(consultId) {
5004
- return runtime_1.wrap(function _callee42$(_context43) {
4639
+ var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(consultId) {
4640
+ return _regeneratorRuntime().wrap(function _callee42$(_context43) {
5005
4641
  while (1) {
5006
4642
  switch (_context43.prev = _context43.next) {
5007
4643
  case 0:
@@ -5052,10 +4688,10 @@ var OroClient = /*#__PURE__*/function () {
5052
4688
  _proto.getPatientConsultationData =
5053
4689
  /*#__PURE__*/
5054
4690
  function () {
5055
- var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee44(consultationId, forceRefresh) {
4691
+ var _getPatientConsultationData = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(consultationId, forceRefresh) {
5056
4692
  var _this7 = this;
5057
4693
 
5058
- return runtime_1.wrap(function _callee44$(_context45) {
4694
+ return _regeneratorRuntime().wrap(function _callee44$(_context45) {
5059
4695
  while (1) {
5060
4696
  switch (_context45.prev = _context45.next) {
5061
4697
  case 0:
@@ -5109,8 +4745,8 @@ var OroClient = /*#__PURE__*/function () {
5109
4745
  _proto.getPatientPrescriptionsList =
5110
4746
  /*#__PURE__*/
5111
4747
  function () {
5112
- var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee45(consultationId) {
5113
- return runtime_1.wrap(function _callee45$(_context46) {
4748
+ var _getPatientPrescriptionsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(consultationId) {
4749
+ return _regeneratorRuntime().wrap(function _callee45$(_context46) {
5114
4750
  while (1) {
5115
4751
  switch (_context46.prev = _context46.next) {
5116
4752
  case 0:
@@ -5143,8 +4779,8 @@ var OroClient = /*#__PURE__*/function () {
5143
4779
  _proto.getPatientResultsList =
5144
4780
  /*#__PURE__*/
5145
4781
  function () {
5146
- var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee46(consultationId) {
5147
- return runtime_1.wrap(function _callee46$(_context47) {
4782
+ var _getPatientResultsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(consultationId) {
4783
+ return _regeneratorRuntime().wrap(function _callee46$(_context47) {
5148
4784
  while (1) {
5149
4785
  switch (_context47.prev = _context47.next) {
5150
4786
  case 0:
@@ -5177,8 +4813,8 @@ var OroClient = /*#__PURE__*/function () {
5177
4813
  _proto.getPatientTreatmentPlans =
5178
4814
  /*#__PURE__*/
5179
4815
  function () {
5180
- var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee47(consultationId) {
5181
- return runtime_1.wrap(function _callee47$(_context48) {
4816
+ var _getPatientTreatmentPlans = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(consultationId) {
4817
+ return _regeneratorRuntime().wrap(function _callee47$(_context48) {
5182
4818
  while (1) {
5183
4819
  switch (_context48.prev = _context48.next) {
5184
4820
  case 0:
@@ -5212,8 +4848,8 @@ var OroClient = /*#__PURE__*/function () {
5212
4848
  _proto.getPatientTreatmentPlanByUuid =
5213
4849
  /*#__PURE__*/
5214
4850
  function () {
5215
- var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee48(consultationId, treatmentPlanId) {
5216
- return runtime_1.wrap(function _callee48$(_context49) {
4851
+ var _getPatientTreatmentPlanByUuid = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(consultationId, treatmentPlanId) {
4852
+ return _regeneratorRuntime().wrap(function _callee48$(_context49) {
5217
4853
  while (1) {
5218
4854
  switch (_context49.prev = _context49.next) {
5219
4855
  case 0:
@@ -5251,10 +4887,10 @@ var OroClient = /*#__PURE__*/function () {
5251
4887
  _proto.getPatientDocumentsList =
5252
4888
  /*#__PURE__*/
5253
4889
  function () {
5254
- var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
4890
+ var _getPatientDocumentsList = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(filters, expandPrivateMetadata, consultationId) {
5255
4891
  var _this8 = this;
5256
4892
 
5257
- return runtime_1.wrap(function _callee50$(_context51) {
4893
+ return _regeneratorRuntime().wrap(function _callee50$(_context51) {
5258
4894
  while (1) {
5259
4895
  switch (_context51.prev = _context51.next) {
5260
4896
  case 0:
@@ -5270,8 +4906,8 @@ var OroClient = /*#__PURE__*/function () {
5270
4906
  consultationId: consultationId
5271
4907
  }), expandPrivateMetadata, grant.lockboxOwnerUuid, true).then(function (manifest) {
5272
4908
  return Promise.all(manifest.map( /*#__PURE__*/function () {
5273
- var _ref7 = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee49(entry) {
5274
- return runtime_1.wrap(function _callee49$(_context50) {
4909
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(entry) {
4910
+ return _regeneratorRuntime().wrap(function _callee49$(_context50) {
5275
4911
  while (1) {
5276
4912
  switch (_context50.prev = _context50.next) {
5277
4913
  case 0:
@@ -5329,9 +4965,9 @@ var OroClient = /*#__PURE__*/function () {
5329
4965
  _proto.recoverPrivateKeyFromSecurityQuestions =
5330
4966
  /*#__PURE__*/
5331
4967
  function () {
5332
- var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
4968
+ var _recoverPrivateKeyFromSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5333
4969
  var shards, answeredShards, privateKey;
5334
- return runtime_1.wrap(function _callee51$(_context52) {
4970
+ return _regeneratorRuntime().wrap(function _callee51$(_context52) {
5335
4971
  while (1) {
5336
4972
  switch (_context52.prev = _context52.next) {
5337
4973
  case 0:
@@ -5385,9 +5021,9 @@ var OroClient = /*#__PURE__*/function () {
5385
5021
  _proto.recoverPrivateKeyFromPassword =
5386
5022
  /*#__PURE__*/
5387
5023
  function () {
5388
- var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee52(id, password) {
5024
+ var _recoverPrivateKeyFromPassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(id, password) {
5389
5025
  var identity, recoveryPayload, symmetricDecryptor, privateKey, symetricEncryptor;
5390
- return runtime_1.wrap(function _callee52$(_context53) {
5026
+ return _regeneratorRuntime().wrap(function _callee52$(_context53) {
5391
5027
  while (1) {
5392
5028
  switch (_context53.prev = _context53.next) {
5393
5029
  case 0:
@@ -5433,9 +5069,9 @@ var OroClient = /*#__PURE__*/function () {
5433
5069
  _proto.recoverPrivateKeyFromMasterKey =
5434
5070
  /*#__PURE__*/
5435
5071
  function () {
5436
- var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee53(id, masterKey) {
5072
+ var _recoverPrivateKeyFromMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(id, masterKey) {
5437
5073
  var recoveryPayload, symmetricDecryptor, privateKey;
5438
- return runtime_1.wrap(function _callee53$(_context54) {
5074
+ return _regeneratorRuntime().wrap(function _callee53$(_context54) {
5439
5075
  while (1) {
5440
5076
  switch (_context54.prev = _context54.next) {
5441
5077
  case 0:
@@ -5475,9 +5111,9 @@ var OroClient = /*#__PURE__*/function () {
5475
5111
  _proto.updateSecurityQuestions =
5476
5112
  /*#__PURE__*/
5477
5113
  function () {
5478
- var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5114
+ var _updateSecurityQuestions = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(id, recoverySecurityQuestions, recoverySecurityAnswers, threshold) {
5479
5115
  var securityQuestionPayload, updateRequest;
5480
- return runtime_1.wrap(function _callee54$(_context55) {
5116
+ return _regeneratorRuntime().wrap(function _callee54$(_context55) {
5481
5117
  while (1) {
5482
5118
  switch (_context55.prev = _context55.next) {
5483
5119
  case 0:
@@ -5529,9 +5165,9 @@ var OroClient = /*#__PURE__*/function () {
5529
5165
  _proto.updatePassword =
5530
5166
  /*#__PURE__*/
5531
5167
  function () {
5532
- var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee55(id, newPassword, oldPassword) {
5168
+ var _updatePassword = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(id, newPassword, oldPassword) {
5533
5169
  var symmetricEncryptor, passwordPayload, updateRequest;
5534
- return runtime_1.wrap(function _callee55$(_context56) {
5170
+ return _regeneratorRuntime().wrap(function _callee55$(_context56) {
5535
5171
  while (1) {
5536
5172
  switch (_context56.prev = _context56.next) {
5537
5173
  case 0:
@@ -5591,9 +5227,9 @@ var OroClient = /*#__PURE__*/function () {
5591
5227
  _proto.updateMasterKey =
5592
5228
  /*#__PURE__*/
5593
5229
  function () {
5594
- var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee56(id, masterKey, lockboxUuid) {
5230
+ var _updateMasterKey = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(id, masterKey, lockboxUuid) {
5595
5231
  var symmetricEncryptor, masterKeyPayload, updateRequest, updatedIdentity;
5596
- return runtime_1.wrap(function _callee56$(_context57) {
5232
+ return _regeneratorRuntime().wrap(function _callee56$(_context57) {
5597
5233
  while (1) {
5598
5234
  switch (_context57.prev = _context57.next) {
5599
5235
  case 0: