@jetthai/cuora 1.0.163 → 1.0.164

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.164](https://github.com/jetthai/cuora-module/compare/v1.0.163...v1.0.164) (2022-08-26)
6
+
5
7
  ### [1.0.163](https://github.com/jetthai/cuora-module/compare/v1.0.162...v1.0.163) (2022-08-19)
6
8
 
7
9
  ### [1.0.162](https://github.com/jetthai/cuora-module/compare/v1.0.161...v1.0.162) (2022-08-19)
package/dist/bundle.mjs CHANGED
@@ -310,77 +310,77 @@ var form = {
310
310
 
311
311
  var index$2 = { activity: activity$2, auth: auth$1, common: common$1, game: api, mailbox, payment, user, form };
312
312
 
313
- /*! *****************************************************************************
314
- Copyright (c) Microsoft Corporation.
315
-
316
- Permission to use, copy, modify, and/or distribute this software for any
317
- purpose with or without fee is hereby granted.
318
-
319
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
320
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
321
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
322
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
323
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
324
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
325
- PERFORMANCE OF THIS SOFTWARE.
326
- ***************************************************************************** */
327
-
328
- var __assign$2 = function() {
329
- __assign$2 = Object.assign || function __assign(t) {
330
- for (var s, i = 1, n = arguments.length; i < n; i++) {
331
- s = arguments[i];
332
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
333
- }
334
- return t;
335
- };
336
- return __assign$2.apply(this, arguments);
337
- };
338
-
339
- function __rest$1(s, e) {
340
- var t = {};
341
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
342
- t[p] = s[p];
343
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
344
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
345
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
346
- t[p[i]] = s[p[i]];
347
- }
348
- return t;
349
- }
350
-
351
- function __values(o) {
352
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
353
- if (m) return m.call(o);
354
- if (o && typeof o.length === "number") return {
355
- next: function () {
356
- if (o && i >= o.length) o = void 0;
357
- return { value: o && o[i++], done: !o };
358
- }
359
- };
360
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
361
- }
362
-
363
- function __read(o, n) {
364
- var m = typeof Symbol === "function" && o[Symbol.iterator];
365
- if (!m) return o;
366
- var i = m.call(o), r, ar = [], e;
367
- try {
368
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
369
- }
370
- catch (error) { e = { error: error }; }
371
- finally {
372
- try {
373
- if (r && !r.done && (m = i["return"])) m.call(i);
374
- }
375
- finally { if (e) throw e.error; }
376
- }
377
- return ar;
378
- }
379
-
380
- function __spreadArray(to, from) {
381
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
382
- to[j] = from[i];
383
- return to;
313
+ /*! *****************************************************************************
314
+ Copyright (c) Microsoft Corporation.
315
+
316
+ Permission to use, copy, modify, and/or distribute this software for any
317
+ purpose with or without fee is hereby granted.
318
+
319
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
320
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
321
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
322
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
323
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
324
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
325
+ PERFORMANCE OF THIS SOFTWARE.
326
+ ***************************************************************************** */
327
+
328
+ var __assign$2 = function() {
329
+ __assign$2 = Object.assign || function __assign(t) {
330
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
331
+ s = arguments[i];
332
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
333
+ }
334
+ return t;
335
+ };
336
+ return __assign$2.apply(this, arguments);
337
+ };
338
+
339
+ function __rest$1(s, e) {
340
+ var t = {};
341
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
342
+ t[p] = s[p];
343
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
344
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
345
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
346
+ t[p[i]] = s[p[i]];
347
+ }
348
+ return t;
349
+ }
350
+
351
+ function __values(o) {
352
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
353
+ if (m) return m.call(o);
354
+ if (o && typeof o.length === "number") return {
355
+ next: function () {
356
+ if (o && i >= o.length) o = void 0;
357
+ return { value: o && o[i++], done: !o };
358
+ }
359
+ };
360
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
361
+ }
362
+
363
+ function __read(o, n) {
364
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
365
+ if (!m) return o;
366
+ var i = m.call(o), r, ar = [], e;
367
+ try {
368
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
369
+ }
370
+ catch (error) { e = { error: error }; }
371
+ finally {
372
+ try {
373
+ if (r && !r.done && (m = i["return"])) m.call(i);
374
+ }
375
+ finally { if (e) throw e.error; }
376
+ }
377
+ return ar;
378
+ }
379
+
380
+ function __spreadArray(to, from) {
381
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
382
+ to[j] = from[i];
383
+ return to;
384
384
  }
385
385
 
386
386
  var STATE_DELIMITER = '.';
@@ -517,9 +517,9 @@ function mapFilterValues(collection, iteratee, predicate) {
517
517
 
518
518
  return result;
519
519
  }
520
- /**
521
- * Retrieves a value at the given path.
522
- * @param props The deep path to the prop of the desired value
520
+ /**
521
+ * Retrieves a value at the given path.
522
+ * @param props The deep path to the prop of the desired value
523
523
  */
524
524
 
525
525
  var path = function (props) {
@@ -548,9 +548,9 @@ var path = function (props) {
548
548
  return result;
549
549
  };
550
550
  };
551
- /**
552
- * Retrieves a value at the given path via the nested accessor prop.
553
- * @param props The deep path to the prop of the desired value
551
+ /**
552
+ * Retrieves a value at the given path via the nested accessor prop.
553
+ * @param props The deep path to the prop of the desired value
554
554
  */
555
555
 
556
556
  function nestedPath(props, accessorProp) {
@@ -998,11 +998,11 @@ function toActivityDefinition(action) {
998
998
  type: actionObject.type
999
999
  });
1000
1000
  }
1001
- /**
1002
- * Raises an event. This places the event in the internal event queue, so that
1003
- * the event is immediately consumed by the machine in the current step.
1004
- *
1005
- * @param eventType The event to raise.
1001
+ /**
1002
+ * Raises an event. This places the event in the internal event queue, so that
1003
+ * the event is immediately consumed by the machine in the current step.
1004
+ *
1005
+ * @param eventType The event to raise.
1006
1006
  */
1007
1007
 
1008
1008
  function raise(event) {
@@ -1023,15 +1023,15 @@ function resolveRaise(action) {
1023
1023
  _event: toSCXMLEvent(action.event)
1024
1024
  };
1025
1025
  }
1026
- /**
1027
- * Sends an event. This returns an action that will be read by an interpreter to
1028
- * send the event in the next step, after the current step is finished executing.
1029
- *
1030
- * @param event The event to send.
1031
- * @param options Options to pass into the send event:
1032
- * - `id` - The unique send event identifier (used with `cancel()`).
1033
- * - `delay` - The number of milliseconds to delay the sending of the event.
1034
- * - `to` - The target of this event (by default, the machine the event was sent from).
1026
+ /**
1027
+ * Sends an event. This returns an action that will be read by an interpreter to
1028
+ * send the event in the next step, after the current step is finished executing.
1029
+ *
1030
+ * @param event The event to send.
1031
+ * @param options Options to pass into the send event:
1032
+ * - `id` - The unique send event identifier (used with `cancel()`).
1033
+ * - `delay` - The number of milliseconds to delay the sending of the event.
1034
+ * - `to` - The target of this event (by default, the machine the event was sent from).
1035
1035
  */
1036
1036
 
1037
1037
  function send(event, options) {
@@ -1073,12 +1073,12 @@ var resolveLog = function (action, ctx, _event) {
1073
1073
  })
1074
1074
  });
1075
1075
  };
1076
- /**
1077
- * Cancels an in-flight `send(...)` action. A canceled sent action will not
1078
- * be executed, nor will its event be sent, unless it has already been sent
1079
- * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
1080
- *
1081
- * @param sendId The `id` of the `send(...)` action to cancel.
1076
+ /**
1077
+ * Cancels an in-flight `send(...)` action. A canceled sent action will not
1078
+ * be executed, nor will its event be sent, unless it has already been sent
1079
+ * (e.g., if `cancel(...)` is called after the `send(...)` action's `delay`).
1080
+ *
1081
+ * @param sendId The `id` of the `send(...)` action to cancel.
1082
1082
  */
1083
1083
 
1084
1084
  var cancel = function (sendId) {
@@ -1087,10 +1087,10 @@ var cancel = function (sendId) {
1087
1087
  sendId: sendId
1088
1088
  };
1089
1089
  };
1090
- /**
1091
- * Starts an activity.
1092
- *
1093
- * @param activity The activity to start.
1090
+ /**
1091
+ * Starts an activity.
1092
+ *
1093
+ * @param activity The activity to start.
1094
1094
  */
1095
1095
 
1096
1096
  function start(activity) {
@@ -1101,10 +1101,10 @@ function start(activity) {
1101
1101
  exec: undefined
1102
1102
  };
1103
1103
  }
1104
- /**
1105
- * Stops an activity.
1106
- *
1107
- * @param actorRef The activity to stop.
1104
+ /**
1105
+ * Stops an activity.
1106
+ *
1107
+ * @param actorRef The activity to stop.
1108
1108
  */
1109
1109
 
1110
1110
  function stop(actorRef) {
@@ -1126,10 +1126,10 @@ function resolveStop(action, context, _event) {
1126
1126
  };
1127
1127
  return actionObject;
1128
1128
  }
1129
- /**
1130
- * Updates the current context of the machine.
1131
- *
1132
- * @param assignment An object that represents the partial context to update.
1129
+ /**
1130
+ * Updates the current context of the machine.
1131
+ *
1132
+ * @param assignment An object that represents the partial context to update.
1133
1133
  */
1134
1134
 
1135
1135
  var assign = function (assignment) {
@@ -1138,24 +1138,24 @@ var assign = function (assignment) {
1138
1138
  assignment: assignment
1139
1139
  };
1140
1140
  };
1141
- /**
1142
- * Returns an event type that represents an implicit event that
1143
- * is sent after the specified `delay`.
1144
- *
1145
- * @param delayRef The delay in milliseconds
1146
- * @param id The state node ID where this event is handled
1141
+ /**
1142
+ * Returns an event type that represents an implicit event that
1143
+ * is sent after the specified `delay`.
1144
+ *
1145
+ * @param delayRef The delay in milliseconds
1146
+ * @param id The state node ID where this event is handled
1147
1147
  */
1148
1148
 
1149
1149
  function after(delayRef, id) {
1150
1150
  var idSuffix = id ? "#" + id : '';
1151
1151
  return ActionTypes.After + "(" + delayRef + ")" + idSuffix;
1152
1152
  }
1153
- /**
1154
- * Returns an event that represents that a final state node
1155
- * has been reached in the parent state node.
1156
- *
1157
- * @param id The final state node's parent state node `id`
1158
- * @param data The data to pass into the event
1153
+ /**
1154
+ * Returns an event that represents that a final state node
1155
+ * has been reached in the parent state node.
1156
+ *
1157
+ * @param id The final state node's parent state node `id`
1158
+ * @param data The data to pass into the event
1159
1159
  */
1160
1160
 
1161
1161
  function done(id, data) {
@@ -1171,14 +1171,14 @@ function done(id, data) {
1171
1171
 
1172
1172
  return eventObject;
1173
1173
  }
1174
- /**
1175
- * Returns an event that represents that an invoked service has terminated.
1176
- *
1177
- * An invoked service is terminated when it has reached a top-level final state node,
1178
- * but not when it is canceled.
1179
- *
1180
- * @param id The final state node ID
1181
- * @param data The data to pass into the event
1174
+ /**
1175
+ * Returns an event that represents that an invoked service has terminated.
1176
+ *
1177
+ * An invoked service is terminated when it has reached a top-level final state node,
1178
+ * but not when it is canceled.
1179
+ *
1180
+ * @param id The final state node ID
1181
+ * @param data The data to pass into the event
1182
1182
  */
1183
1183
 
1184
1184
  function doneInvoke(id, data) {
@@ -1589,17 +1589,17 @@ var State =
1589
1589
 
1590
1590
  /** @class */
1591
1591
  function () {
1592
- /**
1593
- * Creates a new State instance.
1594
- * @param value The state value
1595
- * @param context The extended state
1596
- * @param historyValue The tree representing historical values of the state nodes
1597
- * @param history The previous state
1598
- * @param actions An array of action objects to execute as side-effects
1599
- * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
1600
- * @param meta
1601
- * @param events Internal event queue. Should be empty with run-to-completion semantics.
1602
- * @param configuration
1592
+ /**
1593
+ * Creates a new State instance.
1594
+ * @param value The state value
1595
+ * @param context The extended state
1596
+ * @param historyValue The tree representing historical values of the state nodes
1597
+ * @param history The previous state
1598
+ * @param actions An array of action objects to execute as side-effects
1599
+ * @param activities A mapping of activities and whether they are started (`true`) or stopped (`false`).
1600
+ * @param meta
1601
+ * @param events Internal event queue. Should be empty with run-to-completion semantics.
1602
+ * @param configuration
1603
1603
  */
1604
1604
  function State(config) {
1605
1605
  var _this = this;
@@ -1635,10 +1635,10 @@ function () {
1635
1635
  }
1636
1636
  });
1637
1637
  }
1638
- /**
1639
- * Creates a new State instance for the given `stateValue` and `context`.
1640
- * @param stateValue
1641
- * @param context
1638
+ /**
1639
+ * Creates a new State instance for the given `stateValue` and `context`.
1640
+ * @param stateValue
1641
+ * @param context
1642
1642
  */
1643
1643
 
1644
1644
 
@@ -1682,19 +1682,19 @@ function () {
1682
1682
  children: {}
1683
1683
  });
1684
1684
  };
1685
- /**
1686
- * Creates a new State instance for the given `config`.
1687
- * @param config The state config
1685
+ /**
1686
+ * Creates a new State instance for the given `config`.
1687
+ * @param config The state config
1688
1688
  */
1689
1689
 
1690
1690
 
1691
1691
  State.create = function (config) {
1692
1692
  return new State(config);
1693
1693
  };
1694
- /**
1695
- * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
1696
- * @param stateValue
1697
- * @param context
1694
+ /**
1695
+ * Creates a new `State` instance for the given `stateValue` and `context` with no actions (side-effects).
1696
+ * @param stateValue
1697
+ * @param context
1698
1698
  */
1699
1699
 
1700
1700
 
@@ -1721,10 +1721,10 @@ function () {
1721
1721
 
1722
1722
  return State.from(stateValue, context);
1723
1723
  };
1724
- /**
1725
- * Returns an array of all the string leaf state node paths.
1726
- * @param stateValue
1727
- * @param delimiter The character(s) that separate each subpath in the string state node path.
1724
+ /**
1725
+ * Returns an array of all the string leaf state node paths.
1726
+ * @param stateValue
1727
+ * @param delimiter The character(s) that separate each subpath in the string state node path.
1728
1728
  */
1729
1729
 
1730
1730
 
@@ -1763,28 +1763,28 @@ function () {
1763
1763
  tags: Array.from(tags)
1764
1764
  });
1765
1765
  };
1766
- /**
1767
- * Whether the current state value is a subset of the given parent state value.
1768
- * @param parentStateValue
1766
+ /**
1767
+ * Whether the current state value is a subset of the given parent state value.
1768
+ * @param parentStateValue
1769
1769
  */
1770
1770
 
1771
1771
 
1772
1772
  State.prototype.matches = function (parentStateValue) {
1773
1773
  return matchesState(parentStateValue, this.value);
1774
1774
  };
1775
- /**
1776
- * Whether the current state configuration has a state node with the specified `tag`.
1777
- * @param tag
1775
+ /**
1776
+ * Whether the current state configuration has a state node with the specified `tag`.
1777
+ * @param tag
1778
1778
  */
1779
1779
 
1780
1780
 
1781
1781
  State.prototype.hasTag = function (tag) {
1782
1782
  return this.tags.has(tag);
1783
1783
  };
1784
- /**
1785
- * Determines whether sending the `event` will cause a transition.
1786
- * @param event The event to test
1787
- * @returns Whether the event will cause a transition
1784
+ /**
1785
+ * Determines whether sending the `event` will cause a transition.
1786
+ * @param event The event to test
1787
+ * @returns Whether the event will cause a transition
1788
1788
  */
1789
1789
 
1790
1790
 
@@ -1801,9 +1801,9 @@ function () {
1801
1801
  return State;
1802
1802
  }();
1803
1803
 
1804
- /**
1805
- * Maintains a stack of the current service in scope.
1806
- * This is used to provide the correct service to spawn().
1804
+ /**
1805
+ * Maintains a stack of the current service in scope.
1806
+ * This is used to provide the correct service to spawn().
1807
1807
  */
1808
1808
  var provide = function (service, fn) {
1809
1809
  var result = fn(service);
@@ -1833,11 +1833,11 @@ function createNullActor(id) {
1833
1833
  }
1834
1834
  };
1835
1835
  }
1836
- /**
1837
- * Creates a deferred actor that is able to be invoked given the provided
1838
- * invocation information in its `.meta` value.
1839
- *
1840
- * @param invokeDefinition The meta information needed to invoke the actor.
1836
+ /**
1837
+ * Creates a deferred actor that is able to be invoked given the provided
1838
+ * invocation information in its `.meta` value.
1839
+ *
1840
+ * @param invokeDefinition The meta information needed to invoke the actor.
1841
1841
  */
1842
1842
 
1843
1843
  function createInvocableActor(invokeDefinition, machine, context, _event) {
@@ -1928,12 +1928,12 @@ var StateNode =
1928
1928
  /** @class */
1929
1929
  function () {
1930
1930
  function StateNode(
1931
- /**
1932
- * The raw config used to create the machine.
1931
+ /**
1932
+ * The raw config used to create the machine.
1933
1933
  */
1934
1934
  config, options,
1935
- /**
1936
- * The initial extended state
1935
+ /**
1936
+ * The initial extended state
1937
1937
  */
1938
1938
  _context // TODO: this is unsafe, but we're removing it in v5 anyway
1939
1939
  ) {
@@ -1947,8 +1947,8 @@ function () {
1947
1947
 
1948
1948
  this.config = config;
1949
1949
  this._context = _context;
1950
- /**
1951
- * The order this state node appears. Corresponds to the implicit SCXML document order.
1950
+ /**
1951
+ * The order this state node appears. Corresponds to the implicit SCXML document order.
1952
1952
  */
1953
1953
 
1954
1954
  this.order = -1;
@@ -2083,11 +2083,11 @@ function () {
2083
2083
  return stateNode.on;
2084
2084
  });
2085
2085
  };
2086
- /**
2087
- * Clones this state machine with custom options and context.
2088
- *
2089
- * @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
2090
- * @param context Custom context (will override predefined context)
2086
+ /**
2087
+ * Clones this state machine with custom options and context.
2088
+ *
2089
+ * @param options Options (actions, guards, activities, services) to recursively merge with the existing options.
2090
+ * @param context Custom context (will override predefined context)
2091
2091
  */
2092
2092
 
2093
2093
 
@@ -2106,10 +2106,10 @@ function () {
2106
2106
  delays: __assign$2(__assign$2({}, delays), options.delays)
2107
2107
  }, context !== null && context !== void 0 ? context : this.context);
2108
2108
  };
2109
- /**
2110
- * Clones this state machine with custom context.
2111
- *
2112
- * @param context Custom context (will override predefined context, not recursive)
2109
+ /**
2110
+ * Clones this state machine with custom context.
2111
+ *
2112
+ * @param context Custom context (will override predefined context, not recursive)
2113
2113
  */
2114
2114
 
2115
2115
 
@@ -2125,8 +2125,8 @@ function () {
2125
2125
  configurable: true
2126
2126
  });
2127
2127
  Object.defineProperty(StateNode.prototype, "definition", {
2128
- /**
2129
- * The well-structured state node definition.
2128
+ /**
2129
+ * The well-structured state node definition.
2130
2130
  */
2131
2131
  get: function () {
2132
2132
  return {
@@ -2160,8 +2160,8 @@ function () {
2160
2160
  };
2161
2161
 
2162
2162
  Object.defineProperty(StateNode.prototype, "on", {
2163
- /**
2164
- * The mapping of events to transitions.
2163
+ /**
2164
+ * The mapping of events to transitions.
2165
2165
  */
2166
2166
  get: function () {
2167
2167
  if (this.__cache.on) {
@@ -2186,8 +2186,8 @@ function () {
2186
2186
  configurable: true
2187
2187
  });
2188
2188
  Object.defineProperty(StateNode.prototype, "transitions", {
2189
- /**
2190
- * All the transitions that can be taken from this state node.
2189
+ /**
2190
+ * All the transitions that can be taken from this state node.
2191
2191
  */
2192
2192
  get: function () {
2193
2193
  return this.__cache.transitions || (this.__cache.transitions = this.formatTransitions(), this.__cache.transitions);
@@ -2210,8 +2210,8 @@ function () {
2210
2210
  this.__cache.candidates[eventName] = candidates;
2211
2211
  return candidates;
2212
2212
  };
2213
- /**
2214
- * All delayed transitions from the config.
2213
+ /**
2214
+ * All delayed transitions from the config.
2215
2215
  */
2216
2216
 
2217
2217
 
@@ -2263,10 +2263,10 @@ function () {
2263
2263
  });
2264
2264
  });
2265
2265
  };
2266
- /**
2267
- * Returns the state nodes represented by the current state value.
2268
- *
2269
- * @param state The state value or State instance
2266
+ /**
2267
+ * Returns the state nodes represented by the current state value.
2268
+ *
2269
+ * @param state The state value or State instance
2270
2270
  */
2271
2271
 
2272
2272
 
@@ -2297,10 +2297,10 @@ function () {
2297
2297
  return allSubStateNodes.concat(subStateNode);
2298
2298
  }, []));
2299
2299
  };
2300
- /**
2301
- * Returns `true` if this state node explicitly handles the given event.
2302
- *
2303
- * @param event The event in question
2300
+ /**
2301
+ * Returns `true` if this state node explicitly handles the given event.
2302
+ *
2303
+ * @param event The event in question
2304
2304
  */
2305
2305
 
2306
2306
 
@@ -2308,12 +2308,12 @@ function () {
2308
2308
  var eventType = getEventType(event);
2309
2309
  return this.events.includes(eventType);
2310
2310
  };
2311
- /**
2312
- * Resolves the given `state` to a new `State` instance relative to this machine.
2313
- *
2314
- * This ensures that `.events` and `.nextEvents` represent the correct values.
2315
- *
2316
- * @param state The state to resolve
2311
+ /**
2312
+ * Resolves the given `state` to a new `State` instance relative to this machine.
2313
+ *
2314
+ * This ensures that `.events` and `.nextEvents` represent the correct values.
2315
+ *
2316
+ * @param state The state to resolve
2317
2317
  */
2318
2318
 
2319
2319
 
@@ -2531,9 +2531,9 @@ function () {
2531
2531
 
2532
2532
  return nodes;
2533
2533
  };
2534
- /**
2535
- * Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
2536
- * this state node, it does not escape.
2534
+ /**
2535
+ * Whether the given state node "escapes" this state node. If the `stateNode` is equal to or the parent of
2536
+ * this state node, it does not escape.
2537
2537
  */
2538
2538
 
2539
2539
 
@@ -2658,12 +2658,12 @@ function () {
2658
2658
  var actions = toActionObjects(exitActions.concat(transition.actions).concat(entryActions), this.machine.options.actions);
2659
2659
  return actions;
2660
2660
  };
2661
- /**
2662
- * Determines the next state given the current `state` and sent `event`.
2663
- *
2664
- * @param state The current State instance or state value
2665
- * @param event The event that was sent at the current state
2666
- * @param context The current context (extended state) of the current state
2661
+ /**
2662
+ * Determines the next state given the current `state` and sent `event`.
2663
+ *
2664
+ * @param state The current State instance or state value
2665
+ * @param event The event that was sent at the current state
2666
+ * @param context The current context (extended state) of the current state
2667
2667
  */
2668
2668
 
2669
2669
 
@@ -2856,8 +2856,8 @@ function () {
2856
2856
  })));
2857
2857
  return maybeNextState;
2858
2858
  };
2859
- /**
2860
- * Returns the child state node from its relative `stateKey`, or throws.
2859
+ /**
2860
+ * Returns the child state node from its relative `stateKey`, or throws.
2861
2861
  */
2862
2862
 
2863
2863
 
@@ -2878,10 +2878,10 @@ function () {
2878
2878
 
2879
2879
  return result;
2880
2880
  };
2881
- /**
2882
- * Returns the state node with the given `stateId`, or throws.
2883
- *
2884
- * @param stateId The state ID. The prefix "#" is removed.
2881
+ /**
2882
+ * Returns the state node with the given `stateId`, or throws.
2883
+ *
2884
+ * @param stateId The state ID. The prefix "#" is removed.
2885
2885
  */
2886
2886
 
2887
2887
 
@@ -2900,10 +2900,10 @@ function () {
2900
2900
 
2901
2901
  return stateNode;
2902
2902
  };
2903
- /**
2904
- * Returns the relative state node from the given `statePath`, or throws.
2905
- *
2906
- * @param statePath The string or string array relative path to the state node.
2903
+ /**
2904
+ * Returns the relative state node from the given `statePath`, or throws.
2905
+ *
2906
+ * @param statePath The string or string array relative path to the state node.
2907
2907
  */
2908
2908
 
2909
2909
 
@@ -2931,10 +2931,10 @@ function () {
2931
2931
 
2932
2932
  return currentStateNode;
2933
2933
  };
2934
- /**
2935
- * Resolves a partial state value with its full representation in this machine.
2936
- *
2937
- * @param stateValue The partial state value to resolve.
2934
+ /**
2935
+ * Resolves a partial state value with its full representation in this machine.
2936
+ *
2937
+ * @param stateValue The partial state value to resolve.
2938
2938
  */
2939
2939
 
2940
2940
 
@@ -3038,9 +3038,9 @@ function () {
3038
3038
  };
3039
3039
 
3040
3040
  Object.defineProperty(StateNode.prototype, "initialState", {
3041
- /**
3042
- * The initial State instance, which includes all actions to be executed from
3043
- * entering the initial state.
3041
+ /**
3042
+ * The initial State instance, which includes all actions to be executed from
3043
+ * entering the initial state.
3044
3044
  */
3045
3045
  get: function () {
3046
3046
  this._init(); // TODO: this should be in the constructor (see note in constructor)
@@ -3058,9 +3058,9 @@ function () {
3058
3058
  configurable: true
3059
3059
  });
3060
3060
  Object.defineProperty(StateNode.prototype, "target", {
3061
- /**
3062
- * The target state value of the history state node, if it exists. This represents the
3063
- * default state value to transition to if no history value exists yet.
3061
+ /**
3062
+ * The target state value of the history state node, if it exists. This represents the
3063
+ * default state value to transition to if no history value exists yet.
3064
3064
  */
3065
3065
  get: function () {
3066
3066
  var target;
@@ -3080,12 +3080,12 @@ function () {
3080
3080
  enumerable: false,
3081
3081
  configurable: true
3082
3082
  });
3083
- /**
3084
- * Returns the leaf nodes from a state path relative to this state node.
3085
- *
3086
- * @param relativeStateId The relative state path to retrieve the state nodes
3087
- * @param history The previous state to retrieve history
3088
- * @param resolve Whether state nodes should resolve to initial child state nodes
3083
+ /**
3084
+ * Returns the leaf nodes from a state path relative to this state node.
3085
+ *
3086
+ * @param relativeStateId The relative state path to retrieve the state nodes
3087
+ * @param history The previous state to retrieve history
3088
+ * @param resolve Whether state nodes should resolve to initial child state nodes
3089
3089
  */
3090
3090
 
3091
3091
  StateNode.prototype.getRelativeStateNodes = function (relativeStateId, historyValue, resolve) {
@@ -3118,11 +3118,11 @@ function () {
3118
3118
  enumerable: false,
3119
3119
  configurable: true
3120
3120
  });
3121
- /**
3122
- * Retrieves state nodes from a relative path to this state node.
3123
- *
3124
- * @param relativePath The relative path from this state node
3125
- * @param historyValue
3121
+ /**
3122
+ * Retrieves state nodes from a relative path to this state node.
3123
+ *
3124
+ * @param relativePath The relative path from this state node
3125
+ * @param historyValue
3126
3126
  */
3127
3127
 
3128
3128
  StateNode.prototype.getFromRelativePath = function (relativePath) {
@@ -3170,11 +3170,11 @@ function () {
3170
3170
  })
3171
3171
  };
3172
3172
  };
3173
- /**
3174
- * Resolves to the historical value(s) of the parent state node,
3175
- * represented by state nodes.
3176
- *
3177
- * @param historyValue
3173
+ /**
3174
+ * Resolves to the historical value(s) of the parent state node,
3175
+ * represented by state nodes.
3176
+ *
3177
+ * @param historyValue
3178
3178
  */
3179
3179
 
3180
3180
 
@@ -3206,8 +3206,8 @@ function () {
3206
3206
  };
3207
3207
 
3208
3208
  Object.defineProperty(StateNode.prototype, "stateIds", {
3209
- /**
3210
- * All the state node IDs of this state node and its descendant state nodes.
3209
+ /**
3210
+ * All the state node IDs of this state node and its descendant state nodes.
3211
3211
  */
3212
3212
  get: function () {
3213
3213
  var _this = this;
@@ -3221,8 +3221,8 @@ function () {
3221
3221
  configurable: true
3222
3222
  });
3223
3223
  Object.defineProperty(StateNode.prototype, "events", {
3224
- /**
3225
- * All the event types accepted by this state node and its descendants.
3224
+ /**
3225
+ * All the event types accepted by this state node and its descendants.
3226
3226
  */
3227
3227
  get: function () {
3228
3228
  var e_7, _a, e_8, _b;
@@ -3278,10 +3278,10 @@ function () {
3278
3278
  configurable: true
3279
3279
  });
3280
3280
  Object.defineProperty(StateNode.prototype, "ownEvents", {
3281
- /**
3282
- * All the events that have transitions directly from this state node.
3283
- *
3284
- * Excludes any inert events.
3281
+ /**
3282
+ * All the events that have transitions directly from this state node.
3283
+ *
3284
+ * Excludes any inert events.
3285
3285
  */
3286
3286
  get: function () {
3287
3287
  var events = new Set(this.transitions.filter(function (transition) {
@@ -7742,213 +7742,213 @@ function tryDecode(str, decode) {
7742
7742
  }
7743
7743
  }
7744
7744
 
7745
- function hasDocumentCookie() {
7746
- // Can we get/set cookies on document.cookie?
7747
- return typeof document === 'object' && typeof document.cookie === 'string';
7748
- }
7749
- function parseCookies(cookies, options) {
7750
- if (typeof cookies === 'string') {
7751
- return parse_1(cookies, options);
7752
- }
7753
- else if (typeof cookies === 'object' && cookies !== null) {
7754
- return cookies;
7755
- }
7756
- else {
7757
- return {};
7758
- }
7759
- }
7760
- function isParsingCookie(value, doNotParse) {
7761
- if (typeof doNotParse === 'undefined') {
7762
- // We guess if the cookie start with { or [, it has been serialized
7763
- doNotParse =
7764
- !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
7765
- }
7766
- return !doNotParse;
7767
- }
7768
- function readCookie(value, options) {
7769
- if (options === void 0) { options = {}; }
7770
- var cleanValue = cleanupCookieValue(value);
7771
- if (isParsingCookie(cleanValue, options.doNotParse)) {
7772
- try {
7773
- return JSON.parse(cleanValue);
7774
- }
7775
- catch (e) {
7776
- // At least we tried
7777
- }
7778
- }
7779
- // Ignore clean value if we failed the deserialization
7780
- // It is not relevant anymore to trim those values
7781
- return value;
7782
- }
7783
- function cleanupCookieValue(value) {
7784
- // express prepend j: before serializing a cookie
7785
- if (value && value[0] === 'j' && value[1] === ':') {
7786
- return value.substr(2);
7787
- }
7788
- return value;
7789
- }
7790
-
7791
- var __assign$1 = (undefined && undefined.__assign) || function () {
7792
- __assign$1 = Object.assign || function(t) {
7793
- for (var s, i = 1, n = arguments.length; i < n; i++) {
7794
- s = arguments[i];
7795
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7796
- t[p] = s[p];
7797
- }
7798
- return t;
7799
- };
7800
- return __assign$1.apply(this, arguments);
7801
- };
7802
- var Cookies = /** @class */ (function () {
7803
- function Cookies(cookies, options) {
7804
- var _this = this;
7805
- this.changeListeners = [];
7806
- this.HAS_DOCUMENT_COOKIE = false;
7807
- this.cookies = parseCookies(cookies, options);
7808
- new Promise(function () {
7809
- _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
7810
- }).catch(function () { });
7811
- }
7812
- Cookies.prototype._updateBrowserValues = function (parseOptions) {
7813
- if (!this.HAS_DOCUMENT_COOKIE) {
7814
- return;
7815
- }
7816
- this.cookies = parse_1(document.cookie, parseOptions);
7817
- };
7818
- Cookies.prototype._emitChange = function (params) {
7819
- for (var i = 0; i < this.changeListeners.length; ++i) {
7820
- this.changeListeners[i](params);
7821
- }
7822
- };
7823
- Cookies.prototype.get = function (name, options, parseOptions) {
7824
- if (options === void 0) { options = {}; }
7825
- this._updateBrowserValues(parseOptions);
7826
- return readCookie(this.cookies[name], options);
7827
- };
7828
- Cookies.prototype.getAll = function (options, parseOptions) {
7829
- if (options === void 0) { options = {}; }
7830
- this._updateBrowserValues(parseOptions);
7831
- var result = {};
7832
- for (var name_1 in this.cookies) {
7833
- result[name_1] = readCookie(this.cookies[name_1], options);
7834
- }
7835
- return result;
7836
- };
7837
- Cookies.prototype.set = function (name, value, options) {
7838
- var _a;
7839
- if (typeof value === 'object') {
7840
- value = JSON.stringify(value);
7841
- }
7842
- this.cookies = __assign$1(__assign$1({}, this.cookies), (_a = {}, _a[name] = value, _a));
7843
- if (this.HAS_DOCUMENT_COOKIE) {
7844
- document.cookie = serialize_1(name, value, options);
7845
- }
7846
- this._emitChange({ name: name, value: value, options: options });
7847
- };
7848
- Cookies.prototype.remove = function (name, options) {
7849
- var finalOptions = (options = __assign$1(__assign$1({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
7850
- this.cookies = __assign$1({}, this.cookies);
7851
- delete this.cookies[name];
7852
- if (this.HAS_DOCUMENT_COOKIE) {
7853
- document.cookie = serialize_1(name, '', finalOptions);
7854
- }
7855
- this._emitChange({ name: name, value: undefined, options: options });
7856
- };
7857
- Cookies.prototype.addChangeListener = function (callback) {
7858
- this.changeListeners.push(callback);
7859
- };
7860
- Cookies.prototype.removeChangeListener = function (callback) {
7861
- var idx = this.changeListeners.indexOf(callback);
7862
- if (idx >= 0) {
7863
- this.changeListeners.splice(idx, 1);
7864
- }
7865
- };
7866
- return Cookies;
7745
+ function hasDocumentCookie() {
7746
+ // Can we get/set cookies on document.cookie?
7747
+ return typeof document === 'object' && typeof document.cookie === 'string';
7748
+ }
7749
+ function parseCookies(cookies, options) {
7750
+ if (typeof cookies === 'string') {
7751
+ return parse_1(cookies, options);
7752
+ }
7753
+ else if (typeof cookies === 'object' && cookies !== null) {
7754
+ return cookies;
7755
+ }
7756
+ else {
7757
+ return {};
7758
+ }
7759
+ }
7760
+ function isParsingCookie(value, doNotParse) {
7761
+ if (typeof doNotParse === 'undefined') {
7762
+ // We guess if the cookie start with { or [, it has been serialized
7763
+ doNotParse =
7764
+ !value || (value[0] !== '{' && value[0] !== '[' && value[0] !== '"');
7765
+ }
7766
+ return !doNotParse;
7767
+ }
7768
+ function readCookie(value, options) {
7769
+ if (options === void 0) { options = {}; }
7770
+ var cleanValue = cleanupCookieValue(value);
7771
+ if (isParsingCookie(cleanValue, options.doNotParse)) {
7772
+ try {
7773
+ return JSON.parse(cleanValue);
7774
+ }
7775
+ catch (e) {
7776
+ // At least we tried
7777
+ }
7778
+ }
7779
+ // Ignore clean value if we failed the deserialization
7780
+ // It is not relevant anymore to trim those values
7781
+ return value;
7782
+ }
7783
+ function cleanupCookieValue(value) {
7784
+ // express prepend j: before serializing a cookie
7785
+ if (value && value[0] === 'j' && value[1] === ':') {
7786
+ return value.substr(2);
7787
+ }
7788
+ return value;
7789
+ }
7790
+
7791
+ var __assign$1 = (undefined && undefined.__assign) || function () {
7792
+ __assign$1 = Object.assign || function(t) {
7793
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
7794
+ s = arguments[i];
7795
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7796
+ t[p] = s[p];
7797
+ }
7798
+ return t;
7799
+ };
7800
+ return __assign$1.apply(this, arguments);
7801
+ };
7802
+ var Cookies = /** @class */ (function () {
7803
+ function Cookies(cookies, options) {
7804
+ var _this = this;
7805
+ this.changeListeners = [];
7806
+ this.HAS_DOCUMENT_COOKIE = false;
7807
+ this.cookies = parseCookies(cookies, options);
7808
+ new Promise(function () {
7809
+ _this.HAS_DOCUMENT_COOKIE = hasDocumentCookie();
7810
+ }).catch(function () { });
7811
+ }
7812
+ Cookies.prototype._updateBrowserValues = function (parseOptions) {
7813
+ if (!this.HAS_DOCUMENT_COOKIE) {
7814
+ return;
7815
+ }
7816
+ this.cookies = parse_1(document.cookie, parseOptions);
7817
+ };
7818
+ Cookies.prototype._emitChange = function (params) {
7819
+ for (var i = 0; i < this.changeListeners.length; ++i) {
7820
+ this.changeListeners[i](params);
7821
+ }
7822
+ };
7823
+ Cookies.prototype.get = function (name, options, parseOptions) {
7824
+ if (options === void 0) { options = {}; }
7825
+ this._updateBrowserValues(parseOptions);
7826
+ return readCookie(this.cookies[name], options);
7827
+ };
7828
+ Cookies.prototype.getAll = function (options, parseOptions) {
7829
+ if (options === void 0) { options = {}; }
7830
+ this._updateBrowserValues(parseOptions);
7831
+ var result = {};
7832
+ for (var name_1 in this.cookies) {
7833
+ result[name_1] = readCookie(this.cookies[name_1], options);
7834
+ }
7835
+ return result;
7836
+ };
7837
+ Cookies.prototype.set = function (name, value, options) {
7838
+ var _a;
7839
+ if (typeof value === 'object') {
7840
+ value = JSON.stringify(value);
7841
+ }
7842
+ this.cookies = __assign$1(__assign$1({}, this.cookies), (_a = {}, _a[name] = value, _a));
7843
+ if (this.HAS_DOCUMENT_COOKIE) {
7844
+ document.cookie = serialize_1(name, value, options);
7845
+ }
7846
+ this._emitChange({ name: name, value: value, options: options });
7847
+ };
7848
+ Cookies.prototype.remove = function (name, options) {
7849
+ var finalOptions = (options = __assign$1(__assign$1({}, options), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 }));
7850
+ this.cookies = __assign$1({}, this.cookies);
7851
+ delete this.cookies[name];
7852
+ if (this.HAS_DOCUMENT_COOKIE) {
7853
+ document.cookie = serialize_1(name, '', finalOptions);
7854
+ }
7855
+ this._emitChange({ name: name, value: undefined, options: options });
7856
+ };
7857
+ Cookies.prototype.addChangeListener = function (callback) {
7858
+ this.changeListeners.push(callback);
7859
+ };
7860
+ Cookies.prototype.removeChangeListener = function (callback) {
7861
+ var idx = this.changeListeners.indexOf(callback);
7862
+ if (idx >= 0) {
7863
+ this.changeListeners.splice(idx, 1);
7864
+ }
7865
+ };
7866
+ return Cookies;
7867
7867
  }());
7868
7868
 
7869
- /*! *****************************************************************************
7870
- Copyright (c) Microsoft Corporation.
7871
-
7872
- Permission to use, copy, modify, and/or distribute this software for any
7873
- purpose with or without fee is hereby granted.
7874
-
7875
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7876
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7877
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7878
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7879
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7880
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7881
- PERFORMANCE OF THIS SOFTWARE.
7882
- ***************************************************************************** */
7883
-
7884
- var __assign = function() {
7885
- __assign = Object.assign || function __assign(t) {
7886
- for (var s, i = 1, n = arguments.length; i < n; i++) {
7887
- s = arguments[i];
7888
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7889
- }
7890
- return t;
7891
- };
7892
- return __assign.apply(this, arguments);
7893
- };
7894
-
7895
- function __rest(s, e) {
7896
- var t = {};
7897
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7898
- t[p] = s[p];
7899
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
7900
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7901
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7902
- t[p[i]] = s[p[i]];
7903
- }
7904
- return t;
7905
- }
7906
-
7907
- function __awaiter(thisArg, _arguments, P, generator) {
7908
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7909
- return new (P || (P = Promise))(function (resolve, reject) {
7910
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7911
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7912
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7913
- step((generator = generator.apply(thisArg, _arguments || [])).next());
7914
- });
7915
- }
7916
-
7917
- function __generator(thisArg, body) {
7918
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7919
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7920
- function verb(n) { return function (v) { return step([n, v]); }; }
7921
- function step(op) {
7922
- if (f) throw new TypeError("Generator is already executing.");
7923
- while (_) try {
7924
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
7925
- if (y = 0, t) op = [op[0] & 2, t.value];
7926
- switch (op[0]) {
7927
- case 0: case 1: t = op; break;
7928
- case 4: _.label++; return { value: op[1], done: false };
7929
- case 5: _.label++; y = op[1]; op = [0]; continue;
7930
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
7931
- default:
7932
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7933
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7934
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7935
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7936
- if (t[2]) _.ops.pop();
7937
- _.trys.pop(); continue;
7938
- }
7939
- op = body.call(thisArg, _);
7940
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7941
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7942
- }
7943
- }
7944
-
7945
- /** @deprecated */
7946
- function __spreadArrays() {
7947
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7948
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
7949
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7950
- r[k] = a[j];
7951
- return r;
7869
+ /*! *****************************************************************************
7870
+ Copyright (c) Microsoft Corporation.
7871
+
7872
+ Permission to use, copy, modify, and/or distribute this software for any
7873
+ purpose with or without fee is hereby granted.
7874
+
7875
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
7876
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
7877
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
7878
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
7879
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
7880
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
7881
+ PERFORMANCE OF THIS SOFTWARE.
7882
+ ***************************************************************************** */
7883
+
7884
+ var __assign = function() {
7885
+ __assign = Object.assign || function __assign(t) {
7886
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
7887
+ s = arguments[i];
7888
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
7889
+ }
7890
+ return t;
7891
+ };
7892
+ return __assign.apply(this, arguments);
7893
+ };
7894
+
7895
+ function __rest(s, e) {
7896
+ var t = {};
7897
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
7898
+ t[p] = s[p];
7899
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7900
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7901
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
7902
+ t[p[i]] = s[p[i]];
7903
+ }
7904
+ return t;
7905
+ }
7906
+
7907
+ function __awaiter(thisArg, _arguments, P, generator) {
7908
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
7909
+ return new (P || (P = Promise))(function (resolve, reject) {
7910
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7911
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7912
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7913
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
7914
+ });
7915
+ }
7916
+
7917
+ function __generator(thisArg, body) {
7918
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
7919
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
7920
+ function verb(n) { return function (v) { return step([n, v]); }; }
7921
+ function step(op) {
7922
+ if (f) throw new TypeError("Generator is already executing.");
7923
+ while (_) try {
7924
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
7925
+ if (y = 0, t) op = [op[0] & 2, t.value];
7926
+ switch (op[0]) {
7927
+ case 0: case 1: t = op; break;
7928
+ case 4: _.label++; return { value: op[1], done: false };
7929
+ case 5: _.label++; y = op[1]; op = [0]; continue;
7930
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
7931
+ default:
7932
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
7933
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
7934
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
7935
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
7936
+ if (t[2]) _.ops.pop();
7937
+ _.trys.pop(); continue;
7938
+ }
7939
+ op = body.call(thisArg, _);
7940
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
7941
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
7942
+ }
7943
+ }
7944
+
7945
+ /** @deprecated */
7946
+ function __spreadArrays() {
7947
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
7948
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
7949
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
7950
+ r[k] = a[j];
7951
+ return r;
7952
7952
  }
7953
7953
 
7954
7954
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.0.163",
3
+ "version": "1.0.164",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -4,6 +4,7 @@ export default {
4
4
  url: 'activities/list',
5
5
  method: 'get',
6
6
  params: { appSecret, include },
7
+ isPublic: true
7
8
  }),
8
9
  getActivityDetail: ({ activityNo, appSecret }) => ({
9
10
  url: 'activities',
@@ -7,6 +7,7 @@ export default function (request) {
7
7
  id: 'bank_binding',
8
8
  initial: 'fetching',
9
9
  context: {
10
+ hasAnyAccount: false,
10
11
  bankList: [],
11
12
  bank: null,
12
13
  branch: null,
@@ -80,8 +81,10 @@ export default function (request) {
80
81
  actions: {
81
82
  setBanks: assign((context, event) => {
82
83
  const { bankList = [], paymentInfo = {} } = event.data
84
+ const { bankInfo = [] } = paymentInfo
83
85
  return {
84
- holderName: paymentInfo.bankInfo[0]?.holderName,
86
+ hasAnyAccount: bankInfo.length > 0,
87
+ holderName: bankInfo[0]?.holderName,
85
88
  bankList,
86
89
  bank: bankList[0],
87
90
  }