@foxy.io/elements 1.27.0-beta.6 → 1.27.0-beta.7

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 (271) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-api-browser.js +1 -1
  6. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  8. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  9. package/dist/cdn/foxy-attribute-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-form.js +1 -1
  11. package/dist/cdn/foxy-billing-address-card.js +1 -1
  12. package/dist/cdn/foxy-cancellation-form.js +1 -1
  13. package/dist/cdn/foxy-cart-card.js +1 -1
  14. package/dist/cdn/foxy-cart-form.js +1 -1
  15. package/dist/cdn/foxy-client-card.js +1 -1
  16. package/dist/cdn/foxy-client-form.js +1 -1
  17. package/dist/cdn/foxy-collection-page.js +1 -1
  18. package/dist/cdn/foxy-collection-pages.js +1 -1
  19. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  20. package/dist/cdn/foxy-coupon-card.js +1 -1
  21. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  23. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  25. package/dist/cdn/foxy-coupon-form.js +1 -1
  26. package/dist/cdn/foxy-custom-field-card.js +1 -1
  27. package/dist/cdn/foxy-custom-field-form.js +1 -1
  28. package/dist/cdn/foxy-customer-api.js +1 -1
  29. package/dist/cdn/foxy-customer-card.js +1 -1
  30. package/dist/cdn/foxy-customer-form.js +1 -1
  31. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  33. package/dist/cdn/foxy-customer-portal.js +1 -1
  34. package/dist/cdn/foxy-customer.js +3 -3
  35. package/dist/cdn/foxy-customers-table.js +1 -1
  36. package/dist/cdn/foxy-discount-builder.js +1 -1
  37. package/dist/cdn/foxy-discount-card.js +1 -1
  38. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  39. package/dist/cdn/foxy-donation.js +1 -1
  40. package/dist/cdn/foxy-downloadable-card.js +1 -1
  41. package/dist/cdn/foxy-downloadable-form.js +1 -1
  42. package/dist/cdn/foxy-email-template-card.js +1 -1
  43. package/dist/cdn/foxy-email-template-form.js +1 -1
  44. package/dist/cdn/foxy-error-entry-card.js +1 -1
  45. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  47. package/dist/cdn/foxy-form-dialog.js +1 -1
  48. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  49. package/dist/cdn/foxy-gift-card-card.js +1 -1
  50. package/dist/cdn/foxy-gift-card-code-card.js +1 -0
  51. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-form.js +1 -1
  55. package/dist/cdn/foxy-i18n-editor.js +2 -2
  56. package/dist/cdn/foxy-i18n.js +1 -1
  57. package/dist/cdn/foxy-integration-card.js +1 -1
  58. package/dist/cdn/foxy-integration-form.js +1 -1
  59. package/dist/cdn/foxy-item-card.js +1 -1
  60. package/dist/cdn/foxy-item-category-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-form.js +1 -1
  62. package/dist/cdn/foxy-item-form.js +3 -3
  63. package/dist/cdn/foxy-item-option-card.js +1 -1
  64. package/dist/cdn/foxy-item-option-form.js +1 -1
  65. package/dist/cdn/foxy-items-form.js +1 -1
  66. package/dist/cdn/foxy-native-integration-card.js +1 -1
  67. package/dist/cdn/foxy-native-integration-form.js +1 -1
  68. package/dist/cdn/foxy-nucleon-element.js +1 -1
  69. package/dist/cdn/foxy-pagination.js +1 -1
  70. package/dist/cdn/foxy-passkey-card.js +1 -1
  71. package/dist/cdn/foxy-passkey-form.js +1 -1
  72. package/dist/cdn/foxy-payment-card.js +1 -1
  73. package/dist/cdn/foxy-payment-method-card.js +1 -1
  74. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  76. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api.js +1 -1
  81. package/dist/cdn/foxy-query-builder.js +64 -1
  82. package/dist/cdn/foxy-report-form.js +1 -1
  83. package/dist/cdn/foxy-reports-table.js +1 -1
  84. package/dist/cdn/foxy-shipment-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  86. package/dist/cdn/foxy-sign-in-form.js +1 -1
  87. package/dist/cdn/foxy-spinner.js +2 -2
  88. package/dist/cdn/foxy-store-card.js +1 -1
  89. package/dist/cdn/foxy-store-form.js +1 -1
  90. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  91. package/dist/cdn/foxy-subscription-card.js +1 -1
  92. package/dist/cdn/foxy-subscription-form.js +1 -1
  93. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  94. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  95. package/dist/cdn/foxy-table.js +1 -1
  96. package/dist/cdn/foxy-tax-card.js +1 -1
  97. package/dist/cdn/foxy-tax-form.js +1 -1
  98. package/dist/cdn/foxy-template-config-form.js +1 -1
  99. package/dist/cdn/foxy-template-form.js +1 -1
  100. package/dist/cdn/foxy-template-set-card.js +1 -1
  101. package/dist/cdn/foxy-template-set-form.js +1 -1
  102. package/dist/cdn/foxy-transaction-card.js +1 -1
  103. package/dist/cdn/foxy-transaction.js +1 -1
  104. package/dist/cdn/foxy-transactions-table.js +1 -1
  105. package/dist/cdn/foxy-user-card.js +1 -1
  106. package/dist/cdn/foxy-user-form.js +1 -1
  107. package/dist/cdn/foxy-users-table.js +1 -1
  108. package/dist/cdn/foxy-webhook-card.js +1 -1
  109. package/dist/cdn/foxy-webhook-form.js +1 -1
  110. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  111. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  112. package/dist/cdn/{shared-da7a0bfb.js → shared-018d5724.js} +1 -1
  113. package/dist/cdn/{shared-80eb1fee.js → shared-03673673.js} +1 -1
  114. package/dist/cdn/{shared-065dbdf6.js → shared-07e7d118.js} +1 -1
  115. package/dist/cdn/{shared-cab2aa63.js → shared-0a8161e5.js} +1 -1
  116. package/dist/cdn/{shared-48b76c74.js → shared-0a9d860d.js} +1 -1
  117. package/dist/cdn/{shared-f03dacf5.js → shared-0f59fd6a.js} +1 -1
  118. package/dist/cdn/{shared-a73e7be4.js → shared-122cccac.js} +1 -1
  119. package/dist/cdn/{shared-03ccfd62.js → shared-186e41cf.js} +1 -1
  120. package/dist/cdn/shared-18918efe.js +1 -0
  121. package/dist/cdn/shared-18bfe97c.js +1 -0
  122. package/dist/cdn/{shared-1d6beb48.js → shared-1e7639e6.js} +1 -1
  123. package/dist/cdn/{shared-cc723108.js → shared-2314add3.js} +1 -1
  124. package/dist/cdn/{shared-931db653.js → shared-25198d9a.js} +1 -1
  125. package/dist/cdn/{shared-9a5da74d.js → shared-285f8cee.js} +1 -1
  126. package/dist/cdn/{shared-850e2ae1.js → shared-28be347b.js} +1 -1
  127. package/dist/cdn/{shared-6af480b8.js → shared-2b5a3c80.js} +1 -1
  128. package/dist/cdn/{shared-8def6325.js → shared-3cabd589.js} +1 -1
  129. package/dist/cdn/{shared-bfa30d93.js → shared-412c19c2.js} +1 -1
  130. package/dist/cdn/shared-467e5b06.js +1 -0
  131. package/dist/cdn/shared-482b2b86.js +1 -0
  132. package/dist/cdn/{shared-b30f9b10.js → shared-4affec66.js} +1 -1
  133. package/dist/cdn/{shared-4877ed05.js → shared-4c611015.js} +2 -2
  134. package/dist/cdn/{shared-f2a8fb36.js → shared-4c7a8fcc.js} +1 -1
  135. package/dist/cdn/{shared-208e37af.js → shared-540063aa.js} +1 -1
  136. package/dist/cdn/{shared-93812e51.js → shared-55630cac.js} +1 -1
  137. package/dist/cdn/{shared-b81aa01c.js → shared-584df8a8.js} +1 -1
  138. package/dist/cdn/shared-5875cb66.js +1 -0
  139. package/dist/cdn/{shared-589e5d06.js → shared-58951f74.js} +4 -4
  140. package/dist/cdn/{shared-fd041b18.js → shared-5debeb1b.js} +1 -1
  141. package/dist/cdn/{shared-6e977271.js → shared-612ea9ed.js} +1 -1
  142. package/dist/cdn/{shared-d4322854.js → shared-62e9c883.js} +1 -1
  143. package/dist/cdn/{shared-683145e5.js → shared-6586ffd5.js} +1 -1
  144. package/dist/cdn/{shared-205721a3.js → shared-684cd55a.js} +1 -1
  145. package/dist/cdn/{shared-7e201abd.js → shared-6b68b3b6.js} +1 -1
  146. package/dist/cdn/{shared-5dbb9630.js → shared-6cd4e618.js} +1 -1
  147. package/dist/cdn/{shared-4329ffa1.js → shared-739f24fe.js} +1 -1
  148. package/dist/cdn/{shared-befe135a.js → shared-75d13e1b.js} +1 -1
  149. package/dist/cdn/{shared-bba8ae80.js → shared-77258081.js} +1 -1
  150. package/dist/cdn/{shared-250e652f.js → shared-79d35787.js} +1 -1
  151. package/dist/cdn/{shared-724e9a20.js → shared-7b2bd917.js} +1 -1
  152. package/dist/cdn/{shared-d04c2e0c.js → shared-7f60c1c1.js} +1 -1
  153. package/dist/cdn/{shared-56addb06.js → shared-7ff78b4a.js} +1 -1
  154. package/dist/cdn/{shared-dccfe5e7.js → shared-8258443c.js} +1 -1
  155. package/dist/cdn/{shared-8a04bea3.js → shared-851a7db5.js} +1 -1
  156. package/dist/cdn/shared-8874ec69.js +1 -0
  157. package/dist/cdn/{shared-c5f57aa8.js → shared-8a247f48.js} +1 -1
  158. package/dist/cdn/{shared-e48fbf50.js → shared-8b521111.js} +1 -1
  159. package/dist/cdn/shared-90877857.js +1 -0
  160. package/dist/cdn/{shared-bb08b5ce.js → shared-90cbed56.js} +1 -1
  161. package/dist/cdn/{shared-039de1fd.js → shared-91c88f14.js} +1 -1
  162. package/dist/cdn/{shared-0e5ea9cf.js → shared-99e354b1.js} +1 -1
  163. package/dist/cdn/{shared-fe7b3ed2.js → shared-9cfef94a.js} +1 -1
  164. package/dist/cdn/{shared-845f8bf1.js → shared-a24b2aa7.js} +1 -1
  165. package/dist/cdn/{shared-a0cbfb2f.js → shared-ad11b006.js} +1 -1
  166. package/dist/cdn/{shared-f7a5b12a.js → shared-b2fd98e6.js} +1 -1
  167. package/dist/cdn/{shared-11014aad.js → shared-b3db7611.js} +1 -1
  168. package/dist/cdn/{shared-85979316.js → shared-b900e1b5.js} +1 -1
  169. package/dist/cdn/{shared-5f09205d.js → shared-b9ea6d85.js} +1 -1
  170. package/dist/cdn/{shared-fb8c09b8.js → shared-bb1d162b.js} +1 -1
  171. package/dist/cdn/{shared-1a9e80fa.js → shared-bd919e3b.js} +1 -1
  172. package/dist/cdn/{shared-61f67b16.js → shared-be0fca15.js} +1 -1
  173. package/dist/cdn/{shared-e966f1ef.js → shared-cdf873d4.js} +1 -1
  174. package/dist/cdn/{shared-0e8dceb8.js → shared-d10d6cba.js} +1 -1
  175. package/dist/cdn/shared-d222bd1e.js +6 -0
  176. package/dist/cdn/{shared-fda63db8.js → shared-d56a3799.js} +4 -4
  177. package/dist/cdn/{shared-8cd0f36d.js → shared-d72e87ee.js} +1 -1
  178. package/dist/cdn/{shared-1d257548.js → shared-da2e66a4.js} +1 -1
  179. package/dist/cdn/{shared-bc95d87e.js → shared-ea5fa631.js} +1 -1
  180. package/dist/cdn/{shared-abf72e2f.js → shared-ee13d85c.js} +3 -3
  181. package/dist/cdn/{shared-e35297c9.js → shared-f0fcd613.js} +1 -1
  182. package/dist/cdn/{shared-2c70f0b6.js → shared-f4bb452b.js} +1 -1
  183. package/dist/cdn/{shared-ca15d510.js → shared-f7c60ee0.js} +1 -1
  184. package/dist/cdn/{shared-5c542149.js → shared-fc5ace3b.js} +1 -1
  185. package/dist/cdn/shared-fe45779e.js +1 -0
  186. package/dist/cdn/translations/gift-card-code-card/en.json +10 -0
  187. package/dist/cdn/translations/gift-card-code-form/en.json +86 -0
  188. package/dist/cdn/translations/gift-card-form/en.json +638 -397
  189. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +15 -7
  190. package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
  191. package/dist/elements/{public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.d.ts → internal/InternalBulkAddActionControl/InternalBulkAddActionControl.d.ts} +3 -2
  192. package/dist/elements/{public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.js → internal/InternalBulkAddActionControl/InternalBulkAddActionControl.js} +9 -9
  193. package/dist/elements/internal/InternalBulkAddActionControl/InternalBulkAddActionControl.js.map +1 -0
  194. package/dist/elements/internal/InternalBulkAddActionControl/index.d.ts +6 -0
  195. package/dist/elements/internal/InternalBulkAddActionControl/index.js +8 -0
  196. package/dist/elements/internal/InternalBulkAddActionControl/index.js.map +1 -0
  197. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.d.ts +16 -0
  198. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js +167 -0
  199. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControl.js.map +1 -0
  200. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.d.ts +14 -0
  201. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js +40 -0
  202. package/dist/elements/internal/InternalResourcePickerControl/InternalResourcePickerControlForm.js.map +1 -0
  203. package/dist/elements/internal/InternalResourcePickerControl/index.d.ts +6 -0
  204. package/dist/elements/internal/InternalResourcePickerControl/index.js +10 -0
  205. package/dist/elements/internal/InternalResourcePickerControl/index.js.map +1 -0
  206. package/dist/elements/public/CouponForm/CouponForm.js +6 -4
  207. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
  208. package/dist/elements/public/CouponForm/index.d.ts +1 -1
  209. package/dist/elements/public/CouponForm/index.js +1 -1
  210. package/dist/elements/public/CouponForm/index.js.map +1 -1
  211. package/dist/elements/public/CouponForm/types.d.ts +1 -10
  212. package/dist/elements/public/CouponForm/types.js.map +1 -1
  213. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js +0 -6
  214. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js.map +1 -1
  215. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.d.ts +21 -0
  216. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js +78 -0
  217. package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js.map +1 -0
  218. package/dist/elements/public/GiftCardCodeCard/index.d.ts +5 -0
  219. package/dist/elements/public/GiftCardCodeCard/index.js +7 -0
  220. package/dist/elements/public/GiftCardCodeCard/index.js.map +1 -0
  221. package/dist/elements/public/GiftCardCodeCard/types.d.ts +3 -0
  222. package/dist/elements/public/GiftCardCodeCard/types.js +2 -0
  223. package/dist/elements/public/GiftCardCodeCard/types.js.map +1 -0
  224. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +12 -0
  225. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +69 -4
  226. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  227. package/dist/elements/public/GiftCardCodeForm/index.d.ts +2 -0
  228. package/dist/elements/public/GiftCardCodeForm/index.js +2 -0
  229. package/dist/elements/public/GiftCardCodeForm/index.js.map +1 -1
  230. package/dist/elements/public/GiftCardCodeForm/types.d.ts +5 -1
  231. package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -1
  232. package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +22 -28
  233. package/dist/elements/public/GiftCardForm/GiftCardForm.js +183 -633
  234. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  235. package/dist/elements/public/GiftCardForm/index.d.ts +13 -12
  236. package/dist/elements/public/GiftCardForm/index.js +13 -12
  237. package/dist/elements/public/GiftCardForm/index.js.map +1 -1
  238. package/dist/elements/public/GiftCardForm/types.d.ts +2 -27
  239. package/dist/elements/public/GiftCardForm/types.js.map +1 -1
  240. package/dist/elements/public/index.d.ts +1 -0
  241. package/dist/elements/public/index.defined.d.ts +1 -0
  242. package/dist/elements/public/index.defined.js +1 -0
  243. package/dist/elements/public/index.defined.js.map +1 -1
  244. package/dist/elements/public/index.js +1 -0
  245. package/dist/elements/public/index.js.map +1 -1
  246. package/package.json +2 -2
  247. package/dist/cdn/shared-07d5e225.js +0 -1
  248. package/dist/cdn/shared-29f2468c.js +0 -6
  249. package/dist/cdn/shared-400240f8.js +0 -1
  250. package/dist/cdn/shared-5e35c5a5.js +0 -1
  251. package/dist/cdn/shared-6c4affb9.js +0 -1
  252. package/dist/cdn/shared-77fd8dae.js +0 -1
  253. package/dist/cdn/shared-bfeff3bb.js +0 -1
  254. package/dist/cdn/shared-e07b24ca.js +0 -1
  255. package/dist/cdn/shared-e84be1c2.js +0 -64
  256. package/dist/elements/private/EditableList/EditableList.d.ts +0 -23
  257. package/dist/elements/private/EditableList/EditableList.js +0 -127
  258. package/dist/elements/private/EditableList/EditableList.js.map +0 -1
  259. package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.js.map +0 -1
  260. package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.d.ts +0 -6
  261. package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.js +0 -8
  262. package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.js.map +0 -1
  263. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.d.ts +0 -20
  264. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js +0 -99
  265. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPage.js.map +0 -1
  266. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.d.ts +0 -18
  267. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js +0 -50
  268. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItem.js.map +0 -1
  269. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.d.ts +0 -18
  270. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js +0 -53
  271. package/dist/elements/public/GiftCardForm/private/CategoryRestrictionsPageItemContent.js.map +0 -1
@@ -1 +1 @@
1
- import"./shared-f03dacf5.js";import"./shared-51c4a6dd.js";import"./shared-6c4affb9.js";import"./shared-683145e5.js";import"./shared-11014aad.js";import{g as e}from"./shared-bab2ea2c.js";import{C as t}from"./shared-6af480b8.js";import{a as s}from"./shared-56addb06.js";import{I as i}from"./shared-e48fbf50.js";import{c as r}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./shared-48b76c74.js";import"./shared-4877ed05.js";import"./shared-7e201abd.js";import"./shared-f2a8fb36.js";import"./foxy-spinner.js";import"./shared-1d257548.js";import"./shared-8def6325.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";let a,n,d,c,l,p,u,m,f,h,v,y,_,x,$=e=>e;const b=t(s(i,"transaction-card"));class j extends b{constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}renderBody(){var e,t;const s=this.hiddenSelector,i=!s.matches("total",!0),d=!s.matches("status",!0);return o(a||(a=$` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition-opacity":!0,"opacity-0":!this.data}),i||d?o(n||(n=$` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),i?this.__renderIdAndTotal():"",d?this.__renderStatus():""):"",s.matches("description",!0)?"":this.__renderSummary(),s.matches("customer",!0)?"":this.__renderCustomer(),r({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){var e;const t=await super._sendGet(),s=null===(e=t._links["fx:store"])||void 0===e?void 0:e.href;if("string"==typeof s){const e=await super._fetch(s);this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return t}__renderIdAndTotal(){const t=this.data;let s;if(t){const i={amount:`${t.total_order} ${t.currency_code}`,currencyDisplay:this.__currencyDisplay};s=o(d||(d=$` <span class="truncate">ID ${0}</span> ${0} `),t.display_id||e(t._links.self.href),"updateinfo"!==t.type&&"subscription_cancellation"!==t.type?o(c||(c=$` <span>&bull;</span> <foxy-i18n .options="${0}" infer="" key="price"></foxy-i18n> `),i):"")}else s=o(l||(l=$`&ZeroWidthSpace;`));return o(p||(p=$` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var e,t,s,i,r,a;const n=(null===(e=this.data)||void 0===e?void 0:e.status)||"completed",d=null===(s=null===(t=this.data)||void 0===t?void 0:t.source)||void 0===s?void 0:s.substring(0,3).toUpperCase();return o(u||(u=$` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),d?o(m||(m=$` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),d,d):"",JSON.stringify({value:null===(i=this.data)||void 0===i?void 0:i.transaction_date}),this.lang,this.ns,null!==(r={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[n])&&void 0!==r?r:"text-tertiary",null!==(a={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[n])&&void 0!==a?a:"icons:schedule",n,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var e,t,s;const i=null===(t=null===(e=this.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:items"],r=null===(s=this.data)||void 0===s?void 0:s.type;let a,n;if(n="updateinfo"===r?"summary_payment_method_change":"subscription_modification"===r?"summary_subscription_modification":"subscription_cancellation"===r?"summary_subscription_cancellation":"summary",i){const e={most_expensive_item:[...i].sort(((e,t)=>e.price-t.price))[0],count_minus_one:i.length-1,count:i.length};a=o(f||(f=$`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),e,n)}else a=o(h||(h=$`&ZeroWidthSpace;`));return o(v||(v=$` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),a,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const e=this.data,t=e?o(y||(y=$`${0} ${0} (${0})`),e.customer_first_name,e.customer_last_name,e.customer_email):o(_||(_=$`&ZeroWidthSpace;`));return o(x||(x=$` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),t,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",j);export{j as TransactionCard};
1
+ import"./shared-0f59fd6a.js";import"./shared-51c4a6dd.js";import"./shared-90877857.js";import"./shared-6586ffd5.js";import"./shared-b3db7611.js";import{g as t}from"./shared-bab2ea2c.js";import{C as e}from"./shared-2b5a3c80.js";import{a as s}from"./shared-7ff78b4a.js";import{I as i}from"./shared-8b521111.js";import{c as r}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./shared-0a9d860d.js";import"./shared-4c611015.js";import"./shared-6b68b3b6.js";import"./shared-4c7a8fcc.js";import"./foxy-spinner.js";import"./shared-da2e66a4.js";import"./shared-3cabd589.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";let a,n,d,c,l,p,u,m,h,f,v,y,_,x,$=t=>t;const b=e(s(i,"transaction-card"));class j extends b{constructor(){super(...arguments),this.templates={},this.__currencyDisplay=""}renderBody(){var t,e;const s=this.hiddenSelector,i=!s.matches("total",!0),d=!s.matches("status",!0);return o(a||(a=$` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition-opacity":!0,"opacity-0":!this.data}),i||d?o(n||(n=$` <div class="flex items-center justify-between gap-s"> ${0} ${0} </div> `),i?this.__renderIdAndTotal():"",d?this.__renderStatus():""):"",s.matches("description",!0)?"":this.__renderSummary(),s.matches("customer",!0)?"":this.__renderCustomer(),r({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(e=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==e?e:"")}async _sendGet(){var t;const e=await super._sendGet(),s=null===(t=e._links["fx:store"])||void 0===t?void 0:t.href;if("string"==typeof s){const t=await super._fetch(s);this.__currencyDisplay=t.use_international_currency_symbol?"code":"symbol"}else this.__currencyDisplay="symbol";return e}__renderIdAndTotal(){const e=this.data;let s;if(e){const i={amount:`${e.total_order} ${e.currency_code}`,currencyDisplay:this.__currencyDisplay};s=o(d||(d=$` <span class="truncate">ID ${0}</span> ${0} `),e.display_id||t(e._links.self.href),"updateinfo"!==e.type&&"subscription_cancellation"!==e.type?o(c||(c=$` <span>&bull;</span> <foxy-i18n .options="${0}" infer="" key="price"></foxy-i18n> `),i):"")}else s=o(l||(l=$`&ZeroWidthSpace;`));return o(p||(p=$` <div class="min-w-0" data-testid="total"> ${0} <div class="font-medium flex items-center gap-xs">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("total:before"),s,this.renderTemplateOrSlot("total:after"))}__renderStatus(){var t,e,s,i,r,a;const n=(null===(t=this.data)||void 0===t?void 0:t.status)||"completed",d=null===(s=null===(e=this.data)||void 0===e?void 0:e.source)||void 0===s?void 0:s.substring(0,3).toUpperCase();return o(u||(u=$` <div class="flex-shrink-0" data-testid="status"> ${0} <div class="text-tertiary text-s flex items-center space-x-xs"> ${0} <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> <iron-icon data-testid="status-icon" class="icon-inline cursor-default text-l ${0}" id="status" icon="${0}"> </iron-icon> <vcf-tooltip for="status" theme="light" position="top"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </vcf-tooltip> </div> ${0} </div> `),this.renderTemplateOrSlot("status:before"),d?o(m||(m=$` <vcf-tooltip for="source" theme="light" position="top"> <foxy-i18n infer="" key="source_${0}"></foxy-i18n> </vcf-tooltip> <span class="cursor-default" id="source">${0}</span> `),d,d):"",JSON.stringify({value:null===(i=this.data)||void 0===i?void 0:i.transaction_date}),this.lang,this.ns,null!==(r={authorized:"text-success",completed:"text-success",capturing:"text-success",captured:"text-success",approved:"text-success",pending:"text-success",pending_fraud_review:"text-error",declined:"text-error",rejected:"text-error",problem:"text-error"}[n])&&void 0!==r?r:"text-tertiary",null!==(a={authorized:"icons:done",capturing:"icons:done",captured:"icons:done",approved:"icons:done",pending:"icons:done",completed:"icons:done-all",pending_fraud_review:"icons:info-outline",declined:"icons:highlight-off",rejected:"icons:highlight-off",problem:"icons:info-outline",refunded:"icons:restore",voided:"icons:remove-circle-outline"}[n])&&void 0!==a?a:"icons:schedule",n,this.renderTemplateOrSlot("status:after"))}__renderSummary(){var t,e,s;const i=null===(e=null===(t=this.data)||void 0===t?void 0:t._embedded)||void 0===e?void 0:e["fx:items"],r=null===(s=this.data)||void 0===s?void 0:s.type;let a,n;if(n="updateinfo"===r?"summary_payment_method_change":"subscription_modification"===r?"summary_subscription_modification":"subscription_cancellation"===r?"summary_subscription_cancellation":"summary",i){const t={most_expensive_item:[...i].sort(((t,e)=>t.price-e.price))[0],count_minus_one:i.length-1,count:i.length};a=o(h||(h=$`<foxy-i18n .options="${0}" infer="" key="${0}"></foxy-i18n>`),t,n)}else a=o(f||(f=$`&ZeroWidthSpace;`));return o(v||(v=$` <div data-testid="description"> ${0} <div class="text-s text-secondary truncate">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("description:before"),a,this.renderTemplateOrSlot("description:after"))}__renderCustomer(){const t=this.data,e=t?o(y||(y=$`${0} ${0} (${0})`),t.customer_first_name,t.customer_last_name,t.customer_email):o(_||(_=$`&ZeroWidthSpace;`));return o(x||(x=$` <div data-testid="customer"> ${0} <div class="text-tertiary truncate text-s">${0}</div> ${0} </div> `),this.renderTemplateOrSlot("customer:before"),e,this.renderTemplateOrSlot("customer:after"))}}customElements.define("foxy-transaction-card",j);export{j as TransactionCard};
@@ -1 +1 @@
1
- import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-683145e5.js";import"./shared-29f2468c.js";import{I as t}from"./shared-c5f57aa8.js";import{a as e}from"./shared-befe135a.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-spinner.js";import{_ as i,B as o}from"./shared-11014aad.js";import{g as s}from"./shared-bab2ea2c.js";import{i as r}from"./shared-9803aa7c.js";import{h as n,s as a}from"./shared-dc73b9a5.js";import{c as d}from"./shared-4e709717.js";import"./shared-931db653.js";import"./shared-80eb1fee.js";import{N as l}from"./shared-77fd8dae.js";import"./foxy-nucleon-element.js";import{R as c,a as u}from"./shared-56addb06.js";import"./shared-6c4affb9.js";import"./shared-e48fbf50.js";import"./shared-7e201abd.js";import"./shared-48b76c74.js";import"./shared-1d257548.js";import"./shared-8def6325.js";import"./shared-343d1fd7.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-51c4a6dd.js";import"./shared-6af480b8.js";import"./shared-1d6beb48.js";import"./shared-4877ed05.js";import"./shared-61ade33e.js";import"./shared-039de1fd.js";import"./shared-85979316.js";import"./shared-a0c6a159.js";import"./shared-5dbb9630.js";import"./shared-5f09205d.js";import"./shared-bc95d87e.js";import"./shared-b30f9b10.js";import"./shared-b81aa01c.js";import"./shared-2bf89a21.js";import"./shared-400240f8.js";import"./shared-205721a3.js";import"./shared-d04c2e0c.js";import"./shared-9a5da74d.js";import"./shared-208e37af.js";import"./shared-850e2ae1.js";import"./shared-bb08b5ce.js";import"./shared-651c44fa.js";import"./shared-6e977271.js";import"./shared-cc723108.js";import"./shared-bfa30d93.js";import"./shared-845f8bf1.js";import"./shared-a0cbfb2f.js";import"./shared-2c70f0b6.js";import"./shared-0e8dceb8.js";import"./shared-4329ffa1.js";import"./shared-e35297c9.js";import"./shared-1a9e80fa.js";import"./shared-61f67b16.js";import"./shared-ca15d510.js";import"./shared-589e5d06.js";import"./shared-0e5ea9cf.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./shared-8438d4ca.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";let p,m,f,h,_=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return i(i({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var t,e,i,o;const l=this.nucleon,c=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t._links["fx:customer"].href,u=c?null===(e=null==l?void 0:l.getCustomerPageHref)||void 0===e?void 0:e.call(l,c):void 0;return n(p||(p=_` <foxy-i18n infer="" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),d({"block ring-inset rounded transition-colors":!0,"ring-1 ring-contrast-10":!u,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),r(u),r(c),this.__renderCopyAction(a(m||(m=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",c?String(s(c)):""),this.__renderCopyAction(a(f||(f=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(o=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.customer_email)&&void 0!==o?o:""))}__renderCopyAction(t,e,i,o){const s=this[i],r="fail"===s?"error":"done"===s?"end":"busy";return n(h||(h=_` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==s,(()=>"idle"===s&&this.__copy(o,i)),(t=>"idle"!==s&&t.stopPropagation()),(t=>"idle"!==s&&t.stopPropagation()),d({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==s}),t,e,d({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===s}),r)}async __copy(t,e){this[e]="busy";try{await navigator.clipboard.writeText(t),this[e]="done"}catch(t){this[e]="fail"}setTimeout((()=>this[e]="idle"),3e3)}});let y,v=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return i(i({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"idle"===t?this.theme:"";return n(y||(y=v` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),e,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const e=new l.API(this),i=await e.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=i.ok?"idle":"fail",i.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let x,b,g,j,$,w,k=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var t,e,i,o,s,r,a,d,l,c;return n(x||(x=k` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} </div> `),(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"])?this.__renderCaptureAction():"",(null===(o=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===o?void 0:o._links["fx:void"])?this.__renderVoidAction():"",(null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"")}__renderSendEmailsAction(){var t,e;return n(b||(b=k` <foxy-internal-transaction-post-action-control infer="send-emails" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,e;return n(g||(g=k` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,e,i;return n(j||(j=k` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,e,i;return n($||($=k` <foxy-internal-transaction-post-action-control infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderSubscriptionAction(){var t,e,i;const o=this.nucleon,s=null===(e=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t._links["fx:subscription"])||void 0===e?void 0:e.href,a=s?null===(i=null==o?void 0:o.getSubscriptionPageHref)||void 0===i?void 0:i.call(o,s):void 0;return n(w||(w=k` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),r(a))}});let S,P,H,A,C,E,L,I,R,G,B=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var t,e,i,o,s,a,d,l,c;const u=null===(t=this.nucleon)||void 0===t?void 0:t.data;if(!u)return n(S||(S=B``));const p=null!==(i=null===(e=null==u?void 0:u._embedded)||void 0===e?void 0:e["fx:applied_taxes"])&&void 0!==i?i:[],m=null!==(s=null===(o=u._embedded)||void 0===o?void 0:o["fx:shipments"])&&void 0!==s?s:[];return n(P||(P=B` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),r(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===m.length||0===u.total_shipping?n(H||(H=B` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):m.map((t=>n(A||(A=B` <span>${0}&colon;</span> <span>${0}</span> `),t.shipping_service_description,this.__renderPrice(t.total_shipping,!0)))),0===p.length||0===u.total_tax?n(C||(C=B` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):p.map((t=>n(E||(E=B` <span>${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),null===(d=null===(a=null==u?void 0:u._embedded)||void 0===a?void 0:a["fx:applied_gift_card_codes"])||void 0===d?void 0:d.map((t=>{var e;return n(L||(L=B` <span>${0}&colon;</span> <span>${0}</span> `),t._embedded["fx:gift_card"].name,this.__renderPrice(null!==(e=t.balance_adjustment)&&void 0!==e?e:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((t=>n(I||(I=B` <span data-testclass="discount">${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var t,e,i;return null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var t,e;const i=`#${this.__storeLoaderId}`;return null!==(e=null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==e?e:null}__renderPrice(t,e=!1){var i,o,s;const r=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(s=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===s?void 0:s.currency_code;return n(R||(R=B` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),e&&0!==t?t>0?"text-success":"text-error":"",{currencyDisplay:r,signDisplay:e?"exceptZero":"auto",amount:`${t} ${a}`})}__renderStatus(){var t,e;const i=(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e.status)||"completed";let o="";return o=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",n(G||(G=B` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),o,i)}});let Z,M,T=t=>t;const W=c(u(t,"transaction"));class q extends W{constructor(){super(...arguments),this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null}static get properties(){return i(i({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1}})}get readonlySelector(){var t,e,i;const s=Boolean(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==e?e:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"]);return new o(s?`${super.readonlySelector} billing-addresses`:`${super.readonlySelector} billing-addresses items attributes custom-fields`)}get hiddenSelector(){var t,e;const i=["billing-addresses:dialog:delete billing-addresses:dialog:timestamps"],s=null===(t=this.data)||void 0===t?void 0:t.type;return(null===(e=this.data)||void 0===e?void 0:e._links["fx:subscription"])||i.push("subscription"),"subscription_modification"===s&&i.push("actions"),"updateinfo"===s&&i.push("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===s&&i.push("not=customer,subscription,custom-fields,attributes"),new o(`${super.hiddenSelector} ${i.join(" ")}`.trim())}renderBody(){var t,e,i,o,s,a,d,l,c,u,p,m,f;let h,_,y="subtitle";const v=this.hiddenSelector,x=null===(t=this.data)||void 0===t?void 0:t.source,b=null===(e=this.data)||void 0===e?void 0:e.type;if("updateinfo"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_payment_method":"mit_uoe"===x?"subtitle_admin_changed_payment_method_with_uoe":"mit_api"===x?"subtitle_integration_changed_payment_method":"subtitle_admin_changed_payment_method":"subscription_modification"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_subscription":"mit_uoe"===x?"subtitle_admin_changed_subscription_with_uoe":"mit_api"===x?"subtitle_integration_changed_subscription":"subtitle_admin_changed_subscription":"subscription_renewal"===b?"mit_recurring"===x?y="subtitle_subscription_renewal_attempt":"mit_recurring_reattempt_automated"===x?y="subtitle_subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===x&&(y="subtitle_subscription_renewal_manual_reattempt"):"subscription_cancellation"===b?"cit_recurring_cancellation"===x?y="subtitle_customer_canceled_subscription":"mit_recurring_cancellation"===x&&(y="subtitle_admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_subscribed":"mit_uoe"===x?y="subtitle_admin_subscribed_with_uoe":"mit_api"===x&&(y="subtitle_integration_subscribed"):(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_placed_order":"mit_uoe"===x?y="subtitle_admin_placed_order_with_uoe":"mit_api"===x&&(y="subtitle_integration_placed_order"),this.data)try{const t=new URL(this.data._links["fx:shipments"].href),e=new URL(this.data._links["fx:items"].href);t.searchParams.set("zoom","items:item_category"),e.searchParams.set("zoom","item_options"),h=t.toString(),_=e.toString()}catch(t){}return n(Z||(Z=T` <h2> <div class="flex items-center gap-s leading-xs text-xxl font-medium break-all"> <foxy-i18n infer="header" key="title" .options="${0}"></foxy-i18n> <foxy-copy-to-clipboard infer="header" class="inline-block text-m" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="block leading-xs text-l text-secondary" infer="header" key="${0}" .options="${0}"> </foxy-i18n> <foxy-internal-transaction-actions-control class="mt-xs" infer="actions"> </foxy-internal-transaction-actions-control> </h2> ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <div class="grid gap-m sm-grid-cols-2" ?hidden="${0}"> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> </div> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> `),this.data,null===(o=this.data)||void 0===o?void 0:o.display_id,y,{transaction_date:null===(s=this.data)||void 0===s?void 0:s.transaction_date,ip_country:null===(a=this.data)||void 0===a?void 0:a.ip_country},["problem","pending_fraud_review","rejected","declined"].includes(null!==(l=null===(d=this.data)||void 0===d?void 0:d.status)&&void 0!==l?l:"")?n(M||(M=T` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(c=this.data)||void 0===c?void 0:c.status):"",v.matches("items",!0)&&v.matches("summary",!0),r(_),[this.href],r(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),r(null===(p=this.data)||void 0===p?void 0:p._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},v.matches("custom-fields",!0)&&v.matches("attributes",!0),r(null===(m=this.data)||void 0===m?void 0:m._links["fx:custom_fields"].href),r(null===(f=this.data)||void 0===f?void 0:f._links["fx:attributes"].href),r(h))}}customElements.define("foxy-transaction",q);export{q as Transaction};
1
+ import"./foxy-billing-address-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-custom-field-form.js";import"./foxy-custom-field-card.js";import"./foxy-copy-to-clipboard.js";import"./foxy-shipment-card.js";import"./foxy-payment-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-6586ffd5.js";import"./shared-d222bd1e.js";import{I as t}from"./shared-8a247f48.js";import{a as e}from"./shared-75d13e1b.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-spinner.js";import{_ as i,B as o}from"./shared-b3db7611.js";import{g as s}from"./shared-bab2ea2c.js";import{i as r}from"./shared-9803aa7c.js";import{h as n,s as a}from"./shared-dc73b9a5.js";import{c as d}from"./shared-4e709717.js";import"./shared-25198d9a.js";import"./shared-03673673.js";import{N as l}from"./shared-fe45779e.js";import"./foxy-nucleon-element.js";import{R as c,a as u}from"./shared-7ff78b4a.js";import"./shared-90877857.js";import"./shared-8b521111.js";import"./shared-6b68b3b6.js";import"./shared-0a9d860d.js";import"./shared-da2e66a4.js";import"./shared-3cabd589.js";import"./shared-343d1fd7.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-51c4a6dd.js";import"./shared-2b5a3c80.js";import"./shared-1e7639e6.js";import"./shared-4c611015.js";import"./shared-61ade33e.js";import"./shared-91c88f14.js";import"./shared-b900e1b5.js";import"./shared-a0c6a159.js";import"./shared-6cd4e618.js";import"./shared-b9ea6d85.js";import"./shared-ea5fa631.js";import"./shared-4affec66.js";import"./shared-584df8a8.js";import"./shared-2bf89a21.js";import"./shared-18918efe.js";import"./shared-684cd55a.js";import"./shared-7f60c1c1.js";import"./shared-285f8cee.js";import"./shared-540063aa.js";import"./shared-28be347b.js";import"./shared-90cbed56.js";import"./shared-651c44fa.js";import"./shared-612ea9ed.js";import"./shared-2314add3.js";import"./shared-412c19c2.js";import"./shared-a24b2aa7.js";import"./shared-ad11b006.js";import"./shared-f4bb452b.js";import"./shared-d10d6cba.js";import"./shared-739f24fe.js";import"./shared-f0fcd613.js";import"./shared-bd919e3b.js";import"./shared-be0fca15.js";import"./shared-f7c60ee0.js";import"./shared-58951f74.js";import"./shared-99e354b1.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./shared-8438d4ca.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-collection-page.js";import"./shared-99940888.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";let p,m,f,h,_=t=>t;customElements.define("foxy-internal-transaction-customer-control",class extends e{constructor(){super(...arguments),this.__copyEmailState="idle",this.__copyIdState="idle"}static get properties(){return i(i({},super.properties),{},{__copyEmailState:{attribute:!1},__copyIdState:{attribute:!1}})}renderControl(){var t,e,i,o;const l=this.nucleon,c=null===(t=null==l?void 0:l.data)||void 0===t?void 0:t._links["fx:customer"].href,u=c?null===(e=null==l?void 0:l.getCustomerPageHref)||void 0===e?void 0:e.call(l,c):void 0;return n(p||(p=_` <foxy-i18n infer="" class="block text-s font-medium leading-xs mb-xs" key="label"> </foxy-i18n> <foxy-swipe-actions> <a class="${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" href="${0}"> <foxy-customer-card infer="" href="${0}"></foxy-customer-card> </a> <div class="h-full grid grid-cols-2 gap-s ml-s" slot="action"> ${0} ${0} </div> </foxy-swipe-actions> `),d({"block ring-inset rounded transition-colors":!0,"ring-1 ring-contrast-10":!u,"cursor-pointer bg-contrast-5 hover-bg-contrast-10":!!u,"focus-outline-none focus-ring-2 focus-ring-primary-50":!!u}),r(u),r(c),this.__renderCopyAction(a(m||(m=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M9.493 2.852a.75.75 0 0 0-1.486-.204L7.545 6H4.198a.75.75 0 0 0 0 1.5h3.14l-.69 5H3.302a.75.75 0 0 0 0 1.5h3.14l-.435 3.148a.75.75 0 0 0 1.486.204L7.955 14h2.986l-.434 3.148a.75.75 0 0 0 1.486.204L12.456 14h3.346a.75.75 0 0 0 0-1.5h-3.14l.69-5h3.346a.75.75 0 0 0 0-1.5h-3.14l.435-3.148a.75.75 0 0 0-1.486-.204L12.045 6H9.059l.434-3.148ZM8.852 7.5l-.69 5h2.986l.69-5H8.852Z" clip-rule="evenodd" /></svg>`)),"copy_id_caption","__copyIdState",c?String(s(c)):""),this.__renderCopyAction(a(f||(f=_`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.2rem; height: 1.2rem"><path fill-rule="evenodd" d="M5.404 14.596A6.5 6.5 0 1 1 16.5 10a1.25 1.25 0 0 1-2.5 0 4 4 0 1 0-.571 2.06A2.75 2.75 0 0 0 18 10a8 8 0 1 0-2.343 5.657.75.75 0 0 0-1.06-1.06 6.5 6.5 0 0 1-9.193 0ZM10 7.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5Z" clip-rule="evenodd" /></svg>`)),"copy_email_caption","__copyEmailState",null!==(o=null===(i=null==l?void 0:l.data)||void 0===i?void 0:i.customer_email)&&void 0!==o?o:""))}__renderCopyAction(t,e,i,o){const s=this[i],r="fail"===s?"error":"done"===s?"end":"busy";return n(h||(h=_` <button class="relative transition-colors bg-contrast-5 text-body hover-bg-contrast-10 rounded h-full py-0 px-m focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50" ?disabled="${0}" @click="${0}" @focusout="${0}" @mouseout="${0}"> <div class="${0}"> ${0} <foxy-i18n class="mt-xs text-s font-medium leading-none" infer="" key="${0}"> </foxy-i18n> </div> <div class="${0}"> <foxy-spinner layout="no-label" state="${0}" infer="spinner"> </foxy-spinner> </div> </button> `),"idle"!==s,(()=>"idle"===s&&this.__copy(o,i)),(t=>"idle"!==s&&t.stopPropagation()),(t=>"idle"!==s&&t.stopPropagation()),d({"relative flex flex-col items-center justify-center transition-opacity":!0,"opacity-0":"idle"!==s}),t,e,d({"absolute inset-0 flex items-center justify-center transition-opacity":!0,"opacity-0":"idle"===s}),r)}async __copy(t,e){this[e]="busy";try{await navigator.clipboard.writeText(t),this[e]="done"}catch(t){this[e]="fail"}setTimeout((()=>this[e]="idle"),3e3)}});let y,v=t=>t;customElements.define("foxy-internal-transaction-post-action-control",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return i(i({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"idle"===t?this.theme:"";return n(y||(y=v` <foxy-internal-confirm-dialog header="header" infer="confirm" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0} tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),(t=>!t.detail.cancelled&&this.__submit()),e,"busy"===t||this.disabled,(t=>{this.renderRoot.querySelector("#confirm").show(t.currentTarget)}),t)}async __submit(){var t;if("busy"!==this.__state)try{this.__state="busy";const e=new l.API(this),i=await e.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=i.ok?"idle":"fail",i.ok&&this.dispatchEvent(new CustomEvent("done"))}catch(t){this.__state="fail"}}});let x,b,g,j,$,w,k=t=>t;customElements.define("foxy-internal-transaction-actions-control",class extends e{renderControl(){var t,e,i,o,s,r,a,d,l,c;return n(x||(x=k` <div class="flex flex-wrap gap-x-m gap-y-xs"> ${0} ${0} ${0} ${0} ${0} </div> `),(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"])?this.__renderCaptureAction():"",(null===(o=null===(i=this.nucleon)||void 0===i?void 0:i.data)||void 0===o?void 0:o._links["fx:void"])?this.__renderVoidAction():"",(null===(r=null===(s=this.nucleon)||void 0===s?void 0:s.data)||void 0===r?void 0:r._links["fx:refund"])?this.__renderRefundAction():"",(null===(d=null===(a=this.nucleon)||void 0===a?void 0:a.data)||void 0===d?void 0:d._links["fx:send_emails"])?this.__renderSendEmailsAction():"",(null===(c=null===(l=this.nucleon)||void 0===l?void 0:l.data)||void 0===c?void 0:c._links["fx:subscription"])?this.__renderSubscriptionAction():"")}__renderSendEmailsAction(){var t,e;return n(b||(b=k` <foxy-internal-transaction-post-action-control infer="send-emails" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:send_emails"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderCaptureAction(){var t,e;return n(g||(g=k` <foxy-internal-transaction-post-action-control theme="success" infer="capture" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:capture"].href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderVoidAction(){var t,e,i;return n(j||(j=k` <foxy-internal-transaction-post-action-control theme="error" infer="void" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:void"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderRefundAction(){var t,e,i;return n($||($=k` <foxy-internal-transaction-post-action-control infer="refund" href="${0}" @done="${0}"> </foxy-internal-transaction-post-action-control> `),r(null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:refund"])||void 0===i?void 0:i.href),(()=>{var t;return null===(t=this.nucleon)||void 0===t?void 0:t.refresh()}))}__renderSubscriptionAction(){var t,e,i;const o=this.nucleon,s=null===(e=null===(t=null==o?void 0:o.data)||void 0===t?void 0:t._links["fx:subscription"])||void 0===e?void 0:e.href,a=s?null===(i=null==o?void 0:o.getSubscriptionPageHref)||void 0===i?void 0:i.call(o,s):void 0;return n(w||(w=k` <a class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="subscription" key="caption"></foxy-i18n> </a> `),r(a))}});let S,P,H,A,C,E,L,I,R,G,B=t=>t;customElements.define("foxy-internal-transaction-summary-control",class extends e{constructor(){super(...arguments),this.__storeLoaderId="storeLoader"}renderControl(){var t,e,i,o,s,a,d,l,c;const u=null===(t=this.nucleon)||void 0===t?void 0:t.data;if(!u)return n(S||(S=B``));const p=null!==(i=null===(e=null==u?void 0:u._embedded)||void 0===e?void 0:e["fx:applied_taxes"])&&void 0!==i?i:[],m=null!==(s=null===(o=u._embedded)||void 0===o?void 0:o["fx:shipments"])&&void 0!==s?s:[];return n(P||(P=B` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <p class="grid gap-x-s text-right text-s leading-m border-dashed border rounded border-contrast-20 whitespace-nowrap overflow-auto" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 2px);grid-template-columns:1fr min-content"> <span><foxy-i18n key="subtotal" infer=""></foxy-i18n>&colon;</span> <span>${0}</span> ${0} ${0} ${0} ${0} <span class="col-span-2 border-t border-dashed border-contrast-20 my-s"></span> <span class="col-span-2 flex gap-s justify-between items-center"> ${0} <span class="text-xl font-medium leading-xs"> <foxy-i18n infer="" key="total"></foxy-i18n>&colon; ${0} </span> </span> </p> `),r(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),this.__renderPrice(u.total_item_price),0===m.length||0===u.total_shipping?n(H||(H=B` <span><foxy-i18n infer="" key="total_shipping"></foxy-i18n>&colon;</span> <span>${0} </span> `),this.__renderPrice(u.total_shipping,!0)):m.map((t=>n(A||(A=B` <span>${0}&colon;</span> <span>${0}</span> `),t.shipping_service_description,this.__renderPrice(t.total_shipping,!0)))),0===p.length||0===u.total_tax?n(C||(C=B` <span><foxy-i18n infer="" key="total_tax"></foxy-i18n>&colon;</span> <span>${0}</span> `),this.__renderPrice(u.total_tax,!0)):p.map((t=>n(E||(E=B` <span>${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),null===(d=null===(a=null==u?void 0:u._embedded)||void 0===a?void 0:a["fx:applied_gift_card_codes"])||void 0===d?void 0:d.map((t=>{var e;return n(L||(L=B` <span>${0}&colon;</span> <span>${0}</span> `),t._embedded["fx:gift_card"].name,this.__renderPrice(null!==(e=t.balance_adjustment)&&void 0!==e?e:0,!0))})),null===(c=null===(l=null==u?void 0:u._embedded)||void 0===l?void 0:l["fx:discounts"])||void 0===c?void 0:c.map((t=>n(I||(I=B` <span data-testclass="discount">${0}&colon;</span> <span>${0}</span> `),t.name,this.__renderPrice(t.amount,!0)))),this.__renderStatus(),this.__renderPrice(u.total_order))}get __storeHref(){var t,e,i;return null===(i=null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e._links["fx:store"])||void 0===i?void 0:i.href}get __store(){var t,e;const i=`#${this.__storeLoaderId}`;return null!==(e=null===(t=this.renderRoot.querySelector(i))||void 0===t?void 0:t.data)&&void 0!==e?e:null}__renderPrice(t,e=!1){var i,o,s;const r=(null===(i=this.__store)||void 0===i?void 0:i.use_international_currency_symbol)?"code":"symbol",a=null===(s=null===(o=this.nucleon)||void 0===o?void 0:o.data)||void 0===s?void 0:s.currency_code;return n(R||(R=B` <foxy-i18n class="${0}" infer="" key="price" .options="${0}"> </foxy-i18n> `),e&&0!==t?t>0?"text-success":"text-error":"",{currencyDisplay:r,signDisplay:e?"exceptZero":"auto",amount:`${t} ${a}`})}__renderStatus(){var t,e;const i=(null===(e=null===(t=this.nucleon)||void 0===t?void 0:t.data)||void 0===e?void 0:e.status)||"completed";let o="";return o=["capturing","captured","approved","authorized","pending"].includes(i)?"text-success bg-success-10":i&&"completed"!==i?["problem","pending_fraud_review","rejected","declined"].includes(i)?"text-error-contrast bg-error":"bg-contrast-5 text-body":"text-success-contrast bg-success",n(G||(G=B` <foxy-i18n infer="" class="${0} rounded-s py-xs px-s font-medium text-s leading-xs" key="status_${0}"></foxy-i18n> `),o,i)}});let Z,M,T=t=>t;const W=c(u(t,"transaction"));class q extends W{constructor(){super(...arguments),this.hostedPaymentGatewaysHelper=null,this.paymentGatewaysHelper=null,this.getSubscriptionPageHref=null,this.getCustomerPageHref=null}static get properties(){return i(i({},super.properties),{},{hostedPaymentGatewaysHelper:{attribute:"hosted-payment-gateways-helper"},paymentGatewaysHelper:{attribute:"payment-gateways-helper"},getSubscriptionPageHref:{attribute:!1},getCustomerPageHref:{attribute:!1}})}get readonlySelector(){var t,e,i;const s=Boolean(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links["fx:void"])&&void 0!==e?e:null===(i=this.data)||void 0===i?void 0:i._links["fx:refund"]);return new o(s?`${super.readonlySelector} billing-addresses`:`${super.readonlySelector} billing-addresses items attributes custom-fields`)}get hiddenSelector(){var t,e;const i=["billing-addresses:dialog:delete billing-addresses:dialog:timestamps"],s=null===(t=this.data)||void 0===t?void 0:t.type;return(null===(e=this.data)||void 0===e?void 0:e._links["fx:subscription"])||i.push("subscription"),"subscription_modification"===s&&i.push("actions"),"updateinfo"===s&&i.push("not=customer,subscription,payments,custom-fields,attributes"),"subscription_cancellation"===s&&i.push("not=customer,subscription,custom-fields,attributes"),new o(`${super.hiddenSelector} ${i.join(" ")}`.trim())}renderBody(){var t,e,i,o,s,a,d,l,c,u,p,m,f;let h,_,y="subtitle";const v=this.hiddenSelector,x=null===(t=this.data)||void 0===t?void 0:t.source,b=null===(e=this.data)||void 0===e?void 0:e.type;if("updateinfo"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_payment_method":"mit_uoe"===x?"subtitle_admin_changed_payment_method_with_uoe":"mit_api"===x?"subtitle_integration_changed_payment_method":"subtitle_admin_changed_payment_method":"subscription_modification"===b?y=!x||(null==x?void 0:x.startsWith("cit_"))?"subtitle_customer_changed_subscription":"mit_uoe"===x?"subtitle_admin_changed_subscription_with_uoe":"mit_api"===x?"subtitle_integration_changed_subscription":"subtitle_admin_changed_subscription":"subscription_renewal"===b?"mit_recurring"===x?y="subtitle_subscription_renewal_attempt":"mit_recurring_reattempt_automated"===x?y="subtitle_subscription_renewal_automated_reattempt":"mit_recurring_reattempt_manual"===x&&(y="subtitle_subscription_renewal_manual_reattempt"):"subscription_cancellation"===b?"cit_recurring_cancellation"===x?y="subtitle_customer_canceled_subscription":"mit_recurring_cancellation"===x&&(y="subtitle_admin_canceled_subscription"):(null===(i=this.data)||void 0===i?void 0:i._links["fx:subscription"])?(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_subscribed":"mit_uoe"===x?y="subtitle_admin_subscribed_with_uoe":"mit_api"===x&&(y="subtitle_integration_subscribed"):(null==x?void 0:x.startsWith("cit_"))?y="subtitle_customer_placed_order":"mit_uoe"===x?y="subtitle_admin_placed_order_with_uoe":"mit_api"===x&&(y="subtitle_integration_placed_order"),this.data)try{const t=new URL(this.data._links["fx:shipments"].href),e=new URL(this.data._links["fx:items"].href);t.searchParams.set("zoom","items:item_category"),e.searchParams.set("zoom","item_options"),h=t.toString(),_=e.toString()}catch(t){}return n(Z||(Z=T` <h2> <div class="flex items-center gap-s leading-xs text-xxl font-medium break-all"> <foxy-i18n infer="header" key="title" .options="${0}"></foxy-i18n> <foxy-copy-to-clipboard infer="header" class="inline-block text-m" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="block leading-xs text-l text-secondary" infer="header" key="${0}" .options="${0}"> </foxy-i18n> <foxy-internal-transaction-actions-control class="mt-xs" infer="actions"> </foxy-internal-transaction-actions-control> </h2> ${0} <foxy-internal-transaction-customer-control infer="customer"> </foxy-internal-transaction-customer-control> <div class="grid gap-s" ?hidden="${0}"> <foxy-internal-async-list-control infer="items" class="min-w-0" first="${0}" limit="10" item="foxy-item-card" form="foxy-item-form" alert .related="${0}"> </foxy-internal-async-list-control> <foxy-internal-transaction-summary-control infer="summary" class="min-w-0"> </foxy-internal-transaction-summary-control> </div> <foxy-internal-async-list-control infer="billing-addresses" first="${0}" item="foxy-billing-address-card" form="foxy-address-form" hide-create-button hide-delete-button alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="payments" first="${0}" item="foxy-payment-card" .itemProps="${0}"> </foxy-internal-async-list-control> <div class="grid gap-m sm-grid-cols-2" ?hidden="${0}"> <foxy-internal-async-list-control infer="custom-fields" class="min-w-0" first="${0}" limit="5" form="foxy-custom-field-form" item="foxy-custom-field-card" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" limit="5" form="foxy-attribute-form" item="foxy-attribute-card" alert> </foxy-internal-async-list-control> </div> <foxy-internal-async-list-control infer="shipments" first="${0}" item="foxy-shipment-card"> </foxy-internal-async-list-control> `),this.data,null===(o=this.data)||void 0===o?void 0:o.display_id,y,{transaction_date:null===(s=this.data)||void 0===s?void 0:s.transaction_date,ip_country:null===(a=this.data)||void 0===a?void 0:a.ip_country},["problem","pending_fraud_review","rejected","declined"].includes(null!==(l=null===(d=this.data)||void 0===d?void 0:d.status)&&void 0!==l?l:"")?n(M||(M=T` <p class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n infer="header" key="alert_status_${0}"></foxy-i18n> </p> `),null===(c=this.data)||void 0===c?void 0:c.status):"",v.matches("items",!0)&&v.matches("summary",!0),r(_),[this.href],r(null===(u=this.data)||void 0===u?void 0:u._links["fx:billing_addresses"].href),r(null===(p=this.data)||void 0===p?void 0:p._links["fx:payments"].href),{"hosted-payment-gateways-helper":this.hostedPaymentGatewaysHelper,"payment-gateways-helper":this.paymentGatewaysHelper},v.matches("custom-fields",!0)&&v.matches("attributes",!0),r(null===(m=this.data)||void 0===m?void 0:m._links["fx:custom_fields"].href),r(null===(f=this.data)||void 0===f?void 0:f._links["fx:attributes"].href),r(h))}}customElements.define("foxy-transaction",q);export{q as Transaction};
@@ -1,4 +1,4 @@
1
- import"./shared-1d257548.js";import"./shared-7e201abd.js";import"./foxy-spinner.js";import"./shared-683145e5.js";import{T as t}from"./shared-e966f1ef.js";import{a as s}from"./shared-56addb06.js";import"./shared-48b76c74.js";import"./shared-11014aad.js";import"./shared-dc73b9a5.js";import"./shared-8def6325.js";import"./shared-343d1fd7.js";import"./shared-6af480b8.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-4e709717.js";let e,a,n,o,r,i,l=t=>t;class d extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[d.priceColumn,d.summaryColumn,d.statusColumn,d.idColumn,d.dateColumn,d.receiptColumn]}}d.priceColumn={cell:t=>t.html(e||(e=l`
1
+ import"./shared-da2e66a4.js";import"./shared-6b68b3b6.js";import"./foxy-spinner.js";import"./shared-6586ffd5.js";import{T as t}from"./shared-cdf873d4.js";import{a as s}from"./shared-7ff78b4a.js";import"./shared-0a9d860d.js";import"./shared-b3db7611.js";import"./shared-dc73b9a5.js";import"./shared-3cabd589.js";import"./shared-343d1fd7.js";import"./shared-2b5a3c80.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-4e709717.js";let e,a,n,o,r,i,l=t=>t;class d extends(s(t,"transactions-table")){constructor(){super(...arguments),this.columns=[d.priceColumn,d.summaryColumn,d.statusColumn,d.idColumn,d.dateColumn,d.receiptColumn]}}d.priceColumn={cell:t=>t.html(e||(e=l`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n totals"
4
4
  class="text-m font-medium font-tnum"
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-683145e5.js";import{a as r}from"./shared-56addb06.js";import{T as s}from"./shared-b30f9b10.js";import{h as e}from"./shared-dc73b9a5.js";import"./shared-7e201abd.js";import"./shared-48b76c74.js";import"./shared-1d257548.js";import"./shared-11014aad.js";import"./shared-8def6325.js";import"./shared-343d1fd7.js";import"./shared-6af480b8.js";import"./shared-9803aa7c.js";import"./shared-e48fbf50.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-4e709717.js";let a,d,t=r=>r;const o=r(s,"user-card");class i extends o{renderBody(){return super.renderBody({title:r=>{const s=[r.first_name.trim(),r.last_name.trim()];return e(a||(a=t`${0}`),s.filter((r=>!!r)).join(" ")||this.t("no_name"))},subtitle:r=>e(d||(d=t`${0}`),r.email)})}}customElements.define("foxy-user-card",i);export{i as UserCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-6586ffd5.js";import{a as r}from"./shared-7ff78b4a.js";import{T as s}from"./shared-4affec66.js";import{h as e}from"./shared-dc73b9a5.js";import"./shared-6b68b3b6.js";import"./shared-0a9d860d.js";import"./shared-da2e66a4.js";import"./shared-b3db7611.js";import"./shared-3cabd589.js";import"./shared-343d1fd7.js";import"./shared-2b5a3c80.js";import"./shared-9803aa7c.js";import"./shared-8b521111.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-4e709717.js";let a,d,t=r=>r;const o=r(s,"user-card");class i extends o{renderBody(){return super.renderBody({title:r=>{const s=[r.first_name.trim(),r.last_name.trim()];return e(a||(a=t`${0}`),s.filter((r=>!!r)).join(" ")||this.t("no_name"))},subtitle:r=>e(d||(d=t`${0}`),r.email)})}}customElements.define("foxy-user-card",i);export{i as UserCard};
@@ -1 +1 @@
1
- import"./shared-5f09205d.js";import"./shared-e35297c9.js";import"./shared-61f67b16.js";import{I as e}from"./shared-c5f57aa8.js";import{v as r}from"./shared-b738ee96.js";import{a as t}from"./shared-56addb06.js";import{B as o}from"./shared-11014aad.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-bc95d87e.js";import"./shared-4877ed05.js";import"./shared-48b76c74.js";import"./shared-61ade33e.js";import"./shared-039de1fd.js";import"./shared-7e201abd.js";import"./shared-befe135a.js";import"./shared-51c4a6dd.js";import"./shared-683145e5.js";import"./shared-343d1fd7.js";import"./shared-8def6325.js";import"./shared-6af480b8.js";import"./shared-9803aa7c.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-845f8bf1.js";import"./shared-205721a3.js";import"./shared-6e977271.js";import"./shared-a0cbfb2f.js";import"./shared-931db653.js";import"./shared-80eb1fee.js";import"./shared-5dbb9630.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d257548.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let n,a=e=>e;const i=t(e,"user-form");class d extends i{constructor(){super(...arguments),this.templates={},this.__roleGetValue=()=>{const e=[];return this.form.is_merchant&&e.push("merchant"),this.form.is_programmer&&e.push("backend_developer"),this.form.is_front_end_developer&&e.push("frontend_developer"),this.form.is_designer&&e.push("designer"),e},this.__roleSetValue=e=>{this.edit({is_merchant:e.includes("merchant"),is_programmer:e.includes("backend_developer"),is_front_end_developer:e.includes("frontend_developer"),is_designer:e.includes("designer")})},this.__roleOptions=[{label:"option_merchant",value:"merchant"},{label:"option_backend_developer",value:"backend_developer"},{label:"option_frontend_developer",value:"frontend_developer"},{label:"option_designer",value:"designer"}]}static get v8n(){return[({first_name:e})=>e&&e.length>0||"first-name:v8n_required",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>e&&e.length>0||"last-name:v8n_required",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||r(e)||"email:v8n_invalid_email",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("affiliate-id"),new o(e.join(" ").trim())}renderBody(){return s(n||(n=a` <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="email"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-integer-control infer="affiliate-id"></foxy-internal-integer-control> <foxy-internal-checkbox-group-control infer="role" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.__roleGetValue,this.__roleSetValue,this.__roleOptions,super.renderBody())}}customElements.define("foxy-user-form",d);export{d as UserForm};
1
+ import"./shared-b9ea6d85.js";import"./shared-f0fcd613.js";import"./shared-be0fca15.js";import{I as e}from"./shared-8a247f48.js";import{v as r}from"./shared-b738ee96.js";import{a as t}from"./shared-7ff78b4a.js";import{B as o}from"./shared-b3db7611.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-ea5fa631.js";import"./shared-4c611015.js";import"./shared-0a9d860d.js";import"./shared-61ade33e.js";import"./shared-91c88f14.js";import"./shared-6b68b3b6.js";import"./shared-75d13e1b.js";import"./shared-51c4a6dd.js";import"./shared-6586ffd5.js";import"./shared-343d1fd7.js";import"./shared-3cabd589.js";import"./shared-2b5a3c80.js";import"./shared-9803aa7c.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-a24b2aa7.js";import"./shared-684cd55a.js";import"./shared-612ea9ed.js";import"./shared-ad11b006.js";import"./shared-25198d9a.js";import"./shared-03673673.js";import"./shared-6cd4e618.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-da2e66a4.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,n=e=>e;const i=t(e,"user-form");class d extends i{constructor(){super(...arguments),this.templates={},this.__roleGetValue=()=>{const e=[];return this.form.is_merchant&&e.push("merchant"),this.form.is_programmer&&e.push("backend_developer"),this.form.is_front_end_developer&&e.push("frontend_developer"),this.form.is_designer&&e.push("designer"),e},this.__roleSetValue=e=>{this.edit({is_merchant:e.includes("merchant"),is_programmer:e.includes("backend_developer"),is_front_end_developer:e.includes("frontend_developer"),is_designer:e.includes("designer")})},this.__roleOptions=[{label:"option_merchant",value:"merchant"},{label:"option_backend_developer",value:"backend_developer"},{label:"option_frontend_developer",value:"frontend_developer"},{label:"option_designer",value:"designer"}]}static get v8n(){return[({first_name:e})=>e&&e.length>0||"first-name:v8n_required",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>e&&e.length>0||"last-name:v8n_required",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||r(e)||"email:v8n_invalid_email",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.unshift("affiliate-id"),new o(e.join(" ").trim())}renderBody(){return s(a||(a=n` <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="email"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-integer-control infer="affiliate-id"></foxy-internal-integer-control> <foxy-internal-checkbox-group-control infer="role" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.__roleGetValue,this.__roleSetValue,this.__roleOptions,super.renderBody())}}customElements.define("foxy-user-form",d);export{d as UserForm};
@@ -1 +1 @@
1
- import"./shared-931db653.js";import"./foxy-form-dialog.js";import"./foxy-user-form.js";import"./foxy-spinner.js";import"./shared-683145e5.js";import{s as e,h as s}from"./shared-dc73b9a5.js";import{T as a}from"./shared-e966f1ef.js";import{a as r}from"./shared-56addb06.js";import"./shared-4877ed05.js";import"./shared-48b76c74.js";import"./shared-61ade33e.js";import"./shared-80eb1fee.js";import"./shared-11014aad.js";import"./shared-5dbb9630.js";import"./shared-e07b24ca.js";import"./shared-343d1fd7.js";import"./shared-6af480b8.js";import"./shared-9803aa7c.js";import"./shared-8def6325.js";import"./shared-4e709717.js";import"./shared-3ab0306f.js";import"./shared-99940888.js";import"./shared-5f09205d.js";import"./shared-bc95d87e.js";import"./shared-039de1fd.js";import"./shared-7e201abd.js";import"./shared-befe135a.js";import"./shared-51c4a6dd.js";import"./shared-77fd8dae.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-e35297c9.js";import"./shared-845f8bf1.js";import"./shared-205721a3.js";import"./shared-6e977271.js";import"./shared-a0cbfb2f.js";import"./shared-61f67b16.js";import"./shared-c5f57aa8.js";import"./foxy-copy-to-clipboard.js";import"./shared-1d257548.js";import"./shared-bab2ea2c.js";import"./shared-b738ee96.js";import"./foxy-nucleon-element.js";let t,o,d,l,i=e=>e;const n=[{property:"is_merchant",icon:e(t||(t=i`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:e(o||(o=i`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:e(d||(d=i`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:e(l||(l=i`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let m,C,p,f,h,c,u,j=e=>e;class g extends(r(a,"users-table")){constructor(){super(...arguments),this.columns=[g.nameColumn,g.emailColumn,g.rolesColumn,g.lastUpdatedColumn,g.actionsColumn]}render(){return s(m||(m=j` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}g.nameColumn={cell:e=>s(C||(C=j` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),e.data.first_name,e.data.last_name)},g.emailColumn={hideBelow:"md",cell:e=>s(p||(p=j` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),e.data.email)},g.rolesColumn={cell:e=>s(f||(f=j` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((a=>s(h||(h=j` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[a]?"":"text-disabled",n.find((e=>e.property===a)).icon))))},g.lastUpdatedColumn={hideBelow:"lg",cell:e=>s(c||(c=j` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:e.data.date_modified}),e.lang,e.ns,JSON.stringify({value:e.data.date_modified}),e.lang,e.ns)},g.actionsColumn={cell:e=>s(u||(u=j` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(s=>{const a=s.target,r=a.getRootNode().querySelector("#form");r.href=e.data._links.self.href,r.show(a)}),e.lang,e.ns)},customElements.define("foxy-users-table",g);export{g as UsersTable};
1
+ import"./shared-25198d9a.js";import"./foxy-form-dialog.js";import"./foxy-user-form.js";import"./foxy-spinner.js";import"./shared-6586ffd5.js";import{s as e,h as s}from"./shared-dc73b9a5.js";import{T as a}from"./shared-cdf873d4.js";import{a as r}from"./shared-7ff78b4a.js";import"./shared-4c611015.js";import"./shared-0a9d860d.js";import"./shared-61ade33e.js";import"./shared-03673673.js";import"./shared-b3db7611.js";import"./shared-6cd4e618.js";import"./shared-482b2b86.js";import"./shared-343d1fd7.js";import"./shared-2b5a3c80.js";import"./shared-9803aa7c.js";import"./shared-3cabd589.js";import"./shared-4e709717.js";import"./shared-3ab0306f.js";import"./shared-99940888.js";import"./shared-b9ea6d85.js";import"./shared-ea5fa631.js";import"./shared-91c88f14.js";import"./shared-6b68b3b6.js";import"./shared-75d13e1b.js";import"./shared-51c4a6dd.js";import"./shared-fe45779e.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-f0fcd613.js";import"./shared-a24b2aa7.js";import"./shared-684cd55a.js";import"./shared-612ea9ed.js";import"./shared-ad11b006.js";import"./shared-be0fca15.js";import"./shared-8a247f48.js";import"./foxy-copy-to-clipboard.js";import"./shared-da2e66a4.js";import"./shared-bab2ea2c.js";import"./shared-b738ee96.js";import"./foxy-nucleon-element.js";let t,o,d,l,i=e=>e;const n=[{property:"is_merchant",icon:e(t||(t=i`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:e(o||(o=i`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:e(d||(d=i`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:e(l||(l=i`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let m,C,p,f,h,c,u,j=e=>e;class g extends(r(a,"users-table")){constructor(){super(...arguments),this.columns=[g.nameColumn,g.emailColumn,g.rolesColumn,g.lastUpdatedColumn,g.actionsColumn]}render(){return s(m||(m=j` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}g.nameColumn={cell:e=>s(C||(C=j` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),e.data.first_name,e.data.last_name)},g.emailColumn={hideBelow:"md",cell:e=>s(p||(p=j` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),e.data.email)},g.rolesColumn={cell:e=>s(f||(f=j` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((a=>s(h||(h=j` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[a]?"":"text-disabled",n.find((e=>e.property===a)).icon))))},g.lastUpdatedColumn={hideBelow:"lg",cell:e=>s(c||(c=j` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:e.data.date_modified}),e.lang,e.ns,JSON.stringify({value:e.data.date_modified}),e.lang,e.ns)},g.actionsColumn={cell:e=>s(u||(u=j` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(s=>{const a=s.target,r=a.getRootNode().querySelector("#form");r.href=e.data._links.self.href,r.show(a)}),e.lang,e.ns)},customElements.define("foxy-users-table",g);export{g as UsersTable};
@@ -1 +1 @@
1
- import"./shared-6c4affb9.js";import{I as e}from"./shared-e48fbf50.js";import{h as s}from"./shared-dc73b9a5.js";import{a as r}from"./shared-56addb06.js";import"./foxy-spinner.js";import"./shared-7e201abd.js";import"./shared-48b76c74.js";import"./shared-1d257548.js";import"./shared-683145e5.js";import"./shared-11014aad.js";import"./shared-343d1fd7.js";import"./shared-8def6325.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-4e709717.js";let a,t=e=>e;class d extends(r(e,"webhook-card")){renderBody(){var e,r,d,o;return s(a||(a=t` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-secondary">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0}&ZeroWidthSpace; </p> </div> `),null===(e=this.data)||void 0===e?void 0:e.name,null===(r=this.data)||void 0===r?void 0:r.url,null===(d=this.data)||void 0===d?void 0:d.format,null===(o=this.data)||void 0===o?void 0:o.event_resource)}}customElements.define("foxy-webhook-card",d);export{d as WebhookCard};
1
+ import"./shared-90877857.js";import{I as s}from"./shared-8b521111.js";import{h as r}from"./shared-dc73b9a5.js";import{a as e}from"./shared-7ff78b4a.js";import"./foxy-spinner.js";import"./shared-6b68b3b6.js";import"./shared-0a9d860d.js";import"./shared-da2e66a4.js";import"./shared-6586ffd5.js";import"./shared-b3db7611.js";import"./shared-343d1fd7.js";import"./shared-3cabd589.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-4e709717.js";let t,d=s=>s;class a extends(e(s,"webhook-card")){renderBody(){var s,e,a,o;return r(t||(t=d` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-secondary">${0}&ZeroWidthSpace;</p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0}&ZeroWidthSpace; </p> </div> `),null===(s=this.data)||void 0===s?void 0:s.name,null===(e=this.data)||void 0===e?void 0:e.url,null===(a=this.data)||void 0===a?void 0:a.format,null===(o=this.data)||void 0===o?void 0:o.event_resource)}}customElements.define("foxy-webhook-card",a);export{a as WebhookCard};
@@ -1 +1 @@
1
- import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-683145e5.js";import{a as e}from"./shared-befe135a.js";import"./shared-1d257548.js";import"./shared-7e201abd.js";import{_ as r,B as t}from"./shared-11014aad.js";import{h as o,L as s}from"./shared-dc73b9a5.js";import{I as i}from"./shared-8def6325.js";import{T as n,a}from"./shared-56addb06.js";import{c as l}from"./shared-4e709717.js";import"./shared-1d6beb48.js";import"./shared-61f67b16.js";import{I as d}from"./shared-c5f57aa8.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-spinner.js";import"./shared-48b76c74.js";import"./shared-343d1fd7.js";import"./shared-6af480b8.js";import"./shared-9803aa7c.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./shared-80eb1fee.js";import"./shared-931db653.js";import"./shared-4877ed05.js";import"./shared-61ade33e.js";import"./shared-5dbb9630.js";import"./shared-51c4a6dd.js";import"./shared-039de1fd.js";import"./shared-6e977271.js";import"./shared-205721a3.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-6c4affb9.js";import"./shared-e48fbf50.js";let c,f=e=>e;class m extends(n(i(s))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return o(c||(c=f` <details class="w-full border border-contrast-10 rounded" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-medium text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),l({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t":!0,"rounded-b":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",m);let p,h,u,y,x,g=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const r=this.disabledSelector.matches("card",!0);return o(p||(p=g` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),r,l({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!r}),(r=>{const t=r.currentTarget,o=this.__dialog;o.header="header_update",o.href=e.href,o.show(t)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const r=new URL(this.first);r.searchParams.set("limit",String(this.limit)),e=r.toString()}catch(r){e=this.first}return o(h||(h=g` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?o(u||(u=g` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":o(y||(y=g` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const r=this.__dialog,t=e.currentTarget;r.header="header_create",r.href="",r.show(t)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;const r=this.item;if((null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==r){let e;e=null===r?()=>o(x||(x=g``)):"string"==typeof r?new Function("ctx",`return ctx.html\`<${r} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${r}>\``):r,this.__cachedCardRenderer={item:r,render:e}}return this.__cachedCardRenderer.render}});let b,_,j=e=>e;class v extends(a(d,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get readonlySelector(){const e=[];return this.data&&e.push("event-resource"),new t(`${super.readonlySelector} ${e.join(" ")}`.trim())}renderBody(){return o(b||(b=j` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?o(_||(_=j` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",v);export{v as WebhookForm};
1
+ import"./foxy-collection-page.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-6586ffd5.js";import{a as e}from"./shared-75d13e1b.js";import"./shared-da2e66a4.js";import"./shared-6b68b3b6.js";import{_ as r,B as t}from"./shared-b3db7611.js";import{h as o,L as s}from"./shared-dc73b9a5.js";import{I as i}from"./shared-3cabd589.js";import{T as n,a}from"./shared-7ff78b4a.js";import{c as l}from"./shared-4e709717.js";import"./shared-1e7639e6.js";import"./shared-be0fca15.js";import{I as d}from"./shared-8a247f48.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-spinner.js";import"./shared-0a9d860d.js";import"./shared-343d1fd7.js";import"./shared-2b5a3c80.js";import"./shared-9803aa7c.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./shared-03673673.js";import"./shared-25198d9a.js";import"./shared-4c611015.js";import"./shared-61ade33e.js";import"./shared-6cd4e618.js";import"./shared-51c4a6dd.js";import"./shared-91c88f14.js";import"./shared-612ea9ed.js";import"./shared-684cd55a.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-90877857.js";import"./shared-8b521111.js";let c,f=e=>e;class m extends(n(i(s))){constructor(){super(...arguments),this.summary=null,this.open=!1}static get properties(){return r(r({},super.properties),{},{summary:{type:String},open:{type:Boolean}})}render(){var e;return o(c||(c=f` <details class="w-full border border-contrast-10 rounded" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center h-m pl-m pr-s"> <div class="flex items-center flex-1"> <foxy-i18n class="flex items-center text-xs tracking-wide uppercase font-medium text-body" infer="" key="${0}"> </foxy-i18n> <slot name="actions"></slot> </div> <iron-icon class="icon-inline text-xl text-body" icon="icons:expand-${0}"> </iron-icon> </div> </summary> <div class="border-t border-contrast-10"> <slot></slot> </div> </details> `),this.open,(e=>{this.open=e.currentTarget.open}),l({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"transition-colors cursor-pointer hover-bg-contrast-5":!0,"rounded-t":!0,"rounded-b":!this.open}),null!==(e=this.summary)&&void 0!==e?e:"",this.open?"less":"more")}}customElements.define("foxy-internal-details",m);let p,h,u,y,x,g=e=>e;customElements.define("foxy-internal-async-details-control",class extends e{constructor(){super(...arguments),this.related=[],this.limit=20,this.first="",this.form="",this.item="",this.open=!1,this.__cachedCardRenderer=null,this.__itemRenderer=e=>{if(!this.form||!e.data)return this.__cardRenderer(e);const r=this.disabledSelector.matches("card",!0);return o(p||(p=g` <button ?disabled="${0}" class="${0}" @click="${0}"> ${0} </button> `),r,l({"focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50":!0,"text-left w-full block transition-colors":!0,"hover-bg-contrast-5":!r}),(r=>{const t=r.currentTarget,o=this.__dialog;o.header="header_update",o.href=e.href,o.show(t)}),this.__cardRenderer(e))}}static get properties(){return r(r({},super.properties),{},{related:{type:Array},first:{type:String},limit:{type:Number},form:{type:String},item:{type:String},open:{type:Boolean}})}renderControl(){let e;try{const r=new URL(this.first);r.searchParams.set("limit",String(this.limit)),e=r.toString()}catch(r){e=this.first}return o(h||(h=g` <foxy-internal-details summary="title" infer="" ?open="${0}" @toggle="${0}"> ${0} <foxy-pagination class="px-m pb-s" first="${0}" infer="pagination"> <foxy-collection-page class="-mx-m block divide-y divide-contrast-10 mb-s" infer="card" .related="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> </foxy-internal-details> `),this.open,(e=>this.open=e.currentTarget.open),this.form?o(u||(u=g` <foxy-form-dialog parent="${0}" infer="dialog" id="form" .related="${0}" .form="${0}"> </foxy-form-dialog> ${0} `),e,this.related,this.form,this.readonly?"":o(y||(y=g` <button class="h-xs w-xs rounded-full text-success flex items-center justify-center text-l focus-outline-none focus-ring-2 focus-ring-primary-50" slot="actions" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline" icon="icons:add"></iron-icon> </button> `),this.disabled,(e=>{e.preventDefault(),e.stopPropagation();const r=this.__dialog,t=e.currentTarget;r.header="header_create",r.href="",r.show(t)}))):"",e,this.related,this.__itemRenderer)}get __dialog(){return this.renderRoot.querySelector("#form")}get __cardRenderer(){var e;const r=this.item;if((null===(e=this.__cachedCardRenderer)||void 0===e?void 0:e.item)!==r){let e;e=null===r?()=>o(x||(x=g``)):"string"==typeof r?new Function("ctx",`return ctx.html\`<${r} related=\${JSON.stringify(ctx.related)} parent=\${ctx.parent} class="p-m" infer href=\${ctx.href}></${r}>\``):r,this.__cachedCardRenderer={item:r,render:e}}return this.__cachedCardRenderer.render}});let b,_,j=e=>e;class v extends(a(d,"webhook-form")){constructor(){super(...arguments),this.__formats=[{value:"json",label:"JSON"},{value:"webflow",label:"Webflow"},{value:"zapier",label:"Zapier"}],this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({version:e})=>!!e||"version:v8n_required",({format:e})=>!!e||"format:v8n_required",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get readonlySelector(){const e=[];return this.data&&e.push("event-resource"),new t(`${super.readonlySelector} ${e.join(" ")}`.trim())}renderBody(){return o(b||(b=j` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="event-resource" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="query"></foxy-internal-text-control> <foxy-internal-text-control infer="url"></foxy-internal-text-control> <foxy-internal-radio-group-control infer="format" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-text-control infer="encryption-key"></foxy-internal-text-control> <foxy-internal-text-control infer="version"></foxy-internal-text-control> ${0} ${0} `),this.__eventResources,this.__formats,this.data?o(_||(_=j` <foxy-internal-async-details-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card"> </foxy-internal-async-details-control> <foxy-internal-async-details-control first="${0}" infer="logs" limit="5" item="foxy-webhook-log-card"> </foxy-internal-async-details-control> `),this.data._links["fx:statuses"].href,this.data._links["fx:logs"].href):"",super.renderBody())}}customElements.define("foxy-webhook-form",v);export{v as WebhookForm};
@@ -1 +1 @@
1
- import"./shared-683145e5.js";import"./shared-6c4affb9.js";import{a as e}from"./shared-56addb06.js";import{I as s}from"./shared-e48fbf50.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-11014aad.js";import"./shared-343d1fd7.js";import"./shared-8def6325.js";import"./foxy-spinner.js";import"./shared-7e201abd.js";import"./shared-48b76c74.js";import"./shared-1d257548.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";import"./shared-4e709717.js";let a,d=e=>e;class o extends(e(s,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:o,response_body:t}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=d` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-medium"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},o,t)}}customElements.define("foxy-webhook-log-card",o);export{o as WebhookLogCard};
1
+ import"./shared-6586ffd5.js";import"./shared-90877857.js";import{a as e}from"./shared-7ff78b4a.js";import{I as s}from"./shared-8b521111.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-b3db7611.js";import"./shared-343d1fd7.js";import"./shared-3cabd589.js";import"./foxy-spinner.js";import"./shared-6b68b3b6.js";import"./shared-0a9d860d.js";import"./shared-da2e66a4.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";import"./shared-4e709717.js";let a,d=e=>e;class o extends(e(s,"webhook-log-card")){renderBody(){var e;const{date_created:s,response_code:o,response_body:t}=null!==(e=this.data)&&void 0!==e?e:{};return r(a||(a=d` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center font-medium"> <foxy-i18n .options="${0}" infer="" key="date"></foxy-i18n> <span class="inline-block text-xs bg-contrast-5 text-secondary rounded p-xs"> ${0}&ZeroWidthSpace; </span> </p> <p class="text-tertiary">${0}&ZeroWidthSpace;</p> </div> `),{value:s},o,t)}}customElements.define("foxy-webhook-log-card",o);export{o as WebhookLogCard};
@@ -1 +1 @@
1
- import"./shared-683145e5.js";import"./shared-6c4affb9.js";import{a as s}from"./shared-56addb06.js";import{I as e}from"./shared-e48fbf50.js";import{h as r}from"./shared-dc73b9a5.js";import{c as a}from"./shared-4e709717.js";import"./shared-11014aad.js";import"./shared-343d1fd7.js";import"./shared-8def6325.js";import"./foxy-spinner.js";import"./shared-7e201abd.js";import"./shared-48b76c74.js";import"./shared-1d257548.js";import"./shared-77fd8dae.js";import"./shared-e07b24ca.js";import"./shared-3ab0306f.js";import"./shared-8a04bea3.js";import"./shared-250e652f.js";let t,d=s=>s;const o=s(e,"webhook-status-card");class i extends o{renderBody(){var s,e;const o=null===(s=this.data)||void 0===s?void 0:s.status;return r(t||(t=d` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},a({"text-error":"failed"===o,"text-tertiary":"pending"===o,"text-success":"successful"===o}),o)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
1
+ import"./shared-6586ffd5.js";import"./shared-90877857.js";import{a as s}from"./shared-7ff78b4a.js";import{I as e}from"./shared-8b521111.js";import{h as r}from"./shared-dc73b9a5.js";import{c as t}from"./shared-4e709717.js";import"./shared-b3db7611.js";import"./shared-343d1fd7.js";import"./shared-3cabd589.js";import"./foxy-spinner.js";import"./shared-6b68b3b6.js";import"./shared-0a9d860d.js";import"./shared-da2e66a4.js";import"./shared-fe45779e.js";import"./shared-482b2b86.js";import"./shared-3ab0306f.js";import"./shared-851a7db5.js";import"./shared-79d35787.js";let a,d=s=>s;const o=s(e,"webhook-status-card");class i extends o{renderBody(){var s,e;const o=null===(s=this.data)||void 0===s?void 0:s.status;return r(a||(a=d` <p class="flex justify-between items-center leading-none"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> </p> `),{value:null===(e=this.data)||void 0===e?void 0:e.date_created},t({"text-error":"failed"===o,"text-tertiary":"pending"===o,"text-success":"successful"===o}),o)}}customElements.define("foxy-webhook-status-card",i);export{i as WebhookStatusCard};
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./shared-11014aad.js";import{E as t,T as n}from"./shared-4877ed05.js";import"./shared-205721a3.js";import"./shared-bb08b5ce.js";import{T as s}from"./shared-6e977271.js";import"./shared-9a5da74d.js";import{h as i,P as r}from"./shared-48b76c74.js";import{L as o}from"./shared-724e9a20.js";import{C as a}from"./shared-61ade33e.js";import{I as l}from"./shared-cc723108.js";import"./shared-0e5ea9cf.js";import{w as A,y as d,x as h}from"./shared-56addb06.js";import{O as m}from"./shared-208e37af.js";import{a as c,F as u}from"./shared-7e201abd.js";import{c as p,L as g,h as v}from"./shared-dc73b9a5.js";import{D as b}from"./shared-5e35c5a5.js";class y extends CustomEvent{constructor(e){super("change",{detail:e})}}class _ extends y{}const f=i`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
1
+ import{_ as e}from"./shared-b3db7611.js";import{E as t,T as n}from"./shared-4c611015.js";import"./shared-684cd55a.js";import"./shared-90cbed56.js";import{T as s}from"./shared-612ea9ed.js";import"./shared-285f8cee.js";import{h as i,P as r}from"./shared-0a9d860d.js";import{L as o}from"./shared-7b2bd917.js";import{C as a}from"./shared-61ade33e.js";import{I as l}from"./shared-2314add3.js";import"./shared-99e354b1.js";import{w as A,y as d,x as h}from"./shared-7ff78b4a.js";import{O as m}from"./shared-540063aa.js";import{a as c,F as u}from"./shared-6b68b3b6.js";import{c as p,L as g,h as v}from"./shared-dc73b9a5.js";import{D as b}from"./shared-18bfe97c.js";class y extends CustomEvent{constructor(e){super("change",{detail:e})}}class _ extends y{}const f=i`<dom-module id="lumo-list-box" theme-for="vaadin-list-box">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-931db653.js";import"./shared-683145e5.js";import{_ as t}from"./shared-11014aad.js";import{h as e}from"./shared-dc73b9a5.js";import{D as s}from"./shared-5dbb9630.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
1
+ import"./shared-25198d9a.js";import"./shared-6586ffd5.js";import{_ as t}from"./shared-b3db7611.js";import{h as e}from"./shared-dc73b9a5.js";import{D as s}from"./shared-6cd4e618.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
@@ -1 +1 @@
1
- import{c as e,aI as t,_ as n}from"./shared-11014aad.js";import{h as r,L as s}from"./shared-dc73b9a5.js";import{A as o}from"./shared-03ccfd62.js";import"./shared-dccfe5e7.js";import{C as i}from"./shared-6af480b8.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-8def6325.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var n=function(e){var t=e.path,n=e.domain,r=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==n?"":";domain="+n,null==r?"":";expires="+r.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,r){return[encodeURIComponent(e),"=",encodeURIComponent(t),n(r)].join("")}})),c=e((function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){s=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(s)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},r=new RegExp("\\s*;\\s*");return e.split(r).forEach((function(e){var r=n(e.split("="),2),s=r[0],o=r[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),h=e((function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,r,o;return t=e,(r=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),n=Object.keys(t).sort();return e<n.length?n[e]:null}},{key:"removeItem",value:function(e,t){var n=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),r=l.formatCookie(e,"",n);this._setCookie(r)}},{key:"setItem",value:function(e,t,n){var r=Object.assign(Object.assign({},this._defaultOptions),n),s=l.formatCookie(e,t,r);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&n(t.prototype,r),o&&n(t,o),e}();t.CookieStorage=r;var s={defineProperty:function(e,t,n){return e.setItem(t.toString(),String(n.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,n){if("string"==typeof t&&t in e)return e[t];var r=e.getItem(t.toString());return null!==r?r:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],n=0;n<e.length;n++){var r=e.key(n);null!==r&&t.push(r)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,n,r){return e.setItem(t.toString(),String(n)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return h.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class f extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),n=super.getItem("fx.customer.start"),r=super.getItem("fx.customer.jwt");if(null===e||null===t||null===n||null===r)return null;const s={session_token:e,date_created:n,expires_in:parseInt(t),jwt:r},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,n){if(e!==o.SESSION)return super.setItem(e,t,n);{const e=JSON.parse(t),n=1e3*e.expires_in,r=new Date(new Date(e.date_created).getTime()+n);super.setItem("fx.customer",e.session_token,{expires:r}),super.setItem("fx.customer.jwt",e.jwt,{expires:r}),super.setItem("fx.customer.start",e.date_created,{expires:r}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:r}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:r})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new f;let g,m=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const n=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:r=>{"foxy://customer-api/session"===n.request.url&&e.requestUpdate(),401===r.status&&e.requestUpdate(),t.respondWith(Promise.resolve(r))}});e.dispatchEvent(n)&&n.respondWith(e.__handleRequest(n.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return r(g||(g=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthSessionAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to sign in"}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to request a password reset"}))}async __handleVirtualAuthSignUpPost(e){const t=await e.clone().json();try{await this.api.signUp(t)}catch(e){if(!(e instanceof o.AuthError))throw e;let t,n;if("UNAUTHORIZED"===e.code)t="Customer registration is disabled for this store.",n=401;else if("UNAVAILABLE"===e.code)t="This email address is already in use by an existing customer of this store.",n=403;else{if("INVALID_FORM"!==e.code)throw e;t="Client verification failed.",n=400}const r=JSON.stringify({total:1,_embedded:{"fx:errors":[{message:t}]}});return new Response(r,{status:n})}return t.password&&await this.api.signIn(t),this.requestUpdate(),this.dispatchEvent(new _.SignUpEvent("signup")),new Response(JSON.stringify({_links:{self:{href:e.url}},message:"Account created"}))}async __handleVirtualAuthSignUpAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to create an account"}))}async __handleRequest(e){const t=e.url,n=e.method;try{if(t.startsWith("foxy://customer-api/session"))return"DELETE"===n?this.__handleVirtualAuthSessionDelete():"POST"===n?this.__handleVirtualAuthSessionPost(e):this.__handleVirtualAuthSessionAny(e);if(t.startsWith("foxy://customer-api/recover"))return"POST"===n?this.__handleVirtualAuthRecoverPost(e):this.__handleVirtualAuthRecoverAny(e);if(t.startsWith("foxy://customer-api/signup"))return"POST"===n?this.__handleVirtualAuthSignUpPost(e):this.__handleVirtualAuthSignUpAny(e);const r=await this.api.fetch(e);return 401===r.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),r}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{},_.SignUpEvent=class extends CustomEvent{};export{_ as C};
1
+ import{c as e,aI as t,_ as n}from"./shared-b3db7611.js";import{h as r,L as s}from"./shared-dc73b9a5.js";import{A as o}from"./shared-186e41cf.js";import"./shared-8258443c.js";import{C as i}from"./shared-2b5a3c80.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-3cabd589.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var n=function(e){var t=e.path,n=e.domain,r=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==n?"":";domain="+n,null==r?"":";expires="+r.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,r){return[encodeURIComponent(e),"=",encodeURIComponent(t),n(r)].join("")}})),c=e((function(e,t){function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){s=!0,o=e}finally{try{r||null==a.return||a.return()}finally{if(s)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},r=new RegExp("\\s*;\\s*");return e.split(r).forEach((function(e){var r=n(e.split("="),2),s=r[0],o=r[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),h=e((function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var r=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,r,o;return t=e,(r=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),n=Object.keys(t).sort();return e<n.length?n[e]:null}},{key:"removeItem",value:function(e,t){var n=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),r=l.formatCookie(e,"",n);this._setCookie(r)}},{key:"setItem",value:function(e,t,n){var r=Object.assign(Object.assign({},this._defaultOptions),n),s=l.formatCookie(e,t,r);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&n(t.prototype,r),o&&n(t,o),e}();t.CookieStorage=r;var s={defineProperty:function(e,t,n){return e.setItem(t.toString(),String(n.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,n){if("string"==typeof t&&t in e)return e[t];var r=e.getItem(t.toString());return null!==r?r:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],n=0;n<e.length;n++){var r=e.key(n);null!==r&&t.push(r)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,n,r){return e.setItem(t.toString(),String(n)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return h.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class f extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),n=super.getItem("fx.customer.start"),r=super.getItem("fx.customer.jwt");if(null===e||null===t||null===n||null===r)return null;const s={session_token:e,date_created:n,expires_in:parseInt(t),jwt:r},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,n){if(e!==o.SESSION)return super.setItem(e,t,n);{const e=JSON.parse(t),n=1e3*e.expires_in,r=new Date(new Date(e.date_created).getTime()+n);super.setItem("fx.customer",e.session_token,{expires:r}),super.setItem("fx.customer.jwt",e.jwt,{expires:r}),super.setItem("fx.customer.start",e.date_created,{expires:r}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:r}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:r})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new f;let g,m=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const n=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:r=>{"foxy://customer-api/session"===n.request.url&&e.requestUpdate(),401===r.status&&e.requestUpdate(),t.respondWith(Promise.resolve(r))}});e.dispatchEvent(n)&&n.respondWith(e.__handleRequest(n.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return r(g||(g=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthSessionAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to sign in"}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to request a password reset"}))}async __handleVirtualAuthSignUpPost(e){const t=await e.clone().json();try{await this.api.signUp(t)}catch(e){if(!(e instanceof o.AuthError))throw e;let t,n;if("UNAUTHORIZED"===e.code)t="Customer registration is disabled for this store.",n=401;else if("UNAVAILABLE"===e.code)t="This email address is already in use by an existing customer of this store.",n=403;else{if("INVALID_FORM"!==e.code)throw e;t="Client verification failed.",n=400}const r=JSON.stringify({total:1,_embedded:{"fx:errors":[{message:t}]}});return new Response(r,{status:n})}return t.password&&await this.api.signIn(t),this.requestUpdate(),this.dispatchEvent(new _.SignUpEvent("signup")),new Response(JSON.stringify({_links:{self:{href:e.url}},message:"Account created"}))}async __handleVirtualAuthSignUpAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to create an account"}))}async __handleRequest(e){const t=e.url,n=e.method;try{if(t.startsWith("foxy://customer-api/session"))return"DELETE"===n?this.__handleVirtualAuthSessionDelete():"POST"===n?this.__handleVirtualAuthSessionPost(e):this.__handleVirtualAuthSessionAny(e);if(t.startsWith("foxy://customer-api/recover"))return"POST"===n?this.__handleVirtualAuthRecoverPost(e):this.__handleVirtualAuthRecoverAny(e);if(t.startsWith("foxy://customer-api/signup"))return"POST"===n?this.__handleVirtualAuthSignUpPost(e):this.__handleVirtualAuthSignUpAny(e);const r=await this.api.fetch(e);return 401===r.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),r}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{},_.SignUpEvent=class extends CustomEvent{};export{_ as C};
@@ -1,4 +1,4 @@
1
- import{E as t,T as e}from"./shared-4877ed05.js";import{h as o,P as r}from"./shared-48b76c74.js";import"./shared-205721a3.js";import{L as a}from"./shared-724e9a20.js";import{I as i}from"./shared-cc723108.js";import{I as s}from"./shared-651c44fa.js";import{a as n}from"./shared-850e2ae1.js";import{a as l}from"./shared-7e201abd.js";const c=o`<dom-module id="lumo-tab" theme-for="vaadin-tab">
1
+ import{E as t,T as e}from"./shared-4c611015.js";import{h as o,P as r}from"./shared-0a9d860d.js";import"./shared-684cd55a.js";import{L as a}from"./shared-7b2bd917.js";import{I as i}from"./shared-2314add3.js";import{I as s}from"./shared-651c44fa.js";import{a as n}from"./shared-28be347b.js";import{a as l}from"./shared-6b68b3b6.js";const c=o`<dom-module id="lumo-tab" theme-for="vaadin-tab">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-56addb06.js";
1
+ import{D as t,r as e,e as n,g as r,f as i,h as s,o,b as a,p as l,j as c,k as d,m as h,c as u,n as p,q as _,s as f,t as m,v as y}from"./shared-7ff78b4a.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{h as t,P as e}from"./shared-48b76c74.js";import{E as i,T as o}from"./shared-4877ed05.js";import"./shared-7e201abd.js";import"./shared-f2a8fb36.js";import{w as s}from"./shared-56addb06.js";import{c as n}from"./shared-dc73b9a5.js";s("vcf-tooltip",n`
1
+ import{h as t,P as e}from"./shared-0a9d860d.js";import{E as i,T as o}from"./shared-4c611015.js";import"./shared-6b68b3b6.js";import"./shared-4c7a8fcc.js";import{w as s}from"./shared-7ff78b4a.js";import{c as n}from"./shared-dc73b9a5.js";s("vcf-tooltip",n`
2
2
  :host {
3
3
  /* Sizing */
4
4
  --lumo-tooltip-size: var(--lumo-size-m);
@@ -1 +1 @@
1
- import{_ as e}from"./shared-11014aad.js";import{y as s}from"./shared-56addb06.js";import{h as t}from"./shared-dc73b9a5.js";let r,a,i,o=e=>e;class d extends s{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return t(r||(r=o` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:s},r)=>t(a||(a=o`${0}${0} ${0}`),0===r?"":t(i||(i=o`&bull;`)),e,s))))}}export{d as M};
1
+ import{_ as e}from"./shared-b3db7611.js";import{y as s}from"./shared-7ff78b4a.js";import{h as t}from"./shared-dc73b9a5.js";let r,a,i,o=e=>e;class p extends s{constructor(){super(...arguments),this.disabled=!1,this.items=[]}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean,reflect:!0},items:{attribute:!1}})}render(){return t(r||(r=o` <p class="font-lumo text-xs leading-s text-secondary"> ${0} </p> `),this.items.map((({name:e,value:s},r)=>t(a||(a=o`${0}${0} ${0}`),0===r?"":t(i||(i=o`&bull;`)),e,s))))}}export{p as M};
@@ -1 +1 @@
1
- import{A as t,aG as e,aH as s}from"./shared-11014aad.js";var n=function(t,e,s,n){return new(s||(s=Promise))((function(i,o){function r(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(r,a)}c((n=n.apply(t,e||[])).next())}))};class i extends t{constructor(t){super(Object.assign(Object.assign({},t),{fetch:(...t)=>this.__fetch(...t)}))}signIn(e){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(e);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(e),method:"POST"});if(!s.ok){const e=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new t.AuthError({code:e})}{const t=yield s.json(),e=Object.assign(Object.assign({},t),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}}))}signUp(e){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(e);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(e)});if(!n.ok){if(400===n.status)throw new t.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new t.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new t.AuthError({code:"UNAVAILABLE"});throw new t.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(e){return n(this,void 0,void 0,(function*(){i.v8n.email.check(e.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(e),method:"POST"})).ok)throw new t.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new t.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(t,e){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(t,e);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const t=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},t.v8n,{signUpParams:e().schema({verification:e().schema({token:e().string(),type:e().passesAnyOf(e().exact("hcaptcha"))}),first_name:e().optional(e().string().maxLength(50)),last_name:e().optional(e().string().maxLength(50)),password:e().string().maxLength(50),email:e().string().maxLength(100)}),credentials:e().schema({email:e().string(),newPassword:e().optional(e().string()),password:e().string()}),email:e().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(t="",e="ms"){var s=null;return(t=t.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(t,e,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(e,10)*n)})),s&&s/r[e]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
1
+ import{A as t,aG as e,aH as s}from"./shared-b3db7611.js";var n=function(t,e,s,n){return new(s||(s=Promise))((function(i,o){function r(t){try{c(n.next(t))}catch(t){o(t)}}function a(t){try{c(n.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof s?e:new s((function(t){t(e)}))).then(r,a)}c((n=n.apply(t,e||[])).next())}))};class i extends t{constructor(t){super(Object.assign(Object.assign({},t),{fetch:(...t)=>this.__fetch(...t)}))}signIn(e){return n(this,void 0,void 0,(function*(){i.v8n.credentials.check(e);const s=yield this.fetch(new URL("./authenticate",this.base).toString(),{body:JSON.stringify(e),method:"POST"});if(!s.ok){const e=401===s.status?"UNAUTHORIZED":"UNKNOWN";throw new t.AuthError({code:e})}{const t=yield s.json(),e=Object.assign(Object.assign({},t),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(e))}}))}signUp(e){return n(this,void 0,void 0,(function*(){i.v8n.signUpParams.check(e);const s=new URL("./sign_up",this.base),n=yield this.fetch(s.toString(),{method:"POST",body:JSON.stringify(e)});if(!n.ok){if(400===n.status)throw new t.AuthError({code:"INVALID_FORM"});if(401===n.status)throw new t.AuthError({code:"UNAUTHORIZED"});if(403===n.status)throw new t.AuthError({code:"UNAVAILABLE"});throw new t.AuthError({code:"UNKNOWN"})}}))}sendPasswordResetEmail(e){return n(this,void 0,void 0,(function*(){i.v8n.email.check(e.email);if(!(yield this.fetch(new URL("./forgot_password",this.base).toString(),{body:JSON.stringify(e),method:"POST"})).ok)throw new t.AuthError({code:"UNKNOWN"})}))}signOut(){return n(this,void 0,void 0,(function*(){if(!(yield this.fetch(new URL("./authenticate",this.base).toString(),{method:"DELETE"})).ok)throw new t.AuthError({code:"UNKNOWN"});this.storage.clear(),this.cache.clear()}))}__fetch(t,e){var o;return n(this,void 0,void 0,(function*(){let n=JSON.parse(null!==(o=this.storage.getItem(i.SESSION))&&void 0!==o?o:"null");const r=new s.Request(t,e);if(null!==n){new Date(n.date_created).getTime()+1e3*n.expires_in<Date.now()?(this.console.info("Session has expired, signing out."),this.storage.clear(),this.cache.clear(),n=null):r.headers.set("Authorization",`Bearer ${n.session_token}`)}r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1"),this.console.trace(`${r.method} ${r.url}`);const a=yield s.fetch(r);if(n&&a.ok){const t=Object.assign(Object.assign({},n),{date_created:(new Date).toISOString()});this.storage.setItem(i.SESSION,JSON.stringify(t))}return a}))}}i.SESSION="session",i.v8n=Object.assign({},t.v8n,{signUpParams:e().schema({verification:e().schema({token:e().string(),type:e().passesAnyOf(e().exact("hcaptcha"))}),first_name:e().optional(e().string().maxLength(50)),last_name:e().optional(e().string().maxLength(50)),password:e().string().maxLength(50),email:e().string().maxLength(100)}),credentials:e().schema({email:e().string(),newPassword:e().optional(e().string()),password:e().string()}),email:e().string()});let o=/(-?(?:\d+\.?\d*|\d*\.?\d+)(?:e[-+]?\d+)?)\s*([a-zµμ]*)/gi;function r(t="",e="ms"){var s=null;return(t=t.replace(/(\d),(\d)/g,"$1$2")).replace(o,(function(t,e,n){(n=r[n]||r[n.toLowerCase().replace(/s$/,"")])&&(s=(s||0)+parseFloat(e,10)*n)})),s&&s/r[e]}r.nanosecond=r.ns=1e-6,r["µs"]=r["μs"]=r.us=r.microsecond=.001,r.millisecond=r.ms=1,r.second=r.sec=r.s=1e3*r.ms,r.minute=r.min=r.m=60*r.s,r.hour=r.hr=r.h=60*r.m,r.day=r.d=24*r.h,r.week=r.wk=r.w=7*r.d,r.month=r.b=30.4375*r.d,r.year=r.yr=r.y=365.25*r.d;export{i as A,r as p};
@@ -0,0 +1 @@
1
+ import{_ as r}from"./shared-b3db7611.js";import{p as s}from"./shared-6586ffd5.js";function t(t){var n;const o=s(t),a=null!==(n={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[o.units])&&void 0!==n?n:o.units;return r(r({},o),{},{units:a})}export{t as p};
@@ -0,0 +1 @@
1
+ import{ap as e,aq as t,ar as a,as as s,at as i,au as n,av as r,aw as o,p as l,ax as d,ay as u,az as c,aA as h,aB as m,aC as v,aD as g,n as p,_ as y,aE as b}from"./shared-b3db7611.js";import"./shared-6b68b3b6.js";import"./shared-4c611015.js";import"./shared-4c7a8fcc.js";import"./shared-a24b2aa7.js";import"./shared-612ea9ed.js";import"./shared-ad11b006.js";import"./shared-739f24fe.js";import{d as f,P as x,A as _,L as w,c as $,h as E}from"./shared-dc73b9a5.js";import"./shared-f4bb452b.js";import"./shared-285f8cee.js";import{p as k}from"./shared-6586ffd5.js";import{a as T,x as S}from"./shared-7ff78b4a.js";import{I as C}from"./shared-3cabd589.js";import{s as V}from"./shared-99940888.js";import{i as A}from"./shared-79d35787.js";var M={raise:e,send:t,sendParent:a,sendUpdate:s,log:i,cancel:n,start:r,stop:o,assign:l,after:d,done:u,respond:c,forwardTo:h,escalate:m,choose:v,pure:g};const j=f((e=>t=>{const{element:a,name:s,strings:i}=t.committer;if(2!==i.length||""!==i[0]||""!==i[1])throw new Error("live directive bindings must not contain any static values");if(t.committer.parts.length>1)throw new Error("live directive must be the only directive for an attribute or property");if(t instanceof x)a[s]!==e&&t.setValue(e);else{if(!(t instanceof _))throw new Error("live directive can only be used on attributes or properties");a.getAttribute(s)!==e&&t.setValue(e)}}));class I extends CustomEvent{constructor(e){super("change",{detail:e})}}class D extends CustomEvent{constructor(e){super("change",{detail:e})}}class U extends D{}let q,F,P=e=>e;class L extends(T(C(w))){constructor(){super(...arguments),this.label="",this.value="",this.disabled=!1,this.readonly=!1,this.errorMessage="",this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{const{count:t,units:a}=k(e);return[t.toString(),a]}},this.__getItems=p((e=>{const t=k(e).count;return[{value:"d",label:this.t("day",{count:t})},{value:"w",label:this.t("week",{count:t})},{value:"m",label:this.t("month",{count:t})},{value:"y",label:this.t("year",{count:t})}]}))}static get properties(){return y(y({},super.properties),{},{checkValidity:{attribute:!1},errorMessage:{type:String,attribute:"error-message"},disabled:{type:Boolean,reflect:!0},readonly:{type:Boolean,reflect:!0},label:{type:String},value:{type:String}})}static get styles(){return $(q||(q=P`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}`))}render(){return E(F||(F=P` <vaadin-custom-field data-testid="field" .i18n="${0}" .label="${0}" .value="${0}" ?disabled="${0}" ?readonly="${0}" .errorMessage="${0}" .checkValidity="${0}" @change="${0}"> <vaadin-integer-field data-testid="value" min="1" max="999" has-controls prevent-invalid-input ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-integer-field> <vaadin-combo-box data-testid="units" item-value-path="value" item-label-path="label" .items="${0}" ?invalid="${0}" ?disabled="${0}" ?readonly="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.__i18n,this.label,j(this.value),this.disabled,this.readonly,this.errorMessage,this.checkValidity,this.__handleChange,!this.checkValidity(),this.disabled,this.readonly,this.__getItems(this.value),!this.checkValidity(),this.disabled,this.readonly)}updated(e){super.updated(e);const t=this.renderRoot.firstElementChild;t.value!==this.value&&(t.value=this.value)}checkValidity(){return!0}__handleChange(e){const t=e.target;this.value=t.value,this.dispatchEvent(new U(this.value))}}const B=b({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(e,t)=>!t.data,isPayloadTruthy:(e,t)=>!!t.data,isValueArray:e=>Array.isArray(e.value),showsIntegerField:e=>"integer"===e.type,showsNumberField:e=>"number"===e.type,showsFrequency:e=>"frequency"===e.type,showsTextarea:e=>"textarea"===e.type,hasMinConstraint:e=>"number"==typeof e.min,hasMaxConstraint:e=>"number"==typeof e.max,hasCustomValue:e=>"string"==typeof e.customValue,hasCustom:e=>e.custom},actions:{setDefaultCustomValue:M.assign({defaultCustomValue:(e,t)=>t.data}),setValue:M.assign({value:(e,t)=>t.data,customValue:(e,t)=>Array.isArray(t.data)?t.data.find((t=>!e.items.includes(t))):e.items.includes(t.data)?null:t.data}),setCustom:M.assign({custom:(e,t)=>t.data}),setItems:M.assign({items:(e,t)=>t.data}),setType:M.assign({type:(e,t)=>t.data}),setMin:M.assign({min:(e,t)=>t.data}),setMax:M.assign({max:(e,t)=>t.data})}});let N,O,Y,R,z,X,G,H,J,K,Q,W,Z,ee,te=e=>e;const ae=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class se extends S{constructor(){super(...arguments),this.getText=e=>e,this.__service=A(B).onChange((()=>this.requestUpdate())).onTransition((({changed:e})=>e&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":L,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,$(Y||(Y=te`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return y(y({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(e){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:e})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(e){this.__service.send("SET_READONLY",{data:e})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(e){this.__service.send("SET_DISABLED",{data:e})}get custom(){return this.__service.state.matches("extension.present")}set custom(e){this.__service.send("SET_CUSTOM",{data:e})}get type(){return this.__service.state.context.type}set type(e){this.__service.send("SET_TYPE",{data:e})}get min(){return this.__service.state.context.min}set min(e){this.__service.send("SET_MIN",{data:e})}get max(){return this.__service.state.context.max}set max(e){this.__service.send("SET_MAX",{data:e})}get value(){return this.__service.state.context.value}set value(e){this.__service.send("SET_VALUE",{data:e})}get items(){return this.__service.state.context.items}set items(e){this.__service.send("SET_ITEMS",{data:e})}render(){const e=this.custom?[...this.items,ae]:this.items,t=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),s=E(R||(R=te` ${0} `),e.map(((e,s,i)=>{var n;const r=this.custom&&s===i.length-1,o=r?a:t?!!(null===(n=this.value)||void 0===n?void 0:n.includes(e)):e===String(this.value),l=this.disabled||!this._isI18nReady,d=V({value:r?ae:e,name:t?e:"choice","data-testid":`item-${e}`,"?disabled":l,"@change":t=>{if(this.readonly)return t.preventDefault();const a=t.target.checked,s=e===ae?this.defaultCustomValue:e,i=this.value;Array.isArray(i)?this.value=e===ae?a?[...i,s]:i.slice(0,i.length-1):a?[s,...i]:i.filter((e=>e!==s)):this.value=a?s:null,this.dispatchEvent(new I(this.value))}}),u=E(z||(z=te` <div> ${0} </div> `),e===ae?this._t("choice.other").toString():E(X||(X=te`<slot name="${0}">${0}</slot>`),`${e}-label`,this.getText(e)));return E(G||(G=te` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),s?"":"hidden",t?function(e,t,a,s,i){const n="transition ease-in-out duration-200",r=`${n} transform ${a?"scale-100":"scale-0"} ${e?"text-contrast-70":"text-tint"}`;return E(O||(O=te` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,l,o,d,u):function(e,t,a,s,i){const n="transition ease-in-out duration-200",r=`${n} ${t||e?"":"shadow-xs"} transform ${a?"scale-100":"scale-0"} ${e?"bg-contrast-70":"bg-tint"}`;return E(N||(N=te` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),t||e?"":"cursor-pointer","border "+(e?"border-dashed border-contrast-30":"border-transparent"),n,e?"":t?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,a,s,t?"text-disabled":e?"text-secondary":"text-body",i)}(this.readonly,l,o,d,u),e===ae&&a?this.__field:"",e!==ae?E(H||(H=te`<slot name="${0}"></slot>`),e):"")})));return E(J||(J=te`<form>${0}</form> `),s)}get __field(){const e=V({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":e=>{e.stopPropagation();const t=e.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(t):this.value=t,this.dispatchEvent(new I(this.value))}});return"frequency"===this.type?E(K||(K=te`<x-frequency-input ...="${0}"></x-frequency-input>`),e):"integer"===this.type?E(Q||(Q=te`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),e):"number"===this.type?E(W||(W=te`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),e):"textarea"===this.type?E(Z||(Z=te`<vaadin-text-area ...="${0}"></vaadin-text-area>`),e):E(ee||(ee=te`<vaadin-text-field ...="${0}"></vaadin-text-field>`),e)}}export{se as C,D,I as a,M as b};
@@ -1,4 +1,4 @@
1
- import{E as e,T as t,D as r}from"./shared-4877ed05.js";import{h as o,G as i,P as s}from"./shared-48b76c74.js";import{C as a}from"./shared-61ade33e.js";import"./shared-039de1fd.js";import{F as l}from"./shared-7e201abd.js";import{I as n}from"./shared-befe135a.js";import"./shared-683145e5.js";import{_ as d}from"./shared-11014aad.js";import{i as h}from"./shared-9803aa7c.js";import{c,h as u}from"./shared-dc73b9a5.js";import{c as p}from"./shared-4e709717.js";import{w as b}from"./shared-56addb06.js";const m=o`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
1
+ import{E as e,T as t,D as r}from"./shared-4c611015.js";import{h as o,G as i,P as s}from"./shared-0a9d860d.js";import{C as a}from"./shared-61ade33e.js";import"./shared-91c88f14.js";import{F as l}from"./shared-6b68b3b6.js";import{I as n}from"./shared-75d13e1b.js";import"./shared-6586ffd5.js";import{_ as d}from"./shared-b3db7611.js";import{i as h}from"./shared-9803aa7c.js";import{c,h as u}from"./shared-dc73b9a5.js";import{c as p}from"./shared-4e709717.js";import{w as b}from"./shared-7ff78b4a.js";const m=o`<dom-module id="lumo-radio-button" theme-for="vaadin-radio-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import{d as e}from"./shared-7e201abd.js";import{u as i}from"./shared-56addb06.js";
1
+ import{d as e}from"./shared-6b68b3b6.js";import{u as i}from"./shared-7ff78b4a.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import{E as t,T as e}from"./shared-4877ed05.js";import{h as o,G as r,P as i,b as a}from"./shared-48b76c74.js";import{C as s}from"./shared-61ade33e.js";const n=o`<dom-module id="lumo-button" theme-for="vaadin-button">
1
+ import{E as t,T as e}from"./shared-4c611015.js";import{h as o,G as r,P as i,b as a}from"./shared-0a9d860d.js";import{C as s}from"./shared-61ade33e.js";const n=o`<dom-module id="lumo-button" theme-for="vaadin-button">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1,4 +1,4 @@
1
- import{T as e,D as t,E as i}from"./shared-4877ed05.js";import{O as s}from"./shared-208e37af.js";import{I as o,a as l}from"./shared-bb08b5ce.js";import{h as n,P as r,D as a,t as h,a as d,p as c,i as u,e as _,y as m,z as p}from"./shared-48b76c74.js";import"./shared-205721a3.js";import{I as f}from"./shared-651c44fa.js";import"./shared-6e977271.js";import{C as g}from"./shared-61ade33e.js";import{t as v,m as y,F as b,f as I,d as x,P as S,O as w,D as P,a as C}from"./shared-7e201abd.js";import{I as V}from"./shared-cc723108.js";
1
+ import{T as e,D as t,E as i}from"./shared-4c611015.js";import{O as s}from"./shared-540063aa.js";import{I as o,a as l}from"./shared-90cbed56.js";import{h as n,P as r,D as a,t as h,a as d,p as c,i as u,e as _,y as m,z as p}from"./shared-0a9d860d.js";import"./shared-684cd55a.js";import{I as f}from"./shared-651c44fa.js";import"./shared-612ea9ed.js";import{C as g}from"./shared-61ade33e.js";import{t as v,m as y,F as b,f as I,d as x,P as S,O as w,D as P,a as C}from"./shared-6b68b3b6.js";import{I as V}from"./shared-2314add3.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1,4 +1,4 @@
1
- import"./shared-56addb06.js";
1
+ import"./shared-7ff78b4a.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.