@foxy.io/elements 1.15.0-beta.1 → 1.15.0-beta.10

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 (343) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +2 -2
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  5. package/dist/cdn/foxy-attribute-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-form.js +1 -1
  7. package/dist/cdn/foxy-cancellation-form.js +1 -1
  8. package/dist/cdn/foxy-collection-page.js +1 -1
  9. package/dist/cdn/foxy-collection-pages.js +1 -1
  10. package/dist/cdn/foxy-coupon-card.js +1 -0
  11. package/dist/cdn/foxy-coupon-code-form.js +1 -0
  12. package/dist/cdn/foxy-coupon-codes-form.js +1 -0
  13. package/dist/cdn/foxy-coupon-form.js +1 -0
  14. package/dist/cdn/foxy-custom-field-card.js +1 -1
  15. package/dist/cdn/foxy-custom-field-form.js +1 -1
  16. package/dist/cdn/foxy-customer-api.js +1 -1
  17. package/dist/cdn/foxy-customer-card.js +1 -1
  18. package/dist/cdn/foxy-customer-form.js +1 -1
  19. package/dist/cdn/foxy-customer-portal-settings.js +1 -972
  20. package/dist/cdn/foxy-customer-portal.js +13 -13
  21. package/dist/cdn/foxy-customer.js +2 -2
  22. package/dist/cdn/foxy-customers-table.js +1 -1
  23. package/dist/cdn/foxy-discount-card.js +1 -1
  24. package/dist/cdn/foxy-donation.js +1 -1
  25. package/dist/cdn/foxy-email-template-form.js +1 -1
  26. package/dist/cdn/foxy-error-entry-card.js +1 -1
  27. package/dist/cdn/foxy-form-dialog.js +1 -1
  28. package/dist/cdn/foxy-generate-codes-form.js +1 -0
  29. package/dist/cdn/foxy-gift-card-card.js +1 -0
  30. package/dist/cdn/foxy-gift-card-code-form.js +1 -0
  31. package/dist/cdn/foxy-gift-card-codes-form.js +1 -0
  32. package/dist/cdn/foxy-gift-card-form.js +1 -0
  33. package/dist/cdn/foxy-i18n.js +1 -1
  34. package/dist/cdn/foxy-items-form.js +1 -1
  35. package/dist/cdn/foxy-nucleon-element.js +1 -1
  36. package/dist/cdn/foxy-pagination.js +1 -0
  37. package/dist/cdn/foxy-payment-card.js +1 -1
  38. package/dist/cdn/foxy-payment-method-card.js +1 -1
  39. package/dist/cdn/foxy-query-builder.js +1 -69
  40. package/dist/cdn/foxy-sign-in-form.js +1 -1
  41. package/dist/cdn/foxy-spinner.js +2 -2
  42. package/dist/cdn/foxy-subscription-card.js +1 -1
  43. package/dist/cdn/foxy-subscription-form.js +4 -4
  44. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  45. package/dist/cdn/foxy-table.js +1 -1
  46. package/dist/cdn/foxy-tax-card.js +1 -1
  47. package/dist/cdn/foxy-tax-form.js +1 -1
  48. package/dist/cdn/foxy-template-config-form.js +1 -1
  49. package/dist/cdn/foxy-template-form.js +1 -1
  50. package/dist/cdn/foxy-transaction-card.js +1 -1
  51. package/dist/cdn/foxy-transactions-table.js +1 -1
  52. package/dist/cdn/foxy-user-form.js +1 -1
  53. package/dist/cdn/foxy-users-table.js +1 -1
  54. package/dist/cdn/shared-00d6a968.js +1 -0
  55. package/dist/cdn/shared-023a97c2.js +302 -0
  56. package/dist/cdn/{shared-91e768be.js → shared-027c537d.js} +1 -1
  57. package/dist/cdn/{shared-f0a83bd6.js → shared-073cb8e9.js} +1 -1
  58. package/dist/cdn/{shared-8a7bee0d.js → shared-09c5f9f1.js} +1 -1
  59. package/dist/cdn/{shared-94b0ae99.js → shared-0f38a631.js} +2 -2
  60. package/dist/cdn/{shared-200f613b.js → shared-1a67bc75.js} +2 -2
  61. package/dist/cdn/{shared-34b2c1e2.js → shared-21419f10.js} +1 -1
  62. package/dist/cdn/{shared-b5147166.js → shared-340f7584.js} +3 -3
  63. package/dist/cdn/{shared-44cfc617.js → shared-39e3ae67.js} +1 -1
  64. package/dist/cdn/shared-3f0a9c2c.js +1 -0
  65. package/dist/cdn/shared-3f965dce.js +1 -0
  66. package/dist/cdn/{shared-e7f8ffe9.js → shared-448781f9.js} +1 -1
  67. package/dist/cdn/{shared-1761daef.js → shared-5535f38f.js} +1 -1
  68. package/dist/cdn/{shared-0ced76a0.js → shared-5a54a9bc.js} +1 -1
  69. package/dist/cdn/shared-5e2fd1c7.js +1 -0
  70. package/dist/cdn/{shared-5c8b531d.js → shared-60d43523.js} +1 -1
  71. package/dist/cdn/shared-625c1272.js +69 -0
  72. package/dist/cdn/shared-65dfd512.js +131 -0
  73. package/dist/cdn/{shared-a46edf4b.js → shared-756034e4.js} +1 -1
  74. package/dist/cdn/{shared-00563cb0.js → shared-7f0a9790.js} +1 -1
  75. package/dist/cdn/shared-84d2d490.js +1 -0
  76. package/dist/cdn/{shared-df573cea.js → shared-8b20bc23.js} +0 -0
  77. package/dist/cdn/shared-8c8a910c.js +1 -0
  78. package/dist/cdn/{shared-5f54e916.js → shared-9cd49a3e.js} +4 -4
  79. package/dist/cdn/{shared-7a42073a.js → shared-9fc4a896.js} +1 -1
  80. package/dist/cdn/{shared-bb824ab4.js → shared-a040d79d.js} +2 -2
  81. package/dist/cdn/{shared-bc2bfe52.js → shared-ab71552b.js} +1 -1
  82. package/dist/cdn/shared-ae8cd227.js +1 -0
  83. package/dist/cdn/{shared-322e60b1.js → shared-ba39823e.js} +1 -1
  84. package/dist/cdn/shared-d58c947c.js +804 -0
  85. package/dist/cdn/{shared-593f7e2c.js → shared-df730f90.js} +1 -1
  86. package/dist/cdn/shared-e55088b4.js +1 -0
  87. package/dist/cdn/shared-ecfd3539.js +1 -0
  88. package/dist/cdn/shared-f2a69797.js +1 -0
  89. package/dist/cdn/{shared-16f72e27.js → shared-f4ad24f4.js} +1 -1
  90. package/dist/cdn/{shared-ec861f31.js → shared-fab8c705.js} +3 -3
  91. package/dist/cdn/translations/access-recovery-form/en.json +12 -0
  92. package/dist/cdn/translations/address-card/en.json +11 -0
  93. package/dist/cdn/translations/address-form/en.json +27 -0
  94. package/dist/cdn/translations/applied-tax-card/en.json +9 -0
  95. package/dist/cdn/translations/attribute-card/en.json +7 -0
  96. package/dist/cdn/translations/attribute-form/en.json +22 -0
  97. package/dist/cdn/translations/cancellation-form/en.json +10 -0
  98. package/dist/cdn/translations/country/pl.json +251 -0
  99. package/dist/cdn/translations/coupon-card/en.json +36 -0
  100. package/dist/cdn/translations/coupon-code-form/en.json +17 -0
  101. package/dist/cdn/translations/coupon-codes-form/en.json +20 -0
  102. package/dist/cdn/translations/coupon-form/en.json +186 -0
  103. package/dist/cdn/translations/custom-field-card/en.json +7 -0
  104. package/dist/cdn/translations/custom-field-form/en.json +19 -0
  105. package/dist/cdn/translations/customer/en.json +247 -0
  106. package/dist/cdn/translations/customer-card/en.json +7 -0
  107. package/dist/cdn/translations/customer-form/en.json +21 -0
  108. package/dist/cdn/translations/customer-portal/de.json +202 -14
  109. package/dist/cdn/translations/customer-portal/en.json +202 -14
  110. package/dist/cdn/translations/customer-portal/es.json +202 -14
  111. package/dist/cdn/translations/customer-portal/pl.json +223 -0
  112. package/dist/cdn/translations/customer-portal/zh-hk.json +202 -14
  113. package/dist/cdn/translations/customers-table/en.json +9 -0
  114. package/dist/cdn/translations/discount-card/en.json +8 -0
  115. package/dist/cdn/translations/email-template-form/en.json +25 -0
  116. package/dist/cdn/translations/error-entry-card/en.json +7 -0
  117. package/dist/cdn/translations/generate-codes-form/en.json +19 -0
  118. package/dist/cdn/translations/gift-card-card/en.json +9 -0
  119. package/dist/cdn/translations/gift-card-code-form/en.json +19 -0
  120. package/dist/cdn/translations/gift-card-codes-form/en.json +25 -0
  121. package/dist/cdn/translations/gift-card-form/en.json +314 -0
  122. package/dist/cdn/translations/pagination/en.json +7 -0
  123. package/dist/cdn/translations/payment-card/en.json +12 -0
  124. package/dist/cdn/translations/payment-method-card/en.json +13 -0
  125. package/dist/cdn/translations/query-builder/en.json +32 -0
  126. package/dist/cdn/translations/sign-in-form/en.json +21 -0
  127. package/dist/cdn/translations/spinner/en.json +7 -0
  128. package/dist/cdn/translations/subscription-card/en.json +26 -0
  129. package/dist/cdn/translations/subscription-form/en.json +76 -0
  130. package/dist/cdn/translations/subscriptions-table/en.json +26 -0
  131. package/dist/cdn/translations/tax-card/en.json +11 -0
  132. package/dist/cdn/translations/tax-form/en.json +38 -0
  133. package/dist/cdn/translations/template-config-form/en.json +107 -0
  134. package/dist/cdn/translations/template-form/en.json +23 -0
  135. package/dist/cdn/translations/transaction-card/en.json +25 -0
  136. package/dist/cdn/translations/transactions-table/en.json +22 -0
  137. package/dist/cdn/translations/user-form/en.json +26 -0
  138. package/dist/cdn/translations/users-table/en.json +44 -0
  139. package/dist/elements/private/Checkbox/Checkbox.js +36 -22
  140. package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
  141. package/dist/elements/private/Choice/Choice.js +1 -0
  142. package/dist/elements/private/Choice/Choice.js.map +1 -1
  143. package/dist/elements/private/EditableList/EditableList.d.ts +20 -0
  144. package/dist/elements/private/EditableList/EditableList.js +124 -0
  145. package/dist/elements/private/EditableList/EditableList.js.map +1 -0
  146. package/dist/elements/private/FrequencyInput/FrequencyInput.d.ts +7 -6
  147. package/dist/elements/private/FrequencyInput/FrequencyInput.js +10 -23
  148. package/dist/elements/private/FrequencyInput/FrequencyInput.js.map +1 -1
  149. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +1 -1
  150. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
  151. package/dist/elements/public/AttributeCard/types.d.ts +3 -3
  152. package/dist/elements/public/AttributeCard/types.js.map +1 -1
  153. package/dist/elements/public/AttributeForm/AttributeForm.js +2 -1
  154. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  155. package/dist/elements/public/AttributeForm/types.d.ts +3 -3
  156. package/dist/elements/public/AttributeForm/types.js.map +1 -1
  157. package/dist/elements/public/CollectionPage/CollectionPage.js +3 -1
  158. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  159. package/dist/elements/public/CollectionPage/types.d.ts +2 -0
  160. package/dist/elements/public/CollectionPage/types.js.map +1 -1
  161. package/dist/elements/public/CouponCard/CouponCard.d.ts +29 -0
  162. package/dist/elements/public/CouponCard/CouponCard.js +131 -0
  163. package/dist/elements/public/CouponCard/CouponCard.js.map +1 -0
  164. package/dist/elements/public/CouponCard/index.d.ts +5 -0
  165. package/dist/elements/public/CouponCard/index.js +7 -0
  166. package/dist/elements/public/CouponCard/index.js.map +1 -0
  167. package/dist/elements/public/CouponCard/types.d.ts +15 -0
  168. package/dist/elements/public/CouponCard/types.js +2 -0
  169. package/dist/elements/public/CouponCard/types.js.map +1 -0
  170. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +45 -0
  171. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +218 -0
  172. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -0
  173. package/dist/elements/public/CouponCodeForm/index.d.ts +8 -0
  174. package/dist/elements/public/CouponCodeForm/index.js +10 -0
  175. package/dist/elements/public/CouponCodeForm/index.js.map +1 -0
  176. package/dist/elements/public/CouponCodeForm/types.d.ts +15 -0
  177. package/dist/elements/public/CouponCodeForm/types.js +2 -0
  178. package/dist/elements/public/CouponCodeForm/types.js.map +1 -0
  179. package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +31 -0
  180. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +218 -0
  181. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -0
  182. package/dist/elements/public/CouponCodesForm/index.d.ts +8 -0
  183. package/dist/elements/public/CouponCodesForm/index.js +12 -0
  184. package/dist/elements/public/CouponCodesForm/index.js.map +1 -0
  185. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.d.ts +14 -0
  186. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js +48 -0
  187. package/dist/elements/public/CouponCodesForm/internal/InternalCouponCodesFormListItem.js.map +1 -0
  188. package/dist/elements/public/CouponCodesForm/types.d.ts +17 -0
  189. package/dist/elements/public/CouponCodesForm/types.js +2 -0
  190. package/dist/elements/public/CouponCodesForm/types.js.map +1 -0
  191. package/dist/elements/public/CouponForm/CouponForm.d.ts +77 -0
  192. package/dist/elements/public/CouponForm/CouponForm.js +1301 -0
  193. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -0
  194. package/dist/elements/public/CouponForm/index.d.ts +19 -0
  195. package/dist/elements/public/CouponForm/index.js +21 -0
  196. package/dist/elements/public/CouponForm/index.js.map +1 -0
  197. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.d.ts +20 -0
  198. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js +99 -0
  199. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js.map +1 -0
  200. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.d.ts +18 -0
  201. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js +50 -0
  202. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js.map +1 -0
  203. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.d.ts +18 -0
  204. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js +53 -0
  205. package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js.map +1 -0
  206. package/dist/elements/public/CouponForm/types.d.ts +27 -0
  207. package/dist/elements/public/CouponForm/types.js +2 -0
  208. package/dist/elements/public/CouponForm/types.js.map +1 -0
  209. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +2 -1
  210. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  211. package/dist/elements/public/Customer/Customer.js +1 -1
  212. package/dist/elements/public/Customer/Customer.js.map +1 -1
  213. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +25 -8
  214. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  215. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +20 -6
  216. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
  217. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +2 -1
  218. package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
  219. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +43 -0
  220. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +249 -0
  221. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -0
  222. package/dist/elements/public/GenerateCodesForm/index.d.ts +8 -0
  223. package/dist/elements/public/GenerateCodesForm/index.js +10 -0
  224. package/dist/elements/public/GenerateCodesForm/index.js.map +1 -0
  225. package/dist/elements/public/GenerateCodesForm/types.d.ts +24 -0
  226. package/dist/elements/public/GenerateCodesForm/types.js +2 -0
  227. package/dist/elements/public/GenerateCodesForm/types.js.map +1 -0
  228. package/dist/elements/public/GiftCardCard/GiftCardCard.d.ts +26 -0
  229. package/dist/elements/public/GiftCardCard/GiftCardCard.js +95 -0
  230. package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -0
  231. package/dist/elements/public/GiftCardCard/index.d.ts +5 -0
  232. package/dist/elements/public/GiftCardCard/index.js +7 -0
  233. package/dist/elements/public/GiftCardCard/index.js.map +1 -0
  234. package/dist/elements/public/GiftCardCard/types.d.ts +11 -0
  235. package/dist/elements/public/GiftCardCard/types.js +2 -0
  236. package/dist/elements/public/GiftCardCard/types.js.map +1 -0
  237. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +55 -0
  238. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +292 -0
  239. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -0
  240. package/dist/elements/public/GiftCardCodeForm/index.d.ts +10 -0
  241. package/dist/elements/public/GiftCardCodeForm/index.js +12 -0
  242. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -0
  243. package/dist/elements/public/GiftCardCodeForm/types.d.ts +19 -0
  244. package/dist/elements/public/GiftCardCodeForm/types.js +2 -0
  245. package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -0
  246. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.d.ts +37 -0
  247. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +264 -0
  248. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -0
  249. package/dist/elements/public/GiftCardCodesForm/index.d.ts +9 -0
  250. package/dist/elements/public/GiftCardCodesForm/index.js +13 -0
  251. package/dist/elements/public/GiftCardCodesForm/index.js.map +1 -0
  252. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.d.ts +19 -0
  253. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.js +48 -0
  254. package/dist/elements/public/GiftCardCodesForm/internal/InternalGiftCardCodesFormListItem.js.map +1 -0
  255. package/dist/elements/public/GiftCardCodesForm/types.d.ts +17 -0
  256. package/dist/elements/public/GiftCardCodesForm/types.js +2 -0
  257. package/dist/elements/public/GiftCardCodesForm/types.js.map +1 -0
  258. package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +67 -0
  259. package/dist/elements/public/GiftCardForm/GiftCardForm.js +684 -0
  260. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -0
  261. package/dist/elements/public/GiftCardForm/currencies.d.ts +1 -0
  262. package/dist/elements/public/GiftCardForm/currencies.js +173 -0
  263. package/dist/elements/public/GiftCardForm/currencies.js.map +1 -0
  264. package/dist/elements/public/GiftCardForm/index.d.ts +18 -0
  265. package/dist/elements/public/GiftCardForm/index.js +20 -0
  266. package/dist/elements/public/GiftCardForm/index.js.map +1 -0
  267. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.d.ts +20 -0
  268. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js +99 -0
  269. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js.map +1 -0
  270. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.d.ts +18 -0
  271. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js +50 -0
  272. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js.map +1 -0
  273. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.d.ts +18 -0
  274. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js +53 -0
  275. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js.map +1 -0
  276. package/dist/elements/public/GiftCardForm/types.d.ts +28 -0
  277. package/dist/elements/public/GiftCardForm/types.js +2 -0
  278. package/dist/elements/public/GiftCardForm/types.js.map +1 -0
  279. package/dist/elements/public/I18n/I18n.js +1 -1
  280. package/dist/elements/public/I18n/I18n.js.map +1 -1
  281. package/dist/elements/public/I18n/format/date.js +7 -6
  282. package/dist/elements/public/I18n/format/date.js.map +1 -1
  283. package/dist/elements/public/I18n/format/discount.d.ts +6 -0
  284. package/dist/elements/public/I18n/format/discount.js +20 -0
  285. package/dist/elements/public/I18n/format/discount.js.map +1 -0
  286. package/dist/elements/public/I18n/format/index.js +6 -0
  287. package/dist/elements/public/I18n/format/index.js.map +1 -1
  288. package/dist/elements/public/I18n/format/ordinal.d.ts +6 -0
  289. package/dist/elements/public/I18n/format/ordinal.js +9 -0
  290. package/dist/elements/public/I18n/format/ordinal.js.map +1 -0
  291. package/dist/elements/public/I18n/format/relative.d.ts +6 -0
  292. package/dist/elements/public/I18n/format/relative.js +15 -0
  293. package/dist/elements/public/I18n/format/relative.js.map +1 -0
  294. package/dist/elements/public/NucleonElement/NucleonElement.js +4 -4
  295. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  296. package/dist/elements/public/Pagination/Pagination.d.ts +37 -0
  297. package/dist/elements/public/Pagination/Pagination.js +158 -0
  298. package/dist/elements/public/Pagination/Pagination.js.map +1 -0
  299. package/dist/elements/public/Pagination/index.d.ts +6 -0
  300. package/dist/elements/public/Pagination/index.js +8 -0
  301. package/dist/elements/public/Pagination/index.js.map +1 -0
  302. package/dist/elements/public/SignInForm/SignInForm.js +1 -1
  303. package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
  304. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +1 -1
  305. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  306. package/dist/elements/public/Table/Table.js +20 -5
  307. package/dist/elements/public/Table/Table.js.map +1 -1
  308. package/dist/elements/public/TaxForm/TaxForm.js +16 -14
  309. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  310. package/dist/elements/public/TemplateForm/TemplateForm.js +1 -1
  311. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  312. package/dist/elements/public/UserForm/UserForm.js +2 -1
  313. package/dist/elements/public/UserForm/UserForm.js.map +1 -1
  314. package/dist/elements/public/UsersTable/UsersTable.d.ts +5 -1
  315. package/dist/elements/public/UsersTable/UsersTable.js +2 -1
  316. package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
  317. package/dist/elements/public/index.d.ts +10 -0
  318. package/dist/elements/public/index.defined.d.ts +10 -0
  319. package/dist/elements/public/index.defined.js +10 -0
  320. package/dist/elements/public/index.defined.js.map +1 -1
  321. package/dist/elements/public/index.js +10 -0
  322. package/dist/elements/public/index.js.map +1 -1
  323. package/dist/mixins/themeable.js +96 -4
  324. package/dist/mixins/themeable.js.map +1 -1
  325. package/dist/mixins/translatable.js +1 -1
  326. package/dist/mixins/translatable.js.map +1 -1
  327. package/dist/utils/parse-duration.d.ts +1 -1
  328. package/dist/utils/parse-duration.js +7 -3
  329. package/dist/utils/parse-duration.js.map +1 -1
  330. package/package.json +3 -3
  331. package/dist/cdn/shared-07abcd7b.js +0 -1
  332. package/dist/cdn/shared-35dbd2c5.js +0 -1
  333. package/dist/cdn/shared-6b7602c7.js +0 -1
  334. package/dist/cdn/shared-87ca7818.js +0 -1
  335. package/dist/cdn/shared-9a40309d.js +0 -1
  336. package/dist/cdn/shared-ce1da35d.js +0 -1
  337. package/dist/cdn/shared-d01d809a.js +0 -1
  338. package/dist/cdn/shared-d8ffb279.js +0 -264
  339. package/dist/cdn/shared-e5cbf291.js +0 -1
  340. package/dist/cdn/shared-f1dc1c6c.js +0 -1
  341. package/dist/cdn/translations/shared/de.json +0 -271
  342. package/dist/cdn/translations/shared/en.json +0 -272
  343. package/dist/cdn/translations/shared/es.json +0 -272
@@ -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 h=function(){return h=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},h.apply(this,arguments)};function p(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 d(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 v(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 y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}var g={};function _(t){return Object.keys(t)}function b(t,e,n){void 0===n&&(n=".");var r=j(t,n),i=j(e,n);return F(i)?!!F(r)&&i===r:F(r)?r in i:_(r).every((function(t){return t in i&&b(r[t],i[t])}))}function m(t){try{return F(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 w(t,e){try{return L(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function j(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:L(t)?S(t):"string"!=typeof t?t:S(w(t,e));var n}function S(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 x(t,e){for(var n={},r=_(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function O(t,e,n){var r,i,o={};try{for(var a=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var E=function(t){return function(e){var n,r,i=e;try{for(var o=d(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 k(t){return t?F(t)?[[t]]:A(_(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?k(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function A(t){var e;return(e=[]).concat.apply(e,y(t))}function P(t){return L(t)?t:[t]}function T(t){return void 0===t?[]:P(t)}function R(t,e,n){var r,i;if(C(t))return t(e,n.data);var o={};try{for(var a=d(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];C(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 N(t){return t instanceof Promise||!(null===t||!C(t)&&"object"!=typeof t||!C(t.then))}function D(t,e){var n,r,i=v([[],[]],2),o=i[0],a=i[1];try{for(var s=d(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 I(t,e){return x(t.states,(function(t,n){if(t){var r=(F(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:I(t,r)}}}))}function L(t){return Array.isArray(t)}function C(t){return"function"==typeof t}function F(t){return"string"==typeof t}function $(t,e){if(t)return F(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:C(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function V(t){try{return"subscribe"in t&&C(t.subscribe)}catch(t){return!1}}var M,U,z=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function W(t){try{return"__xstatenode"in t}catch(t){return!1}}function B(t){return!!t&&"function"==typeof t.send}function q(t,e){return F(t)||"number"==typeof t?h({type:t},e):t}function H(t,e){if(!F(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=q(t);return h({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function J(t,e){return P(e).map((function(e){return void 0===e||"string"==typeof e||W(e)?{target:e,event:t}:h(h({},e),{event:t})}))}function G(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function Z(t){return"string"==typeof t?{type:t}:t}function K(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"}(M||(M={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(U||(U={}));var Q=M.Start,X=M.Stop,Y=M.Raise,tt=M.Send,et=M.Cancel,nt=M.NullEvent,rt=M.Assign;M.After,M.DoneState;var it=M.Log,ot=M.Init,at=M.Invoke;M.ErrorExecution;var st=M.ErrorPlatform,ct=M.ErrorCustom,ut=M.Update,lt=M.Choose,ft=M.Pure,ht=H({type:ot});function pt(t,e){return e&&e[t]||void 0}function dt(t,e){var n;if(F(t)||"number"==typeof t){var r=pt(t,e);n=C(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(C(t))n={type:t.name||t.toString(),exec:t};else{if(C(r=pt(t.type,e)))n=h(h({},t),{exec:r});else if(r){var i=r.type||t.type;n=h(h(h({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var vt=function(t,e){return t?(L(t)?t:[t]).map((function(t){return dt(t,e)})):[]};function yt(t){var e=dt(t);return h(h({id:F(t)?t:e.id},e),{type:e.type})}function gt(t){return F(t)?{type:Y,event:t}:_t(t,{to:U.Internal})}function _t(t,e){return{to:e?e.to:void 0,type:tt,event:C(t)?t:q(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:C(t)?t.name:m(t)}}function bt(t,e){return _t(t,h(h({},e),{to:U.Parent}))}function mt(){return bt(ut)}function wt(t,e){return _t(t,h(h({},e),{to:function(t,e,n){return n._event.origin}}))}var jt=function(t,e){return{context:t,event:e}};function St(t,e){return void 0===t&&(t=jt),{type:it,label:e,expr:t}}var xt=function(t){return{type:et,sendId:t}};function Ot(t){var e=yt(t);return{type:M.Start,activity:e,exec:void 0}}function Et(t){var e=C(t)?t:yt(t);return{type:M.Stop,activity:e,exec:void 0}}var kt=function(t){return{type:rt,assignment:t}};function At(t,e){var n=e?"#"+e:"";return M.After+"("+t+")"+n}function Pt(t,e){var n=M.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Tt(t,e){var n=M.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Rt(t,e){var n=M.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Nt(t){return{type:M.Pure,get:t}}function Dt(t,e){return _t((function(t,e){return e}),h(h({},e),{to:t}))}function It(t,e){return bt((function(e,n,r){return{type:ct,data:C(t)?t(e,n,r):t}}),h(h({},e),{to:U.Parent}))}function Lt(t){return{type:M.Choose,conds:t}}function Ct(t,e,n,r,i){var o=v(D(i,(function(t){return t.type===rt})),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(C(a))c=a(t,e.data,s);else try{for(var u=d(_(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=C(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=A(s.map((function(n){var i;switch(n.type){case Y:return{type:Y,_event:H(n.event)};case tt:var o=function(t,e,n,r){var i,o={_event:n},a=H(C(t.event)?t.event(e,n.data,o):t.event);if(F(t.delay)){var s=r&&r[t.delay];i=C(s)?s(e,n.data,o):s}else i=C(t.delay)?t.delay(e,n.data,o):t.delay;var c=C(t.to)?t.to(e,n.data,o):t.to;return h(h({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case it:return function(t,e,n){return h(h({},t),{value:F(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case lt:if(!(s=null===(i=n.conds.find((function(n){var i=$(n.cond,t.options.guards);return!i||G(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=Ct(t,e,c,r,vt(T(s),t.options.actions));return c=a[1],a[0];case ft:var s;if(!(s=n.get(c,r.data)))return[];a=Ct(t,e,c,r,vt(T(s),t.options.actions));return c=a[1],a[0];case X:return function(t,e,n){var r=C(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:M.Stop,activity:i}}(n,c,r);default:return dt(n,t.options.actions)}})));return[u,c]}var Ft=function(t){return"atomic"===t.type||"final"===t.type};function $t(t){return _(t.states).map((function(e){return t.states[e]}))}function Vt(t){var e=[t];return Ft(t)?e:e.concat(A($t(t).map(Vt)))}function Mt(t,e){var n,r,i,o,a,s,c,u,l=zt(new Set(t)),f=new Set(e);try{for(var h=d(f),p=h.next();!p.done;p=h.next())for(var v=(x=p.value).parent;v&&!f.has(v);)f.add(v),v=v.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=zt(f);try{for(var g=d(f),_=g.next();!_.done;_=g.next()){if("compound"!==(x=_.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,d($t(x))),m=b.next();!m.done;m=b.next()){var w=m.value;"history"!==w.type&&(f.has(w)||(f.add(w),l.get(w)?l.get(w).forEach((function(t){return f.add(t)})):w.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{_&&!_.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var j=d(f),S=j.next();!S.done;S=j.next()){var x;for(v=(x=S.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(t){c={error:t}}finally{try{S&&!S.done&&(u=j.return)&&u.call(j)}finally{if(c)throw c.error}}return f}function Ut(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(Ft(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=Ut(t,e)})),i}function zt(t){var e,n,r=new Map;try{for(var i=d(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 Wt(t,e){return Ut(t,zt(Mt([t],e)))}function Bt(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function qt(t,e){return"compound"===e.type?$t(e).some((function(e){return"final"===e.type&&Bt(t,e)})):"parallel"===e.type&&$t(e).every((function(e){return qt(t,e)}))}function Ht(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(F(t)||F(e))return t===e;var n=_(t),r=_(e);return n.length===r.length&&n.every((function(n){return Ht(t[n],e[n])}))}function Jt(t){return!F(t)&&("value"in t&&"history"in t)}function Gt(t,e){var n=t.exec;return h(h({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var Zt=function(){function t(t){var e=this;this.actions=[],this.activities=g,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||g,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,A(y(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:ht,_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=ht;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="."),F(t))return[t];var r=_(t);return r.concat.apply(r,y(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,p(t,["configuration","transitions"])},t.prototype.matches=function(t){return b(t,this.value)},t}(),Kt=function(t,e){return e(t)};function Qt(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function Xt(t,e,n,r){var i,o=Z(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?R(t.data,n,r):void 0,c=a?function(t,e,n){var r=Qt(e);r.deferred=!0,W(t)&&(r.state=Kt(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):Qt(t.id);return c.meta=t,c}function Yt(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function te(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function ee(t){return h(h({type:at},t),{toJSON:function(){t.onDone,t.onError;var e=p(t,["onDone","onError"]);return h(h({},e),{type:at,src:te(t.src)})}})}var ne={},re=function(t){return"#"===t[0]},ie=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||y([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&&_(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?x(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,h(((r={})[o.id]=o,r),o.idMap)),o})):ne;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=d($t(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=T(this.config.entry||this.config.onEntry).map((function(t){return dt(t)})),this.onExit=T(this.config.exit||this.config.onExit).map((function(t){return dt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=T(this.config.invoke).map((function(t,e){var n,r;if(W(t))return i.machine.options.services=h(((n={})[t.id]=t,n),i.machine.options.services),ee({src:t.id,id:t.id});if(F(t.src))return ee(h(h({},t),{id:t.id||t.src,src:t.src}));if(W(t.src)||C(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=h(((r={})[o]=t.src,r),i.machine.options.services),ee(h(h({id:o},t),{src:o}))}var a=t.src;return ee(h(h({id:a.type},t),{src:a}))})),this.activities=T(this.config.activities).concat(this.invoke).map((function(t){return yt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||Vt(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:h(h({},i),e.actions),activities:h(h({},o),e.activities),guards:h(h({},a),e.guards),services:h(h({},s),e.services),delays:h(h({},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:x(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=At(C(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(_t(r,{delay:e})),t.onExit.push(xt(r)),r};return(L(e)?e.map((function(t,e){var r=n(t.delay,e);return h(h({},t),{event:r})})):A(_(e).map((function(t,r){var i=e[t],o=F(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return T(o).map((function(t){return h(h({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return h(h({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof Zt?t.value:j(t,this.delimiter);if(F(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=_(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=m(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(Mt([],this.getStateNodes(t.value)));return new Zt(h(h({},t),{value:this.resolve(t.value),configuration:e,done:qt(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=_(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=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=_(o).map((function(t){return o[t]})),h=A(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=A(f.map((function(t){return t.entrySet}))),v=A(_(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:A(f.map((function(t){return t.exitSet}))),configuration:v,source:e,actions:A(_(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return F(t)?this.transitionLeafNode(t,e,n):1===_(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=d(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,v=t.context,g=!p||(F(p)&&re(p)?t.matches(j(this.getStateNodeById(p).path,this.delimiter)):b(j(p,this.delimiter),E(this.path.slice(0,-2))(t.value))),_=!1;try{_=!h||G(this.machine,h,v,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(_&&g){void 0!==f.target&&(c=f.target),s.push.apply(s,y(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 m=A(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),w=!!i.internal;return{transitions:[i],entrySet:w?[]:A(m.map((function(t){return o.nodesFromChild(t)}))),exitSet:w?[]:[this],configuration:m,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=Mt([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?Mt(c,t.configuration):c;try{for(var l=d(u),f=l.next();!f.done;f=l.next()){Bt(c,g=f.value)||t.entrySet.push(g)}}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=d(c),p=h.next();!p.done;p=h.next()){var g;Bt(u,g=p.value)&&!Bt(t.exitSet,g.parent)||t.exitSet.push(g)}}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 _=A(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Pt(r.id,r.doneData),Pt(o.id,r.doneData?R(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&$t(a).every((function(e){return qt(t.configuration,e)}))&&i.push(Pt(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 b=new Set(t.entrySet),m=new Set(t.exitSet),w=v([A(Array.from(b).map((function(t){return y(t.activities.map((function(t){return Ot(t)})),t.onEntry)}))).concat(_.map(gt)),A(Array.from(m).map((function(t){return y(t.onExit,t.activities.map((function(t){return Et(t)})))})))],2),j=w[0],S=w[1];return vt(S.concat(t.actions).concat(j),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=H(e);if(t instanceof Zt)r=void 0===n?t:this.resolveState(Zt.from(t,n));else{var a=F(t)?this.resolve(S(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(Zt.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=Mt([],this.getStateNodes(r.value)),l=c.configuration.length?Mt(u,c.configuration):u;return c.configuration=y(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,y(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=ht),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?Wt(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),p=e?h({},e.activities):{};try{for(var y=d(f),g=y.next();!g.done;g=y.next()){var _=g.value;_.type===Q?p[_.activity.id||_.activity.type]=_:_.type===X&&(p[_.activity.id||_.activity.type]=!1)}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}var b,m,w=v(Ct(this,e,l,n,f),2),j=w[0],S=w[1],x=v(D(j,(function(t){return t.type===Y||t.type===tt&&t.to===U.Internal})),2),O=x[0],E=x[1],k=j.filter((function(t){var e;return t.type===Q&&(null===(e=t.activity)||void 0===e?void 0:e.type)===at})),A=k.reduce((function(t,e){return t[e.activity.id]=Xt(e.activity,a.machine,S,n),t}),e?h({},e.children):{}),P=c?t.configuration:e?e.configuration:[],T=P.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),R=qt(P,this),N=new Zt({value:c||e.value,context:S,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(b=u,m=c,{current:m,states:I(b,m)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?E:[],activities:c?p:e?e.activities:{},meta:c?T:e?e.meta:void 0,events:[],configuration:P,transitions:t.transitions,children:A,done:R}),L=l!==S;N.changed=n.name===ut||L;var C=N.history;if(C&&delete C.history,!c)return N;var F=N;if(!R)for((this._transient||s.some((function(t){return t._transient})))&&(F=this.resolveRaisedTransition(F,{type:nt},n));O.length;){var $=O.shift();F=this.resolveRaisedTransition(F,$._event,n)}var V=F.changed||(C?!!F.actions.length||L||typeof C.value!=typeof F.value||!Ht(F.value,C.value):void 0);return F.changed=V,F.history=C,F},t.prototype.getStateNode=function(t){if(re(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=re(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&re(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=w(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||ne;switch(this.type){case"parallel":return x(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ne}));case"compound":if(F(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return _(t).length?x(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ne})):this.initialStateValue||{};default:return t||ne}},t.prototype.getResolvedPath=function(t){if(re(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return w(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=O(this.states,(function(t){return t.initialStateValue||ne}),(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=Ft(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=F(e.target)&&re(e.target)?S(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 Ft(this)?[this]:"compound"!==this.type||this.initial?A(k(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=v(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(_(this.states).length)return{current:t||this.initialStateValue,states:O(this.states,(function(e,n){if(!t)return e.historyValue();var r=F(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?A(k(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=d(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 F(a)?[n.getStateNode(a)]:A(k(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=A(_(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=d(_(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,d(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(!F(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 T(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return F(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=h(h({},t),{actions:vt(T(t.actions)),cond:$(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return h(h({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=p(i,["*"]);n=A(_(c).map((function(t){var e=J(t,c[t]);return e})).concat(J("*",s)))}else n=[];var u=this.config.always?J("",this.config.always):[],l=this.config.onDone?J(String(Pt(this.id)),this.config.onDone):[];var f=A(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,y(J(String(Tt(t.id)),t.onDone))),t.onError&&e.push.apply(e,y(J(String(Rt(t.id)),t.onError))),e}))),h=this.after,v=A(y(l,f,n,u).map((function(t){return T(t).map((function(t){return r.formatTransition(t)}))})));try{for(var g=d(h),b=g.next();!b.done;b=g.next()){var m=b.value;v.push(m)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(e=g.return)&&e.call(g)}finally{if(t)throw t.error}}return v},t}();function oe(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new ie(t,e,r)}function ae(t,e){var n="function"==typeof t.context?t.context():t.context;return new ie(t,e,n)}const se=kt({failure:null}),ce=kt({errors:[]}),ue=kt({edits:null}),le=kt({data:null}),fe=ce,he=kt({failure:(t,e)=>e.data}),pe=kt({errors:(t,e)=>e.data}),de=kt({data:(t,e)=>e.data}),ve=kt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const ye=ae({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{actions:["clearData","clearEdits","clearErrors"],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:se,clearErrors:ce,clearEdits:ue,clearData:le,validate:fe,setFailure:he,setErrors:pe,setData:de,applyEdit:ve}),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)})});var ge;!function(t){t[t.List=0]="List",t[t.Set=1]="Set"}(ge||(ge={}));class _e{constructor(t){this.__value=t,this.__tree=_e.__parse(t)}static get True(){return me}static get False(){return be}static fromAttribute(t,e){return null===t?_e.False:""===t||t===e?_e.True:new _e(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const[e,...n]=t.split(":"),{only:r,not:i}=this.__tree;if(null==r?void 0:r[e]){const t=new _e(_e.__stringify(r[e]));return 0===n.length?t:t.zoom(n.join(":"))}return!i||i.includes(e)?_e.False:_e.True}toString(){return this.__value}toAttribute(t=""){var e;return"*"===(null===(e=this.__tree.not)||void 0===e?void 0:e[0])?t:0===this.__value.trim().length?null:this.toString()}static __stringify(t,e=""){return t.only?Object.entries(t.only).reduce(((t,[n,r])=>{const i=_e.__stringify(r,0===e.length?n:`${e}:${n}`);return 0===t.length?i:`${t} ${i}`}),""):t.not?`${0===e.length?"":`${e}:`}not=${t.not.join(",")}`:e}static __parse(t){const e={},n={branch:e,buffer:"",entity:ge.List,tree:e};return Array.from(`${t} `).forEach(((e,r)=>{try{_e.__processors[n.entity](n,e)}catch(e){const n="This error occured at: ",i=t=>t.substring(Math.max(0,r-30),r+30),o=i(t),a=" ".repeat(n.length)+i("^".padStart(r+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}})),e}}_e.__processors={[ge.List](t,e){var n,r,i,o;if(Array.isArray(t.branch))throw new SyntaxError("Paths are not allowed in sets.");if("="===e){if("not"===t.buffer){const e=null!==(n=t.branch.not)&&void 0!==n?n:[];return delete t.branch.only,t.branch.not=e,t.entity=ge.Set,t.branch=e,void(t.buffer="")}throw new SyntaxError(`Unknown modifier "${t.buffer}".`)}if(/^\s$/.test(e)||":"===e){if(t.buffer.length>0){const n=t.buffer,a=null!==(i=null===(r=t.branch.only)||void 0===r?void 0:r[n])&&void 0!==i?i:{};":"!==e&&(a.not=["*"]),!0!==(null===(o=t.branch.not)||void 0===o?void 0:o.includes("*"))&&(t.branch.only=Object.assign(Object.assign({},t.branch.only),{[n]:a}),delete t.branch.not),t.branch=":"===e?a:t.tree,t.buffer=""}}else{if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", ":" or a whitespace, but got "${e}" instead.`);t.buffer+=e}},[ge.Set](t,e){if(!Array.isArray(t.branch))throw new SyntaxError("Unexpected set item.");if(0!==t.buffer.length||!/^\s$/.test(e)){if(","===e||"*"===e||/^\s$/.test(e)){const n="*"===e?"*":t.buffer,r=new Set([...t.branch,n]),i=r.has("*")?new Set(["*"]):r;return t.branch.splice(0,t.branch.length,...i),t.entity=","===e?ge.Set:ge.List,t.branch=","===e?t.branch:t.tree,void(t.buffer="")}if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", "," or a whitespace, but got "${e}" instead.`);t.buffer+=e}}};const be=new _e(""),me=new _e("not=*");var we=Array.isArray,je=t?t.prototype:void 0,Se=je?je.toString:void 0;function xe(t){if("string"==typeof t)return t;if(we(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,xe)+"";if(e(t))return Se?Se.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function Oe(t){if(!n(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Ee,ke=i["__core-js_shared__"],Ae=(Ee=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+Ee:"";var Pe=Function.prototype.toString;function Te(t){if(null!=t){try{return Pe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Re=/^\[object .+?Constructor\]$/,Ne=Function.prototype,De=Object.prototype,Ie=Ne.toString,Le=De.hasOwnProperty,Ce=RegExp("^"+Ie.call(Le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fe(t){return!(!n(t)||(e=t,Ae&&Ae in e))&&(Oe(t)?Ce:Re).test(Te(t));var e}function $e(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Fe(n)?n:void 0}var Ve=$e(i,"WeakMap"),Me=/^(?:0|[1-9]\d*)$/;function Ue(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Me.test(t))&&t>-1&&t%1==0&&t<e}function ze(t,e){return t===e||t!=t&&e!=e}function We(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Be(t){return null!=t&&We(t.length)&&!Oe(t)}var qe=Object.prototype;function He(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qe)}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return o(t)&&"[object Arguments]"==r(t)}var Ze=Object.prototype,Ke=Ze.hasOwnProperty,Qe=Ze.propertyIsEnumerable,Xe=Ge(function(){return arguments}())?Ge:function(t){return o(t)&&Ke.call(t,"callee")&&!Qe.call(t,"callee")};var Ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,tn=Ye&&"object"==typeof module&&module&&!module.nodeType&&module,en=tn&&tn.exports===Ye?i.Buffer:void 0,nn=(en?en.isBuffer:void 0)||function(){return!1},rn={};function on(t){return function(e){return t(e)}}rn["[object Float32Array]"]=rn["[object Float64Array]"]=rn["[object Int8Array]"]=rn["[object Int16Array]"]=rn["[object Int32Array]"]=rn["[object Uint8Array]"]=rn["[object Uint8ClampedArray]"]=rn["[object Uint16Array]"]=rn["[object Uint32Array]"]=!0,rn["[object Arguments]"]=rn["[object Array]"]=rn["[object ArrayBuffer]"]=rn["[object Boolean]"]=rn["[object DataView]"]=rn["[object Date]"]=rn["[object Error]"]=rn["[object Function]"]=rn["[object Map]"]=rn["[object Number]"]=rn["[object Object]"]=rn["[object RegExp]"]=rn["[object Set]"]=rn["[object String]"]=rn["[object WeakMap]"]=!1;var an="object"==typeof exports&&exports&&!exports.nodeType&&exports,sn=an&&"object"==typeof module&&module&&!module.nodeType&&module,cn=sn&&sn.exports===an&&a.process,un=function(){try{var t=sn&&sn.require&&sn.require("util").types;return t||cn&&cn.binding&&cn.binding("util")}catch(t){}}(),ln=un&&un.isTypedArray,fn=ln?on(ln):function(t){return o(t)&&We(t.length)&&!!rn[r(t)]},hn=Object.prototype.hasOwnProperty;function pn(t,e){var n=we(t),r=!n&&Xe(t),i=!n&&!r&&nn(t),o=!n&&!r&&!i&&fn(t),a=n||r||i||o,s=a?Je(t.length,String):[],c=s.length;for(var u in t)!e&&!hn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ue(u,c))||s.push(u);return s}function dn(t,e){return function(n){return t(e(n))}}var vn=dn(Object.keys,Object),yn=Object.prototype.hasOwnProperty;function gn(t){return Be(t)?pn(t):function(t){if(!He(t))return vn(t);var e=[];for(var n in Object(t))yn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var _n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bn=/^\w*$/;var mn=$e(Object,"create");var wn=Object.prototype.hasOwnProperty;var jn=Object.prototype.hasOwnProperty;function Sn(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 xn(t,e){for(var n=t.length;n--;)if(ze(t[n][0],e))return n;return-1}Sn.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},Sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Sn.prototype.get=function(t){var e=this.__data__;if(mn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wn.call(e,t)?e[t]:void 0},Sn.prototype.has=function(t){var e=this.__data__;return mn?void 0!==e[t]:jn.call(e,t)},Sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mn&&void 0===e?"__lodash_hash_undefined__":e,this};var On=Array.prototype.splice;function En(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])}}En.prototype.clear=function(){this.__data__=[],this.size=0},En.prototype.delete=function(t){var e=this.__data__,n=xn(e,t);return!(n<0)&&(n==e.length-1?e.pop():On.call(e,n,1),--this.size,!0)},En.prototype.get=function(t){var e=this.__data__,n=xn(e,t);return n<0?void 0:e[n][1]},En.prototype.has=function(t){return xn(this.__data__,t)>-1},En.prototype.set=function(t,e){var n=this.__data__,r=xn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var kn=$e(i,"Map");function An(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 Pn(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])}}Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(kn||En),string:new Sn}},Pn.prototype.delete=function(t){var e=An(this,t).delete(t);return this.size-=e?1:0,e},Pn.prototype.get=function(t){return An(this,t).get(t)},Pn.prototype.has=function(t){return An(this,t).has(t)},Pn.prototype.set=function(t,e){var n=An(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Tn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tn.Cache||Pn),n}Tn.Cache=Pn;var Rn,Nn,Dn,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ln=/\\(\\)?/g,Cn=(Rn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(In,(function(t,n,r,i){e.push(r?i.replace(Ln,"$1"):n||t)})),e},Nn=Tn(Rn,(function(t){return 500===Dn.size&&Dn.clear(),t})),Dn=Nn.cache,Nn),Fn=Cn;function $n(t,n){return we(t)?t:function(t,n){if(we(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!e(t))||bn.test(t)||!_n.test(t)||null!=n&&t in Object(n)}(t,n)?[t]:Fn(function(t){return null==t?"":xe(t)}(t))}function Vn(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function Mn(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=$n(e,t)).length;null!=t&&n<r;)t=t[Vn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function Un(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function zn(t){var e=this.__data__=new En(t);this.size=e.size}function Wn(){return[]}zn.prototype.clear=function(){this.__data__=new En,this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},zn.prototype.get=function(t){return this.__data__.get(t)},zn.prototype.has=function(t){return this.__data__.has(t)},zn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof En){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pn(r)}return n.set(t,e),this.size=n.size,this};var Bn=Object.prototype.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,Hn=qn?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}(qn(t),(function(e){return Bn.call(t,e)})))}:Wn,Jn=Hn;function Gn(t,e,n){var r=e(t);return we(t)?r:Un(r,n(t))}function Zn(t){return Gn(t,gn,Jn)}var Kn=$e(i,"DataView"),Qn=$e(i,"Promise"),Xn=$e(i,"Set"),Yn=Te(Kn),tr=Te(kn),er=Te(Qn),nr=Te(Xn),rr=Te(Ve),ir=r;(Kn&&"[object DataView]"!=ir(new Kn(new ArrayBuffer(1)))||kn&&"[object Map]"!=ir(new kn)||Qn&&"[object Promise]"!=ir(Qn.resolve())||Xn&&"[object Set]"!=ir(new Xn)||Ve&&"[object WeakMap]"!=ir(new Ve))&&(ir=function(t){var e=r(t),n="[object Object]"==e?t.constructor:void 0,i=n?Te(n):"";if(i)switch(i){case Yn:return"[object DataView]";case tr:return"[object Map]";case er:return"[object Promise]";case nr:return"[object Set]";case rr:return"[object WeakMap]"}return e});var or=ir,ar=i.Uint8Array;function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pn;++e<n;)this.add(t[e])}function cr(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 ur(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function lr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new sr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,o):r(d,v,f,t,e,o);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!cr(e,(function(t,e){if(!ur(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var pr=t?t.prototype:void 0,dr=pr?pr.valueOf:void 0;var vr=Object.prototype.hasOwnProperty;var yr="[object Object]",gr=Object.prototype.hasOwnProperty;function _r(t,e,n,r,i,o){var a=we(t),s=we(e),c=a?"[object Array]":or(t),u=s?"[object Array]":or(e),l=(c="[object Arguments]"==c?yr:c)==yr,f=(u="[object Arguments]"==u?yr:u)==yr,h=c==u;if(h&&nn(t)){if(!nn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new zn),a||fn(t)?lr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ar(t),new ar(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ze(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=fr;case"[object Set]":var c=1&r;if(s||(s=hr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=lr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(dr)return dr.call(t)==dr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&gr.call(t,"__wrapped__"),d=f&&gr.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return o||(o=new zn),i(v,y,n,r,o)}}return!!h&&(o||(o=new zn),function(t,e,n,r,i,o){var a=1&n,s=Zn(t),c=s.length;if(c!=Zn(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:vr.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 v=t[l=s[u]],y=e[l];if(r)var g=a?r(y,v,l,e,t,o):r(v,y,l,t,e,o);if(!(void 0===g?v===y||i(v,y,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function br(t,e,n,r,i){return t===e||(null==t||null==e||!o(t)&&!o(e)?t!=t&&e!=e:_r(t,e,n,r,br,i))}function mr(t,e){return br(t,e)}class wr extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var jr=s((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,v={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){v.isRoot||(v.parent.node[v.key]=t),v.node=t,e&&(d=!1)},delete:function(t){delete v.parent.node[v.key],t&&(d=!1)},remove:function(t){s(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return v;function y(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=o(v.node)),v.isLeaf=0==v.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){v.circular=a[t];break}}else v.isLeaf=!0,v.keys=null;v.notLeaf=!v.isLeaf,v.notRoot=!v.isRoot}y();var g=e.call(v,v.node);return void 0!==g&&v.update&&v.update(g),p.before&&p.before.call(v,v.node),d?("object"!=typeof v.node||null===v.node||v.circular||(a.push(v),y(),c(v.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(v,v.node[e],e);var o=t(v.node[e]);n&&u.call(v.node,e)&&(v.node[e]=o.node),o.isLast=i==v.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(v,o),r.pop()})),a.pop()),p.after&&p.after.call(v,v.node),v):v}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Sr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Sr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Sr.__applyPatch(i,t,e);return mr(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 __isResource(t){return"string"==typeof Mn(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 jr(t).reduce((function(t,e){if(!Sr.__isResource(e))return t;const n=jr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Sr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=jr({data:e}).map((function(e){if(!Sr.__isResource(e))return;const n=e._links.self.href,r=Sr.__approximateURI(n);if(o.includes(r))throw new Sr.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 Sr.UpdateError}})).data)&&void 0!==i?i:null}}Sr.UpdateError=wr;var xr=s((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=[],v=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}();v.prototype.add=v.prototype.addReporter,v.prototype.remove=v.prototype.removeReporter,v.prototype.clear=v.prototype.removeReporter,v.prototype.withScope=v.prototype.withTag,v.prototype.mock=v.prototype.mockTypes,v.prototype.pause=v.prototype.pauseLogs,v.prototype.resume=v.prototype.resumeLogs;var y,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||((y=new v({reporters:[new g]})).Consola=v,y.LogLevel=l,y.BrowserReporter=g,y)}()})),Or=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Er=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),kr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Ar=function(){function t(e,n,r,i){Or(this,t),this.name=e,this.fn=n,this.args=r,this.modifiers=i}return Er(t,[{key:"_test",value:function(t){var e=this.fn;try{Tr(this.modifiers.slice(),e)(t)}catch(t){e=function(){return!1}}try{return Tr(this.modifiers.slice(),e)(t)}catch(t){return!1}}},{key:"_check",value:function(t){try{Tr(this.modifiers.slice(),this.fn)(t)}catch(t){if(Tr(this.modifiers.slice(),(function(t){return t}))(!1))return}if(!Tr(this.modifiers.slice(),this.fn)(t))throw null}},{key:"_testAsync",value:function(t){var e=this;return new Promise((function(n,r){Rr(e.modifiers.slice(),e.fn)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))}}]),t}();function Pr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"simple";return"object"==typeof t?t[e]:t}function Tr(t,e){if(t.length){var n=t.shift(),r=Tr(t,e);return n.perform(r)}return Pr(e)}function Rr(t,e){if(t.length){var n=t.shift(),r=Rr(t,e);return n.performAsync(r)}return function(t){return Promise.resolve(Pr(e,"async")(t))}}var Nr=function t(e,n,r){Or(this,t),this.name=e,this.perform=n,this.performAsync=r},Dr=function(t){function e(t,n,r,i){Or(this,e);for(var o=arguments.length,a=Array(o>4?o-4:0),s=4;s<o;s++)a[s-4]=arguments[s];var c=kr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a));return Error.captureStackTrace&&Error.captureStackTrace(c,e),c.rule=t,c.value=n,c.cause=r,c.target=i,c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}(),Ir=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Or(this,t),this.chain=e,this.nextRuleModifiers=n}return Er(t,[{key:"_applyRule",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n.chain.push(new Ar(e,t.apply(n,i),i,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}}},{key:"_applyModifier",value:function(t,e){return this.nextRuleModifiers.push(new Nr(e,t.simple,t.async)),this}},{key:"_clone",value:function(){return new t(this.chain.slice(),this.nextRuleModifiers.slice())}},{key:"test",value:function(t){return this.chain.every((function(e){return e._test(t)}))}},{key:"testAll",value:function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Dr(n,t,r))}})),e}},{key:"check",value:function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Dr(e,t,n)}}))}},{key:"testAsync",value:function(t){var e=this;return new Promise((function(n,r){Lr(t,e.chain.slice(),n,r)}))}}]),t}();function Lr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){Lr(t,e,n,r)}),(function(e){r(new Dr(i,t,e))}))}else n(t)}function Cr(){return $r(new Ir)}var Fr={};function $r(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=$r(t._clone());return n in Vr?r._applyModifier(Vr[n],n):n in Fr?r._applyRule(Fr[n],n):n in Ur?r._applyRule(Ur[n],n):void 0}})}Cr.extend=function(t){Object.assign(Fr,t)},Cr.clearCustomRules=function(){Fr={}};var Vr={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(t){return!0}))}}},some:{simple:function(t){return function(e){return Mr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Mr(e).map((function(e){try{return t(e).catch((function(t){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return Mr(e).every(t)}},async:function(t){return function(e){return Promise.all(Mr(e).map(t)).then((function(t){return t.every(Boolean)}))}}}};function Mr(t){return"string"==typeof t?t.split(""):t}var Ur={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||Wr)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return zr("string")},boolean:function(){return zr("boolean")},undefined:function(){return zr("undefined")},null:function(){return zr("null")},array:function(){return zr("array")},object:function(){return zr("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/^([a-z]+\s*)+$/.test(t)}},uppercase:function(){return function(t){return/^([A-Z]+\s*)+$/.test(t)}},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(t){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.some((function(e){return e.test(t)}))}},optional:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return e&&"string"==typeof n&&""===n.trim()||null!=n&&t.check(n),!0}}};function zr(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function Wr(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Cr.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 Br=Cr().schema({clear:Cr().typeOf("function"),getItem:Cr().typeOf("function"),key:Cr().typeOf("function"),length:Cr().number(),removeItem:Cr().typeOf("function"),setItem:Cr().typeOf("function")});class qr extends Error{constructor(t){qr.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}qr.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",qr.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",qr.UNAUTHORIZED="UNAUTHORIZED",qr.UNKNOWN="UNKNOWN",qr.v8n={constructor:Cr().schema({code:Cr().passesAnyOf(Cr().exact(qr.NEW_PASSWORD_REQUIRED),Cr().exact(qr.INVALID_NEW_PASSWORD),Cr().exact(qr.UNAUTHORIZED),Cr().exact(qr.UNKNOWN))})};var Hr=u(s((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Jr=s((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})),Gr=s((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})),Zr=u(s((function(t){t.exports=function(t,e){var n=Gr(t,e,"get");return Jr(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),Kr=new WeakMap,Qr=function(){function t(){Kr.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=Zr(this,Kr).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=Zr(this,Kr).get(""+t))?e:null},e.setItem=function(t,e){Zr(this,Kr).set(""+t,""+e)},e.removeItem=function(t){Zr(this,Kr).delete(""+t)},e.clear=function(){Zr(this,Kr).clear()},Hr(t,[{key:"length",get:function(){return Zr(this,Kr).size}}]),t}(),Xr=Qr;class Yr extends Error{constructor(t){super(),Yr.v8n.constructor.check(t),this.response=t}}Yr.v8n={constructor:Cr().instanceOf(l.Response)};var ti=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())}))},ei=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 ni(t){const{json:e}=t,n=ei(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 si(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=>ni(Object.assign(Object.assign({},n),{json:t})))):ni(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class ri extends l.Response{constructor(t){ri.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 ti(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return ni(Object.assign({json:e},n))}))}}ri.v8n={constructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function")})};var ii=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 oi(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>oi(t,e))).join():Object.entries(e).map((([t,e])=>oi(n+t,e))).join()}function ai(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>ai(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class si{constructor(t){si.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return ii(this,void 0,void 0,(function*(){si.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{[...new URLSearchParams(t).entries()].forEach((([t,n])=>e.searchParams.append(t,n)))})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",ai(a)),void 0!==s&&e.searchParams.set("zoom",oi("",s));const c=yield this._fetch(new l.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new ri(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return ii(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new l.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new ri(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){si.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new si(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return ii(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 si(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 si(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new Yr(o)}))}}si.v8n={classConstructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function"),path:Cr().curieChain()}),follow:Cr().string(),get:Cr().optional(Cr().schema({fields:Cr().optional(Cr().array().every.string()),filters:Cr().optional(Cr().array().every.string()),limit:Cr().optional(Cr().number()),offset:Cr().optional(Cr().number()),order:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array())),zoom:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array()))}))},si.ResolutionError=Yr,si.Response=ri;var ci=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 ui extends si{constructor(t){var e,n,r;ui.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new Xr,console:xr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:l.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new Xr,this.cache=this._cache,this.base=t.base}fetch(...t){return ci(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ui.WHATWGResponse=l.Response,ui.WHATWGRequest=l.Request,ui.WHATWGHeaders=l.Headers,ui.whatwgFetch=l.fetch,ui.AuthError=qr,ui.Node=si,ui.v8n={classConstructor:Cr().schema({base:Cr().instanceOf(URL),cache:Cr().optional(Br),fetch:Cr().optional(Cr().typeOf("function")),level:Cr().optional(Cr().integer()),storage:Cr().optional(Br)})};export{At as $,ui as A,_e as B,Yt as C,ut as D,Rt as E,f as F,z as G,L as H,q as I,U as J,F as K,B as L,ct as M,y as N,Gt as O,K as P,gt as Q,Sr as R,Zt as S,_t as T,bt as U,mt as V,St as W,xt as X,Ot as Y,Et as Z,h as _,ye as a,Pt as a0,wt as a1,Dt as a2,It as a3,Lt as a4,Nt as a5,ae as a6,Cr as a7,$e as a8,ze as a9,Be as aa,Ue as ab,He as ac,pn as ad,dn as ae,gn as af,Jn as ag,Wn as ah,Un as ai,Gn as aj,ar as ak,or as al,un as am,on as an,we as ao,nn as ap,zn as aq,Zn as ar,Je as as,oe as at,mr as au,kt as b,d as c,R as d,Tt as e,Jt as f,ht as g,C as h,qt as i,H as j,_ as k,st as l,Tn as m,pt as n,it as o,Kt as p,Q as q,M as r,X as s,jr as t,Z as u,N as v,V as w,W as x,et as y,tt as z};
15
+ ***************************************************************************** */var h=function(){return h=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},h.apply(this,arguments)};function p(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 d(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 v(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 y(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(v(arguments[e]));return t}var g={};function _(t){return Object.keys(t)}function b(t,e,n){void 0===n&&(n=".");var r=j(t,n),i=j(e,n);return F(i)?!!F(r)&&i===r:F(r)?r in i:_(r).every((function(t){return t in i&&b(r[t],i[t])}))}function m(t){try{return F(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 w(t,e){try{return L(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function j(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:L(t)?S(t):"string"!=typeof t?t:S(w(t,e));var n}function S(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 x(t,e){for(var n={},r=_(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function O(t,e,n){var r,i,o={};try{for(var a=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var E=function(t){return function(e){var n,r,i=e;try{for(var o=d(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 k(t){return t?F(t)?[[t]]:A(_(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?k(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function A(t){var e;return(e=[]).concat.apply(e,y(t))}function P(t){return L(t)?t:[t]}function T(t){return void 0===t?[]:P(t)}function R(t,e,n){var r,i;if(C(t))return t(e,n.data);var o={};try{for(var a=d(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];C(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 N(t){return t instanceof Promise||!(null===t||!C(t)&&"object"!=typeof t||!C(t.then))}function D(t,e){var n,r,i=v([[],[]],2),o=i[0],a=i[1];try{for(var s=d(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 I(t,e){return x(t.states,(function(t,n){if(t){var r=(F(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:I(t,r)}}}))}function L(t){return Array.isArray(t)}function C(t){return"function"==typeof t}function F(t){return"string"==typeof t}function $(t,e){if(t)return F(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:C(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function V(t){try{return"subscribe"in t&&C(t.subscribe)}catch(t){return!1}}var M,U,z=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function W(t){try{return"__xstatenode"in t}catch(t){return!1}}function B(t){return!!t&&"function"==typeof t.send}function q(t,e){return F(t)||"number"==typeof t?h({type:t},e):t}function H(t,e){if(!F(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=q(t);return h({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function J(t,e){return P(e).map((function(e){return void 0===e||"string"==typeof e||W(e)?{target:e,event:t}:h(h({},e),{event:t})}))}function G(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function Z(t){return"string"==typeof t?{type:t}:t}function K(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"}(M||(M={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(U||(U={}));var Q=M.Start,X=M.Stop,Y=M.Raise,tt=M.Send,et=M.Cancel,nt=M.NullEvent,rt=M.Assign;M.After,M.DoneState;var it=M.Log,ot=M.Init,at=M.Invoke;M.ErrorExecution;var st=M.ErrorPlatform,ct=M.ErrorCustom,ut=M.Update,lt=M.Choose,ft=M.Pure,ht=H({type:ot});function pt(t,e){return e&&e[t]||void 0}function dt(t,e){var n;if(F(t)||"number"==typeof t){var r=pt(t,e);n=C(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(C(t))n={type:t.name||t.toString(),exec:t};else{if(C(r=pt(t.type,e)))n=h(h({},t),{exec:r});else if(r){var i=r.type||t.type;n=h(h(h({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var vt=function(t,e){return t?(L(t)?t:[t]).map((function(t){return dt(t,e)})):[]};function yt(t){var e=dt(t);return h(h({id:F(t)?t:e.id},e),{type:e.type})}function gt(t){return F(t)?{type:Y,event:t}:_t(t,{to:U.Internal})}function _t(t,e){return{to:e?e.to:void 0,type:tt,event:C(t)?t:q(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:C(t)?t.name:m(t)}}function bt(t,e){return _t(t,h(h({},e),{to:U.Parent}))}function mt(){return bt(ut)}function wt(t,e){return _t(t,h(h({},e),{to:function(t,e,n){return n._event.origin}}))}var jt=function(t,e){return{context:t,event:e}};function St(t,e){return void 0===t&&(t=jt),{type:it,label:e,expr:t}}var xt=function(t){return{type:et,sendId:t}};function Ot(t){var e=yt(t);return{type:M.Start,activity:e,exec:void 0}}function Et(t){var e=C(t)?t:yt(t);return{type:M.Stop,activity:e,exec:void 0}}var kt=function(t){return{type:rt,assignment:t}};function At(t,e){var n=e?"#"+e:"";return M.After+"("+t+")"+n}function Pt(t,e){var n=M.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Tt(t,e){var n=M.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Rt(t,e){var n=M.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Nt(t){return{type:M.Pure,get:t}}function Dt(t,e){return _t((function(t,e){return e}),h(h({},e),{to:t}))}function It(t,e){return bt((function(e,n,r){return{type:ct,data:C(t)?t(e,n,r):t}}),h(h({},e),{to:U.Parent}))}function Lt(t){return{type:M.Choose,conds:t}}function Ct(t,e,n,r,i){var o=v(D(i,(function(t){return t.type===rt})),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(C(a))c=a(t,e.data,s);else try{for(var u=d(_(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=C(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=A(s.map((function(n){var i;switch(n.type){case Y:return{type:Y,_event:H(n.event)};case tt:var o=function(t,e,n,r){var i,o={_event:n},a=H(C(t.event)?t.event(e,n.data,o):t.event);if(F(t.delay)){var s=r&&r[t.delay];i=C(s)?s(e,n.data,o):s}else i=C(t.delay)?t.delay(e,n.data,o):t.delay;var c=C(t.to)?t.to(e,n.data,o):t.to;return h(h({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);return o;case it:return function(t,e,n){return h(h({},t),{value:F(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case lt:if(!(s=null===(i=n.conds.find((function(n){var i=$(n.cond,t.options.guards);return!i||G(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var a=Ct(t,e,c,r,vt(T(s),t.options.actions));return c=a[1],a[0];case ft:var s;if(!(s=n.get(c,r.data)))return[];a=Ct(t,e,c,r,vt(T(s),t.options.actions));return c=a[1],a[0];case X:return function(t,e,n){var r=C(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:M.Stop,activity:i}}(n,c,r);default:return dt(n,t.options.actions)}})));return[u,c]}var Ft=function(t){return"atomic"===t.type||"final"===t.type};function $t(t){return _(t.states).map((function(e){return t.states[e]}))}function Vt(t){var e=[t];return Ft(t)?e:e.concat(A($t(t).map(Vt)))}function Mt(t,e){var n,r,i,o,a,s,c,u,l=zt(new Set(t)),f=new Set(e);try{for(var h=d(f),p=h.next();!p.done;p=h.next())for(var v=(x=p.value).parent;v&&!f.has(v);)f.add(v),v=v.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=zt(f);try{for(var g=d(f),_=g.next();!_.done;_=g.next()){if("compound"!==(x=_.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,d($t(x))),m=b.next();!m.done;m=b.next()){var w=m.value;"history"!==w.type&&(f.has(w)||(f.add(w),l.get(w)?l.get(w).forEach((function(t){return f.add(t)})):w.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{_&&!_.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var j=d(f),S=j.next();!S.done;S=j.next()){var x;for(v=(x=S.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(t){c={error:t}}finally{try{S&&!S.done&&(u=j.return)&&u.call(j)}finally{if(c)throw c.error}}return f}function Ut(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if(Ft(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=Ut(t,e)})),i}function zt(t){var e,n,r=new Map;try{for(var i=d(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 Wt(t,e){return Ut(t,zt(Mt([t],e)))}function Bt(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function qt(t,e){return"compound"===e.type?$t(e).some((function(e){return"final"===e.type&&Bt(t,e)})):"parallel"===e.type&&$t(e).every((function(e){return qt(t,e)}))}function Ht(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if(F(t)||F(e))return t===e;var n=_(t),r=_(e);return n.length===r.length&&n.every((function(n){return Ht(t[n],e[n])}))}function Jt(t){return!F(t)&&("value"in t&&"history"in t)}function Gt(t,e){var n=t.exec;return h(h({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var Zt=function(){function t(t){var e=this;this.actions=[],this.activities=g,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||g,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,A(y(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:ht,_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=ht;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="."),F(t))return[t];var r=_(t);return r.concat.apply(r,y(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,p(t,["configuration","transitions"])},t.prototype.matches=function(t){return b(t,this.value)},t}(),Kt=function(t,e){return e(t)};function Qt(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},toJSON:function(){return{id:t}}}}function Xt(t,e,n,r){var i,o=Z(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?R(t.data,n,r):void 0,c=a?function(t,e,n){var r=Qt(e);r.deferred=!0,W(t)&&(r.state=Kt(void 0,(function(){return(n?t.withContext(n):t).initialState})));return r}(a,t.id,s):Qt(t.id);return c.meta=t,c}function Yt(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function te(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function ee(t){return h(h({type:at},t),{toJSON:function(){t.onDone,t.onError;var e=p(t,["onDone","onError"]);return h(h({},e),{type:at,src:te(t.src)})}})}var ne={},re=function(t){return"#"===t[0]},ie=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||y([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&&_(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.initial=this.config.initial,this.states=this.config.states?x(this.config.states,(function(e,n){var r,o=new t(e,{_parent:i,_key:n});return Object.assign(i.idMap,h(((r={})[o.id]=o,r),o.idMap)),o})):ne;var o=0;!function t(e){var n,r;e.order=o++;try{for(var i=d($t(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=T(this.config.entry||this.config.onEntry).map((function(t){return dt(t)})),this.onExit=T(this.config.exit||this.config.onExit).map((function(t){return dt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=T(this.config.invoke).map((function(t,e){var n,r;if(W(t))return i.machine.options.services=h(((n={})[t.id]=t,n),i.machine.options.services),ee({src:t.id,id:t.id});if(F(t.src))return ee(h(h({},t),{id:t.id||t.src,src:t.src}));if(W(t.src)||C(t.src)){var o=i.id+":invocation["+e+"]";return i.machine.options.services=h(((r={})[o]=t.src,r),i.machine.options.services),ee(h(h({id:o},t),{src:o}))}var a=t.src;return ee(h(h({id:a.type},t),{src:a}))})),this.activities=T(this.config.activities).concat(this.invoke).map((function(t){return yt(t)})),this.transition=this.transition.bind(this)}return t.prototype._init=function(){this.__cache.transitions||Vt(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:h(h({},i),e.actions),activities:h(h({},o),e.activities),guards:h(h({},a),e.guards),services:h(h({},s),e.services),delays:h(h({},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:x(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=At(C(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(_t(r,{delay:e})),t.onExit.push(xt(r)),r};return(L(e)?e.map((function(t,e){var r=n(t.delay,e);return h(h({},t),{event:r})})):A(_(e).map((function(t,r){var i=e[t],o=F(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return T(o).map((function(t){return h(h({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return h(h({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof Zt?t.value:j(t,this.delimiter);if(F(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this.states[r]]}var o=_(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=m(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(Mt([],this.getStateNodes(t.value)));return new Zt(h(h({},t),{value:this.resolve(t.value),configuration:e,done:qt(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=_(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=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=_(o).map((function(t){return o[t]})),h=A(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=A(f.map((function(t){return t.entrySet}))),v=A(_(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:A(f.map((function(t){return t.exitSet}))),configuration:v,source:e,actions:A(_(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return F(t)?this.transitionLeafNode(t,e,n):1===_(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=d(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,v=t.context,g=!p||(F(p)&&re(p)?t.matches(j(this.getStateNodeById(p).path,this.delimiter)):b(j(p,this.delimiter),E(this.path.slice(0,-2))(t.value))),_=!1;try{_=!h||G(this.machine,h,v,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(_&&g){void 0!==f.target&&(c=f.target),s.push.apply(s,y(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 m=A(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),w=!!i.internal;return{transitions:[i],entrySet:w?[]:A(m.map((function(t){return o.nodesFromChild(t)}))),exitSet:w?[]:[this],configuration:m,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=Mt([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?Mt(c,t.configuration):c;try{for(var l=d(u),f=l.next();!f.done;f=l.next()){Bt(c,g=f.value)||t.entrySet.push(g)}}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=d(c),p=h.next();!p.done;p=h.next()){var g;Bt(u,g=p.value)&&!Bt(t.exitSet,g.parent)||t.exitSet.push(g)}}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 _=A(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Pt(r.id,r.doneData),Pt(o.id,r.doneData?R(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&$t(a).every((function(e){return qt(t.configuration,e)}))&&i.push(Pt(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 b=new Set(t.entrySet),m=new Set(t.exitSet),w=v([A(Array.from(b).map((function(t){return y(t.activities.map((function(t){return Ot(t)})),t.onEntry)}))).concat(_.map(gt)),A(Array.from(m).map((function(t){return y(t.onExit,t.activities.map((function(t){return Et(t)})))})))],2),j=w[0],S=w[1];return vt(S.concat(t.actions).concat(j),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=H(e);if(t instanceof Zt)r=void 0===n?t:this.resolveState(Zt.from(t,n));else{var a=F(t)?this.resolve(S(this.getResolvedPath(t))):this.resolve(t),s=n||this.machine.context;r=this.resolveState(Zt.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=Mt([],this.getStateNodes(r.value)),l=c.configuration.length?Mt(u,c.configuration):u;return c.configuration=y(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,y(i)),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=ht),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0?Wt(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),p=e?h({},e.activities):{};try{for(var y=d(f),g=y.next();!g.done;g=y.next()){var _=g.value;_.type===Q?p[_.activity.id||_.activity.type]=_:_.type===X&&(p[_.activity.id||_.activity.type]=!1)}}catch(t){i={error:t}}finally{try{g&&!g.done&&(o=y.return)&&o.call(y)}finally{if(i)throw i.error}}var b,m,w=v(Ct(this,e,l,n,f),2),j=w[0],S=w[1],x=v(D(j,(function(t){return t.type===Y||t.type===tt&&t.to===U.Internal})),2),O=x[0],E=x[1],k=j.filter((function(t){var e;return t.type===Q&&(null===(e=t.activity)||void 0===e?void 0:e.type)===at})),A=k.reduce((function(t,e){return t[e.activity.id]=Xt(e.activity,a.machine,S,n),t}),e?h({},e.children):{}),P=c?t.configuration:e?e.configuration:[],T=P.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{}),R=qt(P,this),N=new Zt({value:c||e.value,context:S,_event:n,_sessionid:e?e._sessionid:null,historyValue:c?u?(b=u,m=c,{current:m,states:I(b,m)}):void 0:e?e.historyValue:void 0,history:!c||t.source?e:void 0,actions:c?E:[],activities:c?p:e?e.activities:{},meta:c?T:e?e.meta:void 0,events:[],configuration:P,transitions:t.transitions,children:A,done:R}),L=l!==S;N.changed=n.name===ut||L;var C=N.history;if(C&&delete C.history,!c)return N;var F=N;if(!R)for((this._transient||s.some((function(t){return t._transient})))&&(F=this.resolveRaisedTransition(F,{type:nt},n));O.length;){var $=O.shift();F=this.resolveRaisedTransition(F,$._event,n)}var V=F.changed||(C?!!F.actions.length||L||typeof C.value!=typeof F.value||!Ht(F.value,C.value):void 0);return F.changed=V,F.history=C,F},t.prototype.getStateNode=function(t){if(re(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=re(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&re(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=w(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||ne;switch(this.type){case"parallel":return x(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ne}));case"compound":if(F(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return _(t).length?x(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ne})):this.initialStateValue||{};default:return t||ne}},t.prototype.getResolvedPath=function(t){if(re(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return w(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=O(this.states,(function(t){return t.initialStateValue||ne}),(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=Ft(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=F(e.target)&&re(e.target)?S(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 Ft(this)?[this]:"compound"!==this.type||this.initial?A(k(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=v(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(_(this.states).length)return{current:t||this.initialStateValue,states:O(this.states,(function(e,n){if(!t)return e.historyValue();var r=F(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?A(k(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=d(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 F(a)?[n.getStateNode(a)]:A(k(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=A(_(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=d(_(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,d(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(!F(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 T(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return F(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=h(h({},t),{actions:vt(T(t.actions)),cond:$(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return h(h({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=p(i,["*"]);n=A(_(c).map((function(t){var e=J(t,c[t]);return e})).concat(J("*",s)))}else n=[];var u=this.config.always?J("",this.config.always):[],l=this.config.onDone?J(String(Pt(this.id)),this.config.onDone):[];var f=A(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,y(J(String(Tt(t.id)),t.onDone))),t.onError&&e.push.apply(e,y(J(String(Rt(t.id)),t.onError))),e}))),h=this.after,v=A(y(l,f,n,u).map((function(t){return T(t).map((function(t){return r.formatTransition(t)}))})));try{for(var g=d(h),b=g.next();!b.done;b=g.next()){var m=b.value;v.push(m)}}catch(e){t={error:e}}finally{try{b&&!b.done&&(e=g.return)&&e.call(g)}finally{if(t)throw t.error}}return v},t}();function oe(t,e,n){void 0===n&&(n=t.context);var r="function"==typeof n?n():n;return new ie(t,e,r)}function ae(t,e){var n="function"==typeof t.context?t.context():t.context;return new ie(t,e,n)}const se=kt({failure:null}),ce=kt({errors:[]}),ue=kt({edits:null}),le=kt({data:null}),fe=ce,he=kt({failure:(t,e)=>e.data}),pe=kt({errors:(t,e)=>e.data}),de=kt({data:(t,e)=>e.data}),ve=kt({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const ye=ae({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{actions:["clearData","clearEdits","clearErrors"],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:se,clearErrors:ce,clearEdits:ue,clearData:le,validate:fe,setFailure:he,setErrors:pe,setData:de,applyEdit:ve}),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)})});var ge;!function(t){t[t.List=0]="List",t[t.Set=1]="Set"}(ge||(ge={}));class _e{constructor(t){this.__value=t,this.__tree=_e.__parse(t)}static get True(){return me}static get False(){return be}static fromAttribute(t,e){return null===t?_e.False:""===t||t===e?_e.True:new _e(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const[e,...n]=t.split(":"),{only:r,not:i}=this.__tree;if(null==r?void 0:r[e]){const t=new _e(_e.__stringify(r[e]));return 0===n.length?t:t.zoom(n.join(":"))}return!i||i.includes(e)?_e.False:_e.True}toString(){return this.__value}toAttribute(t=""){var e;return"*"===(null===(e=this.__tree.not)||void 0===e?void 0:e[0])?t:0===this.__value.trim().length?null:this.toString()}static __stringify(t,e=""){return t.only?Object.entries(t.only).reduce(((t,[n,r])=>{const i=_e.__stringify(r,0===e.length?n:`${e}:${n}`);return 0===t.length?i:`${t} ${i}`}),""):t.not?`${0===e.length?"":`${e}:`}not=${t.not.join(",")}`:e}static __parse(t){const e={},n={branch:e,buffer:"",entity:ge.List,tree:e};return Array.from(`${t} `).forEach(((e,r)=>{try{_e.__processors[n.entity](n,e)}catch(e){const n="This error occured at: ",i=t=>t.substring(Math.max(0,r-30),r+30),o=i(t),a=" ".repeat(n.length)+i("^".padStart(r+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}})),e}}_e.__processors={[ge.List](t,e){var n,r,i,o;if(Array.isArray(t.branch))throw new SyntaxError("Paths are not allowed in sets.");if("="===e){if("not"===t.buffer){const e=null!==(n=t.branch.not)&&void 0!==n?n:[];return delete t.branch.only,t.branch.not=e,t.entity=ge.Set,t.branch=e,void(t.buffer="")}throw new SyntaxError(`Unknown modifier "${t.buffer}".`)}if(/^\s$/.test(e)||":"===e){if(t.buffer.length>0){const n=t.buffer,a=null!==(i=null===(r=t.branch.only)||void 0===r?void 0:r[n])&&void 0!==i?i:{};":"!==e&&(a.not=["*"]),!0!==(null===(o=t.branch.not)||void 0===o?void 0:o.includes("*"))&&(t.branch.only=Object.assign(Object.assign({},t.branch.only),{[n]:a}),delete t.branch.not),t.branch=":"===e?a:t.tree,t.buffer=""}}else{if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", ":" or a whitespace, but got "${e}" instead.`);t.buffer+=e}},[ge.Set](t,e){if(!Array.isArray(t.branch))throw new SyntaxError("Unexpected set item.");if(0!==t.buffer.length||!/^\s$/.test(e)){if(","===e||"*"===e||/^\s$/.test(e)){const n="*"===e?"*":t.buffer,r=new Set([...t.branch,n]),i=r.has("*")?new Set(["*"]):r;return t.branch.splice(0,t.branch.length,...i),t.entity=","===e?ge.Set:ge.List,t.branch=","===e?t.branch:t.tree,void(t.buffer="")}if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", "," or a whitespace, but got "${e}" instead.`);t.buffer+=e}}};const be=new _e(""),me=new _e("not=*");var we=Array.isArray,je=t?t.prototype:void 0,Se=je?je.toString:void 0;function xe(t){if("string"==typeof t)return t;if(we(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,xe)+"";if(e(t))return Se?Se.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function Oe(t){if(!n(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Ee,ke=i["__core-js_shared__"],Ae=(Ee=/[^.]+$/.exec(ke&&ke.keys&&ke.keys.IE_PROTO||""))?"Symbol(src)_1."+Ee:"";var Pe=Function.prototype.toString;function Te(t){if(null!=t){try{return Pe.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Re=/^\[object .+?Constructor\]$/,Ne=Function.prototype,De=Object.prototype,Ie=Ne.toString,Le=De.hasOwnProperty,Ce=RegExp("^"+Ie.call(Le).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Fe(t){return!(!n(t)||(e=t,Ae&&Ae in e))&&(Oe(t)?Ce:Re).test(Te(t));var e}function $e(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Fe(n)?n:void 0}var Ve=$e(i,"WeakMap"),Me=/^(?:0|[1-9]\d*)$/;function Ue(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Me.test(t))&&t>-1&&t%1==0&&t<e}function ze(t,e){return t===e||t!=t&&e!=e}function We(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Be(t){return null!=t&&We(t.length)&&!Oe(t)}var qe=Object.prototype;function He(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||qe)}function Je(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ge(t){return o(t)&&"[object Arguments]"==r(t)}var Ze=Object.prototype,Ke=Ze.hasOwnProperty,Qe=Ze.propertyIsEnumerable,Xe=Ge(function(){return arguments}())?Ge:function(t){return o(t)&&Ke.call(t,"callee")&&!Qe.call(t,"callee")};var Ye="object"==typeof exports&&exports&&!exports.nodeType&&exports,tn=Ye&&"object"==typeof module&&module&&!module.nodeType&&module,en=tn&&tn.exports===Ye?i.Buffer:void 0,nn=(en?en.isBuffer:void 0)||function(){return!1},rn={};function on(t){return function(e){return t(e)}}rn["[object Float32Array]"]=rn["[object Float64Array]"]=rn["[object Int8Array]"]=rn["[object Int16Array]"]=rn["[object Int32Array]"]=rn["[object Uint8Array]"]=rn["[object Uint8ClampedArray]"]=rn["[object Uint16Array]"]=rn["[object Uint32Array]"]=!0,rn["[object Arguments]"]=rn["[object Array]"]=rn["[object ArrayBuffer]"]=rn["[object Boolean]"]=rn["[object DataView]"]=rn["[object Date]"]=rn["[object Error]"]=rn["[object Function]"]=rn["[object Map]"]=rn["[object Number]"]=rn["[object Object]"]=rn["[object RegExp]"]=rn["[object Set]"]=rn["[object String]"]=rn["[object WeakMap]"]=!1;var an="object"==typeof exports&&exports&&!exports.nodeType&&exports,sn=an&&"object"==typeof module&&module&&!module.nodeType&&module,cn=sn&&sn.exports===an&&a.process,un=function(){try{var t=sn&&sn.require&&sn.require("util").types;return t||cn&&cn.binding&&cn.binding("util")}catch(t){}}(),ln=un&&un.isTypedArray,fn=ln?on(ln):function(t){return o(t)&&We(t.length)&&!!rn[r(t)]},hn=Object.prototype.hasOwnProperty;function pn(t,e){var n=we(t),r=!n&&Xe(t),i=!n&&!r&&nn(t),o=!n&&!r&&!i&&fn(t),a=n||r||i||o,s=a?Je(t.length,String):[],c=s.length;for(var u in t)!e&&!hn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||Ue(u,c))||s.push(u);return s}function dn(t,e){return function(n){return t(e(n))}}var vn=dn(Object.keys,Object),yn=Object.prototype.hasOwnProperty;function gn(t){return Be(t)?pn(t):function(t){if(!He(t))return vn(t);var e=[];for(var n in Object(t))yn.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var _n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bn=/^\w*$/;var mn=$e(Object,"create");var wn=Object.prototype.hasOwnProperty;var jn=Object.prototype.hasOwnProperty;function Sn(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 xn(t,e){for(var n=t.length;n--;)if(ze(t[n][0],e))return n;return-1}Sn.prototype.clear=function(){this.__data__=mn?mn(null):{},this.size=0},Sn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Sn.prototype.get=function(t){var e=this.__data__;if(mn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return wn.call(e,t)?e[t]:void 0},Sn.prototype.has=function(t){var e=this.__data__;return mn?void 0!==e[t]:jn.call(e,t)},Sn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=mn&&void 0===e?"__lodash_hash_undefined__":e,this};var On=Array.prototype.splice;function En(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])}}En.prototype.clear=function(){this.__data__=[],this.size=0},En.prototype.delete=function(t){var e=this.__data__,n=xn(e,t);return!(n<0)&&(n==e.length-1?e.pop():On.call(e,n,1),--this.size,!0)},En.prototype.get=function(t){var e=this.__data__,n=xn(e,t);return n<0?void 0:e[n][1]},En.prototype.has=function(t){return xn(this.__data__,t)>-1},En.prototype.set=function(t,e){var n=this.__data__,r=xn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var kn=$e(i,"Map");function An(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 Pn(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])}}Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(kn||En),string:new Sn}},Pn.prototype.delete=function(t){var e=An(this,t).delete(t);return this.size-=e?1:0,e},Pn.prototype.get=function(t){return An(this,t).get(t)},Pn.prototype.has=function(t){return An(this,t).has(t)},Pn.prototype.set=function(t,e){var n=An(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Tn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tn.Cache||Pn),n}Tn.Cache=Pn;var Rn,Nn,Dn,In=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ln=/\\(\\)?/g,Cn=(Rn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(In,(function(t,n,r,i){e.push(r?i.replace(Ln,"$1"):n||t)})),e},Nn=Tn(Rn,(function(t){return 500===Dn.size&&Dn.clear(),t})),Dn=Nn.cache,Nn),Fn=Cn;function $n(t,n){return we(t)?t:function(t,n){if(we(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!e(t))||bn.test(t)||!_n.test(t)||null!=n&&t in Object(n)}(t,n)?[t]:Fn(function(t){return null==t?"":xe(t)}(t))}function Vn(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function Mn(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=$n(e,t)).length;null!=t&&n<r;)t=t[Vn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function Un(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function zn(t){var e=this.__data__=new En(t);this.size=e.size}function Wn(){return[]}zn.prototype.clear=function(){this.__data__=new En,this.size=0},zn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},zn.prototype.get=function(t){return this.__data__.get(t)},zn.prototype.has=function(t){return this.__data__.has(t)},zn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof En){var r=n.__data__;if(!kn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Pn(r)}return n.set(t,e),this.size=n.size,this};var Bn=Object.prototype.propertyIsEnumerable,qn=Object.getOwnPropertySymbols,Hn=qn?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}(qn(t),(function(e){return Bn.call(t,e)})))}:Wn,Jn=Hn;function Gn(t,e,n){var r=e(t);return we(t)?r:Un(r,n(t))}function Zn(t){return Gn(t,gn,Jn)}var Kn=$e(i,"DataView"),Qn=$e(i,"Promise"),Xn=$e(i,"Set"),Yn=Te(Kn),tr=Te(kn),er=Te(Qn),nr=Te(Xn),rr=Te(Ve),ir=r;(Kn&&"[object DataView]"!=ir(new Kn(new ArrayBuffer(1)))||kn&&"[object Map]"!=ir(new kn)||Qn&&"[object Promise]"!=ir(Qn.resolve())||Xn&&"[object Set]"!=ir(new Xn)||Ve&&"[object WeakMap]"!=ir(new Ve))&&(ir=function(t){var e=r(t),n="[object Object]"==e?t.constructor:void 0,i=n?Te(n):"";if(i)switch(i){case Yn:return"[object DataView]";case tr:return"[object Map]";case er:return"[object Promise]";case nr:return"[object Set]";case rr:return"[object WeakMap]"}return e});var or=ir,ar=i.Uint8Array;function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Pn;++e<n;)this.add(t[e])}function cr(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 ur(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function lr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new sr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,o):r(d,v,f,t,e,o);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!cr(e,(function(t,e){if(!ur(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var pr=t?t.prototype:void 0,dr=pr?pr.valueOf:void 0;var vr=Object.prototype.hasOwnProperty;var yr="[object Object]",gr=Object.prototype.hasOwnProperty;function _r(t,e,n,r,i,o){var a=we(t),s=we(e),c=a?"[object Array]":or(t),u=s?"[object Array]":or(e),l=(c="[object Arguments]"==c?yr:c)==yr,f=(u="[object Arguments]"==u?yr:u)==yr,h=c==u;if(h&&nn(t)){if(!nn(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new zn),a||fn(t)?lr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ar(t),new ar(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ze(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=fr;case"[object Set]":var c=1&r;if(s||(s=hr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=lr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(dr)return dr.call(t)==dr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&gr.call(t,"__wrapped__"),d=f&&gr.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return o||(o=new zn),i(v,y,n,r,o)}}return!!h&&(o||(o=new zn),function(t,e,n,r,i,o){var a=1&n,s=Zn(t),c=s.length;if(c!=Zn(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:vr.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 v=t[l=s[u]],y=e[l];if(r)var g=a?r(y,v,l,e,t,o):r(v,y,l,t,e,o);if(!(void 0===g?v===y||i(v,y,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function br(t,e,n,r,i){return t===e||(null==t||null==e||!o(t)&&!o(e)?t!=t&&e!=e:_r(t,e,n,r,br,i))}function mr(t,e){return br(t,e)}class wr extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var jr=s((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,v={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){v.isRoot||(v.parent.node[v.key]=t),v.node=t,e&&(d=!1)},delete:function(t){delete v.parent.node[v.key],t&&(d=!1)},remove:function(t){s(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return v;function y(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=o(v.node)),v.isLeaf=0==v.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){v.circular=a[t];break}}else v.isLeaf=!0,v.keys=null;v.notLeaf=!v.isLeaf,v.notRoot=!v.isRoot}y();var g=e.call(v,v.node);return void 0!==g&&v.update&&v.update(g),p.before&&p.before.call(v,v.node),d?("object"!=typeof v.node||null===v.node||v.circular||(a.push(v),y(),c(v.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(v,v.node[e],e);var o=t(v.node[e]);n&&u.call(v.node,e)&&(v.node[e]=o.node),o.isLast=i==v.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(v,o),r.pop()})),a.pop()),p.after&&p.after.call(v,v.node),v):v}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Sr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Sr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Sr.__applyPatch(i,t,e);return mr(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 Mn(t,"_links.first.href")}static __isResource(t){return"string"==typeof Mn(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 jr(t).reduce((function(t,e){if(!Sr.__isResource(e)||Sr.__isCollection(e))return t;const n=jr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Sr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=jr({data:e}).map((function(e){if(!Sr.__isResource(e))return;const n=e._links.self.href,r=Sr.__approximateURI(n);if(o.includes(r))throw new Sr.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 Sr.UpdateError}})).data)&&void 0!==i?i:null}}Sr.UpdateError=wr;var xr=s((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=[],v=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}();v.prototype.add=v.prototype.addReporter,v.prototype.remove=v.prototype.removeReporter,v.prototype.clear=v.prototype.removeReporter,v.prototype.withScope=v.prototype.withTag,v.prototype.mock=v.prototype.mockTypes,v.prototype.pause=v.prototype.pauseLogs,v.prototype.resume=v.prototype.resumeLogs;var y,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||((y=new v({reporters:[new g]})).Consola=v,y.LogLevel=l,y.BrowserReporter=g,y)}()})),Or=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Er=function(){function t(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)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),kr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Ar=function(){function t(e,n,r,i){Or(this,t),this.name=e,this.fn=n,this.args=r,this.modifiers=i}return Er(t,[{key:"_test",value:function(t){var e=this.fn;try{Tr(this.modifiers.slice(),e)(t)}catch(t){e=function(){return!1}}try{return Tr(this.modifiers.slice(),e)(t)}catch(t){return!1}}},{key:"_check",value:function(t){try{Tr(this.modifiers.slice(),this.fn)(t)}catch(t){if(Tr(this.modifiers.slice(),(function(t){return t}))(!1))return}if(!Tr(this.modifiers.slice(),this.fn)(t))throw null}},{key:"_testAsync",value:function(t){var e=this;return new Promise((function(n,r){Rr(e.modifiers.slice(),e.fn)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))}}]),t}();function Pr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"simple";return"object"==typeof t?t[e]:t}function Tr(t,e){if(t.length){var n=t.shift(),r=Tr(t,e);return n.perform(r)}return Pr(e)}function Rr(t,e){if(t.length){var n=t.shift(),r=Rr(t,e);return n.performAsync(r)}return function(t){return Promise.resolve(Pr(e,"async")(t))}}var Nr=function t(e,n,r){Or(this,t),this.name=e,this.perform=n,this.performAsync=r},Dr=function(t){function e(t,n,r,i){Or(this,e);for(var o=arguments.length,a=Array(o>4?o-4:0),s=4;s<o;s++)a[s-4]=arguments[s];var c=kr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a));return Error.captureStackTrace&&Error.captureStackTrace(c,e),c.rule=t,c.value=n,c.cause=r,c.target=i,c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}(),Ir=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Or(this,t),this.chain=e,this.nextRuleModifiers=n}return Er(t,[{key:"_applyRule",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n.chain.push(new Ar(e,t.apply(n,i),i,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}}},{key:"_applyModifier",value:function(t,e){return this.nextRuleModifiers.push(new Nr(e,t.simple,t.async)),this}},{key:"_clone",value:function(){return new t(this.chain.slice(),this.nextRuleModifiers.slice())}},{key:"test",value:function(t){return this.chain.every((function(e){return e._test(t)}))}},{key:"testAll",value:function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Dr(n,t,r))}})),e}},{key:"check",value:function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Dr(e,t,n)}}))}},{key:"testAsync",value:function(t){var e=this;return new Promise((function(n,r){Lr(t,e.chain.slice(),n,r)}))}}]),t}();function Lr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){Lr(t,e,n,r)}),(function(e){r(new Dr(i,t,e))}))}else n(t)}function Cr(){return $r(new Ir)}var Fr={};function $r(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=$r(t._clone());return n in Vr?r._applyModifier(Vr[n],n):n in Fr?r._applyRule(Fr[n],n):n in Ur?r._applyRule(Ur[n],n):void 0}})}Cr.extend=function(t){Object.assign(Fr,t)},Cr.clearCustomRules=function(){Fr={}};var Vr={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(t){return!0}))}}},some:{simple:function(t){return function(e){return Mr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Mr(e).map((function(e){try{return t(e).catch((function(t){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return Mr(e).every(t)}},async:function(t){return function(e){return Promise.all(Mr(e).map(t)).then((function(t){return t.every(Boolean)}))}}}};function Mr(t){return"string"==typeof t?t.split(""):t}var Ur={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||Wr)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return zr("string")},boolean:function(){return zr("boolean")},undefined:function(){return zr("undefined")},null:function(){return zr("null")},array:function(){return zr("array")},object:function(){return zr("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/^([a-z]+\s*)+$/.test(t)}},uppercase:function(){return function(t){return/^([A-Z]+\s*)+$/.test(t)}},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(t){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.some((function(e){return e.test(t)}))}},optional:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return e&&"string"==typeof n&&""===n.trim()||null!=n&&t.check(n),!0}}};function zr(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function Wr(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Cr.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 Br=Cr().schema({clear:Cr().typeOf("function"),getItem:Cr().typeOf("function"),key:Cr().typeOf("function"),length:Cr().number(),removeItem:Cr().typeOf("function"),setItem:Cr().typeOf("function")});class qr extends Error{constructor(t){qr.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}qr.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",qr.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",qr.UNAUTHORIZED="UNAUTHORIZED",qr.UNKNOWN="UNKNOWN",qr.v8n={constructor:Cr().schema({code:Cr().passesAnyOf(Cr().exact(qr.NEW_PASSWORD_REQUIRED),Cr().exact(qr.INVALID_NEW_PASSWORD),Cr().exact(qr.UNAUTHORIZED),Cr().exact(qr.UNKNOWN))})};var Hr=u(s((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t},t.exports.__esModule=!0,t.exports.default=t.exports}))),Jr=s((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})),Gr=s((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})),Zr=u(s((function(t){t.exports=function(t,e){var n=Gr(t,e,"get");return Jr(t,n)},t.exports.__esModule=!0,t.exports.default=t.exports}))),Kr=new WeakMap,Qr=function(){function t(){Kr.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=Zr(this,Kr).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=Zr(this,Kr).get(""+t))?e:null},e.setItem=function(t,e){Zr(this,Kr).set(""+t,""+e)},e.removeItem=function(t){Zr(this,Kr).delete(""+t)},e.clear=function(){Zr(this,Kr).clear()},Hr(t,[{key:"length",get:function(){return Zr(this,Kr).size}}]),t}(),Xr=Qr;class Yr extends Error{constructor(t){super(),Yr.v8n.constructor.check(t),this.response=t}}Yr.v8n={constructor:Cr().instanceOf(l.Response)};var ti=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())}))},ei=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 ni(t){const{json:e}=t,n=ei(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 si(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=>ni(Object.assign(Object.assign({},n),{json:t})))):ni(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class ri extends l.Response{constructor(t){ri.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 ti(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return ni(Object.assign({json:e},n))}))}}ri.v8n={constructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function")})};var ii=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 oi(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>oi(t,e))).join():Object.entries(e).map((([t,e])=>oi(n+t,e))).join()}function ai(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>ai(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class si{constructor(t){si.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return ii(this,void 0,void 0,(function*(){si.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{[...new URLSearchParams(t).entries()].forEach((([t,n])=>e.searchParams.append(t,n)))})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",ai(a)),void 0!==s&&e.searchParams.set("zoom",oi("",s));const c=yield this._fetch(new l.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new ri(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return ii(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.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 ri(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return ii(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new l.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new ri(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){si.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new si(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return ii(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 si(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 si(Object.assign(Object.assign({},r),{path:o}))._resolve()}}throw this._console.error(`Failed to resolve ${n}.`),new Yr(o)}))}}si.v8n={classConstructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function"),path:Cr().curieChain()}),follow:Cr().string(),get:Cr().optional(Cr().schema({fields:Cr().optional(Cr().array().every.string()),filters:Cr().optional(Cr().array().every.string()),limit:Cr().optional(Cr().number()),offset:Cr().optional(Cr().number()),order:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array())),zoom:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array()))}))},si.ResolutionError=Yr,si.Response=ri;var ci=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 ui extends si{constructor(t){var e,n,r;ui.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new Xr,console:xr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:l.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new Xr,this.cache=this._cache,this.base=t.base}fetch(...t){return ci(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ui.WHATWGResponse=l.Response,ui.WHATWGRequest=l.Request,ui.WHATWGHeaders=l.Headers,ui.whatwgFetch=l.fetch,ui.AuthError=qr,ui.Node=si,ui.v8n={classConstructor:Cr().schema({base:Cr().instanceOf(URL),cache:Cr().optional(Br),fetch:Cr().optional(Cr().typeOf("function")),level:Cr().optional(Cr().integer()),storage:Cr().optional(Br)})};export{At as $,ui as A,_e as B,Yt as C,ut as D,Rt as E,f as F,z as G,L as H,q as I,U as J,F as K,B as L,ct as M,y as N,Gt as O,K as P,gt as Q,Sr as R,Zt as S,_t as T,bt as U,mt as V,St as W,xt as X,Ot as Y,Et as Z,h as _,ye as a,Pt as a0,wt as a1,Dt as a2,It as a3,Lt as a4,Nt as a5,ae as a6,Mn as a7,Cr as a8,$e as a9,ze as aa,Be as ab,Ue as ac,He as ad,pn as ae,dn as af,gn as ag,Jn as ah,Wn as ai,Un as aj,Gn as ak,ar as al,or as am,un as an,on as ao,we as ap,nn as aq,zn as ar,Zn as as,Je as at,oe as au,mr as av,kt as b,d as c,R as d,Tt as e,Jt as f,ht as g,C as h,qt as i,H as j,_ as k,st as l,Tn as m,pt as n,it as o,Kt as p,Q as q,M as r,X as s,jr as t,Z as u,N as v,V as w,W as x,et as y,tt as z};
@@ -1,4 +1,4 @@
1
- import{E as t,C as e,T as o}from"./shared-df573cea.js";import{h as r,G as i,P as a,c as s}from"./shared-ff79f3f9.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
1
+ import{E as t,C as e,T as o}from"./shared-8b20bc23.js";import{h as r,G as i,P as a,c as s}from"./shared-ff79f3f9.js";const n=r`<dom-module id="lumo-button" theme-for="vaadin-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -0,0 +1 @@
1
+ import{L as e,_ as s,j as t,h as r}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import"./shared-8b20bc23.js";import"./shared-073cb8e9.js";import{T as a}from"./shared-ae8cd227.js";import{c as i}from"./shared-4e709717.js";class c extends CustomEvent{constructor(e){super("change",{detail:e})}}let o,l,d=e=>e;class h extends(a(e)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return s(s({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(o||(o=d`:host{--check-size:1.125rem}label{margin:calc(((1rem * var(--lumo-line-height-s)) - var(--check-size))/ -2) 0}label>:first-child{height:calc(1rem * var(--lumo-line-height-s))}.ml-xxl{margin-left:calc(var(--lumo-space-m) + var(--check-size))}.check{height:var(--check-size);width:var(--check-size)}`))]}render(){return r(l||(l=d` <label class="${0}"> <div class="flex items-center"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> </div> <div class="flex-1 font-lumo leading-s ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),i({"flex items-start group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),i({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),i({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new c(this.checked))}),i({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{h as C,c as a};
@@ -1 +1 @@
1
- import{j as e,_ as t,h as r}from"./shared-63eaded9.js";import{B as s}from"./shared-0ced76a0.js";import{c as n}from"./shared-9a40309d.js";import{I as o}from"./shared-b5147166.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":s,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,e(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return t(t({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return r(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?r(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
1
+ import{j as e,_ as t,h as r}from"./shared-63eaded9.js";import{B as s}from"./shared-5a54a9bc.js";import{c as n}from"./shared-ae8cd227.js";import{I as o}from"./shared-340f7584.js";let i,a,l,c=e=>e;class d{constructor(e="unknown"){this.type=e}}class h extends CustomEvent{constructor(){super("reload")}}class p extends n{constructor(){super(...arguments),this.type="unknown",this.reload=!1}static get scopedElements(){return{"vaadin-button":s,"iron-icon":customElements.get("iron-icon"),"x-i18n":o}}static get styles(){return[super.styles,e(i||(i=c`:host{position:absolute;top:0;right:0;bottom:0;left:0}.container-narrow{max-width:400px}`))]}static get properties(){return t(t({},super.properties),{},{reload:{type:Boolean,reflect:!0},type:{type:String}})}render(){return r(a||(a=c` <article class="bg-base font-lumo text-center leading-m p-m h-full flex flex-col items-center justify-center"> <iron-icon icon="lumo:error" class="text-error w-l h-l mb-m"></iron-icon> <header class="text-xl text-header container-narrow font-medium"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.title"></x-i18n> </header> <p class="text-m text-secondary container-narrow mb-l"> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.message"></x-i18n> </p> <div class="flex space-x-s"> <a rel="nofollow noreferrer noopener" href="${0}" target="_blank" class="px-m py-xs text-primary font-medium tracking-wide border border-contrast-10 rounded transition-colors duration-200 hover-bg-primary-10 hover-border-primary-10 focus-outline-none focus-shadow-outline" router-ignore> <x-i18n ns="${0}" lang="${0}" key="errors.${0}.action"></x-i18n> </a> ${0} </div> </article> `),this.ns,this.lang,this.type,this.ns,this.lang,this.type,this._i18n.t(`errors.${this.type}.href`).toString(),this.ns,this.lang,this.type,this.reload?r(l||(l=c` <vaadin-button data-testid="reload" theme="primary" @click="${0}"> <x-i18n ns="${0}" lang="${0}" key="reload"></x-i18n> <iron-icon icon="icons:refresh" slot="suffix"></iron-icon> </vaadin-button> `),(()=>this.dispatchEvent(new h)),this.ns,this.lang):"")}}export{p as E,d as F};
@@ -0,0 +1,69 @@
1
+ import"./shared-60126eee.js";import"./shared-46ee137f.js";import{s as e,h as l,_ as t,j as n,L as s}from"./shared-63eaded9.js";import{c as a}from"./shared-4e709717.js";import{i}from"./shared-6d45a07b.js";import{s as o}from"./shared-2061be9a.js";import{r}from"./shared-b710881a.js";import{R as u,T as d,a as c}from"./shared-ae8cd227.js";var v,p;!function(e){e.Attribute="attribute",e.Boolean="boolean",e.String="string",e.Number="number",e.Date="date",e.Any="any"}(v||(v={})),function(e){e.LessThanOrEqual="lessthanorequal",e.LessThan="lessthan",e.GreaterThanOrEqual="greaterthanorequal",e.GreaterThan="greaterthan",e.IsDefined="isdefined",e.Not="not",e.In="in"}(p||(p={}));let f;const h=e(f||(f=(e=>e)`
2
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
4
+ </svg>
5
+ `));let g;const C=e(g||(g=(e=>e)`
6
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <path d="M12.8656 14.6695C12.3425 14.4581 12 13.9503 12 13.386C12 12.3748 13.0489 11.7048 13.9663 12.1299L23.8937 16.7295C24.5323 17.0254 24.941 17.6652 24.941 18.369C24.941 19.0735 24.5316 19.7137 23.8921 20.0092L13.971 24.5938C13.0509 25.019 12 24.347 12 23.3334C12 22.7709 12.3394 22.264 12.8594 22.0496L21.341 18.3046L12.8656 14.6695Z" class="fill-current"/>
8
+ </svg>
9
+ `));let b;const m=e(b||(b=(e=>e)`
10
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
11
+ <path d="M13.1293 19.569C12.6063 19.7786 12.264 20.2821 12.264 20.8416C12.264 21.8442 13.3124 22.5086 14.2296 22.0871L24.1531 17.5264C24.7915 17.233 25.2 16.5986 25.2 15.9008C25.2 15.2022 24.7907 14.5674 24.1515 14.2744L14.2342 9.72862C13.3144 9.30703 12.264 9.97337 12.264 10.9784C12.264 11.5361 12.6032 12.0388 13.1231 12.2513L21.6014 15.9646L13.1293 19.569Z" class="fill-current"/>
12
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M25.0832 20.8977C24.7867 20.2374 24.0068 19.9404 23.3411 20.2344L13.1498 24.7352C12.4841 25.0292 12.1847 25.8028 12.4811 26.4632C12.7775 27.1235 13.5575 27.4205 14.2232 27.1265L24.4144 22.6257C25.0802 22.3317 25.3796 21.5581 25.0832 20.8977Z" class="fill-current"/>
13
+ </svg>
14
+ `));let w;const x=e(w||(w=(e=>e)`
15
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
16
+ <path d="M12.5 9.8C11.0088 9.8 9.8 11.0088 9.8 12.5V23.5C9.8 24.9912 11.0088 26.2 12.5 26.2H14C14.6627 26.2 15.2 25.6627 15.2 25C15.2 24.3373 14.6627 23.8 14 23.8H13.5C12.782 23.8 12.2 23.218 12.2 22.5V13.5C12.2 12.782 12.782 12.2 13.5 12.2H14C14.6627 12.2 15.2 11.6627 15.2 11C15.2 10.3373 14.6627 9.8 14 9.8H12.5Z" class="fill-current"/>
17
+ <path d="M22 9.8C21.3373 9.8 20.8 10.3373 20.8 11C20.8 11.6627 21.3373 12.2 22 12.2H22.5C23.218 12.2 23.8 12.782 23.8 13.5V22.5C23.8 23.218 23.218 23.8 22.5 23.8H22C21.3373 23.8 20.8 24.3373 20.8 25C20.8 25.6627 21.3373 26.2 22 26.2H23.5C24.9912 26.2 26.2 24.9912 26.2 23.5V12.5C26.2 11.0088 24.9912 9.8 23.5 9.8H22Z" class="fill-current"/>
18
+ </svg>
19
+ `));let V;const H=e(V||(V=(e=>e)`
20
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
21
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M20.05 23.58L20.04 23.59L17.64 21.19L18.7 20.13L20.05 21.48L22.54 19L23.6 20.06L20.06 23.6L20.05 23.58ZM18 8C12.5 8 8 12.5 8 18C8 23.5 12.5 28 18 28C23.5 28 28 23.5 28 18C28 12.5 23.5 8 18 8ZM13.34 12.28L14.75 13.69L16.16 12.28L17.22 13.34L15.81 14.75L17.22 16.16L16.16 17.22L14.75 15.81L13.34 17.22L12.28 16.16L13.69 14.75L12.28 13.34L13.34 12.28ZM18 26C15.8 26 13.8 25.1 12.3 23.7L23.7 12.3C25.1 13.8 26 15.8 26 18C26 22.4 22.4 26 18 26Z" class="fill-current"/>
22
+ </svg>
23
+ `));let $;const L=e($||($=(e=>e)`
24
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
25
+ <path d="M22.8754 22.054C23.3985 22.2655 23.741 22.7733 23.741 23.3375C23.741 24.3487 22.6922 25.0187 21.7747 24.5936L11.8473 19.994C11.2087 19.6981 10.8 19.0583 10.8 18.3545C10.8 17.65 11.2094 17.0098 11.8489 16.7143L21.7701 12.1297C22.6902 11.7045 23.741 12.3765 23.741 13.3902C23.741 13.9526 23.4017 14.4596 22.8816 14.6739L14.4 18.4189L22.8754 22.054Z" class="fill-current"/>
26
+ </svg>
27
+ `));let y;const M=e(y||(y=(e=>e)`
28
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
29
+ <path d="M22.8754 19.654C23.3985 19.8655 23.741 20.3733 23.741 20.9375C23.741 21.9487 22.6922 22.6187 21.7747 22.1936L11.8473 17.594C11.2087 17.2981 10.8 16.6584 10.8 15.9545C10.8 15.25 11.2094 14.6098 11.8489 14.3143L21.7701 9.72971C22.6902 9.30453 23.741 9.97655 23.741 10.9902C23.741 11.5527 23.4017 12.0596 22.8816 12.2739L14.4 16.0189L22.8754 19.654Z" class="fill-current"/>
30
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M10.9169 20.9941C11.2134 20.3281 11.9937 20.0286 12.6597 20.3251L22.8548 24.8643C23.5208 25.1608 23.8203 25.9411 23.5238 26.6071C23.2273 27.2731 22.447 27.5726 21.781 27.2761L11.5859 22.7369C10.9199 22.4404 10.6204 21.6601 10.9169 20.9941Z" class="fill-current"/>
31
+ </svg>
32
+ `));let Z;const N=e(Z||(Z=(e=>e)`
33
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
34
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M24.0049 7.11C24.6649 7.49107 24.8911 8.33507 24.51 8.99511L13.1621 28.6503C12.781 29.3103 11.937 29.5365 11.277 29.1554C10.6169 28.7743 10.3908 27.9303 10.7719 27.2703L22.1198 7.61511C22.5009 6.95507 23.3448 6.72892 24.0049 7.11Z" class="fill-current"/>
35
+ <path d="M17.5097 13.2H10.8C10.1373 13.2 9.60001 13.7373 9.60001 14.4V14.5399C9.60001 15.2026 10.1373 15.7399 10.8 15.7399H16.0433L17.5097 13.2Z" class="fill-current"/>
36
+ <path d="M13.4336 20.2601H10.8C10.1373 20.2601 9.60001 20.7973 9.60001 21.4601V21.6C9.60001 22.2627 10.1373 22.8 10.8 22.8H11.9671L13.4336 20.2601Z" class="fill-current"/>
37
+ <path d="M17.9254 22.8H25.2C25.8627 22.8 26.4 22.2627 26.4 21.6V21.4601C26.4 20.7973 25.8627 20.2601 25.2 20.2601H19.3918L17.9254 22.8Z" class="fill-current"/>
38
+ <path d="M22.0015 15.7399H25.2C25.8627 15.7399 26.4 15.2026 26.4 14.5399V14.4C26.4 13.7373 25.8627 13.2 25.2 13.2H23.468L22.0015 15.7399Z" class="fill-current"/>
39
+ </svg>
40
+ `));let I;const j=e(I||(I=(e=>e)`
41
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
42
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 8C12.48 8 8 12.48 8 18C8 23.52 12.48 28 18 28C23.52 28 28 23.52 28 18C28 12.48 23.52 8 18 8ZM18 26C13.59 26 10 22.41 10 18C10 13.59 13.59 10 18 10C22.41 10 26 13.59 26 18C26 22.41 22.41 26 18 26Z" class="fill-current"/>
43
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M19.49 17.38C19.92 16.16 19.66 14.74 18.68 13.76C17.57 12.65 15.89 12.46 14.58 13.17L16.93 15.52L15.52 16.93L13.17 14.58C12.46 15.9 12.65 17.57 13.76 18.68C14.74 19.66 16.16 19.92 17.38 19.49L20.79 22.9C20.99 23.1 21.3 23.1 21.5 22.9L22.9 21.5C23.1 21.3 23.1 20.99 22.9 20.79L19.49 17.38Z" class="fill-current"/>
44
+ </svg>
45
+ `));let B;const T=e(B||(B=(e=>e)`
46
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
47
+ <path d="M10 13V15C10 15.55 9.55 16 9 16H8V20H9C9.55 20 10 20.45 10 21V23C10 24.65 11.35 26 13 26H16V24H13C12.45 24 12 23.55 12 23V21C12 19.7 11.16 18.58 10 18.17V17.83C11.16 17.42 12 16.3 12 15V13C12 12.45 12.45 12 13 12H16V10H13C11.35 10 10 11.35 10 13Z" class="fill-current"/>
48
+ <path d="M27 16C26.45 16 26 15.55 26 15V13C26 11.35 24.65 10 23 10H20V12H23C23.55 12 24 12.45 24 13V15C24 16.3 24.84 17.42 26 17.83V18.17C24.84 18.58 24 19.69 24 21V23C24 23.55 23.55 24 23 24H20V26H23C24.65 26 26 24.65 26 23V21C26 20.45 26.45 20 27 20H28V16H27Z" class="fill-current"/>
49
+ </svg>
50
+ `));let A;const D=e(A||(A=(e=>e)`
51
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
52
+ <path d="M23.8333 17.0588H22.0833V11.7647H20.3333V10H23.8333V17.0588Z" class="fill-current"/>
53
+ <path d="M15.6667 10H12.1667C11.525 10 11 10.5294 11 11.1765V15.8824C11 16.5294 11.525 17.0588 12.1667 17.0588H15.6667C16.3083 17.0588 16.8333 16.5294 16.8333 15.8824V11.1765C16.8333 10.5294 16.3083 10 15.6667 10ZM15.0833 15.2941H12.75V11.7647H15.0833V15.2941Z" class="fill-current"/>
54
+ <path d="M15.6667 26.4706H13.9167V21.1765H12.1667V19.4118H15.6667V26.4706Z" class="fill-current"/>
55
+ <path d="M23.8333 19.4118H20.3333C19.6917 19.4118 19.1667 19.9412 19.1667 20.5882V25.2941C19.1667 25.9412 19.6917 26.4706 20.3333 26.4706H23.8333C24.475 26.4706 25 25.9412 25 25.2941V20.5882C25 19.9412 24.475 19.4118 23.8333 19.4118ZM23.25 24.7059H20.9167V21.1765H23.25V24.7059Z" class="fill-current"/>
56
+ </svg>
57
+ `));let _;const O=e(_||(_=(e=>e)`
58
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
59
+ <path d="M25 10H24V8H22V10H14V8H12V10H11C9.89 10 9.01 10.9 9.01 12L9 26C9 27.1 9.89 28 11 28H25C26.1 28 27 27.1 27 26V12C27 10.9 26.1 10 25 10ZM25 26H11V16H25V26ZM25 14H11V12H25V14ZM23 19H18V24H23V19Z" class="fill-current"/>
60
+ </svg>
61
+ `));let q;const E=e(q||(q=(e=>e)`
62
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
63
+ <path d="M26.5 16L27 14H23L24 10H22L21 14H17L18 10H16L15 14H11L10.5 16H14.5L13.5 20H9.5L9 22H13L12 26H14L15 22H19L18 26H20L21 22H25L25.5 20H21.5L22.5 16H26.5ZM19.5 20H15.5L16.5 16H20.5L19.5 20Z" class="fill-current"/>
64
+ </svg>
65
+ `));let S;const k=e(S||(S=(e=>e)`
66
+ <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
67
+ <path d="M11 11V14H16.5V26H19.5V14H25V11H11Z" class="fill-current"/>
68
+ </svg>
69
+ `));let z,R,G,U,F,W=e=>e;function Q(e){var t,n,s;const i=null===(n=null===(t=e.list)||void 0===t?void 0:t.every((l=>l.value!==e.value)))||void 0===n||n;return l(z||(z=W` <label class="flex items-center cursor-pointer transition-colors group text-tertiary hover-bg-contrast-5"> <div class="relative flex-1 min-w-0 overflow-hidden"> <select class="${0}" @change="${0}"> ${0} ${0} </select> </div> ${0} </label> `),a({"cursor-pointer bg-transparent relative appearance-none flex h-m px-s":!0,"font-medium w-full max-w-full whitespace-nowrap focus-outline-none":!0,"text-tertiary":i,"text-body":!i}),(l=>{const t=l.currentTarget,n=t.options[t.options.selectedIndex].value;e.onChange(n)}),i?l(R||(R=W`<option value disabled="disabled" ?selected="${0}">${0}</option>`),i,e.t(e.label)):"",null===(s=e.list)||void 0===s?void 0:s.map((({label:t,value:n})=>l(G||(G=W` <option value="${0}" ?selected="${0}"> ${0} </option> `),n,n===e.value,e.t(t)))),i?"":l(U||(U=W` <span class="font-tnum text-xs font-medium border mr-s px-xs rounded-s border-current inline-block"> ${0} </span> ${0} `),e.t(e.label),e.clearable?l(F||(F=W` <button aria-label="${0}" class="w-s h-s mr-xs text-body flex items-center justify-center transition-colors rounded-full focus-outline-none focus-ring-2 focus-ring-primary-50 hover-bg-contrast-5 hover-text-error" @click="${0}"> <iron-icon aria-hidden="true" class="icon-inline text-l" icon="icons:remove-circle-outline"> </iron-icon> </button> `),e.t("delete"),(()=>e.onChange(""))):""))}let J,K,P,X,Y,ee=e=>e;function le(e){var t;const n=`${null!==(t=e.id)&&void 0!==t?t:String(Math.floor(Math.random()*Math.pow(10,8)))}-list`,s=!!e.displayValue;let r=e.value;if("date"===e.type){const l=new Date(e.value);isNaN(l.getTime())||(r=o(l))}return l(J||(J=ee` <label class="relative flex items-center cursor-text group text-tertiary"> <div class="relative flex-1 min-w-0 overflow-hidden"> ${0} <input placeholder="${0}" class="${0}" list="${0}" type="${0}" .value="${0}" ?disabled="${0}" @input="${0}"> </div> <span class="${0}"> ${0} </span> ${0} ${0} </label> `),s?l(K||(K=ee` <div aria-hidden="true" class="absolute inset-0 h-m px-s font-medium text-body flex items-center"> <div class="truncate">${0}</div> </div> `),e.t(e.displayValue)):"",r||"date"===e.type?"":e.t(e.label),a({"bg-base text-body relative appearance-none flex h-m px-s font-medium w-full":!0,"flex max-w-full whitespace-nowrap":!0,"focus-outline-none":!0,"opacity-0 focus-opacity-100":s}),i(e.list?n:void 0),e.type,r,e.disabled,(l=>{var t,n;const s=l.currentTarget;"date"===e.type?e.onChange(null!==(n=null===(t=s.valueAsDate)||void 0===t?void 0:t.toISOString())&&void 0!==n?n:s.value):e.onChange(s.value)}),a({"font-tnum text-xs font-medium border border-current mr-s px-xs rounded-s":!0,"inline-block":!!r||"date"===e.type,"sr-only":!r&&"date"!==e.type}),e.t(e.label),e.list?l(P||(P=ee` <datalist id="${0}"> ${0} </datalist> `),n,e.list.map((({label:t,value:n})=>l(X||(X=ee`<option value="${0}">${0}</option>`),n,e.t(t))))):"",e.disabled?"":l(Y||(Y=ee` <div class="absolute inset-0 transition-colors bg-transparent group-hover-bg-contrast-5 pointer-events-none"></div> `)))}let te,ne,se=e=>e;let ae,ie=e=>e;function oe({parsedValue:e,option:l,options:n,t:s,onChange:a}){return le({displayValue:null==l?void 0:l.label,value:e.path,label:"field",list:n.map((e=>t(t({},e),{},{value:e.path}))),type:"text",id:"path",t:s,onChange:e=>a({operator:null,value:"",path:e})})}let re,ue=e=>e;let de,ce,ve=e=>e;function pe(e){var n,s;const{parsedValue:i,options:o,t:u,isNested:d,isFullSize:c,onChange:f,onDelete:g,onConvert:b}=e,w=null!==(n=o.find((e=>e.path===i.path)))&&void 0!==n?n:null,V=null!==(s=null==w?void 0:w.type)&&void 0!==s?s:v.Any,$=i.operator,y={parsedValue:i,option:w,options:o,t:u,onChange:f},Z={[v.Attribute]:T,[v.Boolean]:D,[v.Number]:E,[v.String]:k,[v.Date]:O,[v.Any]:j};return l(de||(de=ve` <div class="flex items-center space-x-s" aria-label="${0}"> <div class="${0}"> <div class="bg-contrast-10"> <div class="grid gap-1px grid-vertical sm-grid-horizontal"> <div class="bg-base" title="${0}"> <div class="w-m h-m text-tertiary" aria-hidden="true"> ${0} </div> </div> <div class="bg-base"> ${0} </div> <div class="bg-base">${0}</div> <div class="bg-base"> ${0} </div> </div> </div> </div> <div class="${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:remove-circle-outline"> </iron-icon> </button> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon aria-hidden="true" class="m-auto icon-inline text-xl" icon="icons:add-circle-outline"> </iron-icon> </button> </div> </div> `),u("query_builder_rule"),a({"flex-1 bg-base rounded overflow-hidden border":!0,"border-contrast-10":!d,"border-contrast-50":!!d}),u(`type_${V}`),w?Z[V]:j,i.path&&(V===v.Attribute||i.name)?l(ce||(ce=ve` <div class="bg-contrast-10 grid gap-1px grid-cols-1 sm-grid-cols-2"> <div class="bg-base">${0}</div> <div class="bg-base">${0}</div> </div> `),oe(y),function(e){var l;return le({value:null!==(l=e.parsedValue.name)&&void 0!==l?l:"",label:"name",type:"text",t:e.t,onChange:l=>e.onChange(t(t({},e.parsedValue),{},{name:l}))})}(y)):oe(y),function(e){const n=e.parsedValue.operator,s={[p.GreaterThan]:C,[p.GreaterThanOrEqual]:m,[p.In]:x,[p.IsDefined]:H,[p.LessThan]:L,[p.LessThanOrEqual]:M,[p.Not]:N},i={[v.Attribute]:[p.In,p.Not,p.IsDefined],[v.Boolean]:[],[v.String]:[p.In,p.Not],[v.Number]:[p.In,p.Not,p.GreaterThan,p.LessThan,p.GreaterThanOrEqual,p.LessThanOrEqual],[v.Date]:[p.In,p.Not],[v.Any]:Object.values(p)},o=e.option?i[e.option.type]:e.parsedValue.name?Object.values(p):Object.values(p).filter((e=>e!==p.IsDefined)),r=0===o.length||!e.parsedValue.path;return l(ae||(ae=ie` <button title="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <div aria-hidden="true">${0}</div> </button> `),e.t(`operator_${null!=n?n:"equal"}`),a({"flex items-center justify-center w-m h-m transition-colors":!0,"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-tertiary cursor-default":r,"hover-bg-contrast-5":!r}),r,(()=>{var l;const s=n?o.indexOf(n):-1,a=null!==(l=o[s+1])&&void 0!==l?l:null;e.onChange(t(t({},e.parsedValue),{},{operator:a,value:e.parsedValue.value}))}),n?s[n]:h)}(y),$===p.In?function(e){var n,s,a,i;const o=(null===(n=e.option)||void 0===n?void 0:n.list)?Q:le,u=e.parsedValue.value.split(","),d=null!==(a=null===(s=e.option)||void 0===s?void 0:s.type)&&void 0!==a?a:v.Any,c=d===v.Number?"number":d===v.Date?"date":"text",p=null===(i=e.option)||void 0===i?void 0:i.list;return l(te||(te=se` <div class="bg-contrast-10 grid grid-cols-1 gap-1px"> ${0} </div> `),r([...u.filter((e=>!!e)),null],((e,l)=>l),((n,s)=>{var a;return l(ne||(ne=se` <div class="bg-base"> ${0} </div> `),o({type:c,list:p,t:e.t,value:null!=n?n:"",label:n?String(s+1):"add_value",clearable:!0,displayValue:null===(a=null==p?void 0:p.find((e=>e.value===n)))||void 0===a?void 0:a.label,onChange:l=>{l?u[s]=l:u.splice(s,1),e.onChange(t(t({},e.parsedValue),{},{value:u.join(",")}))}}))})))}(y):$===p.IsDefined?function(e){return Q({value:e.parsedValue.value,label:"value",list:[{label:"is_defined_true",value:"true"},{label:"is_defined_false",value:"false"}],t:e.t,onChange:l=>e.onChange(t(t({},e.parsedValue),{},{value:l}))})}(y):V===v.Boolean?function(e){var l,n,s,a,i,o;const{parsedValue:r,option:u,t:d,onChange:c}=e,v=null!==(s=null===(n=null===(l=null==u?void 0:u.list)||void 0===l?void 0:l.find((e=>"false"===e.value)))||void 0===n?void 0:n.label)&&void 0!==s?s:"false",p=[{label:null!==(o=null===(i=null===(a=null==u?void 0:u.list)||void 0===a?void 0:a.find((e=>"true"===e.value)))||void 0===i?void 0:i.label)&&void 0!==o?o:"true",value:"true"},{label:v,value:"false"}];return Q({value:r.value,label:"value",list:p,t:d,onChange:e=>c(t(t({},r),{},{value:e}))})}(y):null===$&&[v.Number,v.Date].includes(V)?function(e){var n,s,a;const{t:i,parsedValue:o,option:r,onChange:u}=e,[d,c]=o.value.split(".."),p=(null==r?void 0:r.list)?Q:le,f=null!==(n=null==r?void 0:r.type)&&void 0!==n?n:v.Any,h=f===v.Number?"number":f===v.Date?"date":"text",g=null==r?void 0:r.list;return l(re||(re=ue` <div class="grid bg-contrast-10 gap-1px grid-cols-1 grid-rows-2 sm-grid-cols-2 sm-grid-rows-1"> <div class="bg-base"> ${0} </div> <div class="bg-base"> ${0} </div> </div> `),p({displayValue:null===(s=null==g?void 0:g.find((e=>e.value===d)))||void 0===s?void 0:s.label,value:d,label:"range_from",type:h,list:g,t:i,onChange:e=>u(t(t({},o),{},{value:`${e}..${c}`}))}),p({displayValue:null===(a=null==g?void 0:g.find((e=>e.value===c)))||void 0===a?void 0:a.label,label:"range_to",value:c,type:h,list:g,t:i,onChange:e=>u(t(t({},o),{},{value:`${d}..${e}`}))}))}(y):function(e){var l,n,s,a;const{t:i,option:o,parsedValue:r,onChange:u}=e,d=(null==o?void 0:o.list)?Q:le,c=null!==(l=null==o?void 0:o.type)&&void 0!==l?l:v.Any;return d({displayValue:null===(s=null===(n=null==o?void 0:o.list)||void 0===n?void 0:n.find((e=>e.value===r.value)))||void 0===s?void 0:s.label,disabled:!r.path,value:null!==(a=r.value)&&void 0!==a?a:"",label:"value",type:c===v.Number?"number":c===v.Date?"date":"text",list:null==o?void 0:o.list,t:i,onChange:e=>u(t(t({},r),{},{value:e}))})}(y),a({"-mr-s self-start flex-col sm-flex-row flex-shrink-0 items-center":!0,"border-t border-b border-transparent divide-y divide-transparent":!0,hidden:!!c,flex:!c}),u("delete"),a({"box-content flex w-m h-m rounded-full transition-colors":!0,"text-secondary hover-bg-contrast-5 hover-text-error":!0,"focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path}),!i.path,g,u("add_or_clause"),a({"box-content flex w-m h-m rounded-full transition-colors text-success":!0,"hover-bg-contrast-5 focus-outline-none focus-ring-2 ring-primary-50":!0,"opacity-0":!i.path||!!d}),!i.path,b)}let fe,he,ge,Ce,be=e=>e;function me(e){const n=l(fe||(fe=be`<div class="h-xs"></div>`)),s=l(he||(he=be` <div class="flex items-center h-s"> <div class="w-m text-center leading-none uppercase font-semibold text-xs text-contrast-30"> ${0} </div> <div class="flex-1 border-t border-contrast-20"></div> <div class="w-m ml-s flex-shrink-0"></div> <div class="hidden sm-block w-m flex-shrink-0"></div> </div> `),e.t("or"));return l(ge||(ge=be` <div aria-label="${0}"> ${0} </div> `),e.t("query_builder_group"),r([...e.parsedValues,null],((e,l)=>String(l)),((a,i)=>{const o=i>0?e.isNested?s:n:"";return null===a?[o,pe({isFullSize:!e.isNested&&0===e.parsedValues.length,isNested:e.isNested,options:e.options,parsedValue:{path:"",operator:null,value:""},t:e.t,onChange:l=>e.onChange([...e.parsedValues,l])})]:Array.isArray(a)?[o,l(Ce||(Ce=be` <div class="bg-contrast-10 rounded-t-l rounded-b-l p-s -m-s"> ${0} </div> `),me({parsedValues:a,isNested:!0,options:e.options,t:e.t,onChange:l=>{const t=[...e.parsedValues],n=l;t[i]=l.length>1?n:n[0],e.onChange(t)}}))]:[o,pe({parsedValue:a,isNested:e.isNested,options:e.options,t:e.t,onChange:l=>{const t=[...e.parsedValues];t[i]=l,e.onChange(t)},onDelete:()=>{const l=e.parsedValues.filter(((e,l)=>l!==i));e.onChange(l)},onConvert:()=>{const l=[...e.parsedValues];l[i]=[a,t(t({},a),{},{operator:null,value:""})],e.onChange(l)}})]})))}function we(e){var l;const[t,n]=e.split("=").map(decodeURIComponent),s=null!==(l=Object.values(p).find((e=>t.endsWith(`:${e}`))))&&void 0!==l?l:null;let a,i=t.substring(0,s?t.lastIndexOf(":"):void 0);const o=t.lastIndexOf("[");return i.endsWith("]")&&-1!==o&&(a=i.substring(o+1,i.length-1),i=i.substring(0,o)),{name:a,path:i,value:n,operator:s}}function xe(e){let l=e.path;return e.name&&(l+=`[${e.name}]`),e.operator&&(l+=`:${e.operator}`),l=`${encodeURIComponent(l)}=${encodeURIComponent(e.value)}`,"="===l?"":l}let Ve;const He=n(Ve||(Ve=(e=>e)`.gap-1px{gap:1px}.grid-vertical{grid-template:auto/var(--lumo-size-m) 1fr}:host([sm]) .sm-grid-horizontal{grid-template:auto/var(--lumo-size-m) 1fr var(--lumo-size-m) 1fr}`)),$e=u(d(c(s,"query-builder")));class Le extends $e{constructor(){super(...arguments),this.options=null,this.value=null}static get properties(){return t(t({},super.properties),{},{options:{type:Array},value:{type:String}})}static get styles(){return[super.styles,He]}render(){var e,l,t;return me({parsedValues:(t=null!==(e=this.value)&&void 0!==e?e:"",t.split("&").filter((e=>!!e)).map((e=>{const[l,t]=e.split("=").map(decodeURIComponent);return(null==t?void 0:t.includes("|"))?`${encodeURIComponent(l)}=${t}`.split("|").map((e=>we(e))):we(e)}))),options:null!==(l=this.options)&&void 0!==l?l:[],t:this.t.bind(this),onChange:e=>{this.value=function(e){return e.map((e=>{if(Array.isArray(e)){const l=[e[0].value,e.slice(1).map((e=>xe(e)))].join("|");return`${e[0].path}=${encodeURIComponent(l)}`}return xe(e)})).join("&")}(e),this.dispatchEvent(new Le.ChangeEvent("change"))}})}}Le.ChangeEvent=class extends CustomEvent{},Le.Operator=p,Le.Type=v,customElements.define("foxy-query-builder",Le);export{Le as Q,v as T,m as o};