@foxy.io/elements 1.24.0-beta.1 → 1.24.0-beta.2

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.
Files changed (221) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-api-browser.js +1 -1
  6. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  8. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  9. package/dist/cdn/foxy-attribute-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-form.js +1 -1
  11. package/dist/cdn/foxy-cancellation-form.js +1 -1
  12. package/dist/cdn/foxy-cart-card.js +1 -1
  13. package/dist/cdn/foxy-cart-form.js +1 -1
  14. package/dist/cdn/foxy-client-card.js +1 -1
  15. package/dist/cdn/foxy-client-form.js +1 -1
  16. package/dist/cdn/foxy-collection-page.js +1 -1
  17. package/dist/cdn/foxy-collection-pages.js +1 -1
  18. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  19. package/dist/cdn/foxy-coupon-card.js +1 -1
  20. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  21. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  22. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-form.js +1 -1
  24. package/dist/cdn/foxy-custom-field-card.js +1 -1
  25. package/dist/cdn/foxy-custom-field-form.js +1 -1
  26. package/dist/cdn/foxy-customer-api.js +1 -1
  27. package/dist/cdn/foxy-customer-card.js +1 -1
  28. package/dist/cdn/foxy-customer-form.js +1 -1
  29. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  30. package/dist/cdn/foxy-customer-portal.js +1 -1
  31. package/dist/cdn/foxy-customer.js +1 -1
  32. package/dist/cdn/foxy-customers-table.js +1 -1
  33. package/dist/cdn/foxy-discount-builder.js +1 -1
  34. package/dist/cdn/foxy-discount-card.js +1 -1
  35. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  36. package/dist/cdn/foxy-donation.js +1 -1
  37. package/dist/cdn/foxy-downloadable-card.js +1 -1
  38. package/dist/cdn/foxy-downloadable-form.js +1 -1
  39. package/dist/cdn/foxy-email-template-card.js +1 -1
  40. package/dist/cdn/foxy-email-template-form.js +1 -1
  41. package/dist/cdn/foxy-error-entry-card.js +1 -1
  42. package/dist/cdn/foxy-filter-attribute-card.js +1 -0
  43. package/dist/cdn/foxy-filter-attribute-form.js +1 -0
  44. package/dist/cdn/foxy-form-dialog.js +1 -1
  45. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  46. package/dist/cdn/foxy-gift-card-card.js +1 -1
  47. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  48. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  49. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-form.js +1 -1
  51. package/dist/cdn/foxy-i18n-editor.js +2 -2
  52. package/dist/cdn/foxy-i18n.js +1 -1
  53. package/dist/cdn/foxy-integration-card.js +1 -1
  54. package/dist/cdn/foxy-integration-form.js +1 -1
  55. package/dist/cdn/foxy-item-card.js +1 -1
  56. package/dist/cdn/foxy-item-category-card.js +1 -1
  57. package/dist/cdn/foxy-item-category-form.js +1 -1
  58. package/dist/cdn/foxy-item-form.js +1 -1
  59. package/dist/cdn/foxy-item-option-card.js +1 -1
  60. package/dist/cdn/foxy-item-option-form.js +1 -1
  61. package/dist/cdn/foxy-items-form.js +1 -1
  62. package/dist/cdn/foxy-nucleon-element.js +1 -1
  63. package/dist/cdn/foxy-pagination.js +1 -1
  64. package/dist/cdn/foxy-passkey-card.js +1 -1
  65. package/dist/cdn/foxy-passkey-form.js +1 -1
  66. package/dist/cdn/foxy-payment-card.js +1 -1
  67. package/dist/cdn/foxy-payment-method-card.js +1 -1
  68. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  69. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  70. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  71. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  72. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  73. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  74. package/dist/cdn/foxy-payments-api.js +1 -1
  75. package/dist/cdn/foxy-query-builder.js +1 -1
  76. package/dist/cdn/foxy-report-form.js +1 -1
  77. package/dist/cdn/foxy-reports-table.js +1 -1
  78. package/dist/cdn/foxy-shipment-card.js +1 -1
  79. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  80. package/dist/cdn/foxy-sign-in-form.js +1 -1
  81. package/dist/cdn/foxy-spinner.js +2 -2
  82. package/dist/cdn/foxy-store-card.js +1 -1
  83. package/dist/cdn/foxy-store-form.js +1 -1
  84. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  85. package/dist/cdn/foxy-subscription-card.js +1 -1
  86. package/dist/cdn/foxy-subscription-form.js +1 -1
  87. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  88. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  89. package/dist/cdn/foxy-table.js +1 -1
  90. package/dist/cdn/foxy-tax-card.js +1 -1
  91. package/dist/cdn/foxy-tax-form.js +1 -1
  92. package/dist/cdn/foxy-template-config-form.js +1 -1
  93. package/dist/cdn/foxy-template-form.js +1 -1
  94. package/dist/cdn/foxy-template-set-card.js +1 -1
  95. package/dist/cdn/foxy-template-set-form.js +1 -1
  96. package/dist/cdn/foxy-transaction-card.js +1 -1
  97. package/dist/cdn/foxy-transaction.js +1 -1
  98. package/dist/cdn/foxy-transactions-table.js +1 -1
  99. package/dist/cdn/foxy-user-card.js +1 -1
  100. package/dist/cdn/foxy-user-form.js +1 -1
  101. package/dist/cdn/foxy-users-table.js +1 -1
  102. package/dist/cdn/foxy-webhook-card.js +1 -1
  103. package/dist/cdn/foxy-webhook-form.js +1 -1
  104. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  105. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  106. package/dist/cdn/{shared-95f9f57d.js → shared-09d4fbb8.js} +1 -1
  107. package/dist/cdn/{shared-2b1da608.js → shared-0a248c0d.js} +1 -1
  108. package/dist/cdn/{shared-1add7ad8.js → shared-17d0db7f.js} +1 -1
  109. package/dist/cdn/{shared-f4561476.js → shared-1b060170.js} +1 -1
  110. package/dist/cdn/shared-1d08a5ad.js +1 -0
  111. package/dist/cdn/{shared-8a671339.js → shared-1d28220a.js} +1 -1
  112. package/dist/cdn/{shared-daf52401.js → shared-1eac92fa.js} +1 -1
  113. package/dist/cdn/{shared-4f999ef4.js → shared-25f64060.js} +1 -1
  114. package/dist/cdn/{shared-98755831.js → shared-307262a1.js} +1 -1
  115. package/dist/cdn/{shared-88455d27.js → shared-31651a9c.js} +1 -1
  116. package/dist/cdn/{shared-a89cb472.js → shared-332f2997.js} +1 -1
  117. package/dist/cdn/{shared-5e5784f4.js → shared-36725fe3.js} +1 -1
  118. package/dist/cdn/{shared-427496b1.js → shared-379b37e6.js} +1 -1
  119. package/dist/cdn/{shared-b5517c1b.js → shared-39f3b48d.js} +1 -1
  120. package/dist/cdn/{shared-1e866f0d.js → shared-432c5183.js} +1 -1
  121. package/dist/cdn/{shared-6f373aa7.js → shared-4674063d.js} +1 -1
  122. package/dist/cdn/{shared-4c7106a1.js → shared-479ad951.js} +1 -1
  123. package/dist/cdn/{shared-f7fc8f00.js → shared-4904bca4.js} +1 -1
  124. package/dist/cdn/{shared-a8cf402a.js → shared-4b67d699.js} +1 -1
  125. package/dist/cdn/{shared-919a9e3e.js → shared-4bbd600d.js} +1 -1
  126. package/dist/cdn/{shared-4b9546a9.js → shared-4c956a8e.js} +1 -1
  127. package/dist/cdn/{shared-ffb7548e.js → shared-4dc58b73.js} +1 -1
  128. package/dist/cdn/{shared-7a5338f3.js → shared-4dee79d4.js} +1 -1
  129. package/dist/cdn/{shared-f7469049.js → shared-51d28e6d.js} +1 -1
  130. package/dist/cdn/shared-53061389.js +1 -0
  131. package/dist/cdn/{shared-47915d1c.js → shared-59042137.js} +1 -1
  132. package/dist/cdn/{shared-7996b565.js → shared-64f98a0f.js} +1 -1
  133. package/dist/cdn/{shared-15517503.js → shared-65318cc1.js} +1 -1
  134. package/dist/cdn/shared-65ba8b39.js +1 -0
  135. package/dist/cdn/{shared-4b870dd4.js → shared-665d6cc4.js} +1 -1
  136. package/dist/cdn/{shared-5816e5e2.js → shared-69a21b9d.js} +1 -1
  137. package/dist/cdn/{shared-14ca3629.js → shared-6abdfcf2.js} +1 -1
  138. package/dist/cdn/{shared-d09de321.js → shared-6dc64a17.js} +1 -1
  139. package/dist/cdn/shared-6f84ac3e.js +1 -0
  140. package/dist/cdn/{shared-5db24486.js → shared-77a4d8e8.js} +1 -1
  141. package/dist/cdn/{shared-58c3cfdd.js → shared-7995407d.js} +1 -1
  142. package/dist/cdn/shared-7f5618ba.js +1 -0
  143. package/dist/cdn/{shared-52d27d8c.js → shared-8474bc4a.js} +1 -1
  144. package/dist/cdn/{shared-8e83d3b5.js → shared-88e36564.js} +1 -1
  145. package/dist/cdn/{shared-ca5e1c6b.js → shared-92f27a38.js} +1 -1
  146. package/dist/cdn/{shared-964cc4a1.js → shared-984fcdf5.js} +3 -3
  147. package/dist/cdn/{shared-b7d2ce09.js → shared-9c626d58.js} +1 -1
  148. package/dist/cdn/{shared-1fe6fb5d.js → shared-9caffb4d.js} +1 -1
  149. package/dist/cdn/{shared-4fd4a4d5.js → shared-a3c73e91.js} +1 -1
  150. package/dist/cdn/{shared-049782e9.js → shared-a92ae606.js} +1 -1
  151. package/dist/cdn/{shared-fae8bf5d.js → shared-b0f534ef.js} +1 -1
  152. package/dist/cdn/{shared-2084b156.js → shared-b3ac59eb.js} +1 -1
  153. package/dist/cdn/{shared-8ed26326.js → shared-b48a83b0.js} +1 -1
  154. package/dist/cdn/{shared-4e03da46.js → shared-ba658670.js} +1 -1
  155. package/dist/cdn/{shared-67fe293e.js → shared-bafcab47.js} +1 -1
  156. package/dist/cdn/{shared-0b5d50ce.js → shared-bdb51db9.js} +1 -1
  157. package/dist/cdn/{shared-a6a5bf97.js → shared-be24dd36.js} +1 -1
  158. package/dist/cdn/shared-bf62a65b.js +1 -0
  159. package/dist/cdn/{shared-eb900735.js → shared-c2d3b32b.js} +1 -1
  160. package/dist/cdn/{shared-689612d6.js → shared-c4240bc6.js} +1 -1
  161. package/dist/cdn/{shared-63bee480.js → shared-c6c6ba69.js} +1 -1
  162. package/dist/cdn/{shared-de790de9.js → shared-c7f2f1ab.js} +1 -1
  163. package/dist/cdn/{shared-ae0df6b9.js → shared-c97e0d6e.js} +1 -1
  164. package/dist/cdn/{shared-bd819b5b.js → shared-cf269a17.js} +1 -1
  165. package/dist/cdn/{shared-5cd8b9a2.js → shared-d14c2060.js} +4 -4
  166. package/dist/cdn/{shared-538d1b55.js → shared-db21f6db.js} +1 -1
  167. package/dist/cdn/{shared-eac3b80a.js → shared-dccf0420.js} +1 -1
  168. package/dist/cdn/{shared-99440d56.js → shared-dfe2602a.js} +1 -1
  169. package/dist/cdn/{shared-d8052238.js → shared-e10052d0.js} +1 -1
  170. package/dist/cdn/{shared-e62effb6.js → shared-e6828dbf.js} +1 -1
  171. package/dist/cdn/{shared-3b92a24f.js → shared-e6997950.js} +1 -1
  172. package/dist/cdn/{shared-58197bb8.js → shared-e7c3b7b6.js} +1 -1
  173. package/dist/cdn/{shared-432ae505.js → shared-e84fa0ea.js} +1 -1
  174. package/dist/cdn/{shared-7f9147ce.js → shared-e8e92fe3.js} +1 -1
  175. package/dist/cdn/shared-fe54babe.js +1 -0
  176. package/dist/cdn/{shared-cf05ab20.js → shared-fef9ecc1.js} +1 -1
  177. package/dist/cdn/{shared-7a386999.js → shared-ff992ead.js} +1 -1
  178. package/dist/cdn/translations/filter-attribute-card/en.json +8 -0
  179. package/dist/cdn/translations/filter-attribute-form/en.json +49 -0
  180. package/dist/cdn/translations/transaction-card/en.json +8 -0
  181. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.d.ts +31 -0
  182. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +113 -0
  183. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -0
  184. package/dist/elements/public/FilterAttributeCard/index.d.ts +4 -0
  185. package/dist/elements/public/FilterAttributeCard/index.js +6 -0
  186. package/dist/elements/public/FilterAttributeCard/index.js.map +1 -0
  187. package/dist/elements/public/FilterAttributeCard/types.d.ts +3 -0
  188. package/dist/elements/public/FilterAttributeCard/types.js +2 -0
  189. package/dist/elements/public/FilterAttributeCard/types.js.map +1 -0
  190. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.d.ts +46 -0
  191. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js +131 -0
  192. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js.map +1 -0
  193. package/dist/elements/public/FilterAttributeForm/index.d.ts +6 -0
  194. package/dist/elements/public/FilterAttributeForm/index.js +8 -0
  195. package/dist/elements/public/FilterAttributeForm/index.js.map +1 -0
  196. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/InternalFilterAttributeFormActionControl.d.ts +5 -0
  197. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/InternalFilterAttributeFormActionControl.js +34 -0
  198. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/InternalFilterAttributeFormActionControl.js.map +1 -0
  199. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/index.d.ts +5 -0
  200. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/index.js +7 -0
  201. package/dist/elements/public/FilterAttributeForm/internal/InternalFilterAttributeFormActionControl/index.js.map +1 -0
  202. package/dist/elements/public/FilterAttributeForm/types.d.ts +14 -0
  203. package/dist/elements/public/FilterAttributeForm/types.js +2 -0
  204. package/dist/elements/public/FilterAttributeForm/types.js.map +1 -0
  205. package/dist/elements/public/TransactionCard/TransactionCard.js +26 -4
  206. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  207. package/dist/elements/public/TransactionCard/types.d.ts +4 -1
  208. package/dist/elements/public/TransactionCard/types.js.map +1 -1
  209. package/dist/elements/public/index.d.ts +2 -0
  210. package/dist/elements/public/index.defined.d.ts +2 -0
  211. package/dist/elements/public/index.defined.js +2 -0
  212. package/dist/elements/public/index.defined.js.map +1 -1
  213. package/dist/elements/public/index.js +2 -0
  214. package/dist/elements/public/index.js.map +1 -1
  215. package/package.json +3 -2
  216. package/dist/cdn/shared-12931460.js +0 -1
  217. package/dist/cdn/shared-509a2f52.js +0 -1
  218. package/dist/cdn/shared-bfdbd733.js +0 -1
  219. package/dist/cdn/shared-c7f56c90.js +0 -1
  220. package/dist/cdn/shared-e41e53c0.js +0 -1
  221. package/dist/cdn/shared-ff45081a.js +0 -1
@@ -12,4 +12,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var E=function(){return E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},E.apply(this,arguments)};function k(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function A(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(P(arguments[e]));return t}var R={};function D(t){return Object.keys(t)}function N(t,e,n){void 0===n&&(n=".");var r=C(t,n),i=C(e,n);return Z(i)?!!Z(r)&&i===r:Z(r)?r in i:D(r).every((function(t){return t in i&&N(r[t],i[t])}))}function I(t){try{return Z(t)||"number"==typeof t?""+t:t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function L(t,e){try{return K(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function C(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:K(t)?F(t):"string"!=typeof t?t:F(L(t,e));var n}function F(t){if(1===t.length)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function U(t,e){for(var n={},r=D(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function M(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var $=function(t){return function(e){var n,r,i=e;try{for(var o=A(t),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function B(t){return t?Z(t)?[[t]]:z(D(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?B(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function z(t){var e;return(e=[]).concat.apply(e,T(t))}function V(t){return K(t)?t:[t]}function W(t){return void 0===t?[]:V(t)}function q(t,e,n){var r,i;if(Q(t))return t(e,n.data);var o={};try{for(var a=A(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];Q(u)?o[c]=u(e,n.data):o[c]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function H(t){return t instanceof Promise||!(null===t||!Q(t)&&"object"!=typeof t||!Q(t.then))}function G(t,e){var n,r,i=P([[],[]],2),o=i[0],a=i[1];try{for(var s=A(t),c=s.next();!c.done;c=s.next()){var u=c.value;e(u)?o.push(u):a.push(u)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}function J(t,e){return U(t.states,(function(t,n){if(t){var r=(Z(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:J(t,r)}}}))}function K(t){return Array.isArray(t)}function Q(t){return"function"==typeof t}function Z(t){return"string"==typeof t}function X(t,e){if(t)return Z(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:Q(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function Y(t){try{return"subscribe"in t&&Q(t.subscribe)}catch(t){return!1}}var tt,et,nt=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function rt(t){try{return"__xstatenode"in t}catch(t){return!1}}function it(t){return!!t&&"function"==typeof t.send}function ot(t,e){return Z(t)||"number"==typeof t?E({type:t},e):t}function at(t,e){if(!Z(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=ot(t);return E({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function st(t,e){return V(e).map((function(e){return void 0===e||"string"==typeof e||rt(e)?{target:e,event:t}:E(E({},e),{event:t})}))}function ct(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function ut(t){return"string"==typeof t?{type:t}:t}function lt(t,e,n){if("object"==typeof t)return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}!function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"}(tt||(tt={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(et||(et={}));var ft=tt.Start,ht=tt.Stop,pt=tt.Raise,dt=tt.Send,yt=tt.Cancel,vt=tt.NullEvent,gt=tt.Assign;tt.After,tt.DoneState;var bt=tt.Log,_t=tt.Init,mt=tt.Invoke;tt.ErrorExecution;var wt=tt.ErrorPlatform,jt=tt.ErrorCustom,xt=tt.Update,Ot=tt.Choose,St=tt.Pure,Et=at({type:_t});function kt(t,e){return e&&e[t]||void 0}function At(t,e){var n;if(Z(t)||"number"==typeof t){var r=kt(t,e);n=Q(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(Q(t))n={type:t.name||t.toString(),exec:t};else{if(Q(r=kt(t.type,e)))n=E(E({},t),{exec:r});else if(r){var i=r.type||t.type;n=E(E(E({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var Pt=function(t,e){return t?(K(t)?t:[t]).map((function(t){return At(t,e)})):[]};function Tt(t){var e=At(t);return E(E({id:Z(t)?t:e.id},e),{type:e.type})}function Rt(t){return Z(t)?{type:pt,event:t}:Dt(t,{to:et.Internal})}function Dt(t,e){return{to:e?e.to:void 0,type:dt,event:Q(t)?t:ot(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:Q(t)?t.name:I(t)}}function Nt(t,e){return Dt(t,E(E({},e),{to:et.Parent}))}function It(){return Nt(xt)}function Lt(t,e){return Dt(t,E(E({},e),{to:function(t,e,n){return n._event.origin}}))}var Ct=function(t,e){return{context:t,event:e}};function Ft(t,e){return void 0===t&&(t=Ct),{type:bt,label:e,expr:t}}var Ut=function(t){return{type:yt,sendId:t}};function Mt(t){var e=Tt(t);return{type:tt.Start,activity:e,exec:void 0}}function $t(t){var e=Q(t)?t:Tt(t);return{type:tt.Stop,activity:e,exec:void 0}}var Bt=function(t){return{type:gt,assignment:t}};function zt(t,e){var n=e?"#"+e:"";return tt.After+"("+t+")"+n}function Vt(t,e){var n=tt.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Wt(t,e){var n=tt.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function qt(t,e){var n=tt.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Ht(t){return{type:tt.Pure,get:t}}function Gt(t,e){return Dt((function(t,e){return e}),E(E({},e),{to:t}))}function Jt(t,e){return Nt((function(e,n,r){return{type:jt,data:Q(t)?t(e,n,r):t}}),E(E({},e),{to:et.Parent}))}function Kt(t){return{type:tt.Choose,conds:t}}function Qt(t,e,n,r,i){var o=P(G(i,(function(t){return t.type===gt})),2),a=o[0],s=o[1],c=a.length?function(t,e,n,r){return t?n.reduce((function(t,n){var i,o,a=n.assignment,s={state:r,action:n,_event:e},c={};if(Q(a))c=a(t,e.data,s);else try{for(var u=A(D(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=Q(h)?h(t,e.data,s):h}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Object.assign({},t,c)}),t):t}(n,r,a,e):n,u=z(s.map((function(n){var i;switch(n.type){case pt:return{type:pt,_event:at(n.event)};case dt:var o=function(t,e,n,r){var i,o={_event:n},a=at(Q(t.event)?t.event(e,n.data,o):t.event);if(Z(t.delay)){var s=r&&r[t.delay];i=Q(s)?s(e,n.data,o):s}else i=Q(t.delay)?t.delay(e,n.data,o):t.delay;var c=Q(t.to)?t.to(e,n.data,o):t.to;return E(E({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case bt:return function(t,e,n){return E(E({},t),{value:Z(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case Ot:if(!(s=null===(i=n.conds.find((function(n){var i=X(n.cond,t.options.guards);return!i||ct(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case St:var s;if(!(s=n.get(c,r.data)))return[];a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case ht:return function(t,e,n){var r=Q(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:tt.Stop,activity:i}}(n,c,r);default:return At(n,t.options.actions)}})));return[u,c]}var Zt=function(t){return"atomic"===t.type||"final"===t.type};function Xt(t){return D(t.states).map((function(e){return t.states[e]}))}function Yt(t){var e=[t];return Zt(t)?e:e.concat(z(Xt(t).map(Yt)))}function te(t,e){var n,r,i,o,a,s,c,u,l=ne(new Set(t)),f=new Set(e);try{for(var h=A(f),p=h.next();!p.done;p=h.next())for(var d=(x=p.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var y=ne(f);try{for(var v=A(f),g=v.next();!g.done;g=v.next()){if("compound"!==(x=g.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,A(Xt(x))),_=b.next();!_.done;_=b.next()){var m=_.value;"history"!==m.type&&(f.has(m)||(f.add(m),l.get(m)?l.get(m).forEach((function(t){return f.add(t)})):m.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var w=A(f),j=w.next();!j.done;j=w.next()){var x;for(d=(x=j.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}}catch(t){c={error:t}}finally{try{j&&!j.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return f}function ee(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(Zt(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=ee(t,e)})),i}function ne(t){var e,n,r=new Map;try{for(var i=A(t),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function re(t,e){return ee(t,ne(te([t],e)))}function ie(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function oe(t,e){return"compound"===e.type?Xt(e).some((function(e){return"final"===e.type&&ie(t,e)})):"parallel"===e.type&&Xt(e).every((function(e){return oe(t,e)}))}function ae(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(Z(t)||Z(e))return t===e;var n=D(t),r=D(e);return n.length===r.length&&n.every((function(n){return ae(t[n],e[n])}))}function se(t){return!Z(t)&&("value"in t&&"history"in t)}function ce(t,e){var n=t.exec;return E(E({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var ue=function(){function t(t){var e=this;this.actions=[],this.activities=R,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||R,this.meta=t.meta||{},this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,Object.defineProperty(this,"nextEvents",{get:function(){return t=e.configuration,z(T(new Set(t.map((function(t){return t.ownEvents})))));var t}})}return t.from=function(e,n){return e instanceof t?e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e:new t({value:e,context:n,_event:Et,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Et;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(t,e){var n=this;if(void 0===t&&(t=this.value),void 0===e&&(e="."),Z(t))return[t];var r=D(t);return r.concat.apply(r,T(r.map((function(r){return n.toStrings(t[r],e).map((function(t){return r+e+t}))}))))},t.prototype.toJSON=function(){var t=this;return t.configuration,t.transitions,k(t,["configuration","transitions"])},t.prototype.matches=function(t){return N(t,this.value)},t}(),le=function(t,e){return e(t)};function fe(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function he(t,e,n,r){var i,o=ut(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?q(t.data,n,r):void 0,c=a?function(t,e,n){var r=fe(e);r.deferred=!0,rt(t)&&(r.state=le(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):fe(t.id);return c.meta=t,c}function pe(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function de(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function ye(t){return E(E({type:mt},t),{toJSON:function(){t.onDone,t.onError;var e=k(t,["onDone","onError"]);return E(E({},e),{type:mt,src:de(t.src)})}})}var ve={},ge=function(t){return"#"===t[0]},be=function(){function t(e,n,r){var i=this;this.config=e,this.context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||T([this.machine.key],this.path).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&D(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?U(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,E(((r={})[o.id]=o,r),o.idMap)),o})):ve;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=A(Xt(e)),a=i.next();!a.done;a=i.next()){t(a.value)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=W(this.config.entry||this.config.onEntry).map((function(t){return At(t)})),this.onExit=W(this.config.exit||this.config.onExit).map((function(t){return At(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=W(this.config.invoke).map((function(t,e){var n,r;if(rt(t))return i.machine.options.services=E(((n={})[t.id]=t,n),i.machine.options.services),ye({src:t.id,id:t.id});if(Z(t.src))return ye(E(E({},t),{id:t.id||t.src,src:t.src}));if(rt(t.src)||Q(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=E(((r={})[o]=t.src,r),i.machine.options.services),ye(E(E({id:o},t),{src:o}))}var a=t.src;return ye(E(E({id:a.type},t),{src:a}))})),this.activities=W(this.config.activities).concat(this.invoke).map((function(t){return Tt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||Yt(this).forEach((function(t){return t.on}))},t.prototype.withConfig=function(e,n){void 0===n&&(n=this.context);var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,c=r.delays;return new t(this.config,{actions:E(E({},i),e.actions),activities:E(E({},o),e.activities),guards:E(E({},a),e.guards),services:E(E({},s),e.services),delays:E(E({},c),e.delays)},n)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:U(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=zt(Q(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(Dt(r,{delay:e})),t.onExit.push(Ut(r)),r};return(K(e)?e.map((function(t,e){var r=n(t.delay,e);return E(E({},t),{event:r})})):z(D(e).map((function(t,r){var i=e[t],o=Z(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return W(o).map((function(t){return E(E({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return E(E({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof ue?t.value:C(t,this.delimiter);if(Z(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=D(r);return o.map((function(t){return n.getStateNode(t)})).concat(o.reduce((function(t,e){var i=n.getStateNode(e).getStateNodes(r[e]);return t.concat(i)}),[]))},t.prototype.handles=function(t){var e=I(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(te([],this.getStateNodes(t.value)));return new ue(E(E({},t),{value:this.resolve(t.value),configuration:e,done:oe(e,this)}))},t.prototype.transitionLeafNode=function(t,e,n){var r=this.getStateNode(t).next(e,n);return r&&r.transitions.length?r:this.next(e,n)},t.prototype.transitionCompoundNode=function(t,e,n){var r=D(t),i=this.getStateNode(r[0])._transition(t[r[0]],e,n);return i&&i.transitions.length?i:this.next(e,n)},t.prototype.transitionParallelNode=function(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=D(o).map((function(t){return o[t]})),h=z(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=z(f.map((function(t){return t.entrySet}))),d=z(D(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:z(f.map((function(t){return t.exitSet}))),configuration:d,source:e,actions:z(D(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return Z(t)?this.transitionLeafNode(t,e,n):1===D(t).length?this.transitionCompoundNode(t,e,n):this.transitionParallelNode(t,e,n)},t.prototype.next=function(t,e){var n,r,i,o=this,a=e.name,s=[],c=[];try{for(var u=A(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,d=t.context,y=!p||(Z(p)&&ge(p)?t.matches(C(this.getStateNodeById(p).path,this.delimiter)):N(C(p,this.delimiter),$(this.path.slice(0,-2))(t.value))),v=!1;try{v=!h||ct(this.machine,h,d,e,t)}catch(t){throw new Error("Unable to evaluate guard '"+(h.name||h.type)+"' in transition for event '"+a+"' in state node '"+this.id+"':\n"+t.message)}if(v&&y){void 0!==f.target&&(c=f.target),s.push.apply(s,T(f.actions)),i=f;break}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!c.length)return{transitions:[i],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var g=z(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),b=!!i.internal;return{transitions:[i],entrySet:b?[]:z(g.map((function(t){return o.nodesFromChild(t)}))),exitSet:b?[]:[this],configuration:g,source:t,actions:s}}},t.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var e=[],n=t;n&&n!==this;)e.push(n),n=n.parent;return e.push(this),e},t.prototype.escapes=function(t){if(this===t)return!1;for(var e=this.parent;e;){if(e===t)return!1;e=e.parent}return!0},t.prototype.getActions=function(t,e,n,r){var i,o,a,s,c=te([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?te(c,t.configuration):c;try{for(var l=A(u),f=l.next();!f.done;f=l.next()){ie(c,d=f.value)||t.entrySet.push(d)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}try{for(var h=A(c),p=h.next();!p.done;p=h.next()){var d;ie(u,d=p.value)&&!ie(t.exitSet,d.parent)||t.exitSet.push(d)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var y=z(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Vt(r.id,r.doneData),Vt(o.id,r.doneData?q(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&Xt(a).every((function(e){return oe(t.configuration,e)}))&&i.push(Vt(a.id)),i})));t.exitSet.sort((function(t,e){return e.order-t.order})),t.entrySet.sort((function(t,e){return t.order-e.order}));var v=new Set(t.entrySet),g=new Set(t.exitSet),b=P([z(Array.from(v).map((function(t){return T(t.activities.map((function(t){return Mt(t)})),t.onEntry)}))).concat(y.map(Rt)),z(Array.from(g).map((function(t){return T(t.onExit,t.activities.map((function(t){return $t(t)})))})))],2),_=b[0],m=b[1];return Pt(m.concat(t.actions).concat(_),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=at(e);if(t instanceof ue)r=void 0===n?t:this.resolveState(ue.from(t,n));else{var a=Z(t)?this.resolve(F(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(ue.from(a,s))}if(this.strict&&!this.events.includes(o.name)&&(i=o.name,!/^(done|error)\./.test(i)))throw new Error("Machine '"+this.id+"' does not accept event '"+o.name+"'");var c=this._transition(r.value,r,o)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=te([],this.getStateNodes(r.value)),l=c.configuration.length?te(u,c.configuration):u;return c.configuration=T(l),this.resolveTransition(c,r,o)},t.prototype.resolveRaisedTransition=function(t,e,n){var r,i=t.actions;return(t=this.transition(t,e))._event=n,t.event=n.data,(r=t.actions).unshift.apply(r,T(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=Et),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?re(this.machine,s):void 0,u=e?e.historyValue?e.historyValue:t.source?this.machine.historyValue(e.value):void 0:void 0,l=e?e.context:r,f=this.getActions(t,l,n,e),h=e?E({},e.activities):{};try{for(var p=A(f),d=p.next();!d.done;d=p.next()){var y=d.value;y.type===ft?h[y.activity.id||y.activity.type]=y:y.type===ht&&(h[y.activity.id||y.activity.type]=!1)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}var v,g,b=P(Qt(this,e,l,n,f),2),_=b[0],m=b[1],w=P(G(_,(function(t){return t.type===pt||t.type===dt&&t.to===et.Internal})),2),j=w[0],x=w[1],O=_.filter((function(t){var e;return t.type===ft&&(null===(e=t.activity)||void 0===e?void 0:e.type)===mt})),S=O.reduce((function(t,e){return t[e.activity.id]=he(e.activity,a.machine,m,n),t}),e?E({},e.children):{}),k=c?t.configuration:e?e.configuration:[],T=k.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),R=oe(k,this),D=new ue({value:c||e.value,context:m,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(v=u,g=c,{current:g,states:J(v,g)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?x:[],activities:c?h:e?e.activities:{},meta:c?T:e?e.meta:void 0,events:[],configuration:k,transitions:t.transitions,children:S,done:R}),N=l!==m;D.changed=n.name===xt||N;var I=D.history;if(I&&delete I.history,!c)return D;var L=D;if(!R)for((this._transient||s.some((function(t){return t._transient})))&&(L=this.resolveRaisedTransition(L,{type:vt},n));j.length;){var C=j.shift();L=this.resolveRaisedTransition(L,C._event,n)}var F=L.changed||(I?!!L.actions.length||N||typeof I.value!=typeof L.value||!ae(L.value,I.value):void 0);return L.changed=F,L.history=I,L},t.prototype.getStateNode=function(t){if(ge(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '"+t+"' from '"+this.id+"'; no child states exist.");var e=this.states[t];if(!e)throw new Error("Child state '"+t+"' does not exist on '"+this.id+"'");return e},t.prototype.getStateNodeById=function(t){var e=ge(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&ge(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=L(t,this.delimiter).slice(),n=this;e.length;){var r=e.shift();if(!r.length)break;n=n.getStateNode(r)}return n},t.prototype.resolve=function(t){var e,n=this;if(!t)return this.initialStateValue||ve;switch(this.type){case"parallel":return U(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ve}));case"compound":if(Z(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return D(t).length?U(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ve})):this.initialStateValue||{};default:return t||ve}},t.prototype.getResolvedPath=function(t){if(ge(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return L(t,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t,e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)e=M(this.states,(function(t){return t.initialStateValue||ve}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '"+this.initial+"' not found on '"+this.key+"'");e=Zt(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}return this.__cache.initialStateValue=e,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(t,e){var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,e)},Object.defineProperty(t.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '"+this.id+"'.");return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var t;if("history"===this.type){var e=this.config;t=Z(e.target)&&ge(e.target)?F(this.machine.getStateNodeById(e.target).path.slice(this.path.length-1)):e.target}return t},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(t,e,n){return void 0===n&&(n=!0),n?"history"===t.type?t.resolveHistory(e):t.initialStateNodes:[t]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;return Zt(this)?[this]:"compound"!==this.type||this.initial?z(B(this.initialStateValue).map((function(e){return t.getFromRelativePath(e)}))):[this]},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var e=P(t),n=e[0],r=e.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '"+n+"' from node with no states");var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '"+n+"' does not exist on '"+this.id+"'");return this.states[n].getFromRelativePath(r)},t.prototype.historyValue=function(t){if(D(this.states).length)return{current:t||this.initialStateValue,states:M(this.states,(function(e,n){if(!t)return e.historyValue();var r=Z(t)?void 0:t[n];return e.historyValue(r||e.initialStateValue)}),(function(t){return!t.history}))}},t.prototype.resolveHistory=function(t){var e=this;if("history"!==this.type)return[this];var n=this.parent;if(!t){var r=this.target;return r?z(B(r).map((function(t){return n.getFromRelativePath(t)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(t){var e,n,r=t;try{for(var a=A(i),s=a.next();!s.done;s=a.next()){var c=s.value;r=r[o][c]}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return r})(t).current;return Z(a)?[n.getStateNode(a)]:z(B(a).map((function(t){return"deep"===e.history?n.getFromRelativePath(t):[n.states[t[0]]]})))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this,e=z(D(this.states).map((function(e){return t.states[e].stateIds})));return[this.id].concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var t,e,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=A(D(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,A(c.events)),l=u.next();!l.done;l=u.next()){var f=l.value;o.add(""+f)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(t){var e=this;if(void 0!==t)return t.map((function(t){if(!Z(t))return t;var n=t[0]===e.delimiter;if(n&&!e.parent)return e.getStateNodeByPath(t.slice(1));var r=n?e.key+t:t;if(!e.parent)return e.getStateNodeByPath(r);try{return e.parent.getStateNodeByPath(r)}catch(t){throw new Error("Invalid transition definition for state node '"+e.id+"':\n"+t.message)}}))},t.prototype.formatTransition=function(t){var e=this,n=function(t){if(void 0!==t&&""!==t)return W(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return Z(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=E(E({},t),{actions:Pt(W(t.actions)),cond:X(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return E(E({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=k(i,["*"]);n=z(D(c).map((function(t){var e=st(t,c[t]);return e})).concat(st("*",s)))}else n=[];var u=this.config.always?st("",this.config.always):[],l=this.config.onDone?st(String(Vt(this.id)),this.config.onDone):[];var f=z(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,T(st(String(Wt(t.id)),t.onDone))),t.onError&&e.push.apply(e,T(st(String(qt(t.id)),t.onError))),e}))),h=this.after,p=z(T(l,f,n,u).map((function(t){return W(t).map((function(t){return r.formatTransition(t)}))})));try{for(var d=A(h),y=d.next();!y.done;y=d.next()){var v=y.value;p.push(v)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}return p},t}();function _e(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new be(t,e,r)}function me(t,e){var n="function"==typeof t.context?t.context():t.context;return new be(t,e,n)}const we=Bt({failure:null}),je=Bt({errors:[]}),xe=Bt({edits:null}),Oe=Bt({data:null}),Se=je,Ee=Bt({failure:(t,e)=>e.data}),ke=Bt({errors:(t,e)=>e.data}),Ae=Bt({data:(t,e)=>e.data}),Pe=Bt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const Te=me({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{target:"#nucleon.busy.deleting"},FETCH:{actions:["clearData","clearEdits","clearErrors"],target:"#nucleon.busy.fetching"},REFRESH:{target:"#nucleon.busy.fetching"},SET_DATA:{actions:["setData","clearEdits","clearErrors"],target:"#nucleon.init"}},states:{busy:{states:{creating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPost"}},deleting:{invoke:{onDone:{actions:["clearData","clearEdits","validate"],target:"#nucleon.idle.template"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendDelete"}},fetching:{invoke:{onDone:{actions:["setData","clearErrors","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendGet"}},updating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPatch"}}}},fail:{exit:"clearFailure"},idle:{initial:"unknown",on:{EDIT:{actions:["applyEdit","validate"],target:".unknown"}},states:{snapshot:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.snapshot.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.updating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},template:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.template.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.creating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},unknown:{always:[{cond:"hasData",target:"snapshot"},{target:"template"}]}}},init:{always:[{cond:"hasData",target:"idle.snapshot"},{target:"idle.template"}]}}},{actions:Object.freeze({__proto__:null,clearFailure:we,clearErrors:je,clearEdits:xe,clearData:Oe,validate:Se,setFailure:Ee,setErrors:ke,setData:Ae,applyEdit:Pe}),guards:Object.freeze({__proto__:null,hasData:t=>null!==t.data,hasEdits:t=>null!==t.edits,hasErrors:t=>t.errors.length>0,isV8nErrorEvent:(t,e)=>Array.isArray(e.data)})});class Re{constructor(t){this.__tree=Re.__parse(t)}static get True(){return Ne}static get False(){return De}static fromAttribute(t,e){return null===t?Re.False:""===t||t===e?Re.True:new Re(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const e=new Re("");return e.__tree=t.split(":").reduce(((t,e)=>{let n;if("include"in t){if(n=t.include[e],void 0===n)return{include:{}};if(!0===n)return{exclude:{"*":!0}}}else{if(n=t.exclude[e],void 0===n)return{exclude:{"*":!0}};if(!0===n)return{include:{}}}return n}),this.__tree),e}toString(){return Re.__stringifyTree(this.__tree)}toAttribute(t=""){const e=this.toString();return"not=*"===e?t:0===e.length?null:e}static __parsePath(t,e){const n=t.indexOf(":"),r=t.substring(0,n),i=t.substring(n+1);if("exclude"in e){const t=e.exclude[r];t&&(e.exclude[r]=this.__parseListItem(i,!0===t?void 0:t))}else{const t=e.include[r];!0!==t&&(e.include[r]=this.__parseListItem(i,t))}return e}static __parseSet(t,e){const n=t.split(",");if("include"in e){e={exclude:e.include};for(const t in e.exclude)n.includes(t)||delete e.exclude[t];for(const t of n)t in e.exclude?delete e.exclude[t]:e.exclude[t]=!0}else for(const t in e.exclude)n.includes(t)||delete e.exclude[t];return e}static __parseListItem(t,e={include:{}}){if(t.includes(":"))return this.__parsePath(t,e);if(t.startsWith("not="))return this.__parseSet(t.substring(4),e);if("include"in e)e.include[t]=!0;else for(const n in e.exclude)n===t&&delete e.exclude[n];return e}static __parseList(t,e={include:{}}){return t.split(" ").reduce(((t,e)=>this.__parseListItem(e,t)),e)}static __lintList(t){var e;let n="list",r="";for(let i=0;i<t.length;++i){const o=t.charAt(i);try{if("list"===n){if(/^\s$/.test(o)){/^\s$/.test(null!==(e=t[i-1])&&void 0!==e?e:" ")||(r+=" ");continue}if(/^[a-z]$/.test(o)){r+=o,n="path";continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("path"===n){if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(":"===o){if(":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if("="===o){if("="===t[i-1]||":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);if(!r.endsWith("not")||3!==r.length&&/[a-z]|-/.test(r[i-4]))throw new SyntaxError(`Expected [a-z] or ":", but got "${o}" instead.`);r+=o,n="set";continue}if(/^\s$/.test(o)){r+=" ",n="list";continue}throw new SyntaxError(`Expected [a-z], ",", ":", ":" or a whitespace, but got "${o}" instead.`)}if("set"===n){if(/^\s$/.test(o))continue;if(/^[a-z]|\*$/.test(o)){n="set-item",r+=o;continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("set-item"===n){if("*"===t[i-1]){if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected "," or a whitespace, but got "${o}" instead.`)}if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1]||"="===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected [a-z], "," or a whitespace, but got "${o}" instead.`)}}catch(e){const n="This error occured at: ",r=t=>t.substring(Math.max(0,i-30),i+30),o=r(t),a=" ".repeat(n.length)+r("^".padStart(i+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}}return r.trimEnd()}static __parse(t){return this.__parseList(this.__lintList(t))}static __stringifyTree(t,e){const n=[];if("include"in t)for(const r in t.include){const i=t.include[r],o=e?[e,r].join(":"):r;!0===i?n.push(o):n.push(this.__stringifyTree(i,o))}else{const r=[],i=[];for(const n in t.exclude){const o=t.exclude[n],a=e?[e,n].join(":"):n;r.push(n),!0!==o&&i.push(this.__stringifyTree(o,a))}n.push(`${e?`${e}:`:""}not=${r.join(",")}`,...i)}return n.join(" ")}}const De=new Re(""),Ne=new Re("not=*");var Ie=Array.isArray,Le=v?v.prototype:void 0,Ce=Le?Le.toString:void 0;function Fe(t){if("string"==typeof t)return t;if(Ie(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Fe)+"";if(S(t))return Ce?Ce.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Ue(t){if(!h(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Me,$e=y["__core-js_shared__"],Be=(Me=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"";var ze=Function.prototype.toString;function Ve(t){if(null!=t){try{return ze.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var We=/^\[object .+?Constructor\]$/,qe=Function.prototype,He=Object.prototype,Ge=qe.toString,Je=He.hasOwnProperty,Ke=RegExp("^"+Ge.call(Je).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qe(t){return!(!h(t)||(e=t,Be&&Be in e))&&(Ue(t)?Ke:We).test(Ve(t));var e}function Ze(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Qe(n)?n:void 0}var Xe=Ze(y,"WeakMap"),Ye=/^(?:0|[1-9]\d*)$/;function tn(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ye.test(t))&&t>-1&&t%1==0&&t<e}function en(t,e){return t===e||t!=t&&e!=e}function nn(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function rn(t){return null!=t&&nn(t.length)&&!Ue(t)}var on=Object.prototype;function an(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||on)}function sn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function cn(t){return O(t)&&"[object Arguments]"==x(t)}var un=Object.prototype,ln=un.hasOwnProperty,fn=un.propertyIsEnumerable,hn=cn(function(){return arguments}())?cn:function(t){return O(t)&&ln.call(t,"callee")&&!fn.call(t,"callee")};var pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,dn=pn&&"object"==typeof module&&module&&!module.nodeType&&module,yn=dn&&dn.exports===pn?y.Buffer:void 0,vn=(yn?yn.isBuffer:void 0)||function(){return!1},gn={};function bn(t){return function(e){return t(e)}}gn["[object Float32Array]"]=gn["[object Float64Array]"]=gn["[object Int8Array]"]=gn["[object Int16Array]"]=gn["[object Int32Array]"]=gn["[object Uint8Array]"]=gn["[object Uint8ClampedArray]"]=gn["[object Uint16Array]"]=gn["[object Uint32Array]"]=!0,gn["[object Arguments]"]=gn["[object Array]"]=gn["[object ArrayBuffer]"]=gn["[object Boolean]"]=gn["[object DataView]"]=gn["[object Date]"]=gn["[object Error]"]=gn["[object Function]"]=gn["[object Map]"]=gn["[object Number]"]=gn["[object Object]"]=gn["[object RegExp]"]=gn["[object Set]"]=gn["[object String]"]=gn["[object WeakMap]"]=!1;var _n="object"==typeof exports&&exports&&!exports.nodeType&&exports,mn=_n&&"object"==typeof module&&module&&!module.nodeType&&module,wn=mn&&mn.exports===_n&&p.process,jn=function(){try{var t=mn&&mn.require&&mn.require("util").types;return t||wn&&wn.binding&&wn.binding("util")}catch(t){}}(),xn=jn&&jn.isTypedArray,On=xn?bn(xn):function(t){return O(t)&&nn(t.length)&&!!gn[x(t)]},Sn=Object.prototype.hasOwnProperty;function En(t,e){var n=Ie(t),r=!n&&hn(t),i=!n&&!r&&vn(t),o=!n&&!r&&!i&&On(t),a=n||r||i||o,s=a?sn(t.length,String):[],c=s.length;for(var u in t)!e&&!Sn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tn(u,c))||s.push(u);return s}function kn(t,e){return function(n){return t(e(n))}}var An=kn(Object.keys,Object),Pn=Object.prototype.hasOwnProperty;function Tn(t){return rn(t)?En(t):function(t){if(!an(t))return An(t);var e=[];for(var n in Object(t))Pn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dn=/^\w*$/;var Nn=Ze(Object,"create");var In=Object.prototype.hasOwnProperty;var Ln=Object.prototype.hasOwnProperty;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t,e){for(var n=t.length;n--;)if(en(t[n][0],e))return n;return-1}Cn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Cn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Cn.prototype.get=function(t){var e=this.__data__;if(Nn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return In.call(e,t)?e[t]:void 0},Cn.prototype.has=function(t){var e=this.__data__;return Nn?void 0!==e[t]:Ln.call(e,t)},Cn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nn&&void 0===e?"__lodash_hash_undefined__":e,this};var Un=Array.prototype.splice;function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Mn.prototype.clear=function(){this.__data__=[],this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,n=Fn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Un.call(e,n,1),--this.size,!0)},Mn.prototype.get=function(t){var e=this.__data__,n=Fn(e,t);return n<0?void 0:e[n][1]},Mn.prototype.has=function(t){return Fn(this.__data__,t)>-1},Mn.prototype.set=function(t,e){var n=this.__data__,r=Fn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var $n=Ze(y,"Map");function Bn(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new($n||Mn),string:new Cn}},zn.prototype.delete=function(t){var e=Bn(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return Bn(this,t).get(t)},zn.prototype.has=function(t){return Bn(this,t).has(t)},zn.prototype.set=function(t,e){var n=Bn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Vn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Vn.Cache||zn),n}Vn.Cache=zn;var Wn,qn,Hn,Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jn=/\\(\\)?/g,Kn=(Wn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gn,(function(t,n,r,i){e.push(r?i.replace(Jn,"$1"):n||t)})),e},qn=Vn(Wn,(function(t){return 500===Hn.size&&Hn.clear(),t})),Hn=qn.cache,qn),Qn=Kn;function Zn(t,e){return Ie(t)?t:function(t,e){if(Ie(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!S(t))||Dn.test(t)||!Rn.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:Qn(function(t){return null==t?"":Fe(t)}(t))}function Xn(t){if("string"==typeof t||S(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Yn(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=Zn(e,t)).length;null!=t&&n<r;)t=t[Xn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function tr(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function er(t){var e=this.__data__=new Mn(t);this.size=e.size}function nr(){return[]}er.prototype.clear=function(){this.__data__=new Mn,this.size=0},er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},er.prototype.get=function(t){return this.__data__.get(t)},er.prototype.has=function(t){return this.__data__.has(t)},er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!$n||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var rr=Object.prototype.propertyIsEnumerable,ir=Object.getOwnPropertySymbols,or=ir?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(ir(t),(function(e){return rr.call(t,e)})))}:nr,ar=or;function sr(t,e,n){var r=e(t);return Ie(t)?r:tr(r,n(t))}function cr(t){return sr(t,Tn,ar)}var ur=Ze(y,"DataView"),lr=Ze(y,"Promise"),fr=Ze(y,"Set"),hr=Ve(ur),pr=Ve($n),dr=Ve(lr),yr=Ve(fr),vr=Ve(Xe),gr=x;(ur&&"[object DataView]"!=gr(new ur(new ArrayBuffer(1)))||$n&&"[object Map]"!=gr(new $n)||lr&&"[object Promise]"!=gr(lr.resolve())||fr&&"[object Set]"!=gr(new fr)||Xe&&"[object WeakMap]"!=gr(new Xe))&&(gr=function(t){var e=x(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ve(n):"";if(r)switch(r){case hr:return"[object DataView]";case pr:return"[object Map]";case dr:return"[object Promise]";case yr:return"[object Set]";case vr:return"[object WeakMap]"}return e});var br=gr,_r=y.Uint8Array;function mr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function wr(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function jr(t,e){return t.has(e)}mr.prototype.add=mr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},mr.prototype.has=function(t){return this.__data__.has(t)};function xr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new mr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],y=e[f];if(r)var v=a?r(y,d,f,e,t,o):r(d,y,f,t,e,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!wr(e,(function(t,e){if(!jr(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==y&&!i(d,y,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Or(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Sr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Er=v?v.prototype:void 0,kr=Er?Er.valueOf:void 0;var Ar=Object.prototype.hasOwnProperty;var Pr="[object Object]",Tr=Object.prototype.hasOwnProperty;function Rr(t,e,n,r,i,o){var a=Ie(t),s=Ie(e),c=a?"[object Array]":br(t),u=s?"[object Array]":br(e),l=(c="[object Arguments]"==c?Pr:c)==Pr,f=(u="[object Arguments]"==u?Pr:u)==Pr,h=c==u;if(h&&vn(t)){if(!vn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new er),a||On(t)?xr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new _r(t),new _r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return en(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Or;case"[object Set]":var c=1&r;if(s||(s=Sr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=xr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(kr)return kr.call(t)==kr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&Tr.call(t,"__wrapped__"),d=f&&Tr.call(e,"__wrapped__");if(p||d){var y=p?t.value():t,v=d?e.value():e;return o||(o=new er),i(y,v,n,r,o)}}return!!h&&(o||(o=new er),function(t,e,n,r,i,o){var a=1&n,s=cr(t),c=s.length;if(c!=cr(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:Ar.call(e,l)))return!1}var f=o.get(t),h=o.get(e);if(f&&h)return f==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<c;){var y=t[l=s[u]],v=e[l];if(r)var g=a?r(v,y,l,e,t,o):r(y,v,l,t,e,o);if(!(void 0===g?y===v||i(y,v,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var b=t.constructor,_=e.constructor;b==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function Dr(t,e,n,r,i){return t===e||(null==t||null==e||!O(t)&&!O(e)?t!=t&&e!=e:Rr(t,e,n,r,Dr,i))}function Nr(t,e){return Dr(t,e)}class Ir extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var Lr=u((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,y={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){y.isRoot||(y.parent.node[y.key]=t),y.node=t,e&&(d=!1)},delete:function(t){delete y.parent.node[y.key],t&&(d=!1)},remove:function(t){s(y.parent.node)?y.parent.node.splice(y.key,1):delete y.parent.node[y.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return y;function v(){if("object"==typeof y.node&&null!==y.node){y.keys&&y.node_===y.node||(y.keys=o(y.node)),y.isLeaf=0==y.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){y.circular=a[t];break}}else y.isLeaf=!0,y.keys=null;y.notLeaf=!y.isLeaf,y.notRoot=!y.isRoot}v();var g=e.call(y,y.node);return void 0!==g&&y.update&&y.update(g),p.before&&p.before.call(y,y.node),d?("object"!=typeof y.node||null===y.node||y.circular||(a.push(y),v(),c(y.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(y,y.node[e],e);var o=t(y.node[e]);n&&u.call(y.node,e)&&(y.node[e]=o.node),o.isLast=i==y.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(y,o),r.pop()})),a.pop()),p.after&&p.after.call(y,y.node),y):y}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Cr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Cr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Cr.__applyPatch(i,t,e);return Nr(t,n)?t:n}))}))}track(t){return this.__callbacks.push(t),()=>{this.__callbacks.splice(this.__callbacks.indexOf(t),1)}}cease(){this.__callbacks.length=0}static __isCollection(t){return"string"==typeof Yn(t,"_links.first.href")}static __isResource(t){return"string"==typeof Yn(t,"_links.self.href")}static __approximateURI(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch(e){return t}}static __createPatch(t){return Lr(t).reduce((function(t,e){if(!Cr.__isResource(e)||Cr.__isCollection(e))return t;const n=Lr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Cr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=Lr({data:e}).map((function(e){if(!Cr.__isResource(e))return;const n=e._links.self.href,r=Cr.__approximateURI(n);if(o.includes(r))throw new Cr.UpdateError;if(t.has(n)){const r=t.get(n);if(r)return this.update(Object.assign(Object.assign({},e),r),!0);if(!this.parent.parent)return this.delete(!0);throw new Cr.UpdateError}})).data)&&void 0!==i?i:null}}Cr.UpdateError=Ir;var Fr=u((function(t,e){t.exports=function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=s(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}var l={};l[l.Fatal=0]="Fatal",l[l.Error=0]="Error",l[l.Warn=1]="Warn",l[l.Log=2]="Log",l[l.Info=3]="Info",l[l.Success=3]="Success",l[l.Debug=4]="Debug",l[l.Trace=5]="Trace",l[l.Silent=-1/0]="Silent",l[l.Verbose=1/0]="Verbose";var f={silent:{level:-1},fatal:{level:l.Fatal},error:{level:l.Error},warn:{level:l.Warn},log:{level:l.Log},info:{level:l.Info},success:{level:l.Success},debug:{level:l.Debug},trace:{level:l.Trace},verbose:{level:l.Trace},ready:{level:l.Info},start:{level:l.Info}};function h(t){return e=t,!("[object Object]"!==Object.prototype.toString.call(e)||!t.message&&!t.args||t.stack);var e}var p=!1,d=[],y=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in t(this,e),this._reporters=n.reporters||[],this._types=n.types||f,this.level=void 0!==n.level?n.level:3,this._defaults=n.defaults||{},this._async=void 0!==n.async?n.async:void 0,this._stdout=n.stdout,this._stderr=n.stderr,this._mockFn=n.mockFn,this._throttle=n.throttle||1e3,this._throttleMin=n.throttleMin||5,this._types){var i=o(o({type:r},this._types[r]),this._defaults);this[r]=this._wrapLogFn(i),this[r].raw=this._wrapLogFn(i,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return n(e,[{key:"create",value:function(t){return new e(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},t))}},{key:"withDefaults",value:function(t){return this.create({defaults:Object.assign({},this._defaults,t)})}},{key:"withTag",value:function(t){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+t:t})}},{key:"addReporter",value:function(t){return this._reporters.push(t),this}},{key:"removeReporter",value:function(t){if(t){var e=this._reporters.indexOf(t);if(e>=0)return this._reporters.splice(e,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(t){return this._reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var t in this._types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}},{key:"restoreConsole",value:function(){for(var t in this._types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(t,e){var n=this;t&&(t.__write||(t.__write=t.write),t.write=function(t){n[e].raw(String(t).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function(){p=!0}},{key:"resumeLogs",value:function(){p=!1;var t,e=u(d.splice(0));try{for(e.s();!(t=e.n()).done;){var n=t.value;n[0]._logFn(n[1],n[2])}}catch(t){e.e(t)}finally{e.f()}}},{key:"mockTypes",value:function(t){if(this._mockFn=t||this._mockFn,"function"==typeof this._mockFn)for(var e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}},{key:"_wrapLogFn",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(!p)return n._logFn(t,i,e);d.push([n,t,i,e])}}},{key:"_logFn",value:function(t,e,n){var r=this;if(t.level>this.level)return!!this._async&&Promise.resolve(!1);var i=Object.assign({date:new Date,args:[]},t);!n&&1===e.length&&h(e[0])?Object.assign(i,e[0]):i.args=Array.from(e),i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split("\n")),i.args.push("\n"+i.additional.join("\n")),delete i.additional),i.type="string"==typeof i.type?i.type.toLowerCase():"",i.tag="string"==typeof i.tag?i.tag.toLowerCase():"";var s=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r._lastLogCount-r._throttleMin;if(r._lastLog&&e>0){var n=a(r._lastLog.args);e>1&&n.push("(repeated ".concat(e," times)")),r._log(o(o({},r._lastLog),{},{args:n})),r._lastLogCount=1}if(t){if(r._lastLog=i,r._async)return r._logAsync(i);r._log(i)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?i.date-this._lastLogTime:0;if(this._lastLogTime=i.date,c<this._throttle)try{var u=JSON.stringify([i.type,i.tag,i.args]),l=this._lastLogSerialized===u;if(this._lastLogSerialized=u,l&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(s,this._throttle))}catch(t){}s(!0)}},{key:"_log",value:function(t){var e,n=u(this._reporters);try{for(n.s();!(e=n.n()).done;)e.value.log(t,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(t){n.e(t)}finally{n.f()}}},{key:"_logAsync",value:function(t){var e=this;return Promise.all(this._reporters.map((function(n){return n.log(t,{async:!0,stdout:e.stdout,stderr:e.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),e}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var v,g=function(){function e(n){t(this,e),this.options=Object.assign({},n),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return n(e,[{key:"log",value:function(t){var e=t.level<1?console.__error||console.error:1===t.level&&console.warn?console.__warn||console.warn:console.__log||console.log,n="log"!==t.type?t.type:"",r=t.tag?t.tag:"",i=this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,o="\n background: ".concat(i,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),s="%c".concat([r,n].filter(Boolean).join(":"));"string"==typeof t.args[0]?e.apply(void 0,["".concat(s,"%c ").concat(t.args[0]),o,""].concat(a(t.args.slice(1)))):e.apply(void 0,[s,o].concat(a(t.args)))}}]),e}();return"undefined"!=typeof window&&window.consola||((v=new y({reporters:[new g]})).Consola=y,v.LogLevel=l,v.BrowserReporter=g,v)}()})),Ur=function(t,e,n,r){this.name=t,this.fn=e,this.args=n,this.modifiers=r};function Mr(t,e){return void 0===e&&(e="simple"),"object"==typeof t?t[e]:t}function $r(t,e,n){if(t.length){var r=t.shift(),i=$r(t,e,n);return r.perform(i,n)}return Mr(e)}function Br(t,e,n){if(t.length){var r=t.shift(),i=Br(t,e,n);return r.performAsync(i,n)}return function(t){return Promise.resolve(Mr(e,"async")(t))}}Ur.prototype._test=function(t){var e=this.fn;try{$r(this.modifiers.slice(),e,this)(t)}catch(t){e=function(){return!1}}try{return $r(this.modifiers.slice(),e,this)(t)}catch(t){return!1}},Ur.prototype._check=function(t){try{$r(this.modifiers.slice(),this.fn,this)(t)}catch(t){if($r(this.modifiers.slice(),(function(t){return t}),this)(!1))return}if(!$r(this.modifiers.slice(),this.fn,this)(t))throw null},Ur.prototype._testAsync=function(t){var e=this;return new Promise((function(n,r){Br(e.modifiers.slice(),e.fn,e)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))};var zr=function(t,e,n){this.name=t,this.perform=e,this.performAsync=n},Vr=function(t){function e(n,r,i,o){for(var a=[],s=arguments.length-4;s-- >0;)a[s]=arguments[s+4];t.call(this,a),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=r,this.cause=i,this.target=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Wr=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.chain=t,this.nextRuleModifiers=e};function qr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){qr(t,e,n,r)}),(function(e){r(new Vr(i,t,e))}))}else n(t)}Wr.prototype._applyRule=function(t,e){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new Ur(e,t.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},Wr.prototype._applyModifier=function(t,e){return this.nextRuleModifiers.push(new zr(e,t.simple,t.async)),this},Wr.prototype._clone=function(){return new Wr(this.chain.slice(),this.nextRuleModifiers.slice())},Wr.prototype.test=function(t){return this.chain.every((function(e){return e._test(t)}))},Wr.prototype.testAll=function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Vr(n,t,r))}})),e},Wr.prototype.check=function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Vr(e,t,n)}}))},Wr.prototype.testAsync=function(t){var e=this;return new Promise((function(n,r){qr(t,e.chain.slice(),n,r)}))};var Hr=function(t,e){return!(!e||"string"!=typeof t||0!==t.trim().length)||null==t};function Gr(){return"undefined"!=typeof Proxy?Kr(new Wr):Qr(new Wr)}var Jr={};function Kr(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=Kr(t._clone());return n in Zr?r._applyModifier(Zr[n],n):n in Jr?r._applyRule(Jr[n],n):n in ti?r._applyRule(ti[n],n):void 0}})}function Qr(t){var e=function(t,e){return Object.keys(t).forEach((function(n){e[n]=function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];var o=Qr(e._clone()),a=o._applyRule(t[n],n).apply(void 0,r);return a}})),e},n=e(ti,t),r=e(Jr,n);return Object.keys(Zr).forEach((function(t){Object.defineProperty(r,t,{get:function(){return Qr(r._clone())._applyModifier(Zr[t],t)}})})),r}Gr.extend=function(t){Object.assign(Jr,t)},Gr.clearCustomRules=function(){Jr={}};var Zr={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then((function(t){return!t})).catch((function(){return!0}))}}},some:{simple:function(t){return function(e){return Yr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Yr(e).map((function(e){try{return t(e).catch((function(){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return!1!==e&&Yr(e).every(t)}},async:function(t){return function(e){return Promise.all(Yr(e).map(t)).then((function(t){return t.every(Boolean)}))}}},strict:{simple:function(t,e){return function(n){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t(n):t(n)}},async:function(t,e){return function(n){return Promise.resolve(t(n)).then((function(t){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t:t})).catch((function(){return!1}))}}}};function Xr(t){return t&&"schema"===t.name&&t.args.length>0&&"object"==typeof t.args[0]}function Yr(t){return"string"==typeof t?t.split(""):t}var ti={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(t){return void 0===t&&(t=!0),function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||ni)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return ei("string")},boolean:function(){return ei("boolean")},undefined:function(){return ei("undefined")},null:function(){return ei("null")},array:function(){return ei("array")},object:function(){return ei("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return"boolean"==typeof t||t===t.toLowerCase()&&""!==t.trim()}},uppercase:function(){return function(t){return t===t.toUpperCase()&&""!==t.trim()}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return 0===t.length}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2==0}},odd:function(){return function(t){return t%2!=0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return function(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach((function(r){var i=t[r];try{i.check((e||{})[r])}catch(t){t.target=r,n.push(t)}})),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map((function(r){return t[r].testAsync((e||{})[r]).catch((function(t){t.target=r,n.push(t)}))}));return Promise.all(r).then((function(){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e){return t.some((function(t){return t.test(e)}))}},optional:function(t,e){return void 0===e&&(e=!1),{simple:function(n){return Hr(n,e)||void 0===t.check(n)},async:function(n){return Hr(n,e)||t.testAsync(n)}}}};function ei(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function ni(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Gr.extend({curieChain:()=>t=>Array.isArray(t)&&t[0]instanceof URL&&t.slice(1).every((t=>"string"==typeof t)),typeOf:t=>e=>typeof e===t});const ri=Gr().schema({clear:Gr().typeOf("function"),getItem:Gr().typeOf("function"),key:Gr().typeOf("function"),length:Gr().number(),removeItem:Gr().typeOf("function"),setItem:Gr().typeOf("function")});class ii extends Error{constructor(t){ii.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}ii.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",ii.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",ii.UNAUTHORIZED="UNAUTHORIZED",ii.UNKNOWN="UNKNOWN",ii.v8n={constructor:Gr().schema({code:Gr().passesAnyOf(Gr().exact(ii.NEW_PASSWORD_REQUIRED),Gr().exact(ii.INVALID_NEW_PASSWORD),Gr().exact(ii.UNAUTHORIZED),Gr().exact(ii.UNKNOWN))})};var oi=c(u((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),ai=u((function(t){t.exports=function(t,e){return e.get?e.get.call(t):e.value},t.exports.__esModule=!0,t.exports.default=t.exports})),si=u((function(t){t.exports=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),ci=c(u((function(t){t.exports=function(t,e){var n=si(t,e,"get");return ai(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),ui=new WeakMap,li=function(){function t(){ui.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=ci(this,ui).keys(),n=0,r=e.next();!r.done;){if(n===t)return r.value;n+=1,r=e.next()}return null},e.getItem=function(t){var e;return null!=(e=ci(this,ui).get(""+t))?e:null},e.setItem=function(t,e){ci(this,ui).set(""+t,""+e)},e.removeItem=function(t){ci(this,ui).delete(""+t)},e.clear=function(){ci(this,ui).clear()},oi(t,[{key:"length",get:function(){return ci(this,ui).size}}]),t}(),fi=li;class hi extends Error{constructor(t){super(),hi.v8n.constructor.check(t),this.response=t}}hi.v8n={constructor:Gr().instanceOf(f.Response)};var pi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},di=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function yi(t){const{json:e}=t,n=di(t,["json"]);if("_links"in e){const t=e._links;e._links=Object.entries(t).reduce(((t,[e,r])=>{if(Array.isArray(r))return Object.assign(Object.assign({},t),{[e]:r});const i=new mi(Object.assign(Object.assign({},n),{path:[new URL(r.href)]})),o={delete:i.delete.bind(i),follow:i.follow.bind(i),get:i.get.bind(i),patch:i.patch.bind(i),post:i.post.bind(i),put:i.put.bind(i)};return Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},r),o)})}),{})}if("_embedded"in e){const t=e._embedded;e._embedded=Object.entries(t).reduce(((t,[e,r])=>Object.assign(t,{[e]:Array.isArray(r)?r.map((t=>yi(Object.assign(Object.assign({},n),{json:t})))):yi(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class vi extends f.Response{constructor(t){vi.v8n.constructor.check(t),super(t.body,t),this._console=t.console,this._fetch=t.fetch,this._cache=t.cache}json(){const t=Object.create(null,{json:{get:()=>super.json}});return pi(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return yi(Object.assign({json:e},n))}))}}vi.v8n={constructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function")})};var gi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};function bi(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>bi(t,e))).join():Object.entries(e).map((([t,e])=>bi(n+t,e))).join()}function _i(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>_i(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class mi{constructor(t){mi.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return gi(this,void 0,void 0,(function*(){mi.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{[...new URLSearchParams(t).entries()].forEach((([t,n])=>e.searchParams.append(t,n)))})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",_i(a)),void 0!==s&&e.searchParams.set("zoom",bi("",s));const c=yield this._fetch(new f.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PUT"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"POST"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PATCH"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return gi(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new f.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){mi.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new mi(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return gi(this,void 0,void 0,(function*(){if(1===this._path.length)return new URL(this._path[0].toString());const[t,e]=this._path,n=`${t.toString()} > ${e}`,r={cache:this._cache,console:this._console,fetch:this._fetch};this._console.trace(`Trying to resolve ${n}...`);const i=this._cache.getItem(n);if(i){this._console.success(`Resolved ${n} to ${i.toString()} using cache.`);const t=[new URL(i),...this._path.slice(2)];return new mi(Object.assign(Object.assign({},r),{path:t}))._resolve()}const o=yield this._fetch(t.toString());if(o.ok){const t=yield o.clone().json();if(t._links[e]){const i=new URL(t._links[e].href),o=[i,...this._path.slice(2)];return this._cache.setItem(n,i.toString()),this._console.trace(`Cached ${i.toString()} for ${n}.`),this._console.success(`Resolved ${n} to ${i.toString()} online.`),new mi(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new hi(o)}))}}mi.v8n={classConstructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function"),path:Gr().curieChain()}),follow:Gr().string(),get:Gr().optional(Gr().schema({fields:Gr().optional(Gr().array().every.string()),filters:Gr().optional(Gr().array().every.string()),limit:Gr().optional(Gr().number()),offset:Gr().optional(Gr().number()),order:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array())),zoom:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array()))}))},mi.ResolutionError=hi,mi.Response=vi;var wi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};class ji extends mi{constructor(t){var e,n,r;ji.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new fi,console:Fr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:f.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new fi,this.cache=this._cache,this.base=t.base}fetch(...t){return wi(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ji.WHATWGResponse=f.Response,ji.WHATWGRequest=f.Request,ji.WHATWGHeaders=f.Headers,ji.whatwgFetch=f.fetch,ji.AuthError=ii,ji.Node=mi,ji.v8n={classConstructor:Gr().schema({base:Gr().instanceOf(URL),cache:Gr().optional(ri),fetch:Gr().optional(Gr().typeOf("function")),level:Gr().optional(Gr().integer()),storage:Gr().optional(ri)})};export{Yn as $,ji as A,Re as B,ht as C,ft as D,tt as E,ut as F,H as G,Y as H,rt as I,yt as J,dt as K,pe as L,xt as M,qt as N,nt as O,K as P,ot as Q,Cr as R,ue as S,et as T,Z as U,it as V,jt as W,T as X,ce as Y,lt as Z,e as _,s as a,Rt as a0,Dt as a1,Nt as a2,It as a3,Ft as a4,Ut as a5,Mt as a6,$t as a7,zt as a8,Vt as a9,v as aA,O as aB,br as aC,jn as aD,bn as aE,Ie as aF,vn as aG,er as aH,cr as aI,n as aJ,nn as aK,hn as aL,Lt as aa,Gt as ab,Jt as ac,Kt as ad,Ht as ae,me as af,Zn as ag,Xn as ah,tn as ai,Ze as aj,en as ak,Gr as al,a as am,rn as an,sn as ao,_e as ap,Nr as aq,an as ar,En as as,kn as at,Tn as au,ar as av,nr as aw,tr as ax,sr as ay,_r as az,l as b,u as c,f as d,h as e,Te as f,c as g,Bt as h,S as i,E as j,A as k,oe as l,Vn as m,q as n,Wt as o,le as p,se as q,y as r,Et as s,Lr as t,Q as u,D as v,at as w,wt as x,kt as y,bt as z};
15
+ ***************************************************************************** */var E=function(){return E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},E.apply(this,arguments)};function k(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function A(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function P(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(P(arguments[e]));return t}var R={};function D(t){return Object.keys(t)}function N(t,e,n){void 0===n&&(n=".");var r=C(t,n),i=C(e,n);return Z(i)?!!Z(r)&&i===r:Z(r)?r in i:D(r).every((function(t){return t in i&&N(r[t],i[t])}))}function I(t){try{return Z(t)||"number"==typeof t?""+t:t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function L(t,e){try{return K(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function C(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:K(t)?F(t):"string"!=typeof t?t:F(L(t,e));var n}function F(t){if(1===t.length)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function U(t,e){for(var n={},r=D(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function M(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var $=function(t){return function(e){var n,r,i=e;try{for(var o=A(t),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function B(t){return t?Z(t)?[[t]]:z(D(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?B(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function z(t){var e;return(e=[]).concat.apply(e,T(t))}function V(t){return K(t)?t:[t]}function W(t){return void 0===t?[]:V(t)}function q(t,e,n){var r,i;if(Q(t))return t(e,n.data);var o={};try{for(var a=A(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];Q(u)?o[c]=u(e,n.data):o[c]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function H(t){return t instanceof Promise||!(null===t||!Q(t)&&"object"!=typeof t||!Q(t.then))}function G(t,e){var n,r,i=P([[],[]],2),o=i[0],a=i[1];try{for(var s=A(t),c=s.next();!c.done;c=s.next()){var u=c.value;e(u)?o.push(u):a.push(u)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}function J(t,e){return U(t.states,(function(t,n){if(t){var r=(Z(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:J(t,r)}}}))}function K(t){return Array.isArray(t)}function Q(t){return"function"==typeof t}function Z(t){return"string"==typeof t}function X(t,e){if(t)return Z(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:Q(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function Y(t){try{return"subscribe"in t&&Q(t.subscribe)}catch(t){return!1}}var tt,et,nt=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function rt(t){try{return"__xstatenode"in t}catch(t){return!1}}function it(t){return!!t&&"function"==typeof t.send}function ot(t,e){return Z(t)||"number"==typeof t?E({type:t},e):t}function at(t,e){if(!Z(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=ot(t);return E({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function st(t,e){return V(e).map((function(e){return void 0===e||"string"==typeof e||rt(e)?{target:e,event:t}:E(E({},e),{event:t})}))}function ct(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function ut(t){return"string"==typeof t?{type:t}:t}function lt(t,e,n){if("object"==typeof t)return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}!function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"}(tt||(tt={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(et||(et={}));var ft=tt.Start,ht=tt.Stop,pt=tt.Raise,dt=tt.Send,yt=tt.Cancel,vt=tt.NullEvent,gt=tt.Assign;tt.After,tt.DoneState;var bt=tt.Log,_t=tt.Init,mt=tt.Invoke;tt.ErrorExecution;var wt=tt.ErrorPlatform,jt=tt.ErrorCustom,xt=tt.Update,Ot=tt.Choose,St=tt.Pure,Et=at({type:_t});function kt(t,e){return e&&e[t]||void 0}function At(t,e){var n;if(Z(t)||"number"==typeof t){var r=kt(t,e);n=Q(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(Q(t))n={type:t.name||t.toString(),exec:t};else{if(Q(r=kt(t.type,e)))n=E(E({},t),{exec:r});else if(r){var i=r.type||t.type;n=E(E(E({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var Pt=function(t,e){return t?(K(t)?t:[t]).map((function(t){return At(t,e)})):[]};function Tt(t){var e=At(t);return E(E({id:Z(t)?t:e.id},e),{type:e.type})}function Rt(t){return Z(t)?{type:pt,event:t}:Dt(t,{to:et.Internal})}function Dt(t,e){return{to:e?e.to:void 0,type:dt,event:Q(t)?t:ot(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:Q(t)?t.name:I(t)}}function Nt(t,e){return Dt(t,E(E({},e),{to:et.Parent}))}function It(){return Nt(xt)}function Lt(t,e){return Dt(t,E(E({},e),{to:function(t,e,n){return n._event.origin}}))}var Ct=function(t,e){return{context:t,event:e}};function Ft(t,e){return void 0===t&&(t=Ct),{type:bt,label:e,expr:t}}var Ut=function(t){return{type:yt,sendId:t}};function Mt(t){var e=Tt(t);return{type:tt.Start,activity:e,exec:void 0}}function $t(t){var e=Q(t)?t:Tt(t);return{type:tt.Stop,activity:e,exec:void 0}}var Bt=function(t){return{type:gt,assignment:t}};function zt(t,e){var n=e?"#"+e:"";return tt.After+"("+t+")"+n}function Vt(t,e){var n=tt.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Wt(t,e){var n=tt.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function qt(t,e){var n=tt.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Ht(t){return{type:tt.Pure,get:t}}function Gt(t,e){return Dt((function(t,e){return e}),E(E({},e),{to:t}))}function Jt(t,e){return Nt((function(e,n,r){return{type:jt,data:Q(t)?t(e,n,r):t}}),E(E({},e),{to:et.Parent}))}function Kt(t){return{type:tt.Choose,conds:t}}function Qt(t,e,n,r,i){var o=P(G(i,(function(t){return t.type===gt})),2),a=o[0],s=o[1],c=a.length?function(t,e,n,r){return t?n.reduce((function(t,n){var i,o,a=n.assignment,s={state:r,action:n,_event:e},c={};if(Q(a))c=a(t,e.data,s);else try{for(var u=A(D(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=Q(h)?h(t,e.data,s):h}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Object.assign({},t,c)}),t):t}(n,r,a,e):n,u=z(s.map((function(n){var i;switch(n.type){case pt:return{type:pt,_event:at(n.event)};case dt:var o=function(t,e,n,r){var i,o={_event:n},a=at(Q(t.event)?t.event(e,n.data,o):t.event);if(Z(t.delay)){var s=r&&r[t.delay];i=Q(s)?s(e,n.data,o):s}else i=Q(t.delay)?t.delay(e,n.data,o):t.delay;var c=Q(t.to)?t.to(e,n.data,o):t.to;return E(E({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case bt:return function(t,e,n){return E(E({},t),{value:Z(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case Ot:if(!(s=null===(i=n.conds.find((function(n){var i=X(n.cond,t.options.guards);return!i||ct(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case St:var s;if(!(s=n.get(c,r.data)))return[];a=Qt(t,e,c,r,Pt(W(s),t.options.actions));return c=a[1],a[0];case ht:return function(t,e,n){var r=Q(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:tt.Stop,activity:i}}(n,c,r);default:return At(n,t.options.actions)}})));return[u,c]}var Zt=function(t){return"atomic"===t.type||"final"===t.type};function Xt(t){return D(t.states).map((function(e){return t.states[e]}))}function Yt(t){var e=[t];return Zt(t)?e:e.concat(z(Xt(t).map(Yt)))}function te(t,e){var n,r,i,o,a,s,c,u,l=ne(new Set(t)),f=new Set(e);try{for(var h=A(f),p=h.next();!p.done;p=h.next())for(var d=(x=p.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var y=ne(f);try{for(var v=A(f),g=v.next();!g.done;g=v.next()){if("compound"!==(x=g.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,A(Xt(x))),_=b.next();!_.done;_=b.next()){var m=_.value;"history"!==m.type&&(f.has(m)||(f.add(m),l.get(m)?l.get(m).forEach((function(t){return f.add(t)})):m.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{_&&!_.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(i)throw i.error}}try{for(var w=A(f),j=w.next();!j.done;j=w.next()){var x;for(d=(x=j.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}}catch(t){c={error:t}}finally{try{j&&!j.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return f}function ee(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(Zt(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=ee(t,e)})),i}function ne(t){var e,n,r=new Map;try{for(var i=A(t),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function re(t,e){return ee(t,ne(te([t],e)))}function ie(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function oe(t,e){return"compound"===e.type?Xt(e).some((function(e){return"final"===e.type&&ie(t,e)})):"parallel"===e.type&&Xt(e).every((function(e){return oe(t,e)}))}function ae(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(Z(t)||Z(e))return t===e;var n=D(t),r=D(e);return n.length===r.length&&n.every((function(n){return ae(t[n],e[n])}))}function se(t){return!Z(t)&&("value"in t&&"history"in t)}function ce(t,e){var n=t.exec;return E(E({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var ue=function(){function t(t){var e=this;this.actions=[],this.activities=R,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||R,this.meta=t.meta||{},this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,Object.defineProperty(this,"nextEvents",{get:function(){return t=e.configuration,z(T(new Set(t.map((function(t){return t.ownEvents})))));var t}})}return t.from=function(e,n){return e instanceof t?e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e:new t({value:e,context:n,_event:Et,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=Et;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(t,e){var n=this;if(void 0===t&&(t=this.value),void 0===e&&(e="."),Z(t))return[t];var r=D(t);return r.concat.apply(r,T(r.map((function(r){return n.toStrings(t[r],e).map((function(t){return r+e+t}))}))))},t.prototype.toJSON=function(){var t=this;return t.configuration,t.transitions,k(t,["configuration","transitions"])},t.prototype.matches=function(t){return N(t,this.value)},t}(),le=function(t,e){return e(t)};function fe(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function he(t,e,n,r){var i,o=ut(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?q(t.data,n,r):void 0,c=a?function(t,e,n){var r=fe(e);r.deferred=!0,rt(t)&&(r.state=le(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):fe(t.id);return c.meta=t,c}function pe(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function de(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function ye(t){return E(E({type:mt},t),{toJSON:function(){t.onDone,t.onError;var e=k(t,["onDone","onError"]);return E(E({},e),{type:mt,src:de(t.src)})}})}var ve={},ge=function(t){return"#"===t[0]},be=function(){function t(e,n,r){var i=this;this.config=e,this.context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||T([this.machine.key],this.path).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&D(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?U(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,E(((r={})[o.id]=o,r),o.idMap)),o})):ve;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=A(Xt(e)),a=i.next();!a.done;a=i.next()){t(a.value)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=W(this.config.entry||this.config.onEntry).map((function(t){return At(t)})),this.onExit=W(this.config.exit||this.config.onExit).map((function(t){return At(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=W(this.config.invoke).map((function(t,e){var n,r;if(rt(t))return i.machine.options.services=E(((n={})[t.id]=t,n),i.machine.options.services),ye({src:t.id,id:t.id});if(Z(t.src))return ye(E(E({},t),{id:t.id||t.src,src:t.src}));if(rt(t.src)||Q(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=E(((r={})[o]=t.src,r),i.machine.options.services),ye(E(E({id:o},t),{src:o}))}var a=t.src;return ye(E(E({id:a.type},t),{src:a}))})),this.activities=W(this.config.activities).concat(this.invoke).map((function(t){return Tt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||Yt(this).forEach((function(t){return t.on}))},t.prototype.withConfig=function(e,n){void 0===n&&(n=this.context);var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,c=r.delays;return new t(this.config,{actions:E(E({},i),e.actions),activities:E(E({},o),e.activities),guards:E(E({},a),e.guards),services:E(E({},s),e.services),delays:E(E({},c),e.delays)},n)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:U(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=zt(Q(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(Dt(r,{delay:e})),t.onExit.push(Ut(r)),r};return(K(e)?e.map((function(t,e){var r=n(t.delay,e);return E(E({},t),{event:r})})):z(D(e).map((function(t,r){var i=e[t],o=Z(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return W(o).map((function(t){return E(E({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return E(E({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof ue?t.value:C(t,this.delimiter);if(Z(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=D(r);return o.map((function(t){return n.getStateNode(t)})).concat(o.reduce((function(t,e){var i=n.getStateNode(e).getStateNodes(r[e]);return t.concat(i)}),[]))},t.prototype.handles=function(t){var e=I(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(te([],this.getStateNodes(t.value)));return new ue(E(E({},t),{value:this.resolve(t.value),configuration:e,done:oe(e,this)}))},t.prototype.transitionLeafNode=function(t,e,n){var r=this.getStateNode(t).next(e,n);return r&&r.transitions.length?r:this.next(e,n)},t.prototype.transitionCompoundNode=function(t,e,n){var r=D(t),i=this.getStateNode(r[0])._transition(t[r[0]],e,n);return i&&i.transitions.length?i:this.next(e,n)},t.prototype.transitionParallelNode=function(t,e,n){var r,i,o={};try{for(var a=A(D(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=D(o).map((function(t){return o[t]})),h=z(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=z(f.map((function(t){return t.entrySet}))),d=z(D(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:z(f.map((function(t){return t.exitSet}))),configuration:d,source:e,actions:z(D(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return Z(t)?this.transitionLeafNode(t,e,n):1===D(t).length?this.transitionCompoundNode(t,e,n):this.transitionParallelNode(t,e,n)},t.prototype.next=function(t,e){var n,r,i,o=this,a=e.name,s=[],c=[];try{for(var u=A(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,d=t.context,y=!p||(Z(p)&&ge(p)?t.matches(C(this.getStateNodeById(p).path,this.delimiter)):N(C(p,this.delimiter),$(this.path.slice(0,-2))(t.value))),v=!1;try{v=!h||ct(this.machine,h,d,e,t)}catch(t){throw new Error("Unable to evaluate guard '"+(h.name||h.type)+"' in transition for event '"+a+"' in state node '"+this.id+"':\n"+t.message)}if(v&&y){void 0!==f.target&&(c=f.target),s.push.apply(s,T(f.actions)),i=f;break}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!c.length)return{transitions:[i],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var g=z(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),b=!!i.internal;return{transitions:[i],entrySet:b?[]:z(g.map((function(t){return o.nodesFromChild(t)}))),exitSet:b?[]:[this],configuration:g,source:t,actions:s}}},t.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var e=[],n=t;n&&n!==this;)e.push(n),n=n.parent;return e.push(this),e},t.prototype.escapes=function(t){if(this===t)return!1;for(var e=this.parent;e;){if(e===t)return!1;e=e.parent}return!0},t.prototype.getActions=function(t,e,n,r){var i,o,a,s,c=te([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?te(c,t.configuration):c;try{for(var l=A(u),f=l.next();!f.done;f=l.next()){ie(c,d=f.value)||t.entrySet.push(d)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}try{for(var h=A(c),p=h.next();!p.done;p=h.next()){var d;ie(u,d=p.value)&&!ie(t.exitSet,d.parent)||t.exitSet.push(d)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var y=z(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Vt(r.id,r.doneData),Vt(o.id,r.doneData?q(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&Xt(a).every((function(e){return oe(t.configuration,e)}))&&i.push(Vt(a.id)),i})));t.exitSet.sort((function(t,e){return e.order-t.order})),t.entrySet.sort((function(t,e){return t.order-e.order}));var v=new Set(t.entrySet),g=new Set(t.exitSet),b=P([z(Array.from(v).map((function(t){return T(t.activities.map((function(t){return Mt(t)})),t.onEntry)}))).concat(y.map(Rt)),z(Array.from(g).map((function(t){return T(t.onExit,t.activities.map((function(t){return $t(t)})))})))],2),_=b[0],m=b[1];return Pt(m.concat(t.actions).concat(_),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=at(e);if(t instanceof ue)r=void 0===n?t:this.resolveState(ue.from(t,n));else{var a=Z(t)?this.resolve(F(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(ue.from(a,s))}if(this.strict&&!this.events.includes(o.name)&&(i=o.name,!/^(done|error)\./.test(i)))throw new Error("Machine '"+this.id+"' does not accept event '"+o.name+"'");var c=this._transition(r.value,r,o)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=te([],this.getStateNodes(r.value)),l=c.configuration.length?te(u,c.configuration):u;return c.configuration=T(l),this.resolveTransition(c,r,o)},t.prototype.resolveRaisedTransition=function(t,e,n){var r,i=t.actions;return(t=this.transition(t,e))._event=n,t.event=n.data,(r=t.actions).unshift.apply(r,T(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=Et),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?re(this.machine,s):void 0,u=e?e.historyValue?e.historyValue:t.source?this.machine.historyValue(e.value):void 0:void 0,l=e?e.context:r,f=this.getActions(t,l,n,e),h=e?E({},e.activities):{};try{for(var p=A(f),d=p.next();!d.done;d=p.next()){var y=d.value;y.type===ft?h[y.activity.id||y.activity.type]=y:y.type===ht&&(h[y.activity.id||y.activity.type]=!1)}}catch(t){i={error:t}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}var v,g,b=P(Qt(this,e,l,n,f),2),_=b[0],m=b[1],w=P(G(_,(function(t){return t.type===pt||t.type===dt&&t.to===et.Internal})),2),j=w[0],x=w[1],O=_.filter((function(t){var e;return t.type===ft&&(null===(e=t.activity)||void 0===e?void 0:e.type)===mt})),S=O.reduce((function(t,e){return t[e.activity.id]=he(e.activity,a.machine,m,n),t}),e?E({},e.children):{}),k=c?t.configuration:e?e.configuration:[],T=k.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),R=oe(k,this),D=new ue({value:c||e.value,context:m,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(v=u,g=c,{current:g,states:J(v,g)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?x:[],activities:c?h:e?e.activities:{},meta:c?T:e?e.meta:void 0,events:[],configuration:k,transitions:t.transitions,children:S,done:R}),N=l!==m;D.changed=n.name===xt||N;var I=D.history;if(I&&delete I.history,!c)return D;var L=D;if(!R)for((this._transient||s.some((function(t){return t._transient})))&&(L=this.resolveRaisedTransition(L,{type:vt},n));j.length;){var C=j.shift();L=this.resolveRaisedTransition(L,C._event,n)}var F=L.changed||(I?!!L.actions.length||N||typeof I.value!=typeof L.value||!ae(L.value,I.value):void 0);return L.changed=F,L.history=I,L},t.prototype.getStateNode=function(t){if(ge(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '"+t+"' from '"+this.id+"'; no child states exist.");var e=this.states[t];if(!e)throw new Error("Child state '"+t+"' does not exist on '"+this.id+"'");return e},t.prototype.getStateNodeById=function(t){var e=ge(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&ge(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=L(t,this.delimiter).slice(),n=this;e.length;){var r=e.shift();if(!r.length)break;n=n.getStateNode(r)}return n},t.prototype.resolve=function(t){var e,n=this;if(!t)return this.initialStateValue||ve;switch(this.type){case"parallel":return U(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ve}));case"compound":if(Z(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return D(t).length?U(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ve})):this.initialStateValue||{};default:return t||ve}},t.prototype.getResolvedPath=function(t){if(ge(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return L(t,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t,e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)e=M(this.states,(function(t){return t.initialStateValue||ve}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '"+this.initial+"' not found on '"+this.key+"'");e=Zt(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}return this.__cache.initialStateValue=e,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(t,e){var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,e)},Object.defineProperty(t.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '"+this.id+"'.");return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var t;if("history"===this.type){var e=this.config;t=Z(e.target)&&ge(e.target)?F(this.machine.getStateNodeById(e.target).path.slice(this.path.length-1)):e.target}return t},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(t,e,n){return void 0===n&&(n=!0),n?"history"===t.type?t.resolveHistory(e):t.initialStateNodes:[t]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;return Zt(this)?[this]:"compound"!==this.type||this.initial?z(B(this.initialStateValue).map((function(e){return t.getFromRelativePath(e)}))):[this]},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var e=P(t),n=e[0],r=e.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '"+n+"' from node with no states");var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '"+n+"' does not exist on '"+this.id+"'");return this.states[n].getFromRelativePath(r)},t.prototype.historyValue=function(t){if(D(this.states).length)return{current:t||this.initialStateValue,states:M(this.states,(function(e,n){if(!t)return e.historyValue();var r=Z(t)?void 0:t[n];return e.historyValue(r||e.initialStateValue)}),(function(t){return!t.history}))}},t.prototype.resolveHistory=function(t){var e=this;if("history"!==this.type)return[this];var n=this.parent;if(!t){var r=this.target;return r?z(B(r).map((function(t){return n.getFromRelativePath(t)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(t){var e,n,r=t;try{for(var a=A(i),s=a.next();!s.done;s=a.next()){var c=s.value;r=r[o][c]}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return r})(t).current;return Z(a)?[n.getStateNode(a)]:z(B(a).map((function(t){return"deep"===e.history?n.getFromRelativePath(t):[n.states[t[0]]]})))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this,e=z(D(this.states).map((function(e){return t.states[e].stateIds})));return[this.id].concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var t,e,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=A(D(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,A(c.events)),l=u.next();!l.done;l=u.next()){var f=l.value;o.add(""+f)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(t){var e=this;if(void 0!==t)return t.map((function(t){if(!Z(t))return t;var n=t[0]===e.delimiter;if(n&&!e.parent)return e.getStateNodeByPath(t.slice(1));var r=n?e.key+t:t;if(!e.parent)return e.getStateNodeByPath(r);try{return e.parent.getStateNodeByPath(r)}catch(t){throw new Error("Invalid transition definition for state node '"+e.id+"':\n"+t.message)}}))},t.prototype.formatTransition=function(t){var e=this,n=function(t){if(void 0!==t&&""!==t)return W(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return Z(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=E(E({},t),{actions:Pt(W(t.actions)),cond:X(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return E(E({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=k(i,["*"]);n=z(D(c).map((function(t){var e=st(t,c[t]);return e})).concat(st("*",s)))}else n=[];var u=this.config.always?st("",this.config.always):[],l=this.config.onDone?st(String(Vt(this.id)),this.config.onDone):[];var f=z(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,T(st(String(Wt(t.id)),t.onDone))),t.onError&&e.push.apply(e,T(st(String(qt(t.id)),t.onError))),e}))),h=this.after,p=z(T(l,f,n,u).map((function(t){return W(t).map((function(t){return r.formatTransition(t)}))})));try{for(var d=A(h),y=d.next();!y.done;y=d.next()){var v=y.value;p.push(v)}}catch(e){t={error:e}}finally{try{y&&!y.done&&(e=d.return)&&e.call(d)}finally{if(t)throw t.error}}return p},t}();function _e(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new be(t,e,r)}function me(t,e){var n="function"==typeof t.context?t.context():t.context;return new be(t,e,n)}const we=Bt({failure:null}),je=Bt({errors:[]}),xe=Bt({edits:null}),Oe=Bt({data:null}),Se=je,Ee=Bt({failure:(t,e)=>e.data}),ke=Bt({errors:(t,e)=>e.data}),Ae=Bt({data:(t,e)=>e.data}),Pe=Bt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const Te=me({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{target:"#nucleon.busy.deleting"},FETCH:{actions:["clearData","clearEdits","clearErrors"],target:"#nucleon.busy.fetching"},REFRESH:{target:"#nucleon.busy.fetching"},SET_DATA:{actions:["setData","clearEdits","clearErrors"],target:"#nucleon.init"}},states:{busy:{states:{creating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPost"}},deleting:{invoke:{onDone:{actions:["clearData","clearEdits","validate"],target:"#nucleon.idle.template"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendDelete"}},fetching:{invoke:{onDone:{actions:["setData","clearErrors","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendGet"}},updating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPatch"}}}},fail:{exit:"clearFailure"},idle:{initial:"unknown",on:{EDIT:{actions:["applyEdit","validate"],target:".unknown"}},states:{snapshot:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.snapshot.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.updating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},template:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.template.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.creating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},unknown:{always:[{cond:"hasData",target:"snapshot"},{target:"template"}]}}},init:{always:[{cond:"hasData",target:"idle.snapshot"},{target:"idle.template"}]}}},{actions:Object.freeze({__proto__:null,clearFailure:we,clearErrors:je,clearEdits:xe,clearData:Oe,validate:Se,setFailure:Ee,setErrors:ke,setData:Ae,applyEdit:Pe}),guards:Object.freeze({__proto__:null,hasData:t=>null!==t.data,hasEdits:t=>null!==t.edits,hasErrors:t=>t.errors.length>0,isV8nErrorEvent:(t,e)=>Array.isArray(e.data)})});class Re{constructor(t){this.__tree=Re.__parse(t)}static get True(){return Ne}static get False(){return De}static fromAttribute(t,e){return null===t?Re.False:""===t||t===e?Re.True:new Re(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const e=new Re("");return e.__tree=t.split(":").reduce(((t,e)=>{let n;if("include"in t){if(n=t.include[e],void 0===n)return{include:{}};if(!0===n)return{exclude:{"*":!0}}}else{if(n=t.exclude[e],void 0===n)return{exclude:{"*":!0}};if(!0===n)return{include:{}}}return n}),this.__tree),e}toString(){return Re.__stringifyTree(this.__tree)}toAttribute(t=""){const e=this.toString();return"not=*"===e?t:0===e.length?null:e}static __parsePath(t,e){const n=t.indexOf(":"),r=t.substring(0,n),i=t.substring(n+1);if("exclude"in e){const t=e.exclude[r];t&&(e.exclude[r]=this.__parseListItem(i,!0===t?void 0:t))}else{const t=e.include[r];!0!==t&&(e.include[r]=this.__parseListItem(i,t))}return e}static __parseSet(t,e){const n=t.split(",");if("include"in e){e={exclude:e.include};for(const t in e.exclude)n.includes(t)||delete e.exclude[t];for(const t of n)t in e.exclude?delete e.exclude[t]:e.exclude[t]=!0}else for(const t in e.exclude)n.includes(t)||delete e.exclude[t];return e}static __parseListItem(t,e={include:{}}){if(t.includes(":"))return this.__parsePath(t,e);if(t.startsWith("not="))return this.__parseSet(t.substring(4),e);if("include"in e)e.include[t]=!0;else for(const n in e.exclude)n===t&&delete e.exclude[n];return e}static __parseList(t,e={include:{}}){return t.split(" ").reduce(((t,e)=>this.__parseListItem(e,t)),e)}static __lintList(t){var e;let n="list",r="";for(let i=0;i<t.length;++i){const o=t.charAt(i);try{if("list"===n){if(/^\s$/.test(o)){/^\s$/.test(null!==(e=t[i-1])&&void 0!==e?e:" ")||(r+=" ");continue}if(/^[a-z]$/.test(o)){r+=o,n="path";continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("path"===n){if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(":"===o){if(":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if("="===o){if("="===t[i-1]||":"===t[i-1]||"-"===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);if(!r.endsWith("not")||3!==r.length&&/[a-z]|-/.test(r[i-4]))throw new SyntaxError(`Expected [a-z] or ":", but got "${o}" instead.`);r+=o,n="set";continue}if(/^\s$/.test(o)){r+=" ",n="list";continue}throw new SyntaxError(`Expected [a-z], ",", ":", ":" or a whitespace, but got "${o}" instead.`)}if("set"===n){if(/^\s$/.test(o))continue;if(/^[a-z]|\*$/.test(o)){n="set-item",r+=o;continue}throw new SyntaxError(`Expected [a-z] or a whitespace, but got "${o}" instead.`)}if("set-item"===n){if("*"===t[i-1]){if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected "," or a whitespace, but got "${o}" instead.`)}if(/^[a-z]$/.test(o)){r+=o;continue}if("-"===o){if("-"===t[i-1]||":"===t[i-1]||"="===t[i-1])throw new SyntaxError(`Expected [a-z], but got "${o}" instead.`);r+=o;continue}if(","===o){r+=o,n="set";continue}if(/^\s$/.test(o)){i!==t.length-1&&(r+=" "),n="list";continue}throw new SyntaxError(`Expected [a-z], "," or a whitespace, but got "${o}" instead.`)}}catch(e){const n="This error occured at: ",r=t=>t.substring(Math.max(0,i-30),i+30),o=r(t),a=" ".repeat(n.length)+r("^".padStart(i+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}}return r.trimEnd()}static __parse(t){return this.__parseList(this.__lintList(t))}static __stringifyTree(t,e){const n=[];if("include"in t)for(const r in t.include){const i=t.include[r],o=e?[e,r].join(":"):r;!0===i?n.push(o):n.push(this.__stringifyTree(i,o))}else{const r=[],i=[];for(const n in t.exclude){const o=t.exclude[n],a=e?[e,n].join(":"):n;r.push(n),!0!==o&&i.push(this.__stringifyTree(o,a))}n.push(`${e?`${e}:`:""}not=${r.join(",")}`,...i)}return n.join(" ")}}const De=new Re(""),Ne=new Re("not=*");var Ie=Array.isArray,Le=v?v.prototype:void 0,Ce=Le?Le.toString:void 0;function Fe(t){if("string"==typeof t)return t;if(Ie(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Fe)+"";if(S(t))return Ce?Ce.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Ue(t){if(!h(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Me,$e=y["__core-js_shared__"],Be=(Me=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||""))?"Symbol(src)_1."+Me:"";var ze=Function.prototype.toString;function Ve(t){if(null!=t){try{return ze.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var We=/^\[object .+?Constructor\]$/,qe=Function.prototype,He=Object.prototype,Ge=qe.toString,Je=He.hasOwnProperty,Ke=RegExp("^"+Ge.call(Je).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Qe(t){return!(!h(t)||(e=t,Be&&Be in e))&&(Ue(t)?Ke:We).test(Ve(t));var e}function Ze(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Qe(n)?n:void 0}var Xe=Ze(y,"WeakMap"),Ye=/^(?:0|[1-9]\d*)$/;function tn(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ye.test(t))&&t>-1&&t%1==0&&t<e}function en(t,e){return t===e||t!=t&&e!=e}function nn(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function rn(t){return null!=t&&nn(t.length)&&!Ue(t)}var on=Object.prototype;function an(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||on)}function sn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function cn(t){return O(t)&&"[object Arguments]"==x(t)}var un=Object.prototype,ln=un.hasOwnProperty,fn=un.propertyIsEnumerable,hn=cn(function(){return arguments}())?cn:function(t){return O(t)&&ln.call(t,"callee")&&!fn.call(t,"callee")};var pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,dn=pn&&"object"==typeof module&&module&&!module.nodeType&&module,yn=dn&&dn.exports===pn?y.Buffer:void 0,vn=(yn?yn.isBuffer:void 0)||function(){return!1},gn={};function bn(t){return function(e){return t(e)}}gn["[object Float32Array]"]=gn["[object Float64Array]"]=gn["[object Int8Array]"]=gn["[object Int16Array]"]=gn["[object Int32Array]"]=gn["[object Uint8Array]"]=gn["[object Uint8ClampedArray]"]=gn["[object Uint16Array]"]=gn["[object Uint32Array]"]=!0,gn["[object Arguments]"]=gn["[object Array]"]=gn["[object ArrayBuffer]"]=gn["[object Boolean]"]=gn["[object DataView]"]=gn["[object Date]"]=gn["[object Error]"]=gn["[object Function]"]=gn["[object Map]"]=gn["[object Number]"]=gn["[object Object]"]=gn["[object RegExp]"]=gn["[object Set]"]=gn["[object String]"]=gn["[object WeakMap]"]=!1;var _n="object"==typeof exports&&exports&&!exports.nodeType&&exports,mn=_n&&"object"==typeof module&&module&&!module.nodeType&&module,wn=mn&&mn.exports===_n&&p.process,jn=function(){try{var t=mn&&mn.require&&mn.require("util").types;return t||wn&&wn.binding&&wn.binding("util")}catch(t){}}(),xn=jn&&jn.isTypedArray,On=xn?bn(xn):function(t){return O(t)&&nn(t.length)&&!!gn[x(t)]},Sn=Object.prototype.hasOwnProperty;function En(t,e){var n=Ie(t),r=!n&&hn(t),i=!n&&!r&&vn(t),o=!n&&!r&&!i&&On(t),a=n||r||i||o,s=a?sn(t.length,String):[],c=s.length;for(var u in t)!e&&!Sn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||tn(u,c))||s.push(u);return s}function kn(t,e){return function(n){return t(e(n))}}var An=kn(Object.keys,Object),Pn=Object.prototype.hasOwnProperty;function Tn(t){return rn(t)?En(t):function(t){if(!an(t))return An(t);var e=[];for(var n in Object(t))Pn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Rn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dn=/^\w*$/;var Nn=Ze(Object,"create");var In=Object.prototype.hasOwnProperty;var Ln=Object.prototype.hasOwnProperty;function Cn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t,e){for(var n=t.length;n--;)if(en(t[n][0],e))return n;return-1}Cn.prototype.clear=function(){this.__data__=Nn?Nn(null):{},this.size=0},Cn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Cn.prototype.get=function(t){var e=this.__data__;if(Nn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return In.call(e,t)?e[t]:void 0},Cn.prototype.has=function(t){var e=this.__data__;return Nn?void 0!==e[t]:Ln.call(e,t)},Cn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Nn&&void 0===e?"__lodash_hash_undefined__":e,this};var Un=Array.prototype.splice;function Mn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Mn.prototype.clear=function(){this.__data__=[],this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,n=Fn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Un.call(e,n,1),--this.size,!0)},Mn.prototype.get=function(t){var e=this.__data__,n=Fn(e,t);return n<0?void 0:e[n][1]},Mn.prototype.has=function(t){return Fn(this.__data__,t)>-1},Mn.prototype.set=function(t,e){var n=this.__data__,r=Fn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var $n=Ze(y,"Map");function Bn(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}zn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new($n||Mn),string:new Cn}},zn.prototype.delete=function(t){var e=Bn(this,t).delete(t);return this.size-=e?1:0,e},zn.prototype.get=function(t){return Bn(this,t).get(t)},zn.prototype.has=function(t){return Bn(this,t).has(t)},zn.prototype.set=function(t,e){var n=Bn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Vn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Vn.Cache||zn),n}Vn.Cache=zn;var Wn,qn,Hn,Gn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Jn=/\\(\\)?/g,Kn=(Wn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Gn,(function(t,n,r,i){e.push(r?i.replace(Jn,"$1"):n||t)})),e},qn=Vn(Wn,(function(t){return 500===Hn.size&&Hn.clear(),t})),Hn=qn.cache,qn),Qn=Kn;function Zn(t,e){return Ie(t)?t:function(t,e){if(Ie(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!S(t))||Dn.test(t)||!Rn.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:Qn(function(t){return null==t?"":Fe(t)}(t))}function Xn(t){if("string"==typeof t||S(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Yn(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=Zn(e,t)).length;null!=t&&n<r;)t=t[Xn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function tr(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function er(t){var e=this.__data__=new Mn(t);this.size=e.size}function nr(){return[]}er.prototype.clear=function(){this.__data__=new Mn,this.size=0},er.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},er.prototype.get=function(t){return this.__data__.get(t)},er.prototype.has=function(t){return this.__data__.has(t)},er.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Mn){var r=n.__data__;if(!$n||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new zn(r)}return n.set(t,e),this.size=n.size,this};var rr=Object.prototype.propertyIsEnumerable,ir=Object.getOwnPropertySymbols,or=ir?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(ir(t),(function(e){return rr.call(t,e)})))}:nr,ar=or;function sr(t,e,n){var r=e(t);return Ie(t)?r:tr(r,n(t))}function cr(t){return sr(t,Tn,ar)}var ur=Ze(y,"DataView"),lr=Ze(y,"Promise"),fr=Ze(y,"Set"),hr=Ve(ur),pr=Ve($n),dr=Ve(lr),yr=Ve(fr),vr=Ve(Xe),gr=x;(ur&&"[object DataView]"!=gr(new ur(new ArrayBuffer(1)))||$n&&"[object Map]"!=gr(new $n)||lr&&"[object Promise]"!=gr(lr.resolve())||fr&&"[object Set]"!=gr(new fr)||Xe&&"[object WeakMap]"!=gr(new Xe))&&(gr=function(t){var e=x(t),n="[object Object]"==e?t.constructor:void 0,r=n?Ve(n):"";if(r)switch(r){case hr:return"[object DataView]";case pr:return"[object Map]";case dr:return"[object Promise]";case yr:return"[object Set]";case vr:return"[object WeakMap]"}return e});var br=gr,_r=y.Uint8Array;function mr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new zn;++e<n;)this.add(t[e])}function wr(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function jr(t,e){return t.has(e)}mr.prototype.add=mr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},mr.prototype.has=function(t){return this.__data__.has(t)};function xr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new mr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],y=e[f];if(r)var v=a?r(y,d,f,e,t,o):r(d,y,f,t,e,o);if(void 0!==v){if(v)continue;h=!1;break}if(p){if(!wr(e,(function(t,e){if(!jr(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==y&&!i(d,y,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function Or(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Sr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Er=v?v.prototype:void 0,kr=Er?Er.valueOf:void 0;var Ar=Object.prototype.hasOwnProperty;var Pr="[object Object]",Tr=Object.prototype.hasOwnProperty;function Rr(t,e,n,r,i,o){var a=Ie(t),s=Ie(e),c=a?"[object Array]":br(t),u=s?"[object Array]":br(e),l=(c="[object Arguments]"==c?Pr:c)==Pr,f=(u="[object Arguments]"==u?Pr:u)==Pr,h=c==u;if(h&&vn(t)){if(!vn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new er),a||On(t)?xr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new _r(t),new _r(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return en(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Or;case"[object Set]":var c=1&r;if(s||(s=Sr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=xr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(kr)return kr.call(t)==kr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&Tr.call(t,"__wrapped__"),d=f&&Tr.call(e,"__wrapped__");if(p||d){var y=p?t.value():t,v=d?e.value():e;return o||(o=new er),i(y,v,n,r,o)}}return!!h&&(o||(o=new er),function(t,e,n,r,i,o){var a=1&n,s=cr(t),c=s.length;if(c!=cr(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:Ar.call(e,l)))return!1}var f=o.get(t),h=o.get(e);if(f&&h)return f==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<c;){var y=t[l=s[u]],v=e[l];if(r)var g=a?r(v,y,l,e,t,o):r(y,v,l,t,e,o);if(!(void 0===g?y===v||i(y,v,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var b=t.constructor,_=e.constructor;b==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof _&&_ instanceof _||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function Dr(t,e,n,r,i){return t===e||(null==t||null==e||!O(t)&&!O(e)?t!=t&&e!=e:Rr(t,e,n,r,Dr,i))}function Nr(t,e){return Dr(t,e)}class Ir extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var Lr=u((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,y={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){y.isRoot||(y.parent.node[y.key]=t),y.node=t,e&&(d=!1)},delete:function(t){delete y.parent.node[y.key],t&&(d=!1)},remove:function(t){s(y.parent.node)?y.parent.node.splice(y.key,1):delete y.parent.node[y.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return y;function v(){if("object"==typeof y.node&&null!==y.node){y.keys&&y.node_===y.node||(y.keys=o(y.node)),y.isLeaf=0==y.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){y.circular=a[t];break}}else y.isLeaf=!0,y.keys=null;y.notLeaf=!y.isLeaf,y.notRoot=!y.isRoot}v();var g=e.call(y,y.node);return void 0!==g&&y.update&&y.update(g),p.before&&p.before.call(y,y.node),d?("object"!=typeof y.node||null===y.node||y.circular||(a.push(y),v(),c(y.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(y,y.node[e],e);var o=t(y.node[e]);n&&u.call(y.node,e)&&(y.node[e]=o.node),o.isLast=i==y.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(y,o),r.pop()})),a.pop()),p.after&&p.after.call(y,y.node),y):y}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Cr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Cr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Cr.__applyPatch(i,t,e);return Nr(t,n)?t:n}))}))}track(t){return this.__callbacks.push(t),()=>{this.__callbacks.splice(this.__callbacks.indexOf(t),1)}}cease(){this.__callbacks.length=0}static __isCollection(t){return"string"==typeof Yn(t,"_links.first.href")}static __isResource(t){return"string"==typeof Yn(t,"_links.self.href")}static __approximateURI(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch(e){return t}}static __createPatch(t){return Lr(t).reduce((function(t,e){if(!Cr.__isResource(e)||Cr.__isCollection(e))return t;const n=Lr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Cr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=Lr({data:e}).map((function(e){if(!Cr.__isResource(e))return;const n=e._links.self.href,r=Cr.__approximateURI(n);if(o.includes(r))throw new Cr.UpdateError;if(t.has(n)){const r=t.get(n);if(r)return this.update(Object.assign(Object.assign({},e),r),!0);if(!this.parent.parent)return this.delete(!0);throw new Cr.UpdateError}})).data)&&void 0!==i?i:null}}Cr.UpdateError=Ir;var Fr=u((function(t,e){t.exports=function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=s(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}var l={};l[l.Fatal=0]="Fatal",l[l.Error=0]="Error",l[l.Warn=1]="Warn",l[l.Log=2]="Log",l[l.Info=3]="Info",l[l.Success=3]="Success",l[l.Debug=4]="Debug",l[l.Trace=5]="Trace",l[l.Silent=-1/0]="Silent",l[l.Verbose=1/0]="Verbose";var f={silent:{level:-1},fatal:{level:l.Fatal},error:{level:l.Error},warn:{level:l.Warn},log:{level:l.Log},info:{level:l.Info},success:{level:l.Success},debug:{level:l.Debug},trace:{level:l.Trace},verbose:{level:l.Trace},ready:{level:l.Info},start:{level:l.Info}};function h(t){return e=t,!("[object Object]"!==Object.prototype.toString.call(e)||!t.message&&!t.args||t.stack);var e}var p=!1,d=[],y=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in t(this,e),this._reporters=n.reporters||[],this._types=n.types||f,this.level=void 0!==n.level?n.level:3,this._defaults=n.defaults||{},this._async=void 0!==n.async?n.async:void 0,this._stdout=n.stdout,this._stderr=n.stderr,this._mockFn=n.mockFn,this._throttle=n.throttle||1e3,this._throttleMin=n.throttleMin||5,this._types){var i=o(o({type:r},this._types[r]),this._defaults);this[r]=this._wrapLogFn(i),this[r].raw=this._wrapLogFn(i,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return n(e,[{key:"create",value:function(t){return new e(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},t))}},{key:"withDefaults",value:function(t){return this.create({defaults:Object.assign({},this._defaults,t)})}},{key:"withTag",value:function(t){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+t:t})}},{key:"addReporter",value:function(t){return this._reporters.push(t),this}},{key:"removeReporter",value:function(t){if(t){var e=this._reporters.indexOf(t);if(e>=0)return this._reporters.splice(e,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(t){return this._reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var t in this._types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}},{key:"restoreConsole",value:function(){for(var t in this._types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(t,e){var n=this;t&&(t.__write||(t.__write=t.write),t.write=function(t){n[e].raw(String(t).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function(){p=!0}},{key:"resumeLogs",value:function(){p=!1;var t,e=u(d.splice(0));try{for(e.s();!(t=e.n()).done;){var n=t.value;n[0]._logFn(n[1],n[2])}}catch(t){e.e(t)}finally{e.f()}}},{key:"mockTypes",value:function(t){if(this._mockFn=t||this._mockFn,"function"==typeof this._mockFn)for(var e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}},{key:"_wrapLogFn",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(!p)return n._logFn(t,i,e);d.push([n,t,i,e])}}},{key:"_logFn",value:function(t,e,n){var r=this;if(t.level>this.level)return!!this._async&&Promise.resolve(!1);var i=Object.assign({date:new Date,args:[]},t);!n&&1===e.length&&h(e[0])?Object.assign(i,e[0]):i.args=Array.from(e),i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split("\n")),i.args.push("\n"+i.additional.join("\n")),delete i.additional),i.type="string"==typeof i.type?i.type.toLowerCase():"",i.tag="string"==typeof i.tag?i.tag.toLowerCase():"";var s=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r._lastLogCount-r._throttleMin;if(r._lastLog&&e>0){var n=a(r._lastLog.args);e>1&&n.push("(repeated ".concat(e," times)")),r._log(o(o({},r._lastLog),{},{args:n})),r._lastLogCount=1}if(t){if(r._lastLog=i,r._async)return r._logAsync(i);r._log(i)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?i.date-this._lastLogTime:0;if(this._lastLogTime=i.date,c<this._throttle)try{var u=JSON.stringify([i.type,i.tag,i.args]),l=this._lastLogSerialized===u;if(this._lastLogSerialized=u,l&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(s,this._throttle))}catch(t){}s(!0)}},{key:"_log",value:function(t){var e,n=u(this._reporters);try{for(n.s();!(e=n.n()).done;)e.value.log(t,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(t){n.e(t)}finally{n.f()}}},{key:"_logAsync",value:function(t){var e=this;return Promise.all(this._reporters.map((function(n){return n.log(t,{async:!0,stdout:e.stdout,stderr:e.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),e}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var v,g=function(){function e(n){t(this,e),this.options=Object.assign({},n),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return n(e,[{key:"log",value:function(t){var e=t.level<1?console.__error||console.error:1===t.level&&console.warn?console.__warn||console.warn:console.__log||console.log,n="log"!==t.type?t.type:"",r=t.tag?t.tag:"",i=this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,o="\n background: ".concat(i,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),s="%c".concat([r,n].filter(Boolean).join(":"));"string"==typeof t.args[0]?e.apply(void 0,["".concat(s,"%c ").concat(t.args[0]),o,""].concat(a(t.args.slice(1)))):e.apply(void 0,[s,o].concat(a(t.args)))}}]),e}();return"undefined"!=typeof window&&window.consola||((v=new y({reporters:[new g]})).Consola=y,v.LogLevel=l,v.BrowserReporter=g,v)}()})),Ur=function(t,e,n,r){this.name=t,this.fn=e,this.args=n,this.modifiers=r};function Mr(t,e){return void 0===e&&(e="simple"),"object"==typeof t?t[e]:t}function $r(t,e,n){if(t.length){var r=t.shift(),i=$r(t,e,n);return r.perform(i,n)}return Mr(e)}function Br(t,e,n){if(t.length){var r=t.shift(),i=Br(t,e,n);return r.performAsync(i,n)}return function(t){return Promise.resolve(Mr(e,"async")(t))}}Ur.prototype._test=function(t){var e=this.fn;try{$r(this.modifiers.slice(),e,this)(t)}catch(t){e=function(){return!1}}try{return $r(this.modifiers.slice(),e,this)(t)}catch(t){return!1}},Ur.prototype._check=function(t){try{$r(this.modifiers.slice(),this.fn,this)(t)}catch(t){if($r(this.modifiers.slice(),(function(t){return t}),this)(!1))return}if(!$r(this.modifiers.slice(),this.fn,this)(t))throw null},Ur.prototype._testAsync=function(t){var e=this;return new Promise((function(n,r){Br(e.modifiers.slice(),e.fn,e)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))};var zr=function(t,e,n){this.name=t,this.perform=e,this.performAsync=n},Vr=function(t){function e(n,r,i,o){for(var a=[],s=arguments.length-4;s-- >0;)a[s]=arguments[s+4];t.call(this,a),t.captureStackTrace&&t.captureStackTrace(this,e),this.rule=n,this.value=r,this.cause=i,this.target=o}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Wr=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.chain=t,this.nextRuleModifiers=e};function qr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){qr(t,e,n,r)}),(function(e){r(new Vr(i,t,e))}))}else n(t)}Wr.prototype._applyRule=function(t,e){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new Ur(e,t.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},Wr.prototype._applyModifier=function(t,e){return this.nextRuleModifiers.push(new zr(e,t.simple,t.async)),this},Wr.prototype._clone=function(){return new Wr(this.chain.slice(),this.nextRuleModifiers.slice())},Wr.prototype.test=function(t){return this.chain.every((function(e){return e._test(t)}))},Wr.prototype.testAll=function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Vr(n,t,r))}})),e},Wr.prototype.check=function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Vr(e,t,n)}}))},Wr.prototype.testAsync=function(t){var e=this;return new Promise((function(n,r){qr(t,e.chain.slice(),n,r)}))};var Hr=function(t,e){return!(!e||"string"!=typeof t||0!==t.trim().length)||null==t};function Gr(){return"undefined"!=typeof Proxy?Kr(new Wr):Qr(new Wr)}var Jr={};function Kr(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=Kr(t._clone());return n in Zr?r._applyModifier(Zr[n],n):n in Jr?r._applyRule(Jr[n],n):n in ti?r._applyRule(ti[n],n):void 0}})}function Qr(t){var e=function(t,e){return Object.keys(t).forEach((function(n){e[n]=function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];var o=Qr(e._clone()),a=o._applyRule(t[n],n).apply(void 0,r);return a}})),e},n=e(ti,t),r=e(Jr,n);return Object.keys(Zr).forEach((function(t){Object.defineProperty(r,t,{get:function(){return Qr(r._clone())._applyModifier(Zr[t],t)}})})),r}Gr.extend=function(t){Object.assign(Jr,t)},Gr.clearCustomRules=function(){Jr={}};var Zr={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then((function(t){return!t})).catch((function(){return!0}))}}},some:{simple:function(t){return function(e){return Yr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Yr(e).map((function(e){try{return t(e).catch((function(){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return!1!==e&&Yr(e).every(t)}},async:function(t){return function(e){return Promise.all(Yr(e).map(t)).then((function(t){return t.every(Boolean)}))}}},strict:{simple:function(t,e){return function(n){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t(n):t(n)}},async:function(t,e){return function(n){return Promise.resolve(t(n)).then((function(t){return Xr(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t:t})).catch((function(){return!1}))}}}};function Xr(t){return t&&"schema"===t.name&&t.args.length>0&&"object"==typeof t.args[0]}function Yr(t){return"string"==typeof t?t.split(""):t}var ti={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(t){return void 0===t&&(t=!0),function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||ni)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return ei("string")},boolean:function(){return ei("boolean")},undefined:function(){return ei("undefined")},null:function(){return ei("null")},array:function(){return ei("array")},object:function(){return ei("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return"boolean"==typeof t||t===t.toLowerCase()&&""!==t.trim()}},uppercase:function(){return function(t){return t===t.toUpperCase()&&""!==t.trim()}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return 0===t.length}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2==0}},odd:function(){return function(t){return t%2!=0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return function(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach((function(r){var i=t[r];try{i.check((e||{})[r])}catch(t){t.target=r,n.push(t)}})),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map((function(r){return t[r].testAsync((e||{})[r]).catch((function(t){t.target=r,n.push(t)}))}));return Promise.all(r).then((function(){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return function(e){return t.some((function(t){return t.test(e)}))}},optional:function(t,e){return void 0===e&&(e=!1),{simple:function(n){return Hr(n,e)||void 0===t.check(n)},async:function(n){return Hr(n,e)||t.testAsync(n)}}}};function ei(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function ni(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Gr.extend({curieChain:()=>t=>Array.isArray(t)&&t[0]instanceof URL&&t.slice(1).every((t=>"string"==typeof t)),typeOf:t=>e=>typeof e===t});const ri=Gr().schema({clear:Gr().typeOf("function"),getItem:Gr().typeOf("function"),key:Gr().typeOf("function"),length:Gr().number(),removeItem:Gr().typeOf("function"),setItem:Gr().typeOf("function")});class ii extends Error{constructor(t){ii.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}ii.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",ii.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",ii.UNAUTHORIZED="UNAUTHORIZED",ii.UNKNOWN="UNKNOWN",ii.v8n={constructor:Gr().schema({code:Gr().passesAnyOf(Gr().exact(ii.NEW_PASSWORD_REQUIRED),Gr().exact(ii.INVALID_NEW_PASSWORD),Gr().exact(ii.UNAUTHORIZED),Gr().exact(ii.UNKNOWN))})};var oi=c(u((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),ai=u((function(t){t.exports=function(t,e){return e.get?e.get.call(t):e.value},t.exports.__esModule=!0,t.exports.default=t.exports})),si=u((function(t){t.exports=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),ci=c(u((function(t){t.exports=function(t,e){var n=si(t,e,"get");return ai(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),ui=new WeakMap,li=function(){function t(){ui.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=ci(this,ui).keys(),n=0,r=e.next();!r.done;){if(n===t)return r.value;n+=1,r=e.next()}return null},e.getItem=function(t){var e;return null!=(e=ci(this,ui).get(""+t))?e:null},e.setItem=function(t,e){ci(this,ui).set(""+t,""+e)},e.removeItem=function(t){ci(this,ui).delete(""+t)},e.clear=function(){ci(this,ui).clear()},oi(t,[{key:"length",get:function(){return ci(this,ui).size}}]),t}(),fi=li;class hi extends Error{constructor(t){super(),hi.v8n.constructor.check(t),this.response=t}}hi.v8n={constructor:Gr().instanceOf(f.Response)};var pi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},di=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function yi(t){const{json:e}=t,n=di(t,["json"]);if("_links"in e){const t=e._links;e._links=Object.entries(t).reduce(((t,[e,r])=>{if(Array.isArray(r))return Object.assign(Object.assign({},t),{[e]:r});const i=new mi(Object.assign(Object.assign({},n),{path:[new URL(r.href)]})),o={delete:i.delete.bind(i),follow:i.follow.bind(i),get:i.get.bind(i),patch:i.patch.bind(i),post:i.post.bind(i),put:i.put.bind(i)};return Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},r),o)})}),{})}if("_embedded"in e){const t=e._embedded;e._embedded=Object.entries(t).reduce(((t,[e,r])=>Object.assign(t,{[e]:Array.isArray(r)?r.map((t=>yi(Object.assign(Object.assign({},n),{json:t})))):yi(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class vi extends f.Response{constructor(t){vi.v8n.constructor.check(t),super(t.body,t),this._console=t.console,this._fetch=t.fetch,this._cache=t.cache}json(){const t=Object.create(null,{json:{get:()=>super.json}});return pi(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return yi(Object.assign({json:e},n))}))}}vi.v8n={constructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function")})};var gi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};function bi(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>bi(t,e))).join():Object.entries(e).map((([t,e])=>bi(n+t,e))).join()}function _i(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>_i(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class mi{constructor(t){mi.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return gi(this,void 0,void 0,(function*(){mi.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{const[n,r=""]=t.split("=");n&&e.searchParams.append(n,r)})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",_i(a)),void 0!==s&&e.searchParams.set("zoom",bi("",s));const c=yield this._fetch(new f.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PUT"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"POST"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return gi(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new f.Request(e.toString(),{body:JSON.stringify(t),method:"PATCH"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return gi(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new f.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new vi(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){mi.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new mi(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return gi(this,void 0,void 0,(function*(){if(1===this._path.length)return new URL(this._path[0].toString());const[t,e]=this._path,n=`${t.toString()} > ${e}`,r={cache:this._cache,console:this._console,fetch:this._fetch};this._console.trace(`Trying to resolve ${n}...`);const i=this._cache.getItem(n);if(i){this._console.success(`Resolved ${n} to ${i.toString()} using cache.`);const t=[new URL(i),...this._path.slice(2)];return new mi(Object.assign(Object.assign({},r),{path:t}))._resolve()}const o=yield this._fetch(t.toString());if(o.ok){const t=yield o.clone().json();if(t._links[e]){const i=new URL(t._links[e].href),o=[i,...this._path.slice(2)];return this._cache.setItem(n,i.toString()),this._console.trace(`Cached ${i.toString()} for ${n}.`),this._console.success(`Resolved ${n} to ${i.toString()} online.`),new mi(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new hi(o)}))}}mi.v8n={classConstructor:Gr().schema({cache:ri,console:Gr().instanceOf(Fr.constructor),fetch:Gr().typeOf("function"),path:Gr().curieChain()}),follow:Gr().string(),get:Gr().optional(Gr().schema({fields:Gr().optional(Gr().array().every.string()),filters:Gr().optional(Gr().array().every.string()),limit:Gr().optional(Gr().number()),offset:Gr().optional(Gr().number()),order:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array())),zoom:Gr().optional(Gr().passesAnyOf(Gr().string(),Gr().object(),Gr().array()))}))},mi.ResolutionError=hi,mi.Response=vi;var wi=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};class ji extends mi{constructor(t){var e,n,r;ji.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new fi,console:Fr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:f.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new fi,this.cache=this._cache,this.base=t.base}fetch(...t){return wi(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ji.WHATWGResponse=f.Response,ji.WHATWGRequest=f.Request,ji.WHATWGHeaders=f.Headers,ji.whatwgFetch=f.fetch,ji.AuthError=ii,ji.Node=mi,ji.v8n={classConstructor:Gr().schema({base:Gr().instanceOf(URL),cache:Gr().optional(ri),fetch:Gr().optional(Gr().typeOf("function")),level:Gr().optional(Gr().integer()),storage:Gr().optional(ri)})};export{Yn as $,ji as A,Re as B,ht as C,ft as D,tt as E,ut as F,H as G,Y as H,rt as I,yt as J,dt as K,pe as L,xt as M,qt as N,nt as O,K as P,ot as Q,Cr as R,ue as S,et as T,Z as U,it as V,jt as W,T as X,ce as Y,lt as Z,e as _,s as a,Rt as a0,Dt as a1,Nt as a2,It as a3,Ft as a4,Ut as a5,Mt as a6,$t as a7,zt as a8,Vt as a9,v as aA,O as aB,br as aC,jn as aD,bn as aE,Ie as aF,vn as aG,er as aH,cr as aI,n as aJ,nn as aK,hn as aL,Lt as aa,Gt as ab,Jt as ac,Kt as ad,Ht as ae,me as af,Zn as ag,Xn as ah,tn as ai,Ze as aj,en as ak,Gr as al,a as am,rn as an,sn as ao,_e as ap,Nr as aq,an as ar,En as as,kn as at,Tn as au,ar as av,nr as aw,tr as ax,sr as ay,_r as az,l as b,u as c,f as d,h as e,Te as f,c as g,Bt as h,S as i,E as j,A as k,oe as l,Vn as m,q as n,Wt as o,le as p,se as q,y as r,Et as s,Lr as t,Q as u,D as v,at as w,wt as x,kt as y,bt as z};
@@ -1 +1 @@
1
- import"./shared-47915d1c.js";import"./shared-1add7ad8.js";const A=document.createElement("template");A.innerHTML='<custom-style>\n <style>\n @font-face {\n font-family: \'lumo-icons\';\n src: url(data:application/font-woff;charset=utf-8;base64,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) format(\'woff\');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n</custom-style>',document.head.appendChild(A.content);
1
+ import"./shared-59042137.js";import"./shared-17d0db7f.js";const A=document.createElement("template");A.innerHTML='<custom-style>\n <style>\n @font-face {\n font-family: \'lumo-icons\';\n src: url(data:application/font-woff;charset=utf-8;base64,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) format(\'woff\');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n</custom-style>',document.head.appendChild(A.content);
@@ -1 +1 @@
1
- import{j as t,k as e,l as n,n as i,o as r,p as s,q as o,S as a,s as h,u as c,v as u,w as d,x as l,y as f,z as p,C as v,D as y,E as w,F as x,G as b,H as m,I as g,J as E,K as S,L as T,M as L,N as _,O,P as k,Q as C,T as N,U as M,V as z,W as D,X as P,Y as I,Z as R}from"./shared-98755831.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),j=new Map,F=0,U=function(){return"x:"+F++},X=function(t,e){return j.set(t,e),t},A=function(t){return j.get(t)},V=function(t){j.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(k(t))return i.batch(t),i.state;var n=d(C(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===N.Parent||i.parent.id===n),s=r?i.parent:M(n)?i.children.get(n)||A(n):z(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===D?""+_(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,c=void 0!==h?h:e.id;this.id=c,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return o(t)?e.machine.resolveState(t):e.machine.resolveState(a.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,h)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,a,h,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){a={error:t}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){c(t.stop)&&t.stop()}));try{for(var S=e(u(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],c=function(t){var e=d(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var u=e(t),l=u.next();!l.done;l=u.next()){c(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,d(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=d(t);if(0===n.name.indexOf(l)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(l)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||f(t.type,n),a=c(o)?o:o?o.exec:t.exec;if(a)try{return a(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case S:var h=t;if("number"==typeof h.delay)return void this.defer(h);h.to?this.sendTo(h._event,h.to):this.send(h._event);break;case E:this.cancel(t.sendId);break;case y:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===w.Invoke){var d=x(u.src),l=this.machine.options.services?this.machine.options.services[d.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!l)return;var O=L?i(L,r,s):void 0,k=c(l)?l(r,s.data,{data:O,src:d}):l;b(k)?this.spawnPromise(Promise.resolve(k),T):c(k)?this.spawnCallback(k,T):m(k)?this.spawnObservable(k,T):g(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case v:this.stopChild(t.activity.id);break;case p:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),c(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(b(e))return this.spawnPromise(Promise.resolve(e),n);if(c(e))return this.spawnCallback(e,n);if(T(e))return this.spawnActor(e);if(m(e))return this.spawnObservable(e,n);if(g(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(L,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(d(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(d(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=_(e,t);try{n.send(d(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(d(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(_(e,t))}if(b(n))return this.spawnPromise(n,e);var a={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,c(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,a),a},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(d(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(d(_(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(d(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[O]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
1
+ import{j as t,k as e,l as n,n as i,o as r,p as s,q as o,S as a,s as h,u as c,v as u,w as d,x as l,y as f,z as p,C as v,D as y,E as w,F as x,G as b,H as m,I as g,J as E,K as S,L as T,M as L,N as _,O,P as k,Q as C,T as N,U as M,V as z,W as D,X as P,Y as I,Z as R}from"./shared-307262a1.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),j=new Map,F=0,U=function(){return"x:"+F++},X=function(t,e){return j.set(t,e),t},A=function(t){return j.get(t)},V=function(t){j.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(k(t))return i.batch(t),i.state;var n=d(C(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===N.Parent||i.parent.id===n),s=r?i.parent:M(n)?i.children.get(n)||A(n):z(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===D?""+_(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,c=void 0!==h?h:e.id;this.id=c,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=U()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return o(t)?e.machine.resolveState(t):e.machine.resolveState(a.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,h)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,a,h,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){a={error:t}}finally{try{E&&!E.done&&(h=g.return)&&h.call(g)}finally{if(a)throw a.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){c(t.stop)&&t.stop()}));try{for(var S=e(u(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],c=function(t){var e=d(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var u=e(t),l=u.next();!l.done;l=u.next()){c(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,d(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=d(t);if(0===n.name.indexOf(l)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(l)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||f(t.type,n),a=c(o)?o:o?o.exec:t.exec;if(a)try{return a(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case S:var h=t;if("number"==typeof h.delay)return void this.defer(h);h.to?this.sendTo(h._event,h.to):this.send(h._event);break;case E:this.cancel(t.sendId);break;case y:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===w.Invoke){var d=x(u.src),l=this.machine.options.services?this.machine.options.services[d.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!l)return;var O=L?i(L,r,s):void 0,k=c(l)?l(r,s.data,{data:O,src:d}):l;b(k)?this.spawnPromise(Promise.resolve(k),T):c(k)?this.spawnCallback(k,T):m(k)?this.spawnObservable(k,T):g(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case v:this.stopChild(t.activity.id);break;case p:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),c(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(b(e))return this.spawnPromise(Promise.resolve(e),n);if(c(e))return this.spawnCallback(e,n);if(T(e))return this.spawnActor(e);if(m(e))return this.spawnObservable(e,n);if(g(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(L,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(d(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(d(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=_(e,t);try{n.send(d(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(d(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(_(e,t))}if(b(n))return this.spawnPromise(n,e);var a={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,c(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,a),a},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(d(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(d(_(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(d(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[O]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};