@foxy.io/elements 1.45.0 → 1.46.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 (330) 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-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -0
  7. package/dist/cdn/foxy-api-browser.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-api.js +1 -1
  31. package/dist/cdn/foxy-customer-card.js +1 -1
  32. package/dist/cdn/foxy-customer-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  34. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  35. package/dist/cdn/foxy-customer-portal.js +11 -11
  36. package/dist/cdn/foxy-customer.js +1 -1
  37. package/dist/cdn/foxy-customers-table.js +1 -1
  38. package/dist/cdn/foxy-discount-builder.js +1 -1
  39. package/dist/cdn/foxy-discount-card.js +1 -1
  40. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  41. package/dist/cdn/foxy-donation.js +1 -1
  42. package/dist/cdn/foxy-downloadable-card.js +1 -1
  43. package/dist/cdn/foxy-downloadable-form.js +1 -1
  44. package/dist/cdn/foxy-email-template-card.js +1 -1
  45. package/dist/cdn/foxy-email-template-form.js +1 -1
  46. package/dist/cdn/foxy-error-entry-card.js +1 -1
  47. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  49. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  50. package/dist/cdn/foxy-form-dialog.js +1 -1
  51. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  52. package/dist/cdn/foxy-gift-card-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  56. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  57. package/dist/cdn/foxy-gift-card-form.js +1 -1
  58. package/dist/cdn/foxy-i18n-editor.js +1 -1
  59. package/dist/cdn/foxy-i18n.js +1 -1
  60. package/dist/cdn/foxy-integration-card.js +1 -1
  61. package/dist/cdn/foxy-integration-form.js +1 -1
  62. package/dist/cdn/foxy-item-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-card.js +1 -1
  64. package/dist/cdn/foxy-item-category-form.js +1 -1
  65. package/dist/cdn/foxy-item-form.js +1 -1
  66. package/dist/cdn/foxy-item-option-card.js +1 -1
  67. package/dist/cdn/foxy-item-option-form.js +1 -1
  68. package/dist/cdn/foxy-items-form.js +1 -1
  69. package/dist/cdn/foxy-native-integration-card.js +1 -1
  70. package/dist/cdn/foxy-native-integration-form.js +1 -1
  71. package/dist/cdn/foxy-nucleon-element.js +1 -1
  72. package/dist/cdn/foxy-pagination.js +1 -1
  73. package/dist/cdn/foxy-passkey-card.js +1 -1
  74. package/dist/cdn/foxy-passkey-form.js +1 -1
  75. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  76. package/dist/cdn/foxy-payment-card.js +1 -1
  77. package/dist/cdn/foxy-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  82. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  83. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  84. package/dist/cdn/foxy-payments-api.js +1 -1
  85. package/dist/cdn/foxy-query-builder.js +1 -1
  86. package/dist/cdn/foxy-report-form.js +1 -1
  87. package/dist/cdn/foxy-reports-table.js +1 -1
  88. package/dist/cdn/foxy-shipment-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  91. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  92. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  93. package/dist/cdn/foxy-sign-in-form.js +1 -1
  94. package/dist/cdn/foxy-spinner.js +1 -1
  95. package/dist/cdn/foxy-store-card.js +1 -1
  96. package/dist/cdn/foxy-store-form.js +1 -1
  97. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  98. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -0
  99. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -0
  100. package/dist/cdn/foxy-subscription-card.js +1 -1
  101. package/dist/cdn/foxy-subscription-form.js +1 -1
  102. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  103. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  104. package/dist/cdn/foxy-swipe-actions.js +1 -1
  105. package/dist/cdn/foxy-table.js +1 -1
  106. package/dist/cdn/foxy-tax-card.js +1 -1
  107. package/dist/cdn/foxy-tax-form.js +1 -1
  108. package/dist/cdn/foxy-template-config-form.js +1 -1
  109. package/dist/cdn/foxy-template-form.js +1 -1
  110. package/dist/cdn/foxy-template-set-card.js +1 -1
  111. package/dist/cdn/foxy-template-set-form.js +1 -1
  112. package/dist/cdn/foxy-transaction-card.js +1 -1
  113. package/dist/cdn/foxy-transaction.js +1 -1
  114. package/dist/cdn/foxy-transactions-table.js +1 -1
  115. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  116. package/dist/cdn/foxy-user-card.js +1 -1
  117. package/dist/cdn/foxy-user-form.js +1 -1
  118. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  119. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  120. package/dist/cdn/foxy-users-table.js +1 -1
  121. package/dist/cdn/foxy-webhook-card.js +1 -1
  122. package/dist/cdn/foxy-webhook-form.js +1 -1
  123. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  124. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  125. package/dist/cdn/{shared-6c25eb72.js → shared-0557539b.js} +1 -1
  126. package/dist/cdn/{shared-1e14a3fe.js → shared-0b8768db.js} +1 -1
  127. package/dist/cdn/{shared-cc0d9412.js → shared-0db4e843.js} +3 -3
  128. package/dist/cdn/{shared-e1e4d8f5.js → shared-0e19bda5.js} +1 -1
  129. package/dist/cdn/{shared-85ed835a.js → shared-0e25ac65.js} +1 -1
  130. package/dist/cdn/{shared-4e1bff30.js → shared-0e5484c2.js} +1 -1
  131. package/dist/cdn/{shared-7dc40542.js → shared-11de7969.js} +1 -1
  132. package/dist/cdn/{shared-fd5ff448.js → shared-14cc889b.js} +1 -1
  133. package/dist/cdn/{shared-f9d1baff.js → shared-15a75e70.js} +1 -1
  134. package/dist/cdn/{shared-946a7af6.js → shared-16776ac6.js} +1 -1
  135. package/dist/cdn/{shared-c6b1b119.js → shared-18dc7a8a.js} +1 -1
  136. package/dist/cdn/{shared-c929504f.js → shared-1c985317.js} +1 -1
  137. package/dist/cdn/{shared-f1e48b0e.js → shared-2111aa44.js} +1 -1
  138. package/dist/cdn/shared-257dd725.js +1 -0
  139. package/dist/cdn/{shared-a268320e.js → shared-27c16d99.js} +1 -1
  140. package/dist/cdn/{shared-4cc42648.js → shared-28ceb7f7.js} +1 -1
  141. package/dist/cdn/{shared-a1297ca4.js → shared-2df3c589.js} +1 -1
  142. package/dist/cdn/{shared-85668fe8.js → shared-2f8d04dc.js} +1 -1
  143. package/dist/cdn/{shared-e54135f0.js → shared-32b2d003.js} +1 -1
  144. package/dist/cdn/{shared-005168e0.js → shared-34a87829.js} +1 -1
  145. package/dist/cdn/{shared-5963a49e.js → shared-360196ad.js} +1 -1
  146. package/dist/cdn/shared-3d353eb8.js +1 -0
  147. package/dist/cdn/{shared-3c94ab84.js → shared-4158f91e.js} +1 -1
  148. package/dist/cdn/{shared-809d503c.js → shared-4194ffe7.js} +1 -1
  149. package/dist/cdn/{shared-c782b9fa.js → shared-41c9c53f.js} +1 -1
  150. package/dist/cdn/{shared-8340f3ab.js → shared-4498a367.js} +1 -1
  151. package/dist/cdn/shared-47f3f5f5.js +29 -0
  152. package/dist/cdn/{shared-788173f2.js → shared-4eb52fc7.js} +1 -1
  153. package/dist/cdn/{shared-f8519b17.js → shared-57e94234.js} +1 -1
  154. package/dist/cdn/{shared-a704aaa4.js → shared-58add5b4.js} +1 -1
  155. package/dist/cdn/{shared-e502a7be.js → shared-59128d82.js} +1 -1
  156. package/dist/cdn/{shared-433eea12.js → shared-5a469962.js} +1 -1
  157. package/dist/cdn/shared-5c8931a0.js +1 -0
  158. package/dist/cdn/{shared-d3414cf0.js → shared-64231b81.js} +1 -1
  159. package/dist/cdn/{shared-64e243c4.js → shared-66278c21.js} +1 -1
  160. package/dist/cdn/shared-6740e365.js +1 -0
  161. package/dist/cdn/{shared-65b2760f.js → shared-69c98b7b.js} +1 -1
  162. package/dist/cdn/{shared-b5a0d106.js → shared-6bf89411.js} +1 -1
  163. package/dist/cdn/{shared-50f8f2bd.js → shared-6f071960.js} +1 -1
  164. package/dist/cdn/{shared-138959d7.js → shared-6f90d987.js} +1 -1
  165. package/dist/cdn/{shared-e4792d4a.js → shared-730acf1d.js} +1 -1
  166. package/dist/cdn/{shared-1ae16c80.js → shared-742640c2.js} +1 -1
  167. package/dist/cdn/shared-791b4510.js +1 -0
  168. package/dist/cdn/{shared-3b4148ad.js → shared-7f7d6ceb.js} +1 -1
  169. package/dist/cdn/{shared-be30b940.js → shared-803be1e4.js} +1 -1
  170. package/dist/cdn/{shared-2d1b1ab2.js → shared-845f968f.js} +1 -1
  171. package/dist/cdn/shared-8498f274.js +1 -0
  172. package/dist/cdn/{shared-bea6e6a7.js → shared-84e97597.js} +1 -1
  173. package/dist/cdn/{shared-597193f7.js → shared-8df4ab18.js} +1 -1
  174. package/dist/cdn/{shared-7fec42f2.js → shared-8f9014ff.js} +1 -1
  175. package/dist/cdn/{shared-0ea750af.js → shared-930e68b7.js} +1 -1
  176. package/dist/cdn/{shared-d6a0954b.js → shared-9496e995.js} +1 -1
  177. package/dist/cdn/{shared-0fb0732a.js → shared-97fac71c.js} +1 -1
  178. package/dist/cdn/shared-9b138652.js +1 -0
  179. package/dist/cdn/{shared-c5c123c5.js → shared-9e0b104a.js} +1 -1
  180. package/dist/cdn/{shared-21a945fd.js → shared-a08e5a5f.js} +5 -5
  181. package/dist/cdn/shared-a449033a.js +1 -0
  182. package/dist/cdn/{shared-3615b419.js → shared-a6ddec3d.js} +1 -1
  183. package/dist/cdn/{shared-e7a2b31d.js → shared-b01c3b62.js} +1 -1
  184. package/dist/cdn/{shared-5b0c206b.js → shared-b2cbe727.js} +1 -1
  185. package/dist/cdn/{shared-529a82a3.js → shared-b3fe8c63.js} +1 -1
  186. package/dist/cdn/{shared-51376cac.js → shared-bdc981e3.js} +1 -1
  187. package/dist/cdn/{shared-1091aa45.js → shared-be2ce0e6.js} +1 -1
  188. package/dist/cdn/{shared-937e58bf.js → shared-bf8d95b9.js} +1 -1
  189. package/dist/cdn/{shared-85feff39.js → shared-c5a44ef2.js} +1 -1
  190. package/dist/cdn/shared-c7796413.js +1 -0
  191. package/dist/cdn/{shared-12973e93.js → shared-c84333db.js} +1 -1
  192. package/dist/cdn/{shared-5380e27d.js → shared-d46230dc.js} +1 -1
  193. package/dist/cdn/{shared-9e8344bf.js → shared-d4b77609.js} +1 -1
  194. package/dist/cdn/{shared-7d15992f.js → shared-d9378323.js} +1 -1
  195. package/dist/cdn/{shared-37869bac.js → shared-da4f9115.js} +1 -1
  196. package/dist/cdn/shared-e2d5673b.js +1 -0
  197. package/dist/cdn/{shared-636d6e33.js → shared-e41960a0.js} +1 -1
  198. package/dist/cdn/{shared-278b8790.js → shared-e55c8dc4.js} +1 -1
  199. package/dist/cdn/{shared-5bcf861e.js → shared-eb49be2e.js} +1 -1
  200. package/dist/cdn/{shared-95d34ae8.js → shared-f2a7eb85.js} +5 -5
  201. package/dist/cdn/{shared-df7d368c.js → shared-fb859ece.js} +1 -1
  202. package/dist/cdn/shared-fc155659.js +1 -0
  203. package/dist/cdn/translations/admin-subscription-form/en.json +6 -6
  204. package/dist/cdn/translations/admin-transaction-card/en.json +35 -0
  205. package/dist/cdn/translations/coupon-code-form/en.json +6 -6
  206. package/dist/cdn/translations/store-transaction-folder-card/en.json +8 -0
  207. package/dist/cdn/translations/store-transaction-folder-form/en.json +62 -0
  208. package/dist/cdn/translations/transaction/en.json +4 -0
  209. package/dist/elements/internal/InternalCard/InternalCard.js +1 -1
  210. package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
  211. package/dist/elements/internal/InternalDateControl/getMonthNames.js +2 -2
  212. package/dist/elements/internal/InternalDateControl/getMonthNames.js.map +1 -1
  213. package/dist/elements/internal/InternalForm/InternalForm.d.ts +2 -4
  214. package/dist/elements/internal/InternalForm/InternalForm.js +17 -9
  215. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  216. package/dist/elements/internal/InternalForm/types.d.ts +9 -0
  217. package/dist/elements/internal/InternalForm/types.js.map +1 -1
  218. package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +2 -1
  219. package/dist/elements/internal/InternalTextControl/InternalTextControl.js +39 -0
  220. package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
  221. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +1 -2
  222. package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
  223. package/dist/elements/public/AdminSubscriptionForm/index.d.ts +1 -1
  224. package/dist/elements/public/AdminSubscriptionForm/index.js +1 -1
  225. package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -1
  226. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.d.ts +21 -0
  227. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js +183 -0
  228. package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js.map +1 -0
  229. package/dist/elements/public/AdminTransactionCard/index.d.ts +6 -0
  230. package/dist/elements/public/AdminTransactionCard/index.js +8 -0
  231. package/dist/elements/public/AdminTransactionCard/index.js.map +1 -0
  232. package/dist/elements/public/AdminTransactionCard/types.d.ts +5 -0
  233. package/dist/elements/public/AdminTransactionCard/types.js +2 -0
  234. package/dist/elements/public/AdminTransactionCard/types.js.map +1 -0
  235. package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js +6 -6
  236. package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js.map +1 -1
  237. package/dist/elements/public/CartForm/types.d.ts +1 -1
  238. package/dist/elements/public/CartForm/types.js.map +1 -1
  239. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +1 -0
  240. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +13 -1
  241. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
  242. package/dist/elements/public/CouponCodeForm/index.d.ts +1 -1
  243. package/dist/elements/public/CouponCodeForm/index.js +1 -1
  244. package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
  245. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +7 -3
  246. package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
  247. package/dist/elements/public/FormDialog/FormDialog.js +1 -0
  248. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  249. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +2 -2
  250. package/dist/elements/public/NucleonElement/NucleonElement.js +19 -13
  251. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  252. package/dist/elements/public/PaymentsApi/api/types.d.ts +6 -0
  253. package/dist/elements/public/PaymentsApi/api/types.js.map +1 -1
  254. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +31 -42
  255. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  256. package/dist/elements/public/StoreForm/StoreForm.js +0 -2
  257. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  258. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.d.ts +27 -0
  259. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js +134 -0
  260. package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js.map +1 -0
  261. package/dist/elements/public/StoreTransactionFolderCard/index.d.ts +5 -0
  262. package/dist/elements/public/StoreTransactionFolderCard/index.js +7 -0
  263. package/dist/elements/public/StoreTransactionFolderCard/index.js.map +1 -0
  264. package/dist/elements/public/StoreTransactionFolderCard/types.d.ts +3 -0
  265. package/dist/elements/public/StoreTransactionFolderCard/types.js +2 -0
  266. package/dist/elements/public/StoreTransactionFolderCard/types.js.map +1 -0
  267. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.d.ts +18 -0
  268. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js +83 -0
  269. package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js.map +1 -0
  270. package/dist/elements/public/StoreTransactionFolderForm/index.d.ts +7 -0
  271. package/dist/elements/public/StoreTransactionFolderForm/index.js +9 -0
  272. package/dist/elements/public/StoreTransactionFolderForm/index.js.map +1 -0
  273. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.d.ts +8 -0
  274. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js +74 -0
  275. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js.map +1 -0
  276. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.d.ts +3 -0
  277. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js +5 -0
  278. package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js.map +1 -0
  279. package/dist/elements/public/StoreTransactionFolderForm/types.d.ts +3 -0
  280. package/dist/elements/public/StoreTransactionFolderForm/types.js +2 -0
  281. package/dist/elements/public/StoreTransactionFolderForm/types.js.map +1 -0
  282. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +20 -7
  283. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
  284. package/dist/elements/public/SwipeActions/SwipeActions.d.ts +0 -1
  285. package/dist/elements/public/SwipeActions/SwipeActions.js +6 -7
  286. package/dist/elements/public/SwipeActions/SwipeActions.js.map +1 -1
  287. package/dist/elements/public/TaxCard/TaxCard.js +2 -2
  288. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  289. package/dist/elements/public/TaxForm/TaxForm.js +0 -2
  290. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  291. package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js +1 -3
  292. package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js.map +1 -1
  293. package/dist/elements/public/Transaction/Transaction.d.ts +2 -3
  294. package/dist/elements/public/Transaction/Transaction.js +30 -6
  295. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  296. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +5 -1
  297. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +87 -18
  298. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
  299. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -0
  300. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -0
  301. package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
  302. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +6 -6
  303. package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
  304. package/dist/elements/public/Transaction/types.d.ts +1 -3
  305. package/dist/elements/public/Transaction/types.js.map +1 -1
  306. package/dist/elements/public/TransactionCard/TransactionCard.js +34 -6
  307. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  308. package/dist/elements/public/WebhookCard/types.d.ts +1 -3
  309. package/dist/elements/public/WebhookCard/types.js.map +1 -1
  310. package/dist/elements/public/index.d.ts +3 -0
  311. package/dist/elements/public/index.defined.d.ts +3 -0
  312. package/dist/elements/public/index.defined.js +3 -0
  313. package/dist/elements/public/index.defined.js.map +1 -1
  314. package/dist/elements/public/index.js +3 -0
  315. package/dist/elements/public/index.js.map +1 -1
  316. package/dist/mixins/themeable.js +106 -4
  317. package/dist/mixins/themeable.js.map +1 -1
  318. package/package.json +2 -2
  319. package/dist/cdn/shared-10da9bf0.js +0 -1
  320. package/dist/cdn/shared-1da47f50.js +0 -1
  321. package/dist/cdn/shared-4b24accb.js +0 -1
  322. package/dist/cdn/shared-5905fca4.js +0 -1
  323. package/dist/cdn/shared-69074dae.js +0 -1
  324. package/dist/cdn/shared-77829fbb.js +0 -1
  325. package/dist/cdn/shared-7a87cd33.js +0 -29
  326. package/dist/cdn/shared-a6e889a8.js +0 -1
  327. package/dist/cdn/shared-c66ca1f5.js +0 -1
  328. package/dist/cdn/shared-cb4ac1d2.js +0 -1
  329. package/dist/cdn/shared-f8e1143e.js +0 -1
  330. package/dist/cdn/shared-fc784ca0.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 D=function(){return D=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},D.apply(this,arguments)};function I(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 N(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 L(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 C(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L(arguments[e]));return t}var F={},U="xstate.guard";function M(t){return Object.keys(t)}function $(t,e,n){void 0===n&&(n=".");var r=z(t,n),i=z(e,n);return it(i)?!!it(r)&&i===r:it(r)?r in i:M(r).every((function(t){return t in i&&$(r[t],i[t])}))}function B(t){try{return it(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 V(t,e){try{return nt(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function z(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:nt(t)?W(t):"string"!=typeof t?t:W(V(t,e));var n}function W(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 q(t,e){for(var n={},r=M(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function H(t,e,n){var r,i,o={};try{for(var a=N(M(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 G=function(t){return function(e){var n,r,i=e;try{for(var o=N(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 J(t){return t?it(t)?[[t]]:K(M(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?J(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function K(t){var e;return(e=[]).concat.apply(e,C(t))}function Q(t){return nt(t)?t:[t]}function Z(t){return void 0===t?[]:Q(t)}function X(t,e,n){var r,i;if(rt(t))return t(e,n.data);var o={};try{for(var a=N(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];rt(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 Y(t){return t instanceof Promise||!(null===t||!rt(t)&&"object"!=typeof t||!rt(t.then))}function tt(t,e){var n,r,i=L([[],[]],2),o=i[0],a=i[1];try{for(var s=N(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 et(t,e){return q(t.states,(function(t,n){if(t){var r=(it(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:et(t,r)}}}))}function nt(t){return Array.isArray(t)}function rt(t){return"function"==typeof t}function it(t){return"string"==typeof t}function ot(t,e){if(t)return it(t)?{type:U,name:t,predicate:e?e[t]:void 0}:rt(t)?{type:U,name:t.name,predicate:t}:t}function at(t){try{return"subscribe"in t&&rt(t.subscribe)}catch(t){return!1}}var st,ct,ut=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function lt(t){try{return"__xstatenode"in t}catch(t){return!1}}function ft(t){return!!t&&"function"==typeof t.send}function ht(t,e){return it(t)||"number"==typeof t?D({type:t},e):t}function pt(t,e){if(!it(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=ht(t);return D({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function dt(t,e){return Q(e).map((function(e){return void 0===e||"string"==typeof e||lt(e)?{target:e,event:t}:D(D({},e),{event:t})}))}function yt(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if(e.type===U)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 vt(t){return"string"==typeof t?{type:t}:t}function gt(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"}(st||(st={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(ct||(ct={}));var bt=st.Start,_t=st.Stop,mt=st.Raise,wt=st.Send,xt=st.Cancel,jt=st.NullEvent,Ot=st.Assign;st.After,st.DoneState;var St=st.Log,Et=st.Init,kt=st.Invoke;st.ErrorExecution;var At=st.ErrorPlatform,Pt=st.ErrorCustom,Tt=st.Update,Rt=st.Choose,Dt=st.Pure,It=pt({type:Et});function Nt(t,e){return e&&e[t]||void 0}function Lt(t,e){var n;if(it(t)||"number"==typeof t){var r=Nt(t,e);n=rt(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(rt(t))n={type:t.name||t.toString(),exec:t};else{if(rt(r=Nt(t.type,e)))n=D(D({},t),{exec:r});else if(r){var i=r.type||t.type;n=D(D(D({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var Ct=function(t,e){return t?(nt(t)?t:[t]).map((function(t){return Lt(t,e)})):[]};function Ft(t){var e=Lt(t);return D(D({id:it(t)?t:e.id},e),{type:e.type})}function Ut(t){return it(t)?{type:mt,event:t}:Mt(t,{to:ct.Internal})}function Mt(t,e){return{to:e?e.to:void 0,type:wt,event:rt(t)?t:ht(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:rt(t)?t.name:B(t)}}function $t(t,e){return Mt(t,D(D({},e),{to:ct.Parent}))}function Bt(){return $t(Tt)}function Vt(t,e){return Mt(t,D(D({},e),{to:function(t,e,n){return n._event.origin}}))}var zt=function(t,e){return{context:t,event:e}};function Wt(t,e){return void 0===t&&(t=zt),{type:St,label:e,expr:t}}var qt=function(t){return{type:xt,sendId:t}};function Ht(t){var e=Ft(t);return{type:st.Start,activity:e,exec:void 0}}function Gt(t){var e=rt(t)?t:Ft(t);return{type:st.Stop,activity:e,exec:void 0}}var Jt=function(t){return{type:Ot,assignment:t}};function Kt(t,e){var n=e?"#"+e:"";return st.After+"("+t+")"+n}function Qt(t,e){var n=st.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Zt(t,e){var n=st.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Xt(t,e){var n=st.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Yt(t){return{type:st.Pure,get:t}}function te(t,e){return Mt((function(t,e){return e}),D(D({},e),{to:t}))}function ee(t,e){return $t((function(e,n,r){return{type:Pt,data:rt(t)?t(e,n,r):t}}),D(D({},e),{to:ct.Parent}))}function ne(t){return{type:st.Choose,conds:t}}function re(t,e,n,r,i){var o=L(tt(i,(function(t){return t.type===Ot})),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(rt(a))c=a(t,e.data,s);else try{for(var u=N(M(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=rt(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=K(s.map((function(n){var i;switch(n.type){case mt:return{type:mt,_event:pt(n.event)};case wt:var o=function(t,e,n,r){var i,o={_event:n},a=pt(rt(t.event)?t.event(e,n.data,o):t.event);if(it(t.delay)){var s=r&&r[t.delay];i=rt(s)?s(e,n.data,o):s}else i=rt(t.delay)?t.delay(e,n.data,o):t.delay;var c=rt(t.to)?t.to(e,n.data,o):t.to;return D(D({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case St:return function(t,e,n){return D(D({},t),{value:it(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case Rt:if(!(s=null===(i=n.conds.find((function(n){var i=ot(n.cond,t.options.guards);return!i||yt(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=re(t,e,c,r,Ct(Z(s),t.options.actions));return c=a[1],a[0];case Dt:var s;if(!(s=n.get(c,r.data)))return[];a=re(t,e,c,r,Ct(Z(s),t.options.actions));return c=a[1],a[0];case _t:return function(t,e,n){var r=rt(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:st.Stop,activity:i}}(n,c,r);default:return Lt(n,t.options.actions)}})));return[u,c]}var ie=function(t){return"atomic"===t.type||"final"===t.type};function oe(t){return M(t.states).map((function(e){return t.states[e]}))}function ae(t){var e=[t];return ie(t)?e:e.concat(K(oe(t).map(ae)))}function se(t,e){var n,r,i,o,a,s,c,u,l=ue(new Set(t)),f=new Set(e);try{for(var h=N(f),p=h.next();!p.done;p=h.next())for(var d=(j=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=ue(f);try{for(var v=N(f),g=v.next();!g.done;g=v.next()){if("compound"!==(j=g.value).type||y.get(j)&&y.get(j).length){if("parallel"===j.type)try{for(var b=(a=void 0,N(oe(j))),_=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(j)?l.get(j).forEach((function(t){return f.add(t)})):j.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=N(f),x=w.next();!x.done;x=w.next()){var j;for(d=(j=x.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}}catch(t){c={error:t}}finally{try{x&&!x.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return f}function ce(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(ie(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=ce(t,e)})),i}function ue(t){var e,n,r=new Map;try{for(var i=N(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 le(t,e){return ce(t,ue(se([t],e)))}function fe(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function he(t,e){return"compound"===e.type?oe(e).some((function(e){return"final"===e.type&&fe(t,e)})):"parallel"===e.type&&oe(e).every((function(e){return he(t,e)}))}function pe(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(it(t)||it(e))return t===e;var n=M(t),r=M(e);return n.length===r.length&&n.every((function(n){return pe(t[n],e[n])}))}function de(t){return!it(t)&&("value"in t&&"history"in t)}function ye(t,e){var n=t.exec;return D(D({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var ve=function(){function t(t){var e=this;this.actions=[],this.activities=F,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||F,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,K(C(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:It,_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=It;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="."),it(t))return[t];var r=M(t);return r.concat.apply(r,C(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,I(t,["configuration","transitions"])},t.prototype.matches=function(t){return $(t,this.value)},t}(),ge=function(t,e){return e(t)};function be(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function _e(t,e,n,r){var i,o=vt(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?X(t.data,n,r):void 0,c=a?function(t,e,n){var r=be(e);r.deferred=!0,lt(t)&&(r.state=ge(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):be(t.id);return c.meta=t,c}function me(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function we(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function xe(t){return D(D({type:kt},t),{toJSON:function(){t.onDone,t.onError;var e=I(t,["onDone","onError"]);return D(D({},e),{type:kt,src:we(t.src)})}})}var je="*",Oe={},Se=function(t){return"#"===t[0]},Ee=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||C([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&&M(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?q(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,D(((r={})[o.id]=o,r),o.idMap)),o})):Oe;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=N(oe(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=Z(this.config.entry||this.config.onEntry).map((function(t){return Lt(t)})),this.onExit=Z(this.config.exit||this.config.onExit).map((function(t){return Lt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Z(this.config.invoke).map((function(t,e){var n,r;if(lt(t))return i.machine.options.services=D(((n={})[t.id]=t,n),i.machine.options.services),xe({src:t.id,id:t.id});if(it(t.src))return xe(D(D({},t),{id:t.id||t.src,src:t.src}));if(lt(t.src)||rt(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=D(((r={})[o]=t.src,r),i.machine.options.services),xe(D(D({id:o},t),{src:o}))}var a=t.src;return xe(D(D({id:a.type},t),{src:a}))})),this.activities=Z(this.config.activities).concat(this.invoke).map((function(t){return Ft(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||ae(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:D(D({},i),e.actions),activities:D(D({},o),e.activities),guards:D(D({},a),e.guards),services:D(D({},s),e.services),delays:D(D({},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:q(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===je}));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=Kt(rt(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(Mt(r,{delay:e})),t.onExit.push(qt(r)),r};return(nt(e)?e.map((function(t,e){var r=n(t.delay,e);return D(D({},t),{event:r})})):K(M(e).map((function(t,r){var i=e[t],o=it(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return Z(o).map((function(t){return D(D({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return D(D({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof ve?t.value:z(t,this.delimiter);if(it(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=M(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=B(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(se([],this.getStateNodes(t.value)));return new ve(D(D({},t),{value:this.resolve(t.value),configuration:e,done:he(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=M(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=N(M(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=M(o).map((function(t){return o[t]})),h=K(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=K(f.map((function(t){return t.entrySet}))),d=K(M(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:K(f.map((function(t){return t.exitSet}))),configuration:d,source:e,actions:K(M(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return it(t)?this.transitionLeafNode(t,e,n):1===M(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=N(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||(it(p)&&Se(p)?t.matches(z(this.getStateNodeById(p).path,this.delimiter)):$(z(p,this.delimiter),G(this.path.slice(0,-2))(t.value))),v=!1;try{v=!h||yt(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,C(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=K(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),b=!!i.internal;return{transitions:[i],entrySet:b?[]:K(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=se([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?se(c,t.configuration):c;try{for(var l=N(u),f=l.next();!f.done;f=l.next()){fe(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=N(c),p=h.next();!p.done;p=h.next()){var d;fe(u,d=p.value)&&!fe(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=K(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Qt(r.id,r.doneData),Qt(o.id,r.doneData?X(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&oe(a).every((function(e){return he(t.configuration,e)}))&&i.push(Qt(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=L([K(Array.from(v).map((function(t){return C(t.activities.map((function(t){return Ht(t)})),t.onEntry)}))).concat(y.map(Ut)),K(Array.from(g).map((function(t){return C(t.onExit,t.activities.map((function(t){return Gt(t)})))})))],2),_=b[0],m=b[1];return Ct(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=pt(e);if(t instanceof ve)r=void 0===n?t:this.resolveState(ve.from(t,n));else{var a=it(t)?this.resolve(W(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(ve.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=se([],this.getStateNodes(r.value)),l=c.configuration.length?se(u,c.configuration):u;return c.configuration=C(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,C(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=It),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?le(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?D({},e.activities):{};try{for(var p=N(f),d=p.next();!d.done;d=p.next()){var y=d.value;y.type===bt?h[y.activity.id||y.activity.type]=y:y.type===_t&&(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=L(re(this,e,l,n,f),2),_=b[0],m=b[1],w=L(tt(_,(function(t){return t.type===mt||t.type===wt&&t.to===ct.Internal})),2),x=w[0],j=w[1],O=_.filter((function(t){var e;return t.type===bt&&(null===(e=t.activity)||void 0===e?void 0:e.type)===kt})),S=O.reduce((function(t,e){return t[e.activity.id]=_e(e.activity,a.machine,m,n),t}),e?D({},e.children):{}),E=c?t.configuration:e?e.configuration:[],k=E.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),A=he(E,this),P=new ve({value:c||e.value,context:m,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(v=u,g=c,{current:g,states:et(v,g)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?j:[],activities:c?h:e?e.activities:{},meta:c?k:e?e.meta:void 0,events:[],configuration:E,transitions:t.transitions,children:S,done:A}),T=l!==m;P.changed=n.name===Tt||T;var R=P.history;if(R&&delete R.history,!c)return P;var I=P;if(!A)for((this._transient||s.some((function(t){return t._transient})))&&(I=this.resolveRaisedTransition(I,{type:jt},n));x.length;){var C=x.shift();I=this.resolveRaisedTransition(I,C._event,n)}var F=I.changed||(R?!!I.actions.length||T||typeof R.value!=typeof I.value||!pe(I.value,R.value):void 0);return I.changed=F,I.history=R,I},t.prototype.getStateNode=function(t){if(Se(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=Se(t)?t.slice(1):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&&Se(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=V(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||Oe;switch(this.type){case"parallel":return q(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):Oe}));case"compound":if(it(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return M(t).length?q(t,(function(t,e){return t?n.getStateNode(e).resolve(t):Oe})):this.initialStateValue||{};default:return t||Oe}},t.prototype.getResolvedPath=function(t){if(Se(t)){var e=this.machine.idMap[t.slice(1)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return V(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=H(this.states,(function(t){return t.initialStateValue||Oe}),(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=ie(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=it(e.target)&&Se(e.target)?W(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 ie(this)?[this]:"compound"!==this.type||this.initial?K(J(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=L(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(M(this.states).length)return{current:t||this.initialStateValue,states:H(this.states,(function(e,n){if(!t)return e.historyValue();var r=it(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?K(J(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=N(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 it(a)?[n.getStateNode(a)]:K(J(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=K(M(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=N(M(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,N(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(!it(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 Z(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return it(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=D(D({},t),{actions:Ct(Z(t.actions)),cond:ot(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return D(D({},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=je,a=i[o],s=void 0===a?[]:a,c=I(i,["*"]);n=K(M(c).map((function(t){var e=dt(t,c[t]);return e})).concat(dt(je,s)))}else n=[];var u=this.config.always?dt("",this.config.always):[],l=this.config.onDone?dt(String(Qt(this.id)),this.config.onDone):[];var f=K(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,C(dt(String(Zt(t.id)),t.onDone))),t.onError&&e.push.apply(e,C(dt(String(Xt(t.id)),t.onError))),e}))),h=this.after,p=K(C(l,f,n,u).map((function(t){return Z(t).map((function(t){return r.formatTransition(t)}))})));try{for(var d=N(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 ke(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new Ee(t,e,r)}function Ae(t,e){var n="function"==typeof t.context?t.context():t.context;return new Ee(t,e,n)}const Pe=Jt({failure:null}),Te=Jt({errors:[]}),Re=Jt({edits:null}),De=Jt({data:null}),Ie=Te,Ne=Jt({failure:(t,e)=>e.data}),Le=Jt({errors:(t,e)=>e.data}),Ce=Jt({data:(t,e)=>e.data}),Fe=Jt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const Ue=Ae({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:Pe,clearErrors:Te,clearEdits:Re,clearData:De,validate:Ie,setFailure:Ne,setErrors:Le,setData:Ce,applyEdit:Fe}),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 Me{constructor(t){this.__tree=Me.__parse(t)}static get True(){return Be}static get False(){return $e}static fromAttribute(t,e){return null===t?Me.False:""===t||t===e?Me.True:new Me(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const e=new Me("");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 Me.__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 $e=new Me(""),Be=new Me("not=*");function Ve(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}var ze=Array.isArray,We=1/0,qe=y?y.prototype:void 0,He=qe?qe.toString:void 0;function Ge(t){if("string"==typeof t)return t;if(ze(t))return Ve(t,Ge)+"";if(k(t))return He?He.call(t):"";var e=t+"";return"0"==e&&1/t==-We?"-0":e}var Je="[object AsyncFunction]",Ke="[object Function]",Qe="[object GeneratorFunction]",Ze="[object Proxy]";function Xe(t){if(!f(t))return!1;var e=O(t);return e==Ke||e==Qe||e==Je||e==Ze}var Ye,tn=d["__core-js_shared__"],en=(Ye=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||""))?"Symbol(src)_1."+Ye:"";var nn=Function.prototype.toString;function rn(t){if(null!=t){try{return nn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var on=/^\[object .+?Constructor\]$/,an=Function.prototype,sn=Object.prototype,cn=an.toString,un=sn.hasOwnProperty,ln=RegExp("^"+cn.call(un).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fn(t){return!(!f(t)||(e=t,en&&en in e))&&(Xe(t)?ln:on).test(rn(t));var e}function hn(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return fn(n)?n:void 0}var pn=hn(d,"WeakMap"),dn=9007199254740991,yn=/^(?:0|[1-9]\d*)$/;function vn(t,e){var n=typeof t;return!!(e=null==e?dn:e)&&("number"==n||"symbol"!=n&&yn.test(t))&&t>-1&&t%1==0&&t<e}function gn(t,e){return t===e||t!=t&&e!=e}var bn=9007199254740991;function _n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=bn}function mn(t){return null!=t&&_n(t.length)&&!Xe(t)}var wn=Object.prototype;function xn(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||wn)}function jn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function On(t){return S(t)&&"[object Arguments]"==O(t)}var Sn=Object.prototype,En=Sn.hasOwnProperty,kn=Sn.propertyIsEnumerable,An=On(function(){return arguments}())?On:function(t){return S(t)&&En.call(t,"callee")&&!kn.call(t,"callee")};var Pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tn=Pn&&"object"==typeof module&&module&&!module.nodeType&&module,Rn=Tn&&Tn.exports===Pn?d.Buffer:void 0,Dn=(Rn?Rn.isBuffer:void 0)||function(){return!1},In={};function Nn(t){return function(e){return t(e)}}In["[object Float32Array]"]=In["[object Float64Array]"]=In["[object Int8Array]"]=In["[object Int16Array]"]=In["[object Int32Array]"]=In["[object Uint8Array]"]=In["[object Uint8ClampedArray]"]=In["[object Uint16Array]"]=In["[object Uint32Array]"]=!0,In["[object Arguments]"]=In["[object Array]"]=In["[object ArrayBuffer]"]=In["[object Boolean]"]=In["[object DataView]"]=In["[object Date]"]=In["[object Error]"]=In["[object Function]"]=In["[object Map]"]=In["[object Number]"]=In["[object Object]"]=In["[object RegExp]"]=In["[object Set]"]=In["[object String]"]=In["[object WeakMap]"]=!1;var Ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,Cn=Ln&&"object"==typeof module&&module&&!module.nodeType&&module,Fn=Cn&&Cn.exports===Ln&&h.process,Un=function(){try{var t=Cn&&Cn.require&&Cn.require("util").types;return t||Fn&&Fn.binding&&Fn.binding("util")}catch(t){}}(),Mn=Un&&Un.isTypedArray,$n=Mn?Nn(Mn):function(t){return S(t)&&_n(t.length)&&!!In[O(t)]},Bn=Object.prototype.hasOwnProperty;function Vn(t,e){var n=ze(t),r=!n&&An(t),i=!n&&!r&&Dn(t),o=!n&&!r&&!i&&$n(t),a=n||r||i||o,s=a?jn(t.length,String):[],c=s.length;for(var u in t)!e&&!Bn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vn(u,c))||s.push(u);return s}function zn(t,e){return function(n){return t(e(n))}}var Wn=zn(Object.keys,Object),qn=Object.prototype.hasOwnProperty;function Hn(t){return mn(t)?Vn(t):function(t){if(!xn(t))return Wn(t);var e=[];for(var n in Object(t))qn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jn=/^\w*$/;var Kn=hn(Object,"create");var Qn=Object.prototype.hasOwnProperty;var Zn=Object.prototype.hasOwnProperty;function Xn(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 Yn(t,e){for(var n=t.length;n--;)if(gn(t[n][0],e))return n;return-1}Xn.prototype.clear=function(){this.__data__=Kn?Kn(null):{},this.size=0},Xn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Xn.prototype.get=function(t){var e=this.__data__;if(Kn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Qn.call(e,t)?e[t]:void 0},Xn.prototype.has=function(t){var e=this.__data__;return Kn?void 0!==e[t]:Zn.call(e,t)},Xn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Kn&&void 0===e?"__lodash_hash_undefined__":e,this};var tr=Array.prototype.splice;function er(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])}}er.prototype.clear=function(){this.__data__=[],this.size=0},er.prototype.delete=function(t){var e=this.__data__,n=Yn(e,t);return!(n<0)&&(n==e.length-1?e.pop():tr.call(e,n,1),--this.size,!0)},er.prototype.get=function(t){var e=this.__data__,n=Yn(e,t);return n<0?void 0:e[n][1]},er.prototype.has=function(t){return Yn(this.__data__,t)>-1},er.prototype.set=function(t,e){var n=this.__data__,r=Yn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var nr=hn(d,"Map");function rr(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 ir(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])}}ir.prototype.clear=function(){this.size=0,this.__data__={hash:new Xn,map:new(nr||er),string:new Xn}},ir.prototype.delete=function(t){var e=rr(this,t).delete(t);return this.size-=e?1:0,e},ir.prototype.get=function(t){return rr(this,t).get(t)},ir.prototype.has=function(t){return rr(this,t).has(t)},ir.prototype.set=function(t,e){var n=rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var or="Expected a function";function ar(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(or);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(ar.Cache||ir),n}ar.Cache=ir;var sr,cr,ur,lr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fr=/\\(\\)?/g,hr=(sr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(lr,(function(t,n,r,i){e.push(r?i.replace(fr,"$1"):n||t)})),e},cr=ar(sr,(function(t){return 500===ur.size&&ur.clear(),t})),ur=cr.cache,cr),pr=hr;function dr(t){return null==t?"":Ge(t)}function yr(t,e){return ze(t)?t:function(t,e){if(ze(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!k(t))||Jn.test(t)||!Gn.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:pr(dr(t))}var vr=1/0;function gr(t){if("string"==typeof t||k(t))return t;var e=t+"";return"0"==e&&1/t==-vr?"-0":e}function br(t,e){for(var n=0,r=(e=yr(e,t)).length;null!=t&&n<r;)t=t[gr(e[n++])];return n&&n==r?t:void 0}function _r(t,e,n){var r=null==t?void 0:br(t,e);return void 0===r?n:r}function mr(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function wr(t){var e=this.__data__=new er(t);this.size=e.size}function xr(){return[]}wr.prototype.clear=function(){this.__data__=new er,this.size=0},wr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},wr.prototype.get=function(t){return this.__data__.get(t)},wr.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof er){var r=n.__data__;if(!nr||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ir(r)}return n.set(t,e),this.size=n.size,this};var jr=Object.prototype.propertyIsEnumerable,Or=Object.getOwnPropertySymbols,Sr=Or?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}(Or(t),(function(e){return jr.call(t,e)})))}:xr,Er=Sr;function kr(t,e,n){var r=e(t);return ze(t)?r:mr(r,n(t))}function Ar(t){return kr(t,Hn,Er)}var Pr=hn(d,"DataView"),Tr=hn(d,"Promise"),Rr=hn(d,"Set"),Dr="[object Map]",Ir="[object Promise]",Nr="[object Set]",Lr="[object WeakMap]",Cr="[object DataView]",Fr=rn(Pr),Ur=rn(nr),Mr=rn(Tr),$r=rn(Rr),Br=rn(pn),Vr=O;(Pr&&Vr(new Pr(new ArrayBuffer(1)))!=Cr||nr&&Vr(new nr)!=Dr||Tr&&Vr(Tr.resolve())!=Ir||Rr&&Vr(new Rr)!=Nr||pn&&Vr(new pn)!=Lr)&&(Vr=function(t){var e=O(t),n="[object Object]"==e?t.constructor:void 0,r=n?rn(n):"";if(r)switch(r){case Fr:return Cr;case Ur:return Dr;case Mr:return Ir;case $r:return Nr;case Br:return Lr}return e});var zr=Vr,Wr=d.Uint8Array;function qr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ir;++e<n;)this.add(t[e])}function Hr(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 Gr(t,e){return t.has(e)}qr.prototype.add=qr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qr.prototype.has=function(t){return this.__data__.has(t)};var Jr=1,Kr=2;function Qr(t,e,n,r,i,o){var a=n&Jr,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=n&Kr?new qr: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(!Hr(e,(function(t,e){if(!Gr(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 Zr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Xr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Yr=1,ti=2,ei="[object Boolean]",ni="[object Date]",ri="[object Error]",ii="[object Map]",oi="[object Number]",ai="[object RegExp]",si="[object Set]",ci="[object String]",ui="[object Symbol]",li="[object ArrayBuffer]",fi="[object DataView]",hi=y?y.prototype:void 0,pi=hi?hi.valueOf:void 0;var di=1,yi=Object.prototype.hasOwnProperty;var vi=1,gi="[object Arguments]",bi="[object Array]",_i="[object Object]",mi=Object.prototype.hasOwnProperty;function wi(t,e,n,r,i,o){var a=ze(t),s=ze(e),c=a?bi:zr(t),u=s?bi:zr(e),l=(c=c==gi?_i:c)==_i,f=(u=u==gi?_i:u)==_i,h=c==u;if(h&&Dn(t)){if(!Dn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new wr),a||$n(t)?Qr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case fi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case li:return!(t.byteLength!=e.byteLength||!o(new Wr(t),new Wr(e)));case ei:case ni:case oi:return gn(+t,+e);case ri:return t.name==e.name&&t.message==e.message;case ai:case ci:return t==e+"";case ii:var s=Zr;case si:var c=r&Yr;if(s||(s=Xr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=ti,a.set(t,e);var l=Qr(s(t),s(e),r,i,o,a);return a.delete(t),l;case ui:if(pi)return pi.call(t)==pi.call(e)}return!1}(t,e,c,n,r,i,o);if(!(n&vi)){var p=l&&mi.call(t,"__wrapped__"),d=f&&mi.call(e,"__wrapped__");if(p||d){var y=p?t.value():t,v=d?e.value():e;return o||(o=new wr),i(y,v,n,r,o)}}return!!h&&(o||(o=new wr),function(t,e,n,r,i,o){var a=n&di,s=Ar(t),c=s.length;if(c!=Ar(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:yi.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 xi(t,e,n,r,i){return t===e||(null==t||null==e||!S(t)&&!S(e)?t!=t&&e!=e:wi(t,e,n,r,xi,i))}function ji(t,e){return xi(t,e)}class Oi extends Error{constructor(){super("not enough info to update; please reload resource instead")}}function Si(t){return Object.prototype.toString.call(t)}var Ei=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function ki(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)}var Ai=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},Pi=Object.prototype.hasOwnProperty||function(t,e){return e in t};function Ti(t){if("object"==typeof t&&null!==t){var e;if(Ei(t))e=[];else if("[object Date]"===Si(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===Si(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===Si(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===Si(t)}(t)||function(t){return"[object Number]"===Si(t)}(t)||function(t){return"[object String]"===Si(t)}(t))e=Object(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 ki(Ai(t),(function(n){e[n]=t[n]})),e}return t}function Ri(t,e,n){var r=[],i=[],o=!0;return function t(a){var s=n?Ti(a):a,c={},u=!0,l={node:s,node_:a,path:[].concat(r),parent:i[i.length-1],parents:i,key:r[r.length-1],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){l.isRoot||(l.parent.node[l.key]=t),l.node=t,e&&(u=!1)},delete:function(t){delete l.parent.node[l.key],t&&(u=!1)},remove:function(t){Ei(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key],t&&(u=!1)},keys:null,before:function(t){c.before=t},after:function(t){c.after=t},pre:function(t){c.pre=t},post:function(t){c.post=t},stop:function(){o=!1},block:function(){u=!1}};if(!o)return l;function f(){if("object"==typeof l.node&&null!==l.node){l.keys&&l.node_===l.node||(l.keys=Ai(l.node)),l.isLeaf=0===l.keys.length;for(var t=0;t<i.length;t++)if(i[t].node_===a){l.circular=i[t];break}}else l.isLeaf=!0,l.keys=null;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot}f();var h=e.call(l,l.node);return void 0!==h&&l.update&&l.update(h),c.before&&c.before.call(l,l.node),u?("object"!=typeof l.node||null===l.node||l.circular||(i.push(l),f(),ki(l.keys,(function(e,i){r.push(e),c.pre&&c.pre.call(l,l.node[e],e);var o=t(l.node[e]);n&&Pi.call(l.node,e)&&(l.node[e]=o.node),o.isLast=i===l.keys.length-1,o.isFirst=0===i,c.post&&c.post.call(l,o),r.pop()})),i.pop()),c.after&&c.after.call(l,l.node),l):l}(t).node}function Di(t){this.value=t}function Ii(t){return new Di(t)}Di.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!Pi.call(e,r))return;e=e[r]}return e},Di.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!Pi.call(e,r))return!1;e=e[r]}return!0},Di.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];Pi.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},Di.prototype.map=function(t){return Ri(this.value,t,!0)},Di.prototype.forEach=function(t){return this.value=Ri(this.value,t,!1),this.value},Di.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},Di.prototype.paths=function(){var t=[];return this.forEach((function(){t.push(this.path)})),t},Di.prototype.nodes=function(){var t=[];return this.forEach((function(){t.push(this.node)})),t},Di.prototype.clone=function(){var t=[],e=[];return function n(r){for(var i=0;i<t.length;i++)if(t[i]===r)return e[i];if("object"==typeof r&&null!==r){var o=Ti(r);return t.push(r),e.push(o),ki(Ai(r),(function(t){o[t]=n(r[t])})),t.pop(),e.pop(),o}return r}(this.value)},ki(Ai(Di.prototype),(function(t){Ii[t]=function(e){var n=[].slice.call(arguments,1),r=new Di(e);return r[t].apply(r,n)}}));var Ni=Ii;class Li{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Li.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Li.__applyPatch(i,t,e);return ji(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 _r(t,"_links.first.href")}static __isResource(t){return"string"==typeof _r(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 Ni(t).reduce((function(t,e){if(!Li.__isResource(e)||Li.__isCollection(e))return t;const n=Ni(e).map((function(){if("_embedded"===this.key)return 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=>Li.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=Ni({data:e}).map((function(e){if(!Li.__isResource(e))return;const n=e._links.self.href,r=Li.__approximateURI(n);if(o.includes(r))throw new Li.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 Li.UpdateError}})).data)&&void 0!==i?i:null}}Li.UpdateError=Oi;var Ci=T((function(t,e){var n="undefined"!=typeof self?self:A,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=d(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=d(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=u(t),e=l(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[u(t)]},h.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},h.prototype.set=function(t,e){this.map[u(t)]=l(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),f(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var n,r,i=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},g.call(_.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];w.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function j(t,n){return new Promise((function(r,o){var a=new _(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new w(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}j.polyfill=!0,t.fetch||(t.fetch=j,t.Headers=h,t.Request=_,t.Response=w),e.Headers=h,e.Request=_,e.Response=w,e.fetch=j,Object.defineProperty(e,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})),Fi=T((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)}()})),Ui=function(t,e,n,r){this.name=t,this.fn=e,this.args=n,this.modifiers=r};function Mi(t,e){return void 0===e&&(e="simple"),"object"==typeof t?t[e]:t}function $i(t,e,n){if(t.length){var r=t.shift(),i=$i(t,e,n);return r.perform(i,n)}return Mi(e)}function Bi(t,e,n){if(t.length){var r=t.shift(),i=Bi(t,e,n);return r.performAsync(i,n)}return function(t){return Promise.resolve(Mi(e,"async")(t))}}Ui.prototype._test=function(t){var e=this.fn;try{$i(this.modifiers.slice(),e,this)(t)}catch(t){e=function(){return!1}}try{return $i(this.modifiers.slice(),e,this)(t)}catch(t){return!1}},Ui.prototype._check=function(t){try{$i(this.modifiers.slice(),this.fn,this)(t)}catch(t){if($i(this.modifiers.slice(),(function(t){return t}),this)(!1))return}if(!$i(this.modifiers.slice(),this.fn,this)(t))throw null},Ui.prototype._testAsync=function(t){var e=this;return new Promise((function(n,r){Bi(e.modifiers.slice(),e.fn,e)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))};var Vi=function(t,e,n){this.name=t,this.perform=e,this.performAsync=n},zi=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),Wi=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.chain=t,this.nextRuleModifiers=e};function qi(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){qi(t,e,n,r)}),(function(e){r(new zi(i,t,e))}))}else n(t)}Wi.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 Ui(e,t.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},Wi.prototype._applyModifier=function(t,e){return this.nextRuleModifiers.push(new Vi(e,t.simple,t.async)),this},Wi.prototype._clone=function(){return new Wi(this.chain.slice(),this.nextRuleModifiers.slice())},Wi.prototype.test=function(t){return this.chain.every((function(e){return e._test(t)}))},Wi.prototype.testAll=function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new zi(n,t,r))}})),e},Wi.prototype.check=function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new zi(e,t,n)}}))},Wi.prototype.testAsync=function(t){var e=this;return new Promise((function(n,r){qi(t,e.chain.slice(),n,r)}))};var Hi=function(t,e){return!(!e||"string"!=typeof t||0!==t.trim().length)||null==t};function Gi(){return"undefined"!=typeof Proxy?Ki(new Wi):Qi(new Wi)}var Ji={};function Ki(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=Ki(t._clone());return n in Zi?r._applyModifier(Zi[n],n):n in Ji?r._applyRule(Ji[n],n):n in to?r._applyRule(to[n],n):void 0}})}function Qi(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];return Qi(e._clone())._applyRule(t[n],n).apply(void 0,r)}})),e},n=e(to,t),r=e(Ji,n);return Object.keys(Zi).forEach((function(t){Object.defineProperty(r,t,{get:function(){return Qi(r._clone())._applyModifier(Zi[t],t)}})})),r}Gi.extend=function(t){Object.assign(Ji,t)},Gi.clearCustomRules=function(){Ji={}};var Zi={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 Yi(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Yi(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&&Yi(e).every(t)}},async:function(t){return function(e){return Promise.all(Yi(e).map(t)).then((function(t){return t.every(Boolean)}))}}},strict:{simple:function(t,e){return function(n){return Xi(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 Xi(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t:t})).catch((function(){return!1}))}}}};function Xi(t){return t&&"schema"===t.name&&t.args.length>0&&"object"==typeof t.args[0]}function Yi(t){return"string"==typeof t?t.split(""):t}var to={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||no)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return eo("string")},boolean:function(){return eo("boolean")},undefined:function(){return eo("undefined")},null:function(){return eo("null")},array:function(){return eo("array")},object:function(){return eo("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 Hi(n,e)||void 0===t.check(n)},async:function(n){return Hi(n,e)||t.testAsync(n)}}}};function eo(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function no(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Gi.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 ro=Gi().schema({clear:Gi().typeOf("function"),getItem:Gi().typeOf("function"),key:Gi().typeOf("function"),length:Gi().number(),removeItem:Gi().typeOf("function"),setItem:Gi().typeOf("function")});class io extends Error{constructor(t){io.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}io.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",io.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",io.UNAUTHORIZED="UNAUTHORIZED",io.INVALID_FORM="INVALID_FORM",io.UNAVAILABLE="UNAVAILABLE",io.UNKNOWN="UNKNOWN",io.v8n={constructor:Gi().schema({code:Gi().passesAnyOf(Gi().exact(io.NEW_PASSWORD_REQUIRED),Gi().exact(io.INVALID_NEW_PASSWORD),Gi().exact(io.UNAUTHORIZED),Gi().exact(io.INVALID_FORM),Gi().exact(io.UNAVAILABLE),Gi().exact(io.UNKNOWN))})};var oo=T((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),ao=T((function(t){var e=oo.default;t.exports=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),so=T((function(t){var e=oo.default;t.exports=function(t){var n=ao(t,"string");return"symbol"===e(n)?n:String(n)},t.exports.__esModule=!0,t.exports.default=t.exports})),co=P(T((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,so(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}))),uo=T((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})),lo=T((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})),fo=P(T((function(t){t.exports=function(t,e){var n=lo(t,e,"get");return uo(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),ho=new WeakMap,po=function(){function t(){ho.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=fo(this,ho).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=fo(this,ho).get(""+t))?e:null},e.setItem=function(t,e){fo(this,ho).set(""+t,""+e)},e.removeItem=function(t){fo(this,ho).delete(""+t)},e.clear=function(){fo(this,ho).clear()},co(t,[{key:"length",get:function(){return fo(this,ho).size}}]),t}(),yo=po;class vo extends Error{constructor(t){super(),vo.v8n.constructor.check(t),this.response=t}}vo.v8n={constructor:Gi().instanceOf(Ci.Response)};var go=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())}))},bo=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 _o(t){const{json:e}=t,n=bo(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 Oo(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=>_o(Object.assign(Object.assign({},n),{json:t})))):_o(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class mo extends Ci.Response{constructor(t){mo.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 go(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return _o(Object.assign({json:e},n))}))}}mo.v8n={constructor:Gi().schema({cache:ro,console:Gi().instanceOf(Fi.constructor),fetch:Gi().typeOf("function")})};var wo=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 xo(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>xo(t,e))).join():Object.entries(e).map((([t,e])=>xo(n+t,e))).join()}function jo(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>jo(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class Oo{constructor(t){Oo.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return wo(this,void 0,void 0,(function*(){Oo.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",jo(a)),void 0!==s&&e.searchParams.set("zoom",xo("",s));const c=yield this._fetch(new Ci.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new mo(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return wo(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new Ci.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new mo(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){Oo.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new Oo(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return wo(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 Oo(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 Oo(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new vo(o)}))}}Oo.v8n={classConstructor:Gi().schema({cache:ro,console:Gi().instanceOf(Fi.constructor),fetch:Gi().typeOf("function"),path:Gi().curieChain()}),follow:Gi().string(),get:Gi().optional(Gi().schema({fields:Gi().optional(Gi().array().every.string()),filters:Gi().optional(Gi().array().every.string()),limit:Gi().optional(Gi().number()),offset:Gi().optional(Gi().number()),order:Gi().optional(Gi().passesAnyOf(Gi().string(),Gi().object(),Gi().array())),zoom:Gi().optional(Gi().passesAnyOf(Gi().string(),Gi().object(),Gi().array()))}))},Oo.ResolutionError=vo,Oo.Response=mo;var So=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 Eo extends Oo{constructor(t){var e,n,r;Eo.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new yo,console:Fi.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:Ci.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new yo,this.cache=this._cache,this.base=t.base}fetch(...t){return So(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}Eo.WHATWGResponse=Ci.Response,Eo.WHATWGRequest=Ci.Request,Eo.WHATWGHeaders=Ci.Headers,Eo.whatwgFetch=Ci.fetch,Eo.AuthError=io,Eo.Node=Oo,Eo.v8n={classConstructor:Gi().schema({base:Gi().instanceOf(URL),cache:Gi().optional(ro),fetch:Gi().optional(Gi().typeOf("function")),level:Gi().optional(Gi().integer()),storage:Gi().optional(ro)})};export{Pt as $,Eo as A,Me as B,pt as C,At as D,Nt as E,l as F,St as G,_t as H,bt as I,st as J,vt as K,Y as L,at as M,lt as N,xt as O,wt as P,me as Q,Li as R,Tt as S,Xt as T,ut as U,nt as V,ht as W,ct as X,it as Y,ft as Z,i as _,f as a,de as a0,ve as a1,C as a2,ye as a3,gt as a4,xn as a5,mn as a6,Vn as a7,zn as a8,Hn as a9,Vt as aA,te as aB,ee as aC,ne as aD,Yt as aE,Ae as aF,Gi as aG,Ci as aH,u as aI,P as aJ,jn as aK,ke as aL,ji as aM,o as aN,_n as aO,An as aP,O as aQ,$n as aR,Xe as aS,a as aT,n as aU,Er as aa,xr as ab,mr as ac,kr as ad,Wr as ae,y as af,S as ag,zr as ah,Un as ai,ze as aj,Dn as ak,wr as al,Ar as am,vn as an,hn as ao,gn as ap,Ut as aq,Mt as ar,$t as as,Bt as at,Wt as au,qt as av,Ht as aw,Gt as ax,Kt as ay,Qt as az,A as b,T as c,R as d,br as e,yr as f,Ve as g,Nn as h,k as i,dr as j,Ni as k,_r as l,ar as m,Ue as n,Jt as o,D as p,N as q,d as r,he as s,gr as t,X as u,Zt as v,ge as w,It as x,rt as y,M as z};
15
+ ***************************************************************************** */var D=function(){return D=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},D.apply(this,arguments)};function I(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 N(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 L(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 C(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(L(arguments[e]));return t}var U={},F="xstate.guard";function M(t){return Object.keys(t)}function $(t,e,n){void 0===n&&(n=".");var r=z(t,n),i=z(e,n);return it(i)?!!it(r)&&i===r:it(r)?r in i:M(r).every((function(t){return t in i&&$(r[t],i[t])}))}function B(t){try{return it(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 V(t,e){try{return nt(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function z(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:nt(t)?W(t):"string"!=typeof t?t:W(V(t,e));var n}function W(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 q(t,e){for(var n={},r=M(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function H(t,e,n){var r,i,o={};try{for(var a=N(M(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 G=function(t){return function(e){var n,r,i=e;try{for(var o=N(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 J(t){return t?it(t)?[[t]]:K(M(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?J(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function K(t){var e;return(e=[]).concat.apply(e,C(t))}function Q(t){return nt(t)?t:[t]}function Z(t){return void 0===t?[]:Q(t)}function X(t,e,n){var r,i;if(rt(t))return t(e,n.data);var o={};try{for(var a=N(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];rt(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 Y(t){return t instanceof Promise||!(null===t||!rt(t)&&"object"!=typeof t||!rt(t.then))}function tt(t,e){var n,r,i=L([[],[]],2),o=i[0],a=i[1];try{for(var s=N(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 et(t,e){return q(t.states,(function(t,n){if(t){var r=(it(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:et(t,r)}}}))}function nt(t){return Array.isArray(t)}function rt(t){return"function"==typeof t}function it(t){return"string"==typeof t}function ot(t,e){if(t)return it(t)?{type:F,name:t,predicate:e?e[t]:void 0}:rt(t)?{type:F,name:t.name,predicate:t}:t}function at(t){try{return"subscribe"in t&&rt(t.subscribe)}catch(t){return!1}}var st,ct,ut=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function lt(t){try{return"__xstatenode"in t}catch(t){return!1}}function ft(t){return!!t&&"function"==typeof t.send}function ht(t,e){return it(t)||"number"==typeof t?D({type:t},e):t}function pt(t,e){if(!it(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=ht(t);return D({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function dt(t,e){return Q(e).map((function(e){return void 0===e||"string"==typeof e||lt(e)?{target:e,event:t}:D(D({},e),{event:t})}))}function yt(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if(e.type===F)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 vt(t){return"string"==typeof t?{type:t}:t}function gt(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"}(st||(st={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(ct||(ct={}));var bt=st.Start,_t=st.Stop,mt=st.Raise,wt=st.Send,xt=st.Cancel,jt=st.NullEvent,Ot=st.Assign;st.After,st.DoneState;var St=st.Log,Et=st.Init,kt=st.Invoke;st.ErrorExecution;var At=st.ErrorPlatform,Pt=st.ErrorCustom,Tt=st.Update,Rt=st.Choose,Dt=st.Pure,It=pt({type:Et});function Nt(t,e){return e&&e[t]||void 0}function Lt(t,e){var n;if(it(t)||"number"==typeof t){var r=Nt(t,e);n=rt(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(rt(t))n={type:t.name||t.toString(),exec:t};else{if(rt(r=Nt(t.type,e)))n=D(D({},t),{exec:r});else if(r){var i=r.type||t.type;n=D(D(D({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var Ct=function(t,e){return t?(nt(t)?t:[t]).map((function(t){return Lt(t,e)})):[]};function Ut(t){var e=Lt(t);return D(D({id:it(t)?t:e.id},e),{type:e.type})}function Ft(t){return it(t)?{type:mt,event:t}:Mt(t,{to:ct.Internal})}function Mt(t,e){return{to:e?e.to:void 0,type:wt,event:rt(t)?t:ht(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:rt(t)?t.name:B(t)}}function $t(t,e){return Mt(t,D(D({},e),{to:ct.Parent}))}function Bt(){return $t(Tt)}function Vt(t,e){return Mt(t,D(D({},e),{to:function(t,e,n){return n._event.origin}}))}var zt=function(t,e){return{context:t,event:e}};function Wt(t,e){return void 0===t&&(t=zt),{type:St,label:e,expr:t}}var qt=function(t){return{type:xt,sendId:t}};function Ht(t){var e=Ut(t);return{type:st.Start,activity:e,exec:void 0}}function Gt(t){var e=rt(t)?t:Ut(t);return{type:st.Stop,activity:e,exec:void 0}}var Jt=function(t){return{type:Ot,assignment:t}};function Kt(t,e){var n=e?"#"+e:"";return st.After+"("+t+")"+n}function Qt(t,e){var n=st.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Zt(t,e){var n=st.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Xt(t,e){var n=st.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Yt(t){return{type:st.Pure,get:t}}function te(t,e){return Mt((function(t,e){return e}),D(D({},e),{to:t}))}function ee(t,e){return $t((function(e,n,r){return{type:Pt,data:rt(t)?t(e,n,r):t}}),D(D({},e),{to:ct.Parent}))}function ne(t){return{type:st.Choose,conds:t}}function re(t,e,n,r,i){var o=L(tt(i,(function(t){return t.type===Ot})),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(rt(a))c=a(t,e.data,s);else try{for(var u=N(M(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=rt(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=K(s.map((function(n){var i;switch(n.type){case mt:return{type:mt,_event:pt(n.event)};case wt:var o=function(t,e,n,r){var i,o={_event:n},a=pt(rt(t.event)?t.event(e,n.data,o):t.event);if(it(t.delay)){var s=r&&r[t.delay];i=rt(s)?s(e,n.data,o):s}else i=rt(t.delay)?t.delay(e,n.data,o):t.delay;var c=rt(t.to)?t.to(e,n.data,o):t.to;return D(D({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case St:return function(t,e,n){return D(D({},t),{value:it(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case Rt:if(!(s=null===(i=n.conds.find((function(n){var i=ot(n.cond,t.options.guards);return!i||yt(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=re(t,e,c,r,Ct(Z(s),t.options.actions));return c=a[1],a[0];case Dt:var s;if(!(s=n.get(c,r.data)))return[];a=re(t,e,c,r,Ct(Z(s),t.options.actions));return c=a[1],a[0];case _t:return function(t,e,n){var r=rt(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:st.Stop,activity:i}}(n,c,r);default:return Lt(n,t.options.actions)}})));return[u,c]}var ie=function(t){return"atomic"===t.type||"final"===t.type};function oe(t){return M(t.states).map((function(e){return t.states[e]}))}function ae(t){var e=[t];return ie(t)?e:e.concat(K(oe(t).map(ae)))}function se(t,e){var n,r,i,o,a,s,c,u,l=ue(new Set(t)),f=new Set(e);try{for(var h=N(f),p=h.next();!p.done;p=h.next())for(var d=(j=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=ue(f);try{for(var v=N(f),g=v.next();!g.done;g=v.next()){if("compound"!==(j=g.value).type||y.get(j)&&y.get(j).length){if("parallel"===j.type)try{for(var b=(a=void 0,N(oe(j))),_=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(j)?l.get(j).forEach((function(t){return f.add(t)})):j.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=N(f),x=w.next();!x.done;x=w.next()){var j;for(d=(j=x.value).parent;d&&!f.has(d);)f.add(d),d=d.parent}}catch(t){c={error:t}}finally{try{x&&!x.done&&(u=w.return)&&u.call(w)}finally{if(c)throw c.error}}return f}function ce(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(ie(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=ce(t,e)})),i}function ue(t){var e,n,r=new Map;try{for(var i=N(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 le(t,e){return ce(t,ue(se([t],e)))}function fe(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function he(t,e){return"compound"===e.type?oe(e).some((function(e){return"final"===e.type&&fe(t,e)})):"parallel"===e.type&&oe(e).every((function(e){return he(t,e)}))}function pe(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(it(t)||it(e))return t===e;var n=M(t),r=M(e);return n.length===r.length&&n.every((function(n){return pe(t[n],e[n])}))}function de(t){return!it(t)&&("value"in t&&"history"in t)}function ye(t,e){var n=t.exec;return D(D({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var ve=function(){function t(t){var e=this;this.actions=[],this.activities=U,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||U,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,K(C(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:It,_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=It;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="."),it(t))return[t];var r=M(t);return r.concat.apply(r,C(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,I(t,["configuration","transitions"])},t.prototype.matches=function(t){return $(t,this.value)},t}(),ge=function(t,e){return e(t)};function be(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function _e(t,e,n,r){var i,o=vt(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?X(t.data,n,r):void 0,c=a?function(t,e,n){var r=be(e);r.deferred=!0,lt(t)&&(r.state=ge(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):be(t.id);return c.meta=t,c}function me(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function we(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function xe(t){return D(D({type:kt},t),{toJSON:function(){t.onDone,t.onError;var e=I(t,["onDone","onError"]);return D(D({},e),{type:kt,src:we(t.src)})}})}var je="*",Oe={},Se=function(t){return"#"===t[0]},Ee=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||C([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&&M(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?q(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,D(((r={})[o.id]=o,r),o.idMap)),o})):Oe;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=N(oe(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=Z(this.config.entry||this.config.onEntry).map((function(t){return Lt(t)})),this.onExit=Z(this.config.exit||this.config.onExit).map((function(t){return Lt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=Z(this.config.invoke).map((function(t,e){var n,r;if(lt(t))return i.machine.options.services=D(((n={})[t.id]=t,n),i.machine.options.services),xe({src:t.id,id:t.id});if(it(t.src))return xe(D(D({},t),{id:t.id||t.src,src:t.src}));if(lt(t.src)||rt(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=D(((r={})[o]=t.src,r),i.machine.options.services),xe(D(D({id:o},t),{src:o}))}var a=t.src;return xe(D(D({id:a.type},t),{src:a}))})),this.activities=Z(this.config.activities).concat(this.invoke).map((function(t){return Ut(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||ae(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:D(D({},i),e.actions),activities:D(D({},o),e.activities),guards:D(D({},a),e.guards),services:D(D({},s),e.services),delays:D(D({},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:q(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===je}));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=Kt(rt(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(Mt(r,{delay:e})),t.onExit.push(qt(r)),r};return(nt(e)?e.map((function(t,e){var r=n(t.delay,e);return D(D({},t),{event:r})})):K(M(e).map((function(t,r){var i=e[t],o=it(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return Z(o).map((function(t){return D(D({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return D(D({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof ve?t.value:z(t,this.delimiter);if(it(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=M(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=B(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(se([],this.getStateNodes(t.value)));return new ve(D(D({},t),{value:this.resolve(t.value),configuration:e,done:he(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=M(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=N(M(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=M(o).map((function(t){return o[t]})),h=K(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=K(f.map((function(t){return t.entrySet}))),d=K(M(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:K(f.map((function(t){return t.exitSet}))),configuration:d,source:e,actions:K(M(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return it(t)?this.transitionLeafNode(t,e,n):1===M(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=N(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||(it(p)&&Se(p)?t.matches(z(this.getStateNodeById(p).path,this.delimiter)):$(z(p,this.delimiter),G(this.path.slice(0,-2))(t.value))),v=!1;try{v=!h||yt(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,C(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=K(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),b=!!i.internal;return{transitions:[i],entrySet:b?[]:K(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=se([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?se(c,t.configuration):c;try{for(var l=N(u),f=l.next();!f.done;f=l.next()){fe(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=N(c),p=h.next();!p.done;p=h.next()){var d;fe(u,d=p.value)&&!fe(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=K(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Qt(r.id,r.doneData),Qt(o.id,r.doneData?X(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&oe(a).every((function(e){return he(t.configuration,e)}))&&i.push(Qt(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=L([K(Array.from(v).map((function(t){return C(t.activities.map((function(t){return Ht(t)})),t.onEntry)}))).concat(y.map(Ft)),K(Array.from(g).map((function(t){return C(t.onExit,t.activities.map((function(t){return Gt(t)})))})))],2),_=b[0],m=b[1];return Ct(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=pt(e);if(t instanceof ve)r=void 0===n?t:this.resolveState(ve.from(t,n));else{var a=it(t)?this.resolve(W(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(ve.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=se([],this.getStateNodes(r.value)),l=c.configuration.length?se(u,c.configuration):u;return c.configuration=C(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,C(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=It),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?le(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?D({},e.activities):{};try{for(var p=N(f),d=p.next();!d.done;d=p.next()){var y=d.value;y.type===bt?h[y.activity.id||y.activity.type]=y:y.type===_t&&(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=L(re(this,e,l,n,f),2),_=b[0],m=b[1],w=L(tt(_,(function(t){return t.type===mt||t.type===wt&&t.to===ct.Internal})),2),x=w[0],j=w[1],O=_.filter((function(t){var e;return t.type===bt&&(null===(e=t.activity)||void 0===e?void 0:e.type)===kt})),S=O.reduce((function(t,e){return t[e.activity.id]=_e(e.activity,a.machine,m,n),t}),e?D({},e.children):{}),E=c?t.configuration:e?e.configuration:[],k=E.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),A=he(E,this),P=new ve({value:c||e.value,context:m,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(v=u,g=c,{current:g,states:et(v,g)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?j:[],activities:c?h:e?e.activities:{},meta:c?k:e?e.meta:void 0,events:[],configuration:E,transitions:t.transitions,children:S,done:A}),T=l!==m;P.changed=n.name===Tt||T;var R=P.history;if(R&&delete R.history,!c)return P;var I=P;if(!A)for((this._transient||s.some((function(t){return t._transient})))&&(I=this.resolveRaisedTransition(I,{type:jt},n));x.length;){var C=x.shift();I=this.resolveRaisedTransition(I,C._event,n)}var U=I.changed||(R?!!I.actions.length||T||typeof R.value!=typeof I.value||!pe(I.value,R.value):void 0);return I.changed=U,I.history=R,I},t.prototype.getStateNode=function(t){if(Se(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=Se(t)?t.slice(1):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&&Se(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=V(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||Oe;switch(this.type){case"parallel":return q(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):Oe}));case"compound":if(it(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return M(t).length?q(t,(function(t,e){return t?n.getStateNode(e).resolve(t):Oe})):this.initialStateValue||{};default:return t||Oe}},t.prototype.getResolvedPath=function(t){if(Se(t)){var e=this.machine.idMap[t.slice(1)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return V(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=H(this.states,(function(t){return t.initialStateValue||Oe}),(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=ie(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=it(e.target)&&Se(e.target)?W(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 ie(this)?[this]:"compound"!==this.type||this.initial?K(J(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=L(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(M(this.states).length)return{current:t||this.initialStateValue,states:H(this.states,(function(e,n){if(!t)return e.historyValue();var r=it(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?K(J(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=N(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 it(a)?[n.getStateNode(a)]:K(J(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=K(M(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=N(M(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,N(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(!it(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 Z(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return it(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=D(D({},t),{actions:Ct(Z(t.actions)),cond:ot(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return D(D({},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=je,a=i[o],s=void 0===a?[]:a,c=I(i,["*"]);n=K(M(c).map((function(t){var e=dt(t,c[t]);return e})).concat(dt(je,s)))}else n=[];var u=this.config.always?dt("",this.config.always):[],l=this.config.onDone?dt(String(Qt(this.id)),this.config.onDone):[];var f=K(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,C(dt(String(Zt(t.id)),t.onDone))),t.onError&&e.push.apply(e,C(dt(String(Xt(t.id)),t.onError))),e}))),h=this.after,p=K(C(l,f,n,u).map((function(t){return Z(t).map((function(t){return r.formatTransition(t)}))})));try{for(var d=N(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 ke(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new Ee(t,e,r)}function Ae(t,e){var n="function"==typeof t.context?t.context():t.context;return new Ee(t,e,n)}const Pe=Jt({failure:null}),Te=Jt({errors:[]}),Re=Jt({edits:null}),De=Jt({data:null}),Ie=Te,Ne=Jt({failure:(t,e)=>e.data}),Le=Jt({errors:(t,e)=>e.data}),Ce=Jt({data:(t,e)=>e.data}),Ue=Jt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const Fe=Ae({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:Pe,clearErrors:Te,clearEdits:Re,clearData:De,validate:Ie,setFailure:Ne,setErrors:Le,setData:Ce,applyEdit:Ue}),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 Me{constructor(t){this.__tree=Me.__parse(t)}static get True(){return Be}static get False(){return $e}static fromAttribute(t,e){return null===t?Me.False:""===t||t===e?Me.True:new Me(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const e=new Me("");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 Me.__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 $e=new Me(""),Be=new Me("not=*");function Ve(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}var ze=Array.isArray,We=1/0,qe=y?y.prototype:void 0,He=qe?qe.toString:void 0;function Ge(t){if("string"==typeof t)return t;if(ze(t))return Ve(t,Ge)+"";if(k(t))return He?He.call(t):"";var e=t+"";return"0"==e&&1/t==-We?"-0":e}var Je="[object AsyncFunction]",Ke="[object Function]",Qe="[object GeneratorFunction]",Ze="[object Proxy]";function Xe(t){if(!f(t))return!1;var e=O(t);return e==Ke||e==Qe||e==Je||e==Ze}var Ye,tn=d["__core-js_shared__"],en=(Ye=/[^.]+$/.exec(tn&&tn.keys&&tn.keys.IE_PROTO||""))?"Symbol(src)_1."+Ye:"";var nn=Function.prototype.toString;function rn(t){if(null!=t){try{return nn.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var on=/^\[object .+?Constructor\]$/,an=Function.prototype,sn=Object.prototype,cn=an.toString,un=sn.hasOwnProperty,ln=RegExp("^"+cn.call(un).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fn(t){return!(!f(t)||(e=t,en&&en in e))&&(Xe(t)?ln:on).test(rn(t));var e}function hn(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return fn(n)?n:void 0}var pn=hn(d,"WeakMap"),dn=9007199254740991,yn=/^(?:0|[1-9]\d*)$/;function vn(t,e){var n=typeof t;return!!(e=null==e?dn:e)&&("number"==n||"symbol"!=n&&yn.test(t))&&t>-1&&t%1==0&&t<e}function gn(t,e){return t===e||t!=t&&e!=e}var bn=9007199254740991;function _n(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=bn}function mn(t){return null!=t&&_n(t.length)&&!Xe(t)}var wn=Object.prototype;function xn(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||wn)}function jn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function On(t){return S(t)&&"[object Arguments]"==O(t)}var Sn=Object.prototype,En=Sn.hasOwnProperty,kn=Sn.propertyIsEnumerable,An=On(function(){return arguments}())?On:function(t){return S(t)&&En.call(t,"callee")&&!kn.call(t,"callee")};var Pn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Tn=Pn&&"object"==typeof module&&module&&!module.nodeType&&module,Rn=Tn&&Tn.exports===Pn?d.Buffer:void 0,Dn=(Rn?Rn.isBuffer:void 0)||function(){return!1},In={};function Nn(t){return function(e){return t(e)}}In["[object Float32Array]"]=In["[object Float64Array]"]=In["[object Int8Array]"]=In["[object Int16Array]"]=In["[object Int32Array]"]=In["[object Uint8Array]"]=In["[object Uint8ClampedArray]"]=In["[object Uint16Array]"]=In["[object Uint32Array]"]=!0,In["[object Arguments]"]=In["[object Array]"]=In["[object ArrayBuffer]"]=In["[object Boolean]"]=In["[object DataView]"]=In["[object Date]"]=In["[object Error]"]=In["[object Function]"]=In["[object Map]"]=In["[object Number]"]=In["[object Object]"]=In["[object RegExp]"]=In["[object Set]"]=In["[object String]"]=In["[object WeakMap]"]=!1;var Ln="object"==typeof exports&&exports&&!exports.nodeType&&exports,Cn=Ln&&"object"==typeof module&&module&&!module.nodeType&&module,Un=Cn&&Cn.exports===Ln&&h.process,Fn=function(){try{var t=Cn&&Cn.require&&Cn.require("util").types;return t||Un&&Un.binding&&Un.binding("util")}catch(t){}}(),Mn=Fn&&Fn.isTypedArray,$n=Mn?Nn(Mn):function(t){return S(t)&&_n(t.length)&&!!In[O(t)]},Bn=Object.prototype.hasOwnProperty;function Vn(t,e){var n=ze(t),r=!n&&An(t),i=!n&&!r&&Dn(t),o=!n&&!r&&!i&&$n(t),a=n||r||i||o,s=a?jn(t.length,String):[],c=s.length;for(var u in t)!e&&!Bn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||vn(u,c))||s.push(u);return s}function zn(t,e){return function(n){return t(e(n))}}var Wn=zn(Object.keys,Object),qn=Object.prototype.hasOwnProperty;function Hn(t){return mn(t)?Vn(t):function(t){if(!xn(t))return Wn(t);var e=[];for(var n in Object(t))qn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jn=/^\w*$/;var Kn=hn(Object,"create");var Qn=Object.prototype.hasOwnProperty;var Zn=Object.prototype.hasOwnProperty;function Xn(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 Yn(t,e){for(var n=t.length;n--;)if(gn(t[n][0],e))return n;return-1}Xn.prototype.clear=function(){this.__data__=Kn?Kn(null):{},this.size=0},Xn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Xn.prototype.get=function(t){var e=this.__data__;if(Kn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Qn.call(e,t)?e[t]:void 0},Xn.prototype.has=function(t){var e=this.__data__;return Kn?void 0!==e[t]:Zn.call(e,t)},Xn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Kn&&void 0===e?"__lodash_hash_undefined__":e,this};var tr=Array.prototype.splice;function er(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])}}er.prototype.clear=function(){this.__data__=[],this.size=0},er.prototype.delete=function(t){var e=this.__data__,n=Yn(e,t);return!(n<0)&&(n==e.length-1?e.pop():tr.call(e,n,1),--this.size,!0)},er.prototype.get=function(t){var e=this.__data__,n=Yn(e,t);return n<0?void 0:e[n][1]},er.prototype.has=function(t){return Yn(this.__data__,t)>-1},er.prototype.set=function(t,e){var n=this.__data__,r=Yn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var nr=hn(d,"Map");function rr(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 ir(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])}}ir.prototype.clear=function(){this.size=0,this.__data__={hash:new Xn,map:new(nr||er),string:new Xn}},ir.prototype.delete=function(t){var e=rr(this,t).delete(t);return this.size-=e?1:0,e},ir.prototype.get=function(t){return rr(this,t).get(t)},ir.prototype.has=function(t){return rr(this,t).has(t)},ir.prototype.set=function(t,e){var n=rr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};var or="Expected a function";function ar(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(or);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(ar.Cache||ir),n}ar.Cache=ir;var sr,cr,ur,lr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fr=/\\(\\)?/g,hr=(sr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(lr,(function(t,n,r,i){e.push(r?i.replace(fr,"$1"):n||t)})),e},cr=ar(sr,(function(t){return 500===ur.size&&ur.clear(),t})),ur=cr.cache,cr),pr=hr;function dr(t){return null==t?"":Ge(t)}function yr(t,e){return ze(t)?t:function(t,e){if(ze(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!k(t))||Jn.test(t)||!Gn.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:pr(dr(t))}var vr=1/0;function gr(t){if("string"==typeof t||k(t))return t;var e=t+"";return"0"==e&&1/t==-vr?"-0":e}function br(t,e){for(var n=0,r=(e=yr(e,t)).length;null!=t&&n<r;)t=t[gr(e[n++])];return n&&n==r?t:void 0}function _r(t,e,n){var r=null==t?void 0:br(t,e);return void 0===r?n:r}function mr(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function wr(t){var e=this.__data__=new er(t);this.size=e.size}function xr(){return[]}wr.prototype.clear=function(){this.__data__=new er,this.size=0},wr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},wr.prototype.get=function(t){return this.__data__.get(t)},wr.prototype.has=function(t){return this.__data__.has(t)},wr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof er){var r=n.__data__;if(!nr||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ir(r)}return n.set(t,e),this.size=n.size,this};var jr=Object.prototype.propertyIsEnumerable,Or=Object.getOwnPropertySymbols,Sr=Or?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}(Or(t),(function(e){return jr.call(t,e)})))}:xr,Er=Sr;function kr(t,e,n){var r=e(t);return ze(t)?r:mr(r,n(t))}function Ar(t){return kr(t,Hn,Er)}var Pr=hn(d,"DataView"),Tr=hn(d,"Promise"),Rr=hn(d,"Set"),Dr="[object Map]",Ir="[object Promise]",Nr="[object Set]",Lr="[object WeakMap]",Cr="[object DataView]",Ur=rn(Pr),Fr=rn(nr),Mr=rn(Tr),$r=rn(Rr),Br=rn(pn),Vr=O;(Pr&&Vr(new Pr(new ArrayBuffer(1)))!=Cr||nr&&Vr(new nr)!=Dr||Tr&&Vr(Tr.resolve())!=Ir||Rr&&Vr(new Rr)!=Nr||pn&&Vr(new pn)!=Lr)&&(Vr=function(t){var e=O(t),n="[object Object]"==e?t.constructor:void 0,r=n?rn(n):"";if(r)switch(r){case Ur:return Cr;case Fr:return Dr;case Mr:return Ir;case $r:return Nr;case Br:return Lr}return e});var zr=Vr,Wr=d.Uint8Array;function qr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ir;++e<n;)this.add(t[e])}function Hr(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 Gr(t,e){return t.has(e)}qr.prototype.add=qr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},qr.prototype.has=function(t){return this.__data__.has(t)};var Jr=1,Kr=2;function Qr(t,e,n,r,i,o){var a=n&Jr,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=n&Kr?new qr: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(!Hr(e,(function(t,e){if(!Gr(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 Zr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Xr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Yr=1,ti=2,ei="[object Boolean]",ni="[object Date]",ri="[object Error]",ii="[object Map]",oi="[object Number]",ai="[object RegExp]",si="[object Set]",ci="[object String]",ui="[object Symbol]",li="[object ArrayBuffer]",fi="[object DataView]",hi=y?y.prototype:void 0,pi=hi?hi.valueOf:void 0;var di=1,yi=Object.prototype.hasOwnProperty;var vi=1,gi="[object Arguments]",bi="[object Array]",_i="[object Object]",mi=Object.prototype.hasOwnProperty;function wi(t,e,n,r,i,o){var a=ze(t),s=ze(e),c=a?bi:zr(t),u=s?bi:zr(e),l=(c=c==gi?_i:c)==_i,f=(u=u==gi?_i:u)==_i,h=c==u;if(h&&Dn(t)){if(!Dn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new wr),a||$n(t)?Qr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case fi:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case li:return!(t.byteLength!=e.byteLength||!o(new Wr(t),new Wr(e)));case ei:case ni:case oi:return gn(+t,+e);case ri:return t.name==e.name&&t.message==e.message;case ai:case ci:return t==e+"";case ii:var s=Zr;case si:var c=r&Yr;if(s||(s=Xr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=ti,a.set(t,e);var l=Qr(s(t),s(e),r,i,o,a);return a.delete(t),l;case ui:if(pi)return pi.call(t)==pi.call(e)}return!1}(t,e,c,n,r,i,o);if(!(n&vi)){var p=l&&mi.call(t,"__wrapped__"),d=f&&mi.call(e,"__wrapped__");if(p||d){var y=p?t.value():t,v=d?e.value():e;return o||(o=new wr),i(y,v,n,r,o)}}return!!h&&(o||(o=new wr),function(t,e,n,r,i,o){var a=n&di,s=Ar(t),c=s.length;if(c!=Ar(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:yi.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 xi(t,e,n,r,i){return t===e||(null==t||null==e||!S(t)&&!S(e)?t!=t&&e!=e:wi(t,e,n,r,xi,i))}function ji(t,e){return xi(t,e)}class Oi extends Error{constructor(){super("not enough info to update; please reload resource instead")}}function Si(t){return Object.prototype.toString.call(t)}var Ei=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function ki(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)}var Ai=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},Pi=Object.prototype.hasOwnProperty||function(t,e){return e in t};function Ti(t){if("object"==typeof t&&null!==t){var e;if(Ei(t))e=[];else if("[object Date]"===Si(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===Si(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===Si(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===Si(t)}(t)||function(t){return"[object Number]"===Si(t)}(t)||function(t){return"[object String]"===Si(t)}(t))e=Object(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 ki(Ai(t),(function(n){e[n]=t[n]})),e}return t}function Ri(t,e,n){var r=[],i=[],o=!0;return function t(a){var s=n?Ti(a):a,c={},u=!0,l={node:s,node_:a,path:[].concat(r),parent:i[i.length-1],parents:i,key:r[r.length-1],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){l.isRoot||(l.parent.node[l.key]=t),l.node=t,e&&(u=!1)},delete:function(t){delete l.parent.node[l.key],t&&(u=!1)},remove:function(t){Ei(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key],t&&(u=!1)},keys:null,before:function(t){c.before=t},after:function(t){c.after=t},pre:function(t){c.pre=t},post:function(t){c.post=t},stop:function(){o=!1},block:function(){u=!1}};if(!o)return l;function f(){if("object"==typeof l.node&&null!==l.node){l.keys&&l.node_===l.node||(l.keys=Ai(l.node)),l.isLeaf=0===l.keys.length;for(var t=0;t<i.length;t++)if(i[t].node_===a){l.circular=i[t];break}}else l.isLeaf=!0,l.keys=null;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot}f();var h=e.call(l,l.node);return void 0!==h&&l.update&&l.update(h),c.before&&c.before.call(l,l.node),u?("object"!=typeof l.node||null===l.node||l.circular||(i.push(l),f(),ki(l.keys,(function(e,i){r.push(e),c.pre&&c.pre.call(l,l.node[e],e);var o=t(l.node[e]);n&&Pi.call(l.node,e)&&(l.node[e]=o.node),o.isLast=i===l.keys.length-1,o.isFirst=0===i,c.post&&c.post.call(l,o),r.pop()})),i.pop()),c.after&&c.after.call(l,l.node),l):l}(t).node}function Di(t){this.value=t}function Ii(t){return new Di(t)}Di.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!Pi.call(e,r))return;e=e[r]}return e},Di.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!Pi.call(e,r))return!1;e=e[r]}return!0},Di.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];Pi.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},Di.prototype.map=function(t){return Ri(this.value,t,!0)},Di.prototype.forEach=function(t){return this.value=Ri(this.value,t,!1),this.value},Di.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},Di.prototype.paths=function(){var t=[];return this.forEach((function(){t.push(this.path)})),t},Di.prototype.nodes=function(){var t=[];return this.forEach((function(){t.push(this.node)})),t},Di.prototype.clone=function(){var t=[],e=[];return function n(r){for(var i=0;i<t.length;i++)if(t[i]===r)return e[i];if("object"==typeof r&&null!==r){var o=Ti(r);return t.push(r),e.push(o),ki(Ai(r),(function(t){o[t]=n(r[t])})),t.pop(),e.pop(),o}return r}(this.value)},ki(Ai(Di.prototype),(function(t){Ii[t]=function(e){var n=[].slice.call(arguments,1),r=new Di(e);return r[t].apply(r,n)}}));var Ni=Ii;class Li{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Li.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Li.__applyPatch(i,t,e);return ji(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 _r(t,"_links.first.href")}static __isResource(t){return"string"==typeof _r(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 Ni(t).reduce((function(t,e){if(!Li.__isResource(e)||Li.__isCollection(e))return t;const n=Ni(e).map((function(){if("_embedded"===this.key)return 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=>Li.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=Ni({data:e}).map((function(e){if(!Li.__isResource(e))return;const n=e._links.self.href,r=Li.__approximateURI(n);if(o.includes(r))throw new Li.UpdateError;if(t.has(n)){const r=t.get(n);if(r)for(const t in r)if((t.endsWith("_uri")||t.endsWith("_id"))&&e[t]!==r[t])throw new Li.UpdateError;if(r)return this.update(Object.assign(Object.assign({},e),r),!0);if(!this.parent.parent)return this.delete(!0);throw new Li.UpdateError}})).data)&&void 0!==i?i:null}}Li.UpdateError=Oi;var Ci=T((function(t,e){var n="undefined"!=typeof self?self:A,r=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,a="ArrayBuffer"in t;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&s.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function l(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function h(t){this.map={},t instanceof h?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function d(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=d(e);return e.readAsArrayBuffer(t),n}function v(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=v(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=v(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,r=p(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=d(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(m)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(t,e){t=u(t),e=l(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},h.prototype.delete=function(t){delete this.map[u(t)]},h.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},h.prototype.set=function(t,e){this.map[u(t)]=l(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),f(t)},h.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},h.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),f(t)},r&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){var n,r,i=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new h(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,i||null==t._bodyInit||(i=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new h(e.headers)),this.method=(n=e.method||this.method||"GET",r=n.toUpperCase(),b.indexOf(r)>-1?r:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}})),e}function w(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},g.call(_.prototype),g.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];w.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function j(t,n){return new Promise((function(r,o){var a=new _(t,n);if(a.signal&&a.signal.aborted)return o(new e.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}})),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new w(i,n))},s.onerror=function(){o(new TypeError("Network request failed"))},s.ontimeout=function(){o(new TypeError("Network request failed"))},s.onabort=function(){o(new e.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),a.headers.forEach((function(t,e){s.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",c)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}j.polyfill=!0,t.fetch||(t.fetch=j,t.Headers=h,t.Request=_,t.Response=w),e.Headers=h,e.Request=_,e.Response=w,e.fetch=j,Object.defineProperty(e,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=r;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e})),Ui=T((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)}()})),Fi=function(t,e,n,r){this.name=t,this.fn=e,this.args=n,this.modifiers=r};function Mi(t,e){return void 0===e&&(e="simple"),"object"==typeof t?t[e]:t}function $i(t,e,n){if(t.length){var r=t.shift(),i=$i(t,e,n);return r.perform(i,n)}return Mi(e)}function Bi(t,e,n){if(t.length){var r=t.shift(),i=Bi(t,e,n);return r.performAsync(i,n)}return function(t){return Promise.resolve(Mi(e,"async")(t))}}Fi.prototype._test=function(t){var e=this.fn;try{$i(this.modifiers.slice(),e,this)(t)}catch(t){e=function(){return!1}}try{return $i(this.modifiers.slice(),e,this)(t)}catch(t){return!1}},Fi.prototype._check=function(t){try{$i(this.modifiers.slice(),this.fn,this)(t)}catch(t){if($i(this.modifiers.slice(),(function(t){return t}),this)(!1))return}if(!$i(this.modifiers.slice(),this.fn,this)(t))throw null},Fi.prototype._testAsync=function(t){var e=this;return new Promise((function(n,r){Bi(e.modifiers.slice(),e.fn,e)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))};var Vi=function(t,e,n){this.name=t,this.perform=e,this.performAsync=n},zi=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),Wi=function(t,e){void 0===t&&(t=[]),void 0===e&&(e=[]),this.chain=t,this.nextRuleModifiers=e};function qi(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){qi(t,e,n,r)}),(function(e){r(new zi(i,t,e))}))}else n(t)}Wi.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 Fi(e,t.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},Wi.prototype._applyModifier=function(t,e){return this.nextRuleModifiers.push(new Vi(e,t.simple,t.async)),this},Wi.prototype._clone=function(){return new Wi(this.chain.slice(),this.nextRuleModifiers.slice())},Wi.prototype.test=function(t){return this.chain.every((function(e){return e._test(t)}))},Wi.prototype.testAll=function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new zi(n,t,r))}})),e},Wi.prototype.check=function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new zi(e,t,n)}}))},Wi.prototype.testAsync=function(t){var e=this;return new Promise((function(n,r){qi(t,e.chain.slice(),n,r)}))};var Hi=function(t,e){return!(!e||"string"!=typeof t||0!==t.trim().length)||null==t};function Gi(){return"undefined"!=typeof Proxy?Ki(new Wi):Qi(new Wi)}var Ji={};function Ki(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=Ki(t._clone());return n in Zi?r._applyModifier(Zi[n],n):n in Ji?r._applyRule(Ji[n],n):n in to?r._applyRule(to[n],n):void 0}})}function Qi(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];return Qi(e._clone())._applyRule(t[n],n).apply(void 0,r)}})),e},n=e(to,t),r=e(Ji,n);return Object.keys(Zi).forEach((function(t){Object.defineProperty(r,t,{get:function(){return Qi(r._clone())._applyModifier(Zi[t],t)}})})),r}Gi.extend=function(t){Object.assign(Ji,t)},Gi.clearCustomRules=function(){Ji={}};var Zi={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 Yi(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Yi(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&&Yi(e).every(t)}},async:function(t){return function(e){return Promise.all(Yi(e).map(t)).then((function(t){return t.every(Boolean)}))}}},strict:{simple:function(t,e){return function(n){return Xi(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 Xi(e)&&n&&"object"==typeof n?Object.keys(e.args[0]).length===Object.keys(n).length&&t:t})).catch((function(){return!1}))}}}};function Xi(t){return t&&"schema"===t.name&&t.args.length>0&&"object"==typeof t.args[0]}function Yi(t){return"string"==typeof t?t.split(""):t}var to={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||no)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return eo("string")},boolean:function(){return eo("boolean")},undefined:function(){return eo("undefined")},null:function(){return eo("null")},array:function(){return eo("array")},object:function(){return eo("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 Hi(n,e)||void 0===t.check(n)},async:function(n){return Hi(n,e)||t.testAsync(n)}}}};function eo(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function no(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Gi.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 ro=Gi().schema({clear:Gi().typeOf("function"),getItem:Gi().typeOf("function"),key:Gi().typeOf("function"),length:Gi().number(),removeItem:Gi().typeOf("function"),setItem:Gi().typeOf("function")});class io extends Error{constructor(t){io.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}io.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",io.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",io.UNAUTHORIZED="UNAUTHORIZED",io.INVALID_FORM="INVALID_FORM",io.UNAVAILABLE="UNAVAILABLE",io.UNKNOWN="UNKNOWN",io.v8n={constructor:Gi().schema({code:Gi().passesAnyOf(Gi().exact(io.NEW_PASSWORD_REQUIRED),Gi().exact(io.INVALID_NEW_PASSWORD),Gi().exact(io.UNAUTHORIZED),Gi().exact(io.INVALID_FORM),Gi().exact(io.UNAVAILABLE),Gi().exact(io.UNKNOWN))})};var oo=T((function(t){function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports})),ao=T((function(t){var e=oo.default;t.exports=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n||"default");if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)},t.exports.__esModule=!0,t.exports.default=t.exports})),so=T((function(t){var e=oo.default;t.exports=function(t){var n=ao(t,"string");return"symbol"===e(n)?n:String(n)},t.exports.__esModule=!0,t.exports.default=t.exports})),co=P(T((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,so(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}))),uo=T((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})),lo=T((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})),fo=P(T((function(t){t.exports=function(t,e){var n=lo(t,e,"get");return uo(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),ho=new WeakMap,po=function(){function t(){ho.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=fo(this,ho).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=fo(this,ho).get(""+t))?e:null},e.setItem=function(t,e){fo(this,ho).set(""+t,""+e)},e.removeItem=function(t){fo(this,ho).delete(""+t)},e.clear=function(){fo(this,ho).clear()},co(t,[{key:"length",get:function(){return fo(this,ho).size}}]),t}(),yo=po;class vo extends Error{constructor(t){super(),vo.v8n.constructor.check(t),this.response=t}}vo.v8n={constructor:Gi().instanceOf(Ci.Response)};var go=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())}))},bo=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 _o(t){const{json:e}=t,n=bo(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 Oo(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=>_o(Object.assign(Object.assign({},n),{json:t})))):_o(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class mo extends Ci.Response{constructor(t){mo.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 go(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return _o(Object.assign({json:e},n))}))}}mo.v8n={constructor:Gi().schema({cache:ro,console:Gi().instanceOf(Ui.constructor),fetch:Gi().typeOf("function")})};var wo=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 xo(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>xo(t,e))).join():Object.entries(e).map((([t,e])=>xo(n+t,e))).join()}function jo(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>jo(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class Oo{constructor(t){Oo.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return wo(this,void 0,void 0,(function*(){Oo.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",jo(a)),void 0!==s&&e.searchParams.set("zoom",xo("",s));const c=yield this._fetch(new Ci.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new mo(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return wo(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new Ci.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 mo(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return wo(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new Ci.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new mo(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){Oo.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new Oo(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return wo(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 Oo(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 Oo(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new vo(o)}))}}Oo.v8n={classConstructor:Gi().schema({cache:ro,console:Gi().instanceOf(Ui.constructor),fetch:Gi().typeOf("function"),path:Gi().curieChain()}),follow:Gi().string(),get:Gi().optional(Gi().schema({fields:Gi().optional(Gi().array().every.string()),filters:Gi().optional(Gi().array().every.string()),limit:Gi().optional(Gi().number()),offset:Gi().optional(Gi().number()),order:Gi().optional(Gi().passesAnyOf(Gi().string(),Gi().object(),Gi().array())),zoom:Gi().optional(Gi().passesAnyOf(Gi().string(),Gi().object(),Gi().array()))}))},Oo.ResolutionError=vo,Oo.Response=mo;var So=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 Eo extends Oo{constructor(t){var e,n,r;Eo.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new yo,console:Ui.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:Ci.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new yo,this.cache=this._cache,this.base=t.base}fetch(...t){return So(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}Eo.WHATWGResponse=Ci.Response,Eo.WHATWGRequest=Ci.Request,Eo.WHATWGHeaders=Ci.Headers,Eo.whatwgFetch=Ci.fetch,Eo.AuthError=io,Eo.Node=Oo,Eo.v8n={classConstructor:Gi().schema({base:Gi().instanceOf(URL),cache:Gi().optional(ro),fetch:Gi().optional(Gi().typeOf("function")),level:Gi().optional(Gi().integer()),storage:Gi().optional(ro)})};export{Pt as $,Eo as A,Me as B,pt as C,At as D,Nt as E,l as F,St as G,_t as H,bt as I,st as J,vt as K,Y as L,at as M,lt as N,xt as O,wt as P,me as Q,Li as R,Tt as S,Xt as T,ut as U,nt as V,ht as W,ct as X,it as Y,ft as Z,i as _,f as a,de as a0,ve as a1,C as a2,ye as a3,gt as a4,xn as a5,mn as a6,Vn as a7,zn as a8,Hn as a9,Vt as aA,te as aB,ee as aC,ne as aD,Yt as aE,Ae as aF,Gi as aG,Ci as aH,u as aI,P as aJ,jn as aK,ke as aL,ji as aM,o as aN,_n as aO,An as aP,O as aQ,$n as aR,Xe as aS,a as aT,n as aU,Er as aa,xr as ab,mr as ac,kr as ad,Wr as ae,y as af,S as ag,zr as ah,Fn as ai,ze as aj,Dn as ak,wr as al,Ar as am,vn as an,hn as ao,gn as ap,Ft as aq,Mt as ar,$t as as,Bt as at,Wt as au,qt as av,Ht as aw,Gt as ax,Kt as ay,Qt as az,A as b,T as c,R as d,br as e,yr as f,Ve as g,Nn as h,k as i,dr as j,Ni as k,_r as l,ar as m,Fe as n,Jt as o,D as p,N as q,d as r,he as s,gr as t,X as u,Zt as v,ge as w,It as x,rt as y,M as z};
@@ -1 +1 @@
1
- import{_ as e}from"./shared-7fec42f2.js";const r=r=>class extends r{constructor(){super(...arguments),this.infer=null}static get inferredProperties(){return[]}static get properties(){return e(e({},super.properties),{},{infer:{type:String,reflect:!0}})}inferFromElement(e,r){if(e in r)return r[e]}inferProperties(){this.updateComplete.then((()=>{var e;const r=new Map,t=this.constructor,n=new Set(t.inferredProperties),s=e=>{e&&(e instanceof ShadowRoot?s(e.host):e instanceof HTMLElement&&(n.forEach((t=>{const s=this.inferFromElement(t,e);void 0!==s&&(r.set(t,s),n.delete(t))})),n.size>0&&s(e.parentNode)))};s(this.parentNode),null===(e=this.applyInferredProperties)||void 0===e||e.call(this,r)}))}inferPropertiesInDescendants(){(this.renderRoot===this?[this.renderRoot]:[this.renderRoot,this]).forEach((e=>e.querySelectorAll("[infer]").forEach((e=>{try{e.inferProperties()}catch(r){console.warn(`Failed to infer properties for ${e.tagName}`,e,r)}}))))}applyInferredProperties(e){}connectedCallback(){super.connectedCallback(),this.inferPropertiesInDescendants()}updated(e){super.updated(e),this.inferPropertiesInDescendants()}};export{r as I};
1
+ import{_ as e}from"./shared-8f9014ff.js";const r=r=>class extends r{constructor(){super(...arguments),this.infer=null}static get inferredProperties(){return[]}static get properties(){return e(e({},super.properties),{},{infer:{type:String,reflect:!0}})}inferFromElement(e,r){if(e in r)return r[e]}inferProperties(){this.updateComplete.then((()=>{var e;const r=new Map,t=this.constructor,n=new Set(t.inferredProperties),s=e=>{e&&(e instanceof ShadowRoot?s(e.host):e instanceof HTMLElement&&(n.forEach((t=>{const s=this.inferFromElement(t,e);void 0!==s&&(r.set(t,s),n.delete(t))})),n.size>0&&s(e.parentNode)))};s(this.parentNode),null===(e=this.applyInferredProperties)||void 0===e||e.call(this,r)}))}inferPropertiesInDescendants(){(this.renderRoot===this?[this.renderRoot]:[this.renderRoot,this]).forEach((e=>e.querySelectorAll("[infer]").forEach((e=>{try{e.inferProperties()}catch(r){console.warn(`Failed to infer properties for ${e.tagName}`,e,r)}}))))}applyInferredProperties(e){}connectedCallback(){super.connectedCallback(),this.inferPropertiesInDescendants()}updated(e){super.updated(e),this.inferPropertiesInDescendants()}};export{r as I};
@@ -1 +1 @@
1
- import{ao as a,ap as r}from"./shared-7fec42f2.js";var e=function(){try{var r=a(Object,"defineProperty");return r({},"",{}),r}catch(a){}}();function t(a,r,t){"__proto__"==r&&e?e(a,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[r]=t}var o=Object.prototype.hasOwnProperty;function n(a,e,n){var c=a[e];o.call(a,e)&&r(c,n)&&(void 0!==n||e in a)||t(a,e,n)}export{n as a,t as b,e as d};
1
+ import{ao as a,ap as r}from"./shared-8f9014ff.js";var e=function(){try{var r=a(Object,"defineProperty");return r({},"",{}),r}catch(a){}}();function t(a,r,t){"__proto__"==r&&e?e(a,r,{configurable:!0,enumerable:!0,value:t,writable:!0}):a[r]=t}var o=Object.prototype.hasOwnProperty;function n(a,e,n){var c=a[e];o.call(a,e)&&r(c,n)&&(void 0!==n||e in a)||t(a,e,n)}export{n as a,t as b,e as d};
@@ -1 +1 @@
1
- import"./shared-5963a49e.js";import{a as r}from"./shared-1e14a3fe.js";import"./foxy-form-dialog.js";import"./shared-10da9bf0.js";import{_ as e}from"./shared-7fec42f2.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
1
+ import"./shared-360196ad.js";import{a as r}from"./shared-0b8768db.js";import"./foxy-form-dialog.js";import"./shared-3d353eb8.js";import{_ as e}from"./shared-8f9014ff.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
@@ -0,0 +1 @@
1
+ import{e,f as t,t as r,g as s,h as i,j as n,k as o,l as a,_ as l,m as h,n as u,o as c,R as d,F as f}from"./shared-8f9014ff.js";import{h as _,L as v}from"./shared-ba5c42c7.js";import{A as m}from"./shared-69c98b7b.js";import{U as p,a as g}from"./shared-cd96ff03.js";import{I as y}from"./shared-930e68b7.js";import{i as R,c as E,a as S}from"./shared-da4f9115.js";import{d as b}from"./shared-9496e995.js";import{s as w}from"./shared-791b4510.js";import{i as P}from"./shared-0e19bda5.js";var k=Date.now;var U,x,A,T=b?function(e,t){return b(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:R,F=(U=T,x=0,A=0,function(){var e=k(),t=16-(e-A);if(A=e,t>0){if(++x>=800)return arguments[0]}else x=0;return U.apply(void 0,arguments)});function H(e){return e!=e}function L(e,t,r){return t==t?function(e,t,r){for(var s=r-1,i=e.length;++s<i;)if(e[s]===t)return s;return-1}(e,t,r):function(e,t,r,s){for(var i=e.length,n=r+(s?1:-1);s?n--:++n<i;)if(t(e[n],n,e))return n;return-1}(e,H,r)}var j=Math.max;function N(e,t){return F(function(e,t,r){return t=j(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,n=j(s.length-t,0),o=Array(n);++i<n;)o[i]=s[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=s[i];return a[t]=r(o),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,R),e+"")}function C(t,r){return r.length<2?t:e(t,function(e,t,r){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(i);++s<i;)n[s]=e[s+t];return n}(r,0,-1))}function D(e,t,r,s){for(var i=r-1,n=e.length;++i<n;)if(s(e[i],t))return i;return-1}var I=Array.prototype.splice;var Q=N((function(e,t){return e&&e.length&&t&&t.length?function(e,t,r,n){var o=n?D:L,a=-1,l=t.length,h=e;for(e===t&&(t=E(t)),r&&(h=s(e,i(r)));++a<l;)for(var u=0,c=t[a],d=r?r(c):c;(u=o(h,d,u,n))>-1;)h!==e&&I.call(h,u,1),I.call(e,u,1);return e}(e,t):e})),O=0;function W(e){var t=++O;return n(e)+t}function $(e,s){return null==e||function(e,s){return null==(e=C(e,s=t(s,e)))||delete e[r((i=s,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}(e,s)}function G(e,t){let r=null;return o(t).forEach((function(){var t,s,i,n,o,a,l,h,u,c,d;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(a=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===a?void 0:a.href,s=new URL(null===(u=null===(h=null===(l=this.node)||void 0===l?void 0:l._links)||void 0===h?void 0:h.self)||void 0===u?void 0:u.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(d=null===(c=this.node)||void 0===c?void 0:c._links)&&void 0!==d?d:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const a=o.length<20?o.length:21,l=new URL(e),h=new URL(e);return l.searchParams.set("offset",o.length.toString()),h.searchParams.set("offset",a.toString()),r=JSON.stringify({returned_items:o.length,total_items:a,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:h.toString()},prev:{href:e},next:{href:l.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}async function q(e,t){var r,s;if(t.in("busy"))return Promise.resolve(new Response(null,{status:500}));const i=new URL(e.url);i.search="",i.hash="";const n=i.toString().replace(`foxy://${t.virtualHost}/form/`,"").split("/").map(decodeURIComponent),o=a(t.form,n);let h,u=405;if("GET"===e.method)if(Array.isArray(o)){const i=parseInt(null!==(r=new URL(e.url).searchParams.get("offset"))&&void 0!==r?r:""),a=parseInt(null!==(s=new URL(e.url).searchParams.get("limit"))&&void 0!==s?s:""),c=isNaN(i)||i<0?0:i,d=isNaN(a)||a<0?20:a,f=o.slice(c,c+d).map(((e,r)=>{const s=["form",...n,String(r)],i=`foxy://${t.virtualHost}/${s.map(encodeURIComponent).join("/")}`;return l({_links:{self:{href:i}}},e)})),_=new URL(e.url);_.searchParams.set("offset","0"),_.searchParams.set("limit",String(d));const v=new URL(e.url);v.searchParams.set("offset",String(Math.max(0,c-d))),v.searchParams.set("limit",String(d));const m=new URL(e.url);m.searchParams.set("offset",String(Math.min(o.length,c+d))),m.searchParams.set("limit",String(d));const p=new URL(e.url);p.searchParams.set("offset",String(Math.max(0,o.length-d))),p.searchParams.set("limit",String(d)),u=200,h={returned_items:f.length,total_items:o.length,offset:c,limit:d,_embedded:{"fx:slice":f},_links:{first:{href:_.toString()},last:{href:p.toString()},prev:{href:v.toString()},next:{href:m.toString()},self:{href:e.url}}}}else u=200,h=l({_links:{self:{href:e.url}}},o);if("POST"===e.method){const r=await e.json(),s=S(t.form),i=a(s,n).push(r)-1;t.edit(s);const o=["form",...n,String(i)].map(encodeURIComponent).join("/");u=200,h={_links:{self:{href:`foxy://${t.virtualHost}/${o}`}},message:"Resource created successfully."}}if("PATCH"===e.method){const r=S(t.form),s=l(l({},a(r,n)),await e.json());t.edit(w(r,n,s)),u=200,h=l({_links:{self:{href:e.url}}},s)}if("DELETE"===e.method){const r=S(t.form),s=a(r,n.slice(0,-1));Array.isArray(s)?Q(s,a(r,n)):$(r,n),t.edit(r),u=200,h={_links:{self:{href:e.url}},message:"Resource deleted successfully."}}return Promise.resolve(new Response(JSON.stringify(h),{status:u}))}let M,J=e=>e;class V extends(y(v)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.virtualHost=W("nucleon-"),this.__group="",this.__href=null,this.__unsubscribeFromRumour=null,this.__fetchEventQueue=[],this.__service=P(u.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:c({errors:e=>{const t=this.constructor.v8n,r=l(l({},e.data),e.edits);return t.map((e=>e(r,this))).filter((e=>"string"==typeof e)).filter(((e,t,r)=>r.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},virtualHost:{attribute:"virtual-host"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.failure)&&void 0!==t?t:null}get errors(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.errors)&&void 0!==t?t:[]}get form(){var e,t;const{data:r,edits:s}=null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context)&&void 0!==t?t:{};return l(l({},r),s)}get data(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.data)&&void 0!==t?t:null}set data(e){var t,r,s;this.__destroyRumour(),this.__href=null!==(s=null===(r=null===(t=null==e?void 0:e._links)||void 0===t?void 0:t.self)||void 0===r?void 0:r.href)&&void 0!==s?s:null,this.__service.send({type:"SET_DATA",data:e}),e&&this.__createRumour()}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e;return null!==(e=this.__href)&&void 0!==e?e:""}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.data=null}in(e){var t;return!!(null===(t=this.__service.state)||void 0===t?void 0:t.matches(e))}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(e=!0){e&&this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),r=this.in({idle:{template:{clean:"valid"}}}),s=this.in({idle:{snapshot:{clean:"valid"}}});return r||e||(s||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return _(M||(M=J`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&!this.data&&this.__service.send({type:"FETCH"}),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new p)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(r=e.get("lang"))&&void 0!==r?r:"")}async _fetch(...e){const t=await new m(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"}),i=new URL(s._links.self.href),n=new URL(this.parent).searchParams.get("zoom");n&&i.searchParams.set("zoom",n);const o=i.toString();t=await this._fetch(o);const a=V.Rumour(this.group),l=[...this.related,this.parent];a.share({data:t,related:l,source:t._links.self.href}),this.__href=o}finally{this.__createRumour()}return t}async _sendGet(){let e;this.__destroyRumour();try{const t="REFRESH"===this.__service.state.event.type?{"cache-control":"no-cache"}:void 0;e=await this._fetch(this.href,{headers:t})}finally{this.__createRumour()}return e}async _sendPatch(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e);t=await this._fetch(this.href,{body:r,method:"PATCH"});V.Rumour(this.group).share({data:t,source:this.href,related:this.related})}finally{this.__createRumour()}return t}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=V.Rumour(this.group),t=[...this.related,this.parent];e.share({data:null,source:this.href,related:t})}finally{this.__createRumour()}return null}get __state(){const e=this.__service.state,t=null==e?void 0:e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(null!=t?t:[])].join(" ")}__createService(){this.__service.onTransition((e=>{var t,r,s,i;if(!e.changed)return;let n;e.matches("idle")&&0===e.context.errors.length&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?n=g.ResourceDeleted:(null===(r=e.history)||void 0===r?void 0:r.matches({busy:"creating"}))?n=g.ResourceCreated:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"updating"}))?n=g.ResourceUpdated:(null===(i=e.history)||void 0===i?void 0:i.matches({busy:"fetching"}))&&(n=g.ResourceFetched)),this.requestUpdate(),this.dispatchEvent(new p("update",{detail:{result:n}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new p)})),this.__service.start()}__createRumour(){this.__destroyRumour();const e=V.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this),this.__unsubscribeFromRumour=null}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const r=null===(t=this.__service.state)||void 0===t?void 0:t.context.data,s=r?e(r):r;if(s!==r&&(this.data=s,!s)){const e=g.ResourceDeleted,t=new p("update",{detail:{result:e}});this.dispatchEvent(t)}}catch(e){if(!(e instanceof d.UpdateError))throw e;this.refresh()}}__processFetchEventQueue(){const e=new V.API(this);this.__fetchEventQueue.forEach((t=>{const r=t.request;if(this.virtualHost&&r.url.startsWith(`foxy://${this.virtualHost}/form/`))return t.respondWith(q(r,this));let s=null;if("no-cache"!==t.request.headers.get("cache-control")){const e=G(r.url,this.data);e.ok&&(s=Promise.resolve(e),console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${r.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;",""))}t.respondWith(Promise.resolve(null!=s?s:e.fetch(r)))})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){var t;if(!(e instanceof f))return;if(e.defaultPrevented)return;if(e.composedPath()[0]===this)return;const{url:r,method:s}=e.request;if(r.startsWith("foxy://")){if(!this.virtualHost||!r.startsWith(`foxy://${this.virtualHost}/form/`))return;if("GET"!==s)return e.respondWith(q(e.request,this))}"GET"===s&&(e.preventDefault(),this.__fetchEventQueue.push(e),(null===(t=this.__service.state)||void 0===t?void 0:t.matches("busy"))||this.__processFetchEventQueue())}}V.UpdateEvent=p,V.Rumour=h((()=>new d)),V.API=m;export{V as N,N as b,G as s,W as u};
@@ -1,4 +1,4 @@
1
- import"./shared-b5a0d106.js";import{h as e,G as t,P as o}from"./shared-433eea12.js";import{E as i,T as r}from"./shared-64e243c4.js";import{C as a}from"./shared-5963a49e.js";const s=e`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
1
+ import"./shared-6bf89411.js";import{h as e,G as t,P as o}from"./shared-5a469962.js";import{E as i,T as r}from"./shared-66278c21.js";import{C as a}from"./shared-360196ad.js";const s=e`<dom-module id="lumo-checkbox" theme-for="vaadin-checkbox">
2
2
  <template>
3
3
  <style include="lumo-checkbox-style lumo-checkbox-effects">
4
4
  /* IE11 only */