@foxy.io/elements 1.31.1 → 1.32.0-beta.1

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 (256) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +1 -1
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-api.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +1 -1
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  48. package/dist/cdn/foxy-form-dialog.js +1 -1
  49. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-form.js +1 -1
  56. package/dist/cdn/foxy-i18n-editor.js +1 -1
  57. package/dist/cdn/foxy-i18n.js +1 -1
  58. package/dist/cdn/foxy-integration-card.js +1 -1
  59. package/dist/cdn/foxy-integration-form.js +1 -1
  60. package/dist/cdn/foxy-item-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-form.js +1 -1
  63. package/dist/cdn/foxy-item-form.js +1 -1
  64. package/dist/cdn/foxy-item-option-card.js +1 -1
  65. package/dist/cdn/foxy-item-option-form.js +1 -1
  66. package/dist/cdn/foxy-items-form.js +1 -1
  67. package/dist/cdn/foxy-native-integration-card.js +1 -1
  68. package/dist/cdn/foxy-native-integration-form.js +1 -1
  69. package/dist/cdn/foxy-nucleon-element.js +1 -1
  70. package/dist/cdn/foxy-pagination.js +1 -1
  71. package/dist/cdn/foxy-passkey-card.js +1 -1
  72. package/dist/cdn/foxy-passkey-form.js +1 -1
  73. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  74. package/dist/cdn/foxy-payment-card.js +1 -1
  75. package/dist/cdn/foxy-payment-method-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  82. package/dist/cdn/foxy-payments-api.js +1 -1
  83. package/dist/cdn/foxy-query-builder.js +2 -2
  84. package/dist/cdn/foxy-report-form.js +2 -2
  85. package/dist/cdn/foxy-reports-table.js +1 -1
  86. package/dist/cdn/foxy-shipment-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  90. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  91. package/dist/cdn/foxy-sign-in-form.js +1 -1
  92. package/dist/cdn/foxy-spinner.js +2 -2
  93. package/dist/cdn/foxy-store-card.js +1 -1
  94. package/dist/cdn/foxy-store-form.js +1 -1
  95. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  96. package/dist/cdn/foxy-subscription-card.js +1 -1
  97. package/dist/cdn/foxy-subscription-form.js +1 -1
  98. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  99. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  100. package/dist/cdn/foxy-table.js +1 -1
  101. package/dist/cdn/foxy-tax-card.js +1 -1
  102. package/dist/cdn/foxy-tax-form.js +1 -1
  103. package/dist/cdn/foxy-template-config-form.js +1 -1
  104. package/dist/cdn/foxy-template-form.js +1 -1
  105. package/dist/cdn/foxy-template-set-card.js +1 -1
  106. package/dist/cdn/foxy-template-set-form.js +1 -1
  107. package/dist/cdn/foxy-transaction-card.js +1 -1
  108. package/dist/cdn/foxy-transaction.js +1 -1
  109. package/dist/cdn/foxy-transactions-table.js +7 -7
  110. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  111. package/dist/cdn/foxy-user-card.js +1 -1
  112. package/dist/cdn/foxy-user-form.js +1 -1
  113. package/dist/cdn/foxy-user-invitation-card.js +1 -0
  114. package/dist/cdn/foxy-user-invitation-form.js +1 -0
  115. package/dist/cdn/foxy-users-table.js +1 -1
  116. package/dist/cdn/foxy-webhook-card.js +1 -1
  117. package/dist/cdn/foxy-webhook-form.js +1 -1
  118. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  119. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  120. package/dist/cdn/{shared-12a7a15d.js → shared-019348d7.js} +1 -1
  121. package/dist/cdn/{shared-01b2cad8.js → shared-0e156ee7.js} +1 -1
  122. package/dist/cdn/{shared-9b2d6d62.js → shared-11694c05.js} +1 -1
  123. package/dist/cdn/{shared-21bc5d5e.js → shared-15100be0.js} +1 -1
  124. package/dist/cdn/{shared-f7a1193f.js → shared-17a61265.js} +1 -1
  125. package/dist/cdn/{shared-55e95bd2.js → shared-185dffc3.js} +1 -1
  126. package/dist/cdn/{shared-7c411b0a.js → shared-193bb806.js} +1 -1
  127. package/dist/cdn/{shared-f3773d62.js → shared-19df2a73.js} +1 -1
  128. package/dist/cdn/{shared-0700fd80.js → shared-1a30f25e.js} +1 -1
  129. package/dist/cdn/shared-1aff7995.js +1 -0
  130. package/dist/cdn/{shared-6e859df6.js → shared-239062b0.js} +1 -1
  131. package/dist/cdn/{shared-6918312e.js → shared-28ebee50.js} +1 -1
  132. package/dist/cdn/{shared-24d71d01.js → shared-2ad18636.js} +1 -1
  133. package/dist/cdn/{shared-3c3497d6.js → shared-2bc0d0cd.js} +1 -1
  134. package/dist/cdn/{shared-ac0368ec.js → shared-2e090291.js} +1 -1
  135. package/dist/cdn/{shared-8cd578ee.js → shared-374e6faa.js} +1 -1
  136. package/dist/cdn/{shared-280f868d.js → shared-40af05b3.js} +1 -1
  137. package/dist/cdn/{shared-c8a6496c.js → shared-482ba043.js} +5 -5
  138. package/dist/cdn/{shared-56bf05ef.js → shared-4903b2e3.js} +1 -1
  139. package/dist/cdn/shared-492da078.js +1 -0
  140. package/dist/cdn/{shared-90a47948.js → shared-5513e830.js} +1 -1
  141. package/dist/cdn/{shared-8f3398dc.js → shared-562d466d.js} +1 -1
  142. package/dist/cdn/shared-56ba2d28.js +1 -0
  143. package/dist/cdn/{shared-08e0a194.js → shared-5c35d93a.js} +1 -1
  144. package/dist/cdn/{shared-56a559fd.js → shared-5c846a3b.js} +1 -1
  145. package/dist/cdn/shared-5e09e162.js +1 -0
  146. package/dist/cdn/{shared-453d8f75.js → shared-60209b2d.js} +1 -1
  147. package/dist/cdn/{shared-6ac0d05e.js → shared-641786b2.js} +1 -1
  148. package/dist/cdn/{shared-09b4185a.js → shared-65479601.js} +1 -1
  149. package/dist/cdn/{shared-0f67d020.js → shared-6b8c2a83.js} +1 -1
  150. package/dist/cdn/{shared-a49a2300.js → shared-6e1b5baf.js} +1 -1
  151. package/dist/cdn/{shared-61b6ef6e.js → shared-6f0504e2.js} +1 -1
  152. package/dist/cdn/{shared-e778071b.js → shared-7275324b.js} +1 -1
  153. package/dist/cdn/{shared-937b497c.js → shared-745f340a.js} +1 -1
  154. package/dist/cdn/{shared-1f0b8b7e.js → shared-74eedbe6.js} +1 -1
  155. package/dist/cdn/{shared-d1c10d58.js → shared-7c15c149.js} +1 -1
  156. package/dist/cdn/{shared-a207423c.js → shared-7ceceb4c.js} +1 -1
  157. package/dist/cdn/{shared-ce75e928.js → shared-86a9b27a.js} +1 -1
  158. package/dist/cdn/{shared-91f5e0b3.js → shared-87b5a6aa.js} +1 -1
  159. package/dist/cdn/{shared-5be5874d.js → shared-8a3fd383.js} +1 -1
  160. package/dist/cdn/{shared-c388e926.js → shared-8a73d1aa.js} +1 -1
  161. package/dist/cdn/{shared-b8198665.js → shared-8b5e05df.js} +1 -1
  162. package/dist/cdn/{shared-e24da82e.js → shared-8da3186f.js} +2 -2
  163. package/dist/cdn/{shared-4b346553.js → shared-8fc527b7.js} +1 -1
  164. package/dist/cdn/{shared-ef78d7d9.js → shared-9092b5db.js} +1 -1
  165. package/dist/cdn/{shared-0a6a28ce.js → shared-913e1955.js} +1 -1
  166. package/dist/cdn/{shared-c2776a33.js → shared-91d8985f.js} +1 -1
  167. package/dist/cdn/{shared-5a2f398c.js → shared-92192fe1.js} +1 -1
  168. package/dist/cdn/{shared-d8c3067b.js → shared-97cfdcdb.js} +1 -1
  169. package/dist/cdn/{shared-19884cf4.js → shared-9a59aab2.js} +1 -1
  170. package/dist/cdn/{shared-522a172d.js → shared-9cf15285.js} +1 -1
  171. package/dist/cdn/{shared-28f74114.js → shared-9d309e97.js} +1 -1
  172. package/dist/cdn/{shared-2a5c89a4.js → shared-9e360643.js} +1 -1
  173. package/dist/cdn/{shared-388e9240.js → shared-aaf72aad.js} +1 -1
  174. package/dist/cdn/{shared-37efab30.js → shared-acd33590.js} +1 -1
  175. package/dist/cdn/{shared-44ce656d.js → shared-adcfd50a.js} +1 -1
  176. package/dist/cdn/{shared-f11b2116.js → shared-addddf0e.js} +1 -1
  177. package/dist/cdn/{shared-fb34e84c.js → shared-b726120d.js} +2 -2
  178. package/dist/cdn/{shared-0e055562.js → shared-bc023a29.js} +1 -1
  179. package/dist/cdn/{shared-6d645dc5.js → shared-c2efc54e.js} +1 -1
  180. package/dist/cdn/{shared-029d623b.js → shared-c4f15ea3.js} +1 -1
  181. package/dist/cdn/{shared-ce172224.js → shared-c508d5dc.js} +1 -1
  182. package/dist/cdn/{shared-c286c5ad.js → shared-c518ece2.js} +1 -1
  183. package/dist/cdn/{shared-16c17e32.js → shared-c538157f.js} +1 -1
  184. package/dist/cdn/{shared-f407c2cb.js → shared-c5647b62.js} +1 -1
  185. package/dist/cdn/{shared-60d586ba.js → shared-c9346893.js} +1 -1
  186. package/dist/cdn/{shared-d132bd37.js → shared-c98881c7.js} +1 -1
  187. package/dist/cdn/{shared-da9e048f.js → shared-ca0847b0.js} +1 -1
  188. package/dist/cdn/shared-d1195c27.js +15 -0
  189. package/dist/cdn/{shared-0b01f721.js → shared-d1cb97c6.js} +1 -1
  190. package/dist/cdn/{shared-fb0ca5e2.js → shared-d3044c4c.js} +1 -1
  191. package/dist/cdn/{shared-245f8836.js → shared-d4a1658e.js} +1 -1
  192. package/dist/cdn/shared-d8bffb38.js +14 -0
  193. package/dist/cdn/{shared-fc1dfa64.js → shared-df51ee50.js} +1 -1
  194. package/dist/cdn/{shared-edbf7378.js → shared-dfe41029.js} +1 -1
  195. package/dist/cdn/{shared-536a2d53.js → shared-e709057b.js} +1 -1
  196. package/dist/cdn/{shared-199e3870.js → shared-f5547471.js} +1 -1
  197. package/dist/cdn/{shared-0cc5420d.js → shared-f67f6fc5.js} +1 -1
  198. package/dist/cdn/{shared-7d38cb8a.js → shared-f8368b97.js} +1 -1
  199. package/dist/cdn/{shared-f2968508.js → shared-f893763a.js} +2 -2
  200. package/dist/cdn/{shared-b08ca8d0.js → shared-f998f9c8.js} +1 -1
  201. package/dist/cdn/{shared-ee36b83f.js → shared-fcdb896f.js} +1 -1
  202. package/dist/cdn/translations/user-invitation-card/en.json +17 -0
  203. package/dist/cdn/translations/user-invitation-form/en.json +94 -0
  204. package/dist/elements/public/UserCard/UserCard.d.ts +7 -0
  205. package/dist/elements/public/UserCard/UserCard.js +81 -2
  206. package/dist/elements/public/UserCard/UserCard.js.map +1 -1
  207. package/dist/elements/public/UserCard/index.d.ts +1 -0
  208. package/dist/elements/public/UserCard/index.js +1 -0
  209. package/dist/elements/public/UserCard/index.js.map +1 -1
  210. package/dist/elements/public/UserInvitationCard/UserInvitationCard.d.ts +16 -0
  211. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js +110 -0
  212. package/dist/elements/public/UserInvitationCard/UserInvitationCard.js.map +1 -0
  213. package/dist/elements/public/UserInvitationCard/index.d.ts +4 -0
  214. package/dist/elements/public/UserInvitationCard/index.js +6 -0
  215. package/dist/elements/public/UserInvitationCard/index.js.map +1 -0
  216. package/dist/elements/public/UserInvitationCard/types.d.ts +1 -0
  217. package/dist/elements/public/UserInvitationCard/types.js +2 -0
  218. package/dist/elements/public/UserInvitationCard/types.js.map +1 -0
  219. package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +29 -0
  220. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +313 -0
  221. package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -0
  222. package/dist/elements/public/UserInvitationForm/index.d.ts +7 -0
  223. package/dist/elements/public/UserInvitationForm/index.js +9 -0
  224. package/dist/elements/public/UserInvitationForm/index.js.map +1 -0
  225. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.d.ts +10 -0
  226. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +51 -0
  227. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -0
  228. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.d.ts +5 -0
  229. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js +7 -0
  230. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/index.js.map +1 -0
  231. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.d.ts +9 -0
  232. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js +32 -0
  233. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/InternalUserInvitationFormSyncAction.js.map +1 -0
  234. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.d.ts +5 -0
  235. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js +7 -0
  236. package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormSyncAction/index.js.map +1 -0
  237. package/dist/elements/public/UserInvitationForm/types.d.ts +33 -0
  238. package/dist/elements/public/UserInvitationForm/types.js +2 -0
  239. package/dist/elements/public/UserInvitationForm/types.js.map +1 -0
  240. package/dist/elements/public/index.d.ts +2 -0
  241. package/dist/elements/public/index.defined.d.ts +2 -0
  242. package/dist/elements/public/index.defined.js +2 -0
  243. package/dist/elements/public/index.defined.js.map +1 -1
  244. package/dist/elements/public/index.js +2 -0
  245. package/dist/elements/public/index.js.map +1 -1
  246. package/dist/mixins/themeable.js +4 -0
  247. package/dist/mixins/themeable.js.map +1 -1
  248. package/dist/utils/get-gravatar-url.d.ts +1 -0
  249. package/dist/utils/get-gravatar-url.js +8 -0
  250. package/dist/utils/get-gravatar-url.js.map +1 -0
  251. package/package.json +1 -1
  252. package/dist/cdn/shared-0f6e4584.js +0 -15
  253. package/dist/cdn/shared-3ee151ce.js +0 -1
  254. package/dist/cdn/shared-6474675f.js +0 -1
  255. package/dist/cdn/shared-9db46672.js +0 -1
  256. package/dist/cdn/shared-f34aeb6c.js +0 -1
@@ -1 +1 @@
1
- import"./shared-44ce656d.js";import"./shared-fb34e84c.js";class o extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",o);const n=document.createElement("template");n.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);const t=document.createElement("template");t.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(t.content);const l=document.createElement("template");l.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(l.content);const e=document.createElement("template");e.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(e.content);const a=document.createElement("template");a.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(a.content);
1
+ import"./shared-adcfd50a.js";import"./shared-b726120d.js";class o extends HTMLElement{static get version(){return"1.6.1"}}customElements.define("vaadin-lumo-styles",o);const n=document.createElement("template");n.innerHTML='<custom-style>\n <style>\n html {\n /* Base (background) */\n --lumo-base-color: #FFF;\n\n /* Tint */\n --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);\n --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);\n --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);\n --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);\n --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);\n --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);\n --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);\n --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);\n --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);\n --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);\n --lumo-tint: #FFF;\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);\n --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);\n --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);\n --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);\n --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);\n --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);\n --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);\n --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);\n --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);\n --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);\n --lumo-shade: hsl(214, 35%, 15%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-shade-5pct);\n --lumo-contrast-10pct: var(--lumo-shade-10pct);\n --lumo-contrast-20pct: var(--lumo-shade-20pct);\n --lumo-contrast-30pct: var(--lumo-shade-30pct);\n --lumo-contrast-40pct: var(--lumo-shade-40pct);\n --lumo-contrast-50pct: var(--lumo-shade-50pct);\n --lumo-contrast-60pct: var(--lumo-shade-60pct);\n --lumo-contrast-70pct: var(--lumo-shade-70pct);\n --lumo-contrast-80pct: var(--lumo-shade-80pct);\n --lumo-contrast-90pct: var(--lumo-shade-90pct);\n --lumo-contrast: var(--lumo-shade);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 90%, 52%);\n --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);\n --lumo-primary-text-color: var(--lumo-primary-color);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 100%, 61%);\n --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);\n --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);\n --lumo-error-text-color: hsl(3, 92%, 53%);\n --lumo-error-contrast-color: #FFF;\n\n /* Success */\n --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */\n --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);\n --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);\n --lumo-success-text-color: hsl(145, 100%, 32%);\n --lumo-success-contrast-color: #FFF;\n }\n </style>\n</custom-style><dom-module id="lumo-color">\n <template>\n <style>\n [theme~="dark"] {\n /* Base (background) */\n --lumo-base-color: hsl(214, 35%, 21%);\n\n /* Tint */\n --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);\n --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);\n --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);\n --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);\n --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);\n --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);\n --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);\n --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);\n --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);\n --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);\n --lumo-tint: hsl(214, 100%, 98%);\n\n /* Shade */\n --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);\n --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);\n --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);\n --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);\n --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);\n --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);\n --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);\n --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);\n --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);\n --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);\n --lumo-shade: hsl(214, 33%, 13%);\n\n /* Contrast */\n --lumo-contrast-5pct: var(--lumo-tint-5pct);\n --lumo-contrast-10pct: var(--lumo-tint-10pct);\n --lumo-contrast-20pct: var(--lumo-tint-20pct);\n --lumo-contrast-30pct: var(--lumo-tint-30pct);\n --lumo-contrast-40pct: var(--lumo-tint-40pct);\n --lumo-contrast-50pct: var(--lumo-tint-50pct);\n --lumo-contrast-60pct: var(--lumo-tint-60pct);\n --lumo-contrast-70pct: var(--lumo-tint-70pct);\n --lumo-contrast-80pct: var(--lumo-tint-80pct);\n --lumo-contrast-90pct: var(--lumo-tint-90pct);\n --lumo-contrast: var(--lumo-tint);\n\n /* Text */\n --lumo-header-text-color: var(--lumo-contrast);\n --lumo-body-text-color: var(--lumo-contrast-90pct);\n --lumo-secondary-text-color: var(--lumo-contrast-70pct);\n --lumo-tertiary-text-color: var(--lumo-contrast-50pct);\n --lumo-disabled-text-color: var(--lumo-contrast-30pct);\n\n /* Primary */\n --lumo-primary-color: hsl(214, 86%, 55%);\n --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);\n --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);\n --lumo-primary-text-color: hsl(214, 100%, 70%);\n --lumo-primary-contrast-color: #FFF;\n\n /* Error */\n --lumo-error-color: hsl(3, 90%, 63%);\n --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);\n --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);\n --lumo-error-text-color: hsl(3, 100%, 67%);\n\n /* Success */\n --lumo-success-color: hsl(145, 65%, 42%);\n --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);\n --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);\n --lumo-success-text-color: hsl(145, 85%, 47%);\n }\n\n html {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n [theme~="dark"] {\n color: var(--lumo-body-text-color);\n background-color: var(--lumo-base-color);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n color: var(--lumo-header-text-color);\n }\n\n a {\n color: var(--lumo-primary-text-color);\n }\n\n blockquote {\n color: var(--lumo-secondary-text-color);\n }\n\n code,\n pre {\n background-color: var(--lumo-contrast-10pct);\n border-radius: var(--lumo-border-radius-m);\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-color-legacy">\n <template>\n <style include="lumo-color">\n :host {\n color: var(--lumo-body-text-color) !important;\n background-color: var(--lumo-base-color) !important;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);const t=document.createElement("template");t.innerHTML="<custom-style>\n <style>\n html {\n --lumo-size-xs: 1.625rem;\n --lumo-size-s: 1.875rem;\n --lumo-size-m: 2.25rem;\n --lumo-size-l: 2.75rem;\n --lumo-size-xl: 3.5rem;\n\n /* Icons */\n --lumo-icon-size-s: 1.25em;\n --lumo-icon-size-m: 1.5em;\n --lumo-icon-size-l: 2.25em;\n /* For backwards compatibility */\n --lumo-icon-size: var(--lumo-icon-size-m);\n }\n </style>\n</custom-style>",document.head.appendChild(t.content);const l=document.createElement("template");l.innerHTML="<custom-style>\n <style>\n html {\n /* Square */\n --lumo-space-xs: 0.25rem;\n --lumo-space-s: 0.5rem;\n --lumo-space-m: 1rem;\n --lumo-space-l: 1.5rem;\n --lumo-space-xl: 2.5rem;\n\n /* Wide */\n --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);\n --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);\n --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);\n --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);\n --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);\n\n /* Tall */\n --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);\n --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);\n --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);\n --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);\n --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);\n }\n </style>\n</custom-style>",document.head.appendChild(l.content);const e=document.createElement("template");e.innerHTML="<custom-style>\n <style>\n html {\n /* Border radius */\n --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */\n --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */\n --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */\n --lumo-border-radius: 0.25em; /* Deprecated */\n\n /* Shadow */\n --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);\n --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);\n --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);\n --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);\n --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);\n\n /* Clickable element cursor */\n --lumo-clickable-cursor: default;\n }\n </style>\n</custom-style>",document.head.appendChild(e.content);const a=document.createElement("template");a.innerHTML='<custom-style>\n <style>\n html {\n /* Font families */\n --lumo-font-family: -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";\n\n /* Font sizes */\n --lumo-font-size-xxs: .75rem;\n --lumo-font-size-xs: .8125rem;\n --lumo-font-size-s: .875rem;\n --lumo-font-size-m: 1rem;\n --lumo-font-size-l: 1.125rem;\n --lumo-font-size-xl: 1.375rem;\n --lumo-font-size-xxl: 1.75rem;\n --lumo-font-size-xxxl: 2.5rem;\n\n /* Line heights */\n --lumo-line-height-xs: 1.25;\n --lumo-line-height-s: 1.375;\n --lumo-line-height-m: 1.625;\n }\n\n </style>\n</custom-style><dom-module id="lumo-typography">\n <template>\n <style>\n html {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */\n :host {\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size, var(--lumo-font-size-m));\n line-height: var(--lumo-line-height-m);\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n small,\n [theme~="font-size-s"] {\n font-size: var(--lumo-font-size-s);\n line-height: var(--lumo-line-height-s);\n }\n\n [theme~="font-size-xs"] {\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n }\n\n h1,\n h2,\n h3,\n h4,\n h5,\n h6 {\n font-weight: 600;\n line-height: var(--lumo-line-height-xs);\n margin-top: 1.25em;\n }\n\n h1 {\n font-size: var(--lumo-font-size-xxxl);\n margin-bottom: 0.75em;\n }\n\n h2 {\n font-size: var(--lumo-font-size-xxl);\n margin-bottom: 0.5em;\n }\n\n h3 {\n font-size: var(--lumo-font-size-xl);\n margin-bottom: 0.5em;\n }\n\n h4 {\n font-size: var(--lumo-font-size-l);\n margin-bottom: 0.5em;\n }\n\n h5 {\n font-size: var(--lumo-font-size-m);\n margin-bottom: 0.25em;\n }\n\n h6 {\n font-size: var(--lumo-font-size-xs);\n margin-bottom: 0;\n text-transform: uppercase;\n letter-spacing: 0.03em;\n }\n\n p,\n blockquote {\n margin-top: 0.5em;\n margin-bottom: 0.75em;\n }\n\n a {\n text-decoration: none;\n }\n\n a:hover {\n text-decoration: underline;\n }\n\n hr {\n display: block;\n align-self: stretch;\n height: 1px;\n border: 0;\n padding: 0;\n margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);\n background-color: var(--lumo-contrast-10pct);\n }\n\n blockquote {\n border-left: 2px solid var(--lumo-contrast-30pct);\n }\n\n b,\n strong {\n font-weight: 600;\n }\n\n /* RTL specific styles */\n\n blockquote[dir="rtl"] {\n border-left: none;\n border-right: 2px solid var(--lumo-contrast-30pct);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(a.content);
@@ -1 +1 @@
1
- import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as u,E as d,F as l,G as f,H as p,I as v,J as y,K as w,L as x,M as b,N as m,O as g,P as E,Q as S,S as T,T as L,U as _,V as O,W as k,X as C,Y as N,Z as M,$ as z,a0 as D,a1 as P,a2 as I,a3 as R}from"./shared-0f6e4584.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),F=new Map,U=0,j=function(){return"x:"+U++},X=function(t,e){return F.set(t,e),t},A=function(t){return F.get(t)},V=function(t){F.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=j()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),l=d.next();!l.done;l=d.next()){u(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
1
+ import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as u,E as d,F as l,G as f,H as p,I as v,J as y,K as w,L as x,M as b,N as m,O as g,P as E,Q as S,S as T,T as L,U as _,V as O,W as k,X as C,Y as N,Z as M,$ as z,a0 as D,a1 as P,a2 as I,a3 as R}from"./shared-d1195c27.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),F=new Map,U=0,j=function(){return"x:"+U++},X=function(t,e){return F.set(t,e),t},A=function(t){return F.get(t)},V=function(t){F.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=j()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),l=d.next();!l.done;l=d.next()){u(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
@@ -0,0 +1,17 @@
1
+ {
2
+ "status_admin_accepted": "{{ email }} • Store admin",
3
+ "status_admin_rejected": "{{ email }} • Invitation rejected",
4
+ "status_admin_revoked": "{{ email }} • Access revoked",
5
+ "status_admin_sent": "{{ email }} • Invited",
6
+ "status_user_accepted": "{{ domain }} • Accepted",
7
+ "status_user_rejected": "{{ domain }} • Rejected",
8
+ "status_user_revoked": "{{ domain }} • Revoked",
9
+ "status_user_sent": "{{ domain }} • Pending",
10
+ "full_name": "{{ first_name }} {{ last_name }}",
11
+ "full_name_empty": "Unknown user",
12
+ "spinner": {
13
+ "loading_busy": "Loading",
14
+ "loading_empty": "No data",
15
+ "loading_error": "Unknown error"
16
+ }
17
+ }
@@ -0,0 +1,94 @@
1
+ {
2
+ "header": {
3
+ "title_new": "New store admin"
4
+ },
5
+ "admin_status_title_revoked": "Access revoked",
6
+ "admin_status_title_sent": "Invitation sent",
7
+ "admin_status_title_rejected": "Invitation rejected",
8
+ "admin_status_title_accepted": "This user is a store admin",
9
+ "admin_status_text_revoked": "This user may have been an admin in the past but has no access to this store at the moment. We will keep this record for historical purposes.",
10
+ "admin_status_text_sent": "We've sent an email to this user asking them to join this store. Once they accept, they will be granted full admin access.",
11
+ "admin_status_text_rejected": "If this was a mistake, ask the user to delete this invitation in profile settings. You will be able to invite them again after that.",
12
+ "admin_status_text_accepted": "They have full access to this store, including the ability to add and remove users.",
13
+ "user_status_title_revoked": "You no longer have access to {{ store_name }}",
14
+ "user_status_text_revoked": "If you'd like to join this store again, please ask the store owner to reactivate your access in settings.",
15
+ "user_status_title_sent": "You've been invited to join {{ store_name }} as administrator",
16
+ "user_status_text_sent": "Accepting this invitation will grant you full access to this store. Rejecting it will prevent this store from inviting you again.",
17
+ "user_status_title_rejected": "You've rejected an invitation to join {{ store_name }} as administrator",
18
+ "user_status_text_rejected": "This store won't be able to contact you again. If you changed your mind, delete this invitation and ask the store owner to invite you again.",
19
+ "user_status_title_accepted": "You're a store administrator at {{ store_name }}",
20
+ "user_status_text_accepted": "If you'd like to leave this store, you can do so by pressing the button below. Please note that if you'd like to join again, the store owner will need to invite you.",
21
+ "full_name": "{{ first_name }} {{ last_name }}",
22
+ "full_name_empty": "Unknown User",
23
+ "leave": {
24
+ "caption": "Leave this store"
25
+ },
26
+ "revoke": {
27
+ "caption": "Revoke access"
28
+ },
29
+ "invite-again": {
30
+ "caption": "Invite again"
31
+ },
32
+ "resend": {
33
+ "idle": "Resend email",
34
+ "busy": "Resending...",
35
+ "fail": "Failed to resend",
36
+ "confirm": {
37
+ "header": "Resend email",
38
+ "message": "Please confirm that you'd like to resend the invitation email to this user.",
39
+ "confirm": "Resend",
40
+ "cancel": "Cancel"
41
+ }
42
+ },
43
+ "error": {
44
+ "invitation_exists": "This user has already been invited to this store.",
45
+ "already_has_access": "This user already has access to this store."
46
+ },
47
+ "store": {
48
+ "label": "",
49
+ "helper_text": "",
50
+ "store-domain": {
51
+ "label": "Store domain",
52
+ "placeholder": "Unknown",
53
+ "helper_text": ""
54
+ },
55
+ "store-url": {
56
+ "label": "Website",
57
+ "placeholder": "Unknown",
58
+ "helper_text": ""
59
+ },
60
+ "store-email": {
61
+ "label": "Contact email",
62
+ "placeholder": "Unknown",
63
+ "helper_text": ""
64
+ }
65
+ },
66
+ "email": {
67
+ "label": "Email",
68
+ "placeholder": "Required",
69
+ "helper_text": "If this user doesn't have an account with us, they will be able to create one.",
70
+ "v8n_required": "Please enter an email address."
71
+ },
72
+ "accept": {
73
+ "caption": "Accept"
74
+ },
75
+ "reject": {
76
+ "caption": "Reject"
77
+ },
78
+ "create": {
79
+ "caption": "Send invitation"
80
+ },
81
+ "delete": {
82
+ "delete": "Delete",
83
+ "cancel": "Cancel",
84
+ "delete_prompt": "Deleting an invitation allows the store owner to invite you again. Would you like to proceed?"
85
+ },
86
+ "unavailable": {
87
+ "loading_empty": "Creating an invitation is not available in this context."
88
+ },
89
+ "spinner": {
90
+ "refresh": "Refresh",
91
+ "loading_busy": "Loading",
92
+ "loading_error": "Unknown error"
93
+ }
94
+ }
@@ -1,3 +1,4 @@
1
+ import type { PropertyDeclarations } from 'lit-element';
1
2
  import type { TemplateResult } from 'lit-html';
2
3
  import type { Data } from './types';
3
4
  import { TwoLineCard } from '../CustomFieldCard/TwoLineCard';
@@ -11,6 +12,12 @@ declare const Base: typeof TwoLineCard & import("lit-element").Constructor<impor
11
12
  * @since 1.22.0
12
13
  */
13
14
  export declare class UserCard extends Base<Data> {
15
+ static get properties(): PropertyDeclarations;
16
+ /** When true, displays the number of unanswered invitations next to profile picture if there are some. */
17
+ showInvitations: boolean;
14
18
  renderBody(): TemplateResult;
19
+ private get __invitationsLoader();
20
+ private get __invitationsHref();
21
+ private __getGravatar;
15
22
  }
16
23
  export {};
@@ -1,5 +1,9 @@
1
1
  import { TranslatableMixin } from "../../../mixins/translatable.js";
2
+ import { getGravatarUrl } from "../../../utils/get-gravatar-url.js";
3
+ import { asyncReplace } from 'lit-html/directives/async-replace';
2
4
  import { TwoLineCard } from "../CustomFieldCard/TwoLineCard.js";
5
+ import { ifDefined } from 'lit-html/directives/if-defined';
6
+ import { classMap } from "../../../utils/class-map.js";
3
7
  import { html } from 'lit-html';
4
8
  const NS = 'user-card';
5
9
  const Base = TranslatableMixin(TwoLineCard, NS);
@@ -10,14 +14,89 @@ const Base = TranslatableMixin(TwoLineCard, NS);
10
14
  * @since 1.22.0
11
15
  */
12
16
  export class UserCard extends Base {
17
+ constructor() {
18
+ super(...arguments);
19
+ /** When true, displays the number of unanswered invitations next to profile picture if there are some. */
20
+ this.showInvitations = false;
21
+ }
22
+ static get properties() {
23
+ return {
24
+ ...super.properties,
25
+ showInvitations: { type: Boolean, attribute: 'show-invitations' },
26
+ };
27
+ }
13
28
  renderBody() {
14
- return super.renderBody({
29
+ var _a, _b, _c, _d;
30
+ const invitationsCount = (_c = (_b = (_a = this.__invitationsLoader) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.total_items) !== null && _c !== void 0 ? _c : 0;
31
+ return html `
32
+ <div
33
+ class="flex items-center"
34
+ style="gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"
35
+ >
36
+ <div class="relative flex-shrink-0">
37
+ ${asyncReplace(this.__getGravatar((_d = this.data) === null || _d === void 0 ? void 0 : _d.email))}
38
+ <span
39
+ data-testid="invitations-count"
40
+ style="min-height: 1.5em; min-width: 1.5em; border-radius: 1.5em; left: calc(100% - 1em); top: -0.5em;"
41
+ class=${classMap({
42
+ 'flex items-center justify-center bg-error text-error-contrast': true,
43
+ 'font-medium px-xs leading-none text-xs absolute transform': true,
44
+ 'scale-0': !this.showInvitations || invitationsCount === 0,
45
+ })}
46
+ >
47
+ ${invitationsCount}
48
+ </span>
49
+ </div>
50
+ <div class="min-w-0 flex-1">
51
+ ${super.renderBody({
15
52
  title: data => {
16
53
  const name = [data.first_name.trim(), data.last_name.trim()];
17
54
  return html `${name.filter(v => !!v).join(' ') || this.t('no_name')}`;
18
55
  },
19
56
  subtitle: data => html `${data.email}`,
20
- });
57
+ })}
58
+ </div>
59
+ </div>
60
+
61
+ <foxy-nucleon
62
+ infer=""
63
+ href=${ifDefined(this.__invitationsHref)}
64
+ id="invitationsLoader"
65
+ @update=${this.requestUpdate}
66
+ >
67
+ </foxy-nucleon>
68
+ `;
69
+ }
70
+ get __invitationsLoader() {
71
+ return this.renderRoot.querySelector('#invitationsLoader');
72
+ }
73
+ get __invitationsHref() {
74
+ var _a, _b;
75
+ try {
76
+ if (!this.showInvitations)
77
+ return;
78
+ // TODO remove this when SDK has types for invitations.
79
+ // @ts-expect-error SDK does not have types for invitations yet.
80
+ const url = new URL((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:user_invitations'].href) !== null && _b !== void 0 ? _b : '');
81
+ url.searchParams.set('status', 'sent');
82
+ url.searchParams.set('limit', '1');
83
+ return url.toString();
84
+ }
85
+ catch (_c) {
86
+ return;
87
+ }
88
+ }
89
+ async *__getGravatar(email) {
90
+ yield html `<div class="rounded-full w-s h-s bg-contrast-5"></div>`;
91
+ if (email) {
92
+ yield html `
93
+ <img
94
+ class="rounded-full w-s h-s bg-contrast-5 shadow-xs"
95
+ src=${await getGravatarUrl(email)}
96
+ alt=""
97
+ />
98
+ `;
99
+ }
21
100
  }
22
101
  }
23
102
  //# sourceMappingURL=UserCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UserCard.js","sourceRoot":"","sources":["../../../../src/elements/public/UserCard/UserCard.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,WAAW,EAAE,0CAAuC;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,MAAM,EAAE,GAAG,WAAW,CAAC;AACvB,MAAM,IAAI,GAAG,iBAAiB,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,OAAO,QAAS,SAAQ,IAAU;IACtC,UAAU;QACR,OAAO,KAAK,CAAC,UAAU,CAAC;YACtB,KAAK,EAAE,IAAI,CAAC,EAAE;gBACZ,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC7D,OAAO,IAAI,CAAA,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC;YACvE,CAAC;YACD,QAAQ,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAA,GAAG,IAAI,CAAC,KAAK,EAAE;SACtC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import type { TemplateResult } from 'lit-html';\nimport type { Data } from './types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { TwoLineCard } from '../CustomFieldCard/TwoLineCard';\nimport { html } from 'lit-html';\n\nconst NS = 'user-card';\nconst Base = TranslatableMixin(TwoLineCard, NS);\n\n/**\n * Card element representing a `fx:user` resource.\n *\n * @element foxy-user-card\n * @since 1.22.0\n */\nexport class UserCard extends Base<Data> {\n renderBody(): TemplateResult {\n return super.renderBody({\n title: data => {\n const name = [data.first_name.trim(), data.last_name.trim()];\n return html`${name.filter(v => !!v).join(' ') || this.t('no_name')}`;\n },\n subtitle: data => html`${data.email}`,\n });\n }\n}\n"]}
1
+ {"version":3,"file":"UserCard.js","sourceRoot":"","sources":["../../../../src/elements/public/UserCard/UserCard.ts"],"names":[],"mappings":"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","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { UserInvitations } from '../UserInvitationForm/types';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { TemplateResult } from 'lit-html';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Data } from './types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { getGravatarUrl } from '../../../utils/get-gravatar-url';\nimport { asyncReplace } from 'lit-html/directives/async-replace';\nimport { TwoLineCard } from '../CustomFieldCard/TwoLineCard';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-html';\n\nconst NS = 'user-card';\nconst Base = TranslatableMixin(TwoLineCard, NS);\n\n/**\n * Card element representing a `fx:user` resource.\n *\n * @element foxy-user-card\n * @since 1.22.0\n */\nexport class UserCard extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n showInvitations: { type: Boolean, attribute: 'show-invitations' },\n };\n }\n\n /** When true, displays the number of unanswered invitations next to profile picture if there are some. */\n showInvitations = false;\n\n renderBody(): TemplateResult {\n const invitationsCount = this.__invitationsLoader?.data?.total_items ?? 0;\n\n return html`\n <div\n class=\"flex items-center\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n <div class=\"relative flex-shrink-0\">\n ${asyncReplace(this.__getGravatar(this.data?.email))}\n <span\n data-testid=\"invitations-count\"\n style=\"min-height: 1.5em; min-width: 1.5em; border-radius: 1.5em; left: calc(100% - 1em); top: -0.5em;\"\n class=${classMap({\n 'flex items-center justify-center bg-error text-error-contrast': true,\n 'font-medium px-xs leading-none text-xs absolute transform': true,\n 'scale-0': !this.showInvitations || invitationsCount === 0,\n })}\n >\n ${invitationsCount}\n </span>\n </div>\n <div class=\"min-w-0 flex-1\">\n ${super.renderBody({\n title: data => {\n const name = [data.first_name.trim(), data.last_name.trim()];\n return html`${name.filter(v => !!v).join(' ') || this.t('no_name')}`;\n },\n subtitle: data => html`${data.email}`,\n })}\n </div>\n </div>\n\n <foxy-nucleon\n infer=\"\"\n href=${ifDefined(this.__invitationsHref)}\n id=\"invitationsLoader\"\n @update=${this.requestUpdate}\n >\n </foxy-nucleon>\n `;\n }\n\n private get __invitationsLoader() {\n type Loader = NucleonElement<Resource<UserInvitations>>;\n return this.renderRoot.querySelector<Loader>('#invitationsLoader');\n }\n\n private get __invitationsHref() {\n try {\n if (!this.showInvitations) return;\n // TODO remove this when SDK has types for invitations.\n // @ts-expect-error SDK does not have types for invitations yet.\n const url = new URL(this.data?._links['fx:user_invitations'].href ?? '');\n url.searchParams.set('status', 'sent');\n url.searchParams.set('limit', '1');\n return url.toString();\n } catch {\n return;\n }\n }\n\n private async *__getGravatar(email?: string) {\n yield html`<div class=\"rounded-full w-s h-s bg-contrast-5\"></div>`;\n\n if (email) {\n yield html`\n <img\n class=\"rounded-full w-s h-s bg-contrast-5 shadow-xs\"\n src=${await getGravatarUrl(email)}\n alt=\"\"\n />\n `;\n }\n }\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import '../../internal/InternalSandbox/index';
2
+ import '../NucleonElement/index';
2
3
  import '../Spinner/index';
3
4
  import '../I18n/index';
4
5
  import { UserCard } from './UserCard';
@@ -1,4 +1,5 @@
1
1
  import "../../internal/InternalSandbox/index.js";
2
+ import "../NucleonElement/index.js";
2
3
  import "../Spinner/index.js";
3
4
  import "../I18n/index.js";
4
5
  import { UserCard } from "./UserCard.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/UserCard/index.ts"],"names":[],"mappings":"AAAA,iDAA8C;AAE9C,6BAA0B;AAC1B,0BAAuB;AAEvB,OAAO,EAAE,QAAQ,EAAE,sBAAmB;AAEtC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import '../../internal/InternalSandbox/index';\n\nimport '../Spinner/index';\nimport '../I18n/index';\n\nimport { UserCard } from './UserCard';\n\ncustomElements.define('foxy-user-card', UserCard);\n\nexport { UserCard };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/UserCard/index.ts"],"names":[],"mappings":"AAAA,iDAA8C;AAE9C,oCAAiC;AACjC,6BAA0B;AAC1B,0BAAuB;AAEvB,OAAO,EAAE,QAAQ,EAAE,sBAAmB;AAEtC,cAAc,CAAC,MAAM,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import '../../internal/InternalSandbox/index';\n\nimport '../NucleonElement/index';\nimport '../Spinner/index';\nimport '../I18n/index';\n\nimport { UserCard } from './UserCard';\n\ncustomElements.define('foxy-user-card', UserCard);\n\nexport { UserCard };\n"]}
@@ -0,0 +1,16 @@
1
+ import type { PropertyDeclarations, TemplateResult } from 'lit-element';
2
+ import type { Data } from './types';
3
+ import { InternalCard } from '../../internal/InternalCard/InternalCard';
4
+ declare const Base: typeof InternalCard & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
5
+ defaultNS: string;
6
+ };
7
+ export declare class UserInvitationCard extends Base<Data> {
8
+ static get properties(): PropertyDeclarations;
9
+ /** Default host domain for stores that don't use a custom domain name, e.g. `foxycart.com`. */
10
+ defaultDomain: string | null;
11
+ /** Admin layout will display user info, user layout (default) will display store info. */
12
+ layout: 'admin' | 'user' | null;
13
+ renderBody(): TemplateResult;
14
+ private __getGravatar;
15
+ }
16
+ export {};
@@ -0,0 +1,110 @@
1
+ import { TranslatableMixin } from "../../../mixins/translatable.js";
2
+ import { getGravatarUrl } from "../../../utils/get-gravatar-url.js";
3
+ import { getResourceId } from '@foxy.io/sdk/core';
4
+ import { asyncReplace } from 'lit-html/directives/async-replace';
5
+ import { InternalCard } from "../../internal/InternalCard/InternalCard.js";
6
+ import { html } from 'lit-html';
7
+ const NS = 'user-invitation-card';
8
+ const Base = TranslatableMixin(InternalCard, NS);
9
+ export class UserInvitationCard extends Base {
10
+ constructor() {
11
+ super(...arguments);
12
+ /** Default host domain for stores that don't use a custom domain name, e.g. `foxycart.com`. */
13
+ this.defaultDomain = null;
14
+ /** Admin layout will display user info, user layout (default) will display store info. */
15
+ this.layout = null;
16
+ }
17
+ static get properties() {
18
+ return {
19
+ ...super.properties,
20
+ defaultDomain: { attribute: 'default-domain' },
21
+ layout: {},
22
+ };
23
+ }
24
+ renderBody() {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
26
+ const layout = (_a = this.layout) !== null && _a !== void 0 ? _a : 'user';
27
+ if (layout === 'admin') {
28
+ const { first_name, last_name, status, email } = (_b = this.data) !== null && _b !== void 0 ? _b : {};
29
+ const hasName = (first_name === null || first_name === void 0 ? void 0 : first_name.trim()) || (last_name === null || last_name === void 0 ? void 0 : last_name.trim());
30
+ const titleOptions = { first_name, last_name, context: hasName ? '' : 'empty' };
31
+ const subtitleOptions = { context: `admin_${status}`, email };
32
+ const userLink = (_d = (_c = this.data) === null || _c === void 0 ? void 0 : _c._links['fx:user']) === null || _d === void 0 ? void 0 : _d.href;
33
+ return html `
34
+ <div
35
+ class="flex items-center"
36
+ style="gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"
37
+ >
38
+ ${asyncReplace(this.__getGravatar((_e = this.data) === null || _e === void 0 ? void 0 : _e.email))}
39
+
40
+ <div class="min-w-0 flex-1 leading-xs">
41
+ <div class="flex items-center">
42
+ <foxy-i18n
43
+ class="font-medium truncate mr-auto"
44
+ infer=""
45
+ key="full_name"
46
+ .options=${titleOptions}
47
+ >
48
+ </foxy-i18n>
49
+ ${userLink
50
+ ? html `
51
+ <span class="text-tertiary uppercase text-s flex-shrink-0">
52
+ ID ${getResourceId(userLink)}
53
+ </span>
54
+ `
55
+ : ''}
56
+ </div>
57
+ <foxy-i18n
58
+ .options=${subtitleOptions}
59
+ class="block truncate text-s text-secondary"
60
+ infer=""
61
+ key="status"
62
+ >
63
+ </foxy-i18n>
64
+ </div>
65
+ </div>
66
+ `;
67
+ }
68
+ const storeLink = (_f = this.data) === null || _f === void 0 ? void 0 : _f._links['fx:store'].href;
69
+ const defaultD = this.defaultDomain;
70
+ const d = (_g = this.data) === null || _g === void 0 ? void 0 : _g.store_domain;
71
+ const domain = (d === null || d === void 0 ? void 0 : d.includes('.')) || !defaultD ? d : `${d}.${defaultD}`;
72
+ const subtitleOptions = { context: `user_${(_h = this.data) === null || _h === void 0 ? void 0 : _h.status}`, domain };
73
+ return html `
74
+ <div class="min-w-0 flex-1 leading-xs">
75
+ <div class="flex items-center">
76
+ <span class="font-medium truncate mr-auto">
77
+ ${(_j = this.data) === null || _j === void 0 ? void 0 : _j.store_name}&ZeroWidthSpace;
78
+ </span>
79
+ ${storeLink
80
+ ? html `
81
+ <span class="text-tertiary uppercase text-s flex-shrink-0">
82
+ ID ${getResourceId(storeLink)}
83
+ </span>
84
+ `
85
+ : ''}
86
+ </div>
87
+ <foxy-i18n
88
+ .options=${subtitleOptions}
89
+ class="block truncate text-s text-secondary"
90
+ infer=""
91
+ key="status"
92
+ >
93
+ </foxy-i18n>
94
+ </div>
95
+ `;
96
+ }
97
+ async *__getGravatar(email) {
98
+ yield html `<div class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5"></div>`;
99
+ if (email) {
100
+ yield html `
101
+ <img
102
+ class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5 shadow-xs"
103
+ src=${await getGravatarUrl(email)}
104
+ alt=""
105
+ />
106
+ `;
107
+ }
108
+ }
109
+ }
110
+ //# sourceMappingURL=UserInvitationCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserInvitationCard.js","sourceRoot":"","sources":["../../../../src/elements/public/UserInvitationCard/UserInvitationCard.ts"],"names":[],"mappings":"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","sourcesContent":["import type { PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { Data } from './types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { getGravatarUrl } from '../../../utils/get-gravatar-url';\nimport { getResourceId } from '@foxy.io/sdk/core';\nimport { asyncReplace } from 'lit-html/directives/async-replace';\nimport { InternalCard } from '../../internal/InternalCard/InternalCard';\nimport { html } from 'lit-html';\n\nconst NS = 'user-invitation-card';\nconst Base = TranslatableMixin(InternalCard, NS);\n\nexport class UserInvitationCard extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n defaultDomain: { attribute: 'default-domain' },\n layout: {},\n };\n }\n\n /** Default host domain for stores that don't use a custom domain name, e.g. `foxycart.com`. */\n defaultDomain: string | null = null;\n\n /** Admin layout will display user info, user layout (default) will display store info. */\n layout: 'admin' | 'user' | null = null;\n\n renderBody(): TemplateResult {\n const layout = this.layout ?? 'user';\n\n if (layout === 'admin') {\n const { first_name, last_name, status, email } = this.data ?? {};\n const hasName = first_name?.trim() || last_name?.trim();\n const titleOptions = { first_name, last_name, context: hasName ? '' : 'empty' };\n const subtitleOptions = { context: `admin_${status}`, email };\n const userLink = this.data?._links['fx:user']?.href;\n\n return html`\n <div\n class=\"flex items-center\"\n style=\"gap: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n ${asyncReplace(this.__getGravatar(this.data?.email))}\n\n <div class=\"min-w-0 flex-1 leading-xs\">\n <div class=\"flex items-center\">\n <foxy-i18n\n class=\"font-medium truncate mr-auto\"\n infer=\"\"\n key=\"full_name\"\n .options=${titleOptions}\n >\n </foxy-i18n>\n ${userLink\n ? html`\n <span class=\"text-tertiary uppercase text-s flex-shrink-0\">\n ID ${getResourceId(userLink)}\n </span>\n `\n : ''}\n </div>\n <foxy-i18n\n .options=${subtitleOptions}\n class=\"block truncate text-s text-secondary\"\n infer=\"\"\n key=\"status\"\n >\n </foxy-i18n>\n </div>\n </div>\n `;\n }\n\n const storeLink = this.data?._links['fx:store'].href;\n const defaultD = this.defaultDomain;\n const d = this.data?.store_domain;\n const domain = d?.includes('.') || !defaultD ? d : `${d}.${defaultD}`;\n const subtitleOptions = { context: `user_${this.data?.status}`, domain };\n\n return html`\n <div class=\"min-w-0 flex-1 leading-xs\">\n <div class=\"flex items-center\">\n <span class=\"font-medium truncate mr-auto\">\n ${this.data?.store_name}&ZeroWidthSpace;\n </span>\n ${storeLink\n ? html`\n <span class=\"text-tertiary uppercase text-s flex-shrink-0\">\n ID ${getResourceId(storeLink)}\n </span>\n `\n : ''}\n </div>\n <foxy-i18n\n .options=${subtitleOptions}\n class=\"block truncate text-s text-secondary\"\n infer=\"\"\n key=\"status\"\n >\n </foxy-i18n>\n </div>\n `;\n }\n\n private async *__getGravatar(email?: string) {\n yield html`<div class=\"flex-shrink-0 rounded-full w-s h-s bg-contrast-5\"></div>`;\n\n if (email) {\n yield html`\n <img\n class=\"flex-shrink-0 rounded-full w-s h-s bg-contrast-5 shadow-xs\"\n src=${await getGravatarUrl(email)}\n alt=\"\"\n />\n `;\n }\n }\n}\n"]}
@@ -0,0 +1,4 @@
1
+ import '../../internal/InternalCard/index';
2
+ import '../I18n/index';
3
+ import { UserInvitationCard } from './UserInvitationCard';
4
+ export { UserInvitationCard };
@@ -0,0 +1,6 @@
1
+ import "../../internal/InternalCard/index.js";
2
+ import "../I18n/index.js";
3
+ import { UserInvitationCard } from "./UserInvitationCard.js";
4
+ customElements.define('foxy-user-invitation-card', UserInvitationCard);
5
+ export { UserInvitationCard };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/UserInvitationCard/index.ts"],"names":[],"mappings":"AAAA,8CAA2C;AAC3C,0BAAuB;AAEvB,OAAO,EAAE,kBAAkB,EAAE,gCAA6B;AAE1D,cAAc,CAAC,MAAM,CAAC,2BAA2B,EAAE,kBAAkB,CAAC,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import '../../internal/InternalCard/index';\nimport '../I18n/index';\n\nimport { UserInvitationCard } from './UserInvitationCard';\n\ncustomElements.define('foxy-user-invitation-card', UserInvitationCard);\n\nexport { UserInvitationCard };\n"]}
@@ -0,0 +1 @@
1
+ export * from '../UserInvitationForm/types';
@@ -0,0 +1,2 @@
1
+ export * from "../UserInvitationForm/types.js";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/elements/public/UserInvitationCard/types.ts"],"names":[],"mappings":"AAAA,+CAA4C","sourcesContent":["export * from '../UserInvitationForm/types';\n"]}
@@ -0,0 +1,29 @@
1
+ import type { CSSResultArray, PropertyDeclarations } from 'lit-element';
2
+ import type { TemplateResult } from 'lit-html';
3
+ import type { NucleonV8N } from '../NucleonElement/types';
4
+ import type { Data } from './types';
5
+ import { BooleanSelector } from '@foxy.io/sdk/core';
6
+ import { InternalForm } from '../../internal/InternalForm/InternalForm';
7
+ declare const Base: typeof InternalForm & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
8
+ defaultNS: string;
9
+ };
10
+ export declare class UserInvitationForm extends Base<Data> {
11
+ static get properties(): PropertyDeclarations;
12
+ static get styles(): CSSResultArray;
13
+ static get v8n(): NucleonV8N<Data>;
14
+ /** Default host domain for stores that don't use a custom domain name, e.g. `foxycart.com`. */
15
+ defaultDomain: string | null;
16
+ /** Admin layout will display user info, user layout (default) will display store info. */
17
+ layout: 'admin' | 'user' | null;
18
+ private readonly __storeDomainGetValue;
19
+ get readonlySelector(): BooleanSelector;
20
+ get hiddenSelector(): BooleanSelector;
21
+ renderBody(): TemplateResult;
22
+ protected _fetch<TResult = Data>(...args: Parameters<Window['fetch']>): Promise<TResult>;
23
+ private __getGravatar;
24
+ private __renderAdminTemplateState;
25
+ private __renderUserTemplateState;
26
+ private __renderAdminSnapshotState;
27
+ private __renderUserSnapshotState;
28
+ }
29
+ export {};