@foxy.io/elements 1.27.1 → 1.28.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (745) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +5 -5
  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 +2 -2
  34. package/dist/cdn/foxy-customer.js +5 -5
  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 +5 -5
  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 -1
  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 +2 -2
  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-embed.js +1 -1
  73. package/dist/cdn/foxy-payment-card.js +1 -1
  74. package/dist/cdn/foxy-payment-method-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  81. package/dist/cdn/foxy-payments-api.js +1 -1
  82. package/dist/cdn/foxy-query-builder.js +1 -1
  83. package/dist/cdn/foxy-report-form.js +2 -2
  84. package/dist/cdn/foxy-reports-table.js +5 -5
  85. package/dist/cdn/foxy-shipment-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-container-card.js +1 -0
  87. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -0
  88. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-service-card.js +1 -0
  90. package/dist/cdn/foxy-sign-in-form.js +1 -1
  91. package/dist/cdn/foxy-spinner.js +2 -2
  92. package/dist/cdn/foxy-store-card.js +1 -1
  93. package/dist/cdn/foxy-store-form.js +1 -1
  94. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  95. package/dist/cdn/foxy-subscription-card.js +1 -1
  96. package/dist/cdn/foxy-subscription-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  98. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  99. package/dist/cdn/foxy-table.js +1 -1
  100. package/dist/cdn/foxy-tax-card.js +1 -1
  101. package/dist/cdn/foxy-tax-form.js +1 -1
  102. package/dist/cdn/foxy-template-config-form.js +1 -1
  103. package/dist/cdn/foxy-template-form.js +1 -1
  104. package/dist/cdn/foxy-template-set-card.js +1 -1
  105. package/dist/cdn/foxy-template-set-form.js +1 -1
  106. package/dist/cdn/foxy-transaction-card.js +1 -1
  107. package/dist/cdn/foxy-transaction.js +1 -1
  108. package/dist/cdn/foxy-transactions-table.js +7 -7
  109. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  110. package/dist/cdn/foxy-user-card.js +1 -1
  111. package/dist/cdn/foxy-user-form.js +1 -1
  112. package/dist/cdn/foxy-users-table.js +1 -1
  113. package/dist/cdn/foxy-webhook-card.js +1 -1
  114. package/dist/cdn/foxy-webhook-form.js +1 -1
  115. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  116. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  117. package/dist/cdn/{shared-56b8e9ca.js → shared-004fc193.js} +1 -1
  118. package/dist/cdn/{shared-90ddf541.js → shared-042969fe.js} +1 -1
  119. package/dist/cdn/{shared-b6c1aa47.js → shared-059680a0.js} +1 -1
  120. package/dist/cdn/shared-08d018f5.js +1 -0
  121. package/dist/cdn/{shared-eef50424.js → shared-0da6e42c.js} +1 -1
  122. package/dist/cdn/{shared-eeb2d7ab.js → shared-0e038fda.js} +1 -1
  123. package/dist/cdn/{shared-d67d56c2.js → shared-0ed41a9e.js} +1 -1
  124. package/dist/cdn/{shared-5f65bdab.js → shared-1708eb3c.js} +1 -1
  125. package/dist/cdn/{shared-9f5c636a.js → shared-1d8edd03.js} +1 -1
  126. package/dist/cdn/{shared-739a8fe4.js → shared-23061fb2.js} +1 -1
  127. package/dist/cdn/{shared-98f85be1.js → shared-24586cfb.js} +1 -1
  128. package/dist/cdn/{shared-6c97a6b0.js → shared-25c57c74.js} +1 -1
  129. package/dist/cdn/{shared-a827bcc6.js → shared-2782886e.js} +1 -1
  130. package/dist/cdn/shared-293f9c07.js +1 -0
  131. package/dist/cdn/{shared-d2a79509.js → shared-2e6bda84.js} +1 -1
  132. package/dist/cdn/{shared-a006b7a9.js → shared-32cac4bd.js} +3 -3
  133. package/dist/cdn/shared-365c8437.js +1 -0
  134. package/dist/cdn/{shared-879fcb1f.js → shared-414a0c9b.js} +1 -1
  135. package/dist/cdn/{shared-8acb820f.js → shared-41d57c3b.js} +1 -1
  136. package/dist/cdn/{shared-213b9416.js → shared-421708b0.js} +1 -1
  137. package/dist/cdn/{shared-9e014b51.js → shared-44b101d0.js} +1 -1
  138. package/dist/cdn/{shared-c9f4fe97.js → shared-4761504a.js} +1 -1
  139. package/dist/cdn/{shared-9bd371c7.js → shared-484b31eb.js} +1 -1
  140. package/dist/cdn/{shared-0aa511d0.js → shared-49d678ad.js} +1 -1
  141. package/dist/cdn/{shared-891b33ad.js → shared-4b209827.js} +1 -1
  142. package/dist/cdn/{shared-8d7e2e2c.js → shared-57266e2a.js} +1 -1
  143. package/dist/cdn/shared-57e4bcb0.js +1 -0
  144. package/dist/cdn/{shared-82423f8b.js → shared-58095d4b.js} +1 -1
  145. package/dist/cdn/{shared-0e9ad70e.js → shared-59d8b64e.js} +1 -1
  146. package/dist/cdn/{shared-d7bb413b.js → shared-5c1e607b.js} +1 -1
  147. package/dist/cdn/shared-5cb6aca6.js +1 -0
  148. package/dist/cdn/{shared-1602c9a4.js → shared-66084f2e.js} +1 -1
  149. package/dist/cdn/shared-6740ee7a.js +1 -0
  150. package/dist/cdn/{shared-ecb7a183.js → shared-6d1556a0.js} +1 -1
  151. package/dist/cdn/{shared-41e9ef02.js → shared-7004839c.js} +2 -2
  152. package/dist/cdn/{shared-3c58ddf1.js → shared-701157ac.js} +2 -2
  153. package/dist/cdn/{shared-5e9395ec.js → shared-7063f5af.js} +1 -1
  154. package/dist/cdn/{shared-849413bb.js → shared-789e3185.js} +1 -1
  155. package/dist/cdn/shared-7af96c0a.js +1 -0
  156. package/dist/cdn/{shared-fca5f5e3.js → shared-80b9cb48.js} +1 -1
  157. package/dist/cdn/{shared-96077b62.js → shared-80c6f97e.js} +1 -1
  158. package/dist/cdn/{shared-28e988c6.js → shared-824d0804.js} +1 -1
  159. package/dist/cdn/{shared-4a1ca2d3.js → shared-850e441a.js} +1 -1
  160. package/dist/cdn/shared-8f0251e9.js +1 -0
  161. package/dist/cdn/{shared-b91650ba.js → shared-9ee719e6.js} +1 -1
  162. package/dist/cdn/{shared-ec0fb97f.js → shared-9f44b81f.js} +1 -1
  163. package/dist/cdn/{shared-7a5adb55.js → shared-a05fe56c.js} +1 -1
  164. package/dist/cdn/{shared-b7cda8ba.js → shared-a08d509a.js} +1 -1
  165. package/dist/cdn/{shared-f635c052.js → shared-a28c9952.js} +1 -1
  166. package/dist/cdn/{shared-75f3a59e.js → shared-a4e0a78b.js} +1 -1
  167. package/dist/cdn/{shared-2808f43a.js → shared-a5c48bf4.js} +1 -1
  168. package/dist/cdn/{shared-e075ca81.js → shared-a79dbeb9.js} +1 -1
  169. package/dist/cdn/{shared-a30fcaf6.js → shared-aac73acd.js} +1 -1
  170. package/dist/cdn/{shared-43928f5a.js → shared-add044d3.js} +1 -1
  171. package/dist/cdn/{shared-51c3bc09.js → shared-ae200b9f.js} +1 -1
  172. package/dist/cdn/{shared-3521ade9.js → shared-ae462b8e.js} +1 -1
  173. package/dist/cdn/shared-b3681c71.js +1 -0
  174. package/dist/cdn/{shared-0ac853c6.js → shared-b42c6fe3.js} +1 -1
  175. package/dist/cdn/{shared-71782a9e.js → shared-b44cf5a9.js} +1 -1
  176. package/dist/cdn/{shared-e5f6ca48.js → shared-b6376c8f.js} +1 -1
  177. package/dist/cdn/{shared-617dbd76.js → shared-ba5c9c0b.js} +1 -1
  178. package/dist/cdn/{shared-ec636065.js → shared-baaa1e47.js} +1 -1
  179. package/dist/cdn/{shared-68aebcc4.js → shared-bb35ee61.js} +1 -1
  180. package/dist/cdn/{shared-8b4ba63a.js → shared-bba917bf.js} +1 -1
  181. package/dist/cdn/{shared-15a947f3.js → shared-c0e56e97.js} +1 -1
  182. package/dist/cdn/{shared-8e75c372.js → shared-c2128988.js} +1 -1
  183. package/dist/cdn/{shared-c73f6e8a.js → shared-c4f5b03b.js} +1 -1
  184. package/dist/cdn/shared-cbeb8587.js +1 -0
  185. package/dist/cdn/{shared-741bfa42.js → shared-cf9c48f9.js} +1 -1
  186. package/dist/cdn/{shared-221d3788.js → shared-cfdd6c21.js} +1 -1
  187. package/dist/cdn/{shared-f090c63a.js → shared-d82f9e35.js} +1 -1
  188. package/dist/cdn/{shared-5c4a29b9.js → shared-db108ddb.js} +1 -1
  189. package/dist/cdn/{shared-85707e42.js → shared-e4cc1191.js} +1 -1
  190. package/dist/cdn/{shared-0f4947e8.js → shared-ec696e1b.js} +1 -1
  191. package/dist/cdn/{shared-12e531b8.js → shared-ecec6a10.js} +1 -1
  192. package/dist/cdn/shared-f2335b72.js +29 -0
  193. package/dist/cdn/{shared-550608b8.js → shared-f300193c.js} +1 -1
  194. package/dist/cdn/{shared-85f44e3e.js → shared-f91d5706.js} +1 -1
  195. package/dist/cdn/{shared-21fec810.js → shared-fad783a0.js} +1 -1
  196. package/dist/cdn/{shared-2e2d45c4.js → shared-fbfa45bb.js} +1 -1
  197. package/dist/cdn/{shared-a6e383ac.js → shared-fd410dee.js} +2 -2
  198. package/dist/cdn/{shared-bd99107c.js → shared-fee535ca.js} +1 -1
  199. package/dist/cdn/translations/address-form/en.json +36 -2
  200. package/dist/cdn/translations/api-browser/en.json +9 -3
  201. package/dist/cdn/translations/applied-coupon-code-form/en.json +25 -2
  202. package/dist/cdn/translations/attribute-form/en.json +27 -2
  203. package/dist/cdn/translations/cart-form/en.json +249 -10
  204. package/dist/cdn/translations/client-form/en.json +25 -2
  205. package/dist/cdn/translations/coupon-code-form/en.json +25 -6
  206. package/dist/cdn/translations/coupon-codes-form/en.json +8 -2
  207. package/dist/cdn/translations/coupon-form/en.json +87 -13
  208. package/dist/cdn/translations/custom-field-form/en.json +25 -2
  209. package/dist/cdn/translations/customer/en.json +121 -15
  210. package/dist/cdn/translations/customer-form/en.json +27 -2
  211. package/dist/cdn/translations/customer-portal/de.json +47 -9
  212. package/dist/cdn/translations/customer-portal/en.json +47 -9
  213. package/dist/cdn/translations/customer-portal/es.json +47 -9
  214. package/dist/cdn/translations/customer-portal/fr.json +47 -9
  215. package/dist/cdn/translations/customer-portal/nl.json +47 -9
  216. package/dist/cdn/translations/customer-portal/pl.json +47 -9
  217. package/dist/cdn/translations/customer-portal/sv.json +47 -9
  218. package/dist/cdn/translations/customer-portal/zh-hk.json +47 -9
  219. package/dist/cdn/translations/customer-portal-settings-form/en.json +33 -4
  220. package/dist/cdn/translations/downloadable-form/en.json +25 -2
  221. package/dist/cdn/translations/email-template-form/en.json +2 -2
  222. package/dist/cdn/translations/filter-attribute-form/en.json +2 -2
  223. package/dist/cdn/translations/generate-codes-form/en.json +8 -2
  224. package/dist/cdn/translations/gift-card-code-form/en.json +25 -2
  225. package/dist/cdn/translations/gift-card-codes-form/en.json +8 -2
  226. package/dist/cdn/translations/gift-card-form/en.json +86 -8
  227. package/dist/cdn/translations/integration-form/en.json +17 -3
  228. package/dist/cdn/translations/item-category-form/en.json +32 -7
  229. package/dist/cdn/translations/item-form/en.json +111 -7
  230. package/dist/cdn/translations/item-option-form/en.json +25 -2
  231. package/dist/cdn/translations/native-integration-form/en.json +32 -2
  232. package/dist/cdn/translations/passkey-form/en.json +25 -7
  233. package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +21 -3
  234. package/dist/cdn/translations/payments-api-payment-method-form/en.json +25 -3
  235. package/dist/cdn/translations/payments-api-payment-preset-form/en.json +80 -3
  236. package/dist/cdn/translations/report-form/en.json +2 -2
  237. package/dist/cdn/translations/shipping-container-card/en.json +8 -0
  238. package/dist/cdn/translations/shipping-drop-type-card/en.json +8 -0
  239. package/dist/cdn/translations/shipping-method-card/en.json +1 -0
  240. package/dist/cdn/translations/shipping-service-card/en.json +9 -0
  241. package/dist/cdn/translations/store-form/en.json +26 -3
  242. package/dist/cdn/translations/store-shipping-method-form/en.json +149 -18
  243. package/dist/cdn/translations/subscription-form/en.json +26 -8
  244. package/dist/cdn/translations/subscription-settings-form/en.json +19 -2
  245. package/dist/cdn/translations/tax-form/en.json +2 -2
  246. package/dist/cdn/translations/template-config-form/en.json +2 -2
  247. package/dist/cdn/translations/template-form/en.json +2 -2
  248. package/dist/cdn/translations/template-set-form/en.json +60 -3
  249. package/dist/cdn/translations/transaction/en.json +217 -18
  250. package/dist/cdn/translations/update-payment-method-form/en.json +5 -1
  251. package/dist/cdn/translations/user-form/en.json +26 -2
  252. package/dist/cdn/translations/users-table/en.json +8 -2
  253. package/dist/cdn/translations/webhook-form/en.json +34 -8
  254. package/dist/cdn/translations/webhook-log-card/en.json +2 -2
  255. package/dist/cdn/translations/webhook-status-card/en.json +2 -2
  256. package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js +1 -1
  257. package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js.map +1 -1
  258. package/dist/elements/internal/InternalForm/InternalForm.d.ts +15 -2
  259. package/dist/elements/internal/InternalForm/InternalForm.js +108 -29
  260. package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
  261. package/dist/elements/internal/InternalForm/index.d.ts +2 -1
  262. package/dist/elements/internal/InternalForm/index.js +2 -1
  263. package/dist/elements/internal/InternalForm/index.js.map +1 -1
  264. package/dist/elements/internal/{InternalCreateControl/InternalCreateControl.d.ts → InternalSubmitControl/InternalSubmitControl.d.ts} +3 -10
  265. package/dist/elements/internal/InternalSubmitControl/InternalSubmitControl.js +34 -0
  266. package/dist/elements/internal/InternalSubmitControl/InternalSubmitControl.js.map +1 -0
  267. package/dist/elements/internal/InternalSubmitControl/index.d.ts +5 -0
  268. package/dist/elements/internal/InternalSubmitControl/index.js +7 -0
  269. package/dist/elements/internal/InternalSubmitControl/index.js.map +1 -0
  270. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.d.ts +15 -0
  271. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.js +34 -0
  272. package/dist/elements/internal/InternalUndoControl/InternalUndoControl.js.map +1 -0
  273. package/dist/elements/internal/{InternalCreateControl → InternalUndoControl}/index.d.ts +2 -2
  274. package/dist/elements/internal/InternalUndoControl/index.js +7 -0
  275. package/dist/elements/internal/InternalUndoControl/index.js.map +1 -0
  276. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.d.ts +1 -11
  277. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js +0 -10
  278. package/dist/elements/public/AccessRecoveryForm/AccessRecoveryForm.js.map +1 -1
  279. package/dist/elements/public/AccessRecoveryForm/types.d.ts +0 -10
  280. package/dist/elements/public/AccessRecoveryForm/types.js.map +1 -1
  281. package/dist/elements/public/AddressCard/AddressCard.d.ts +1 -17
  282. package/dist/elements/public/AddressCard/AddressCard.js +0 -16
  283. package/dist/elements/public/AddressCard/AddressCard.js.map +1 -1
  284. package/dist/elements/public/AddressCard/types.d.ts +0 -14
  285. package/dist/elements/public/AddressCard/types.js.map +1 -1
  286. package/dist/elements/public/AddressForm/AddressForm.d.ts +7 -46
  287. package/dist/elements/public/AddressForm/AddressForm.js +51 -53
  288. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  289. package/dist/elements/public/AddressForm/index.d.ts +1 -0
  290. package/dist/elements/public/AddressForm/index.js +1 -0
  291. package/dist/elements/public/AddressForm/index.js.map +1 -1
  292. package/dist/elements/public/AddressForm/types.d.ts +3 -30
  293. package/dist/elements/public/AddressForm/types.js.map +1 -1
  294. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js +2 -2
  295. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/InternalApiBrowserResourceForm.js.map +1 -1
  296. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.d.ts +1 -1
  297. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.js +1 -1
  298. package/dist/elements/public/ApiBrowser/internal/InternalApiBrowserResourceForm/index.js.map +1 -1
  299. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.d.ts +1 -14
  300. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js +2 -13
  301. package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js.map +1 -1
  302. package/dist/elements/public/AppliedCouponCodeForm/types.d.ts +0 -12
  303. package/dist/elements/public/AppliedCouponCodeForm/types.js.map +1 -1
  304. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.d.ts +0 -6
  305. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js +0 -6
  306. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js.map +1 -1
  307. package/dist/elements/public/AttributeCard/AttributeCard.d.ts +1 -7
  308. package/dist/elements/public/AttributeCard/AttributeCard.js +0 -6
  309. package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
  310. package/dist/elements/public/AttributeCard/types.d.ts +1 -9
  311. package/dist/elements/public/AttributeCard/types.js.map +1 -1
  312. package/dist/elements/public/AttributeForm/AttributeForm.d.ts +3 -21
  313. package/dist/elements/public/AttributeForm/AttributeForm.js +8 -21
  314. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  315. package/dist/elements/public/AttributeForm/types.d.ts +0 -16
  316. package/dist/elements/public/AttributeForm/types.js.map +1 -1
  317. package/dist/elements/public/CancellationForm/CancellationForm.d.ts +1 -9
  318. package/dist/elements/public/CancellationForm/CancellationForm.js +0 -8
  319. package/dist/elements/public/CancellationForm/CancellationForm.js.map +1 -1
  320. package/dist/elements/public/CancellationForm/types.d.ts +2 -12
  321. package/dist/elements/public/CancellationForm/types.js.map +1 -1
  322. package/dist/elements/public/CartForm/CartForm.d.ts +1 -93
  323. package/dist/elements/public/CartForm/CartForm.js +3 -93
  324. package/dist/elements/public/CartForm/CartForm.js.map +1 -1
  325. package/dist/elements/public/CartForm/index.d.ts +1 -1
  326. package/dist/elements/public/CartForm/index.js +1 -1
  327. package/dist/elements/public/CartForm/index.js.map +1 -1
  328. package/dist/elements/public/CartForm/types.d.ts +0 -64
  329. package/dist/elements/public/CartForm/types.js.map +1 -1
  330. package/dist/elements/public/ClientForm/ClientForm.d.ts +1 -44
  331. package/dist/elements/public/ClientForm/ClientForm.js +2 -46
  332. package/dist/elements/public/ClientForm/ClientForm.js.map +1 -1
  333. package/dist/elements/public/ClientForm/types.d.ts +0 -32
  334. package/dist/elements/public/ClientForm/types.js.map +1 -1
  335. package/dist/elements/public/CollectionPages/CollectionPages.js +16 -8
  336. package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
  337. package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +2 -0
  338. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +9 -2
  339. package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +1 -1
  340. package/dist/elements/public/CopyToClipboard/index.d.ts +1 -0
  341. package/dist/elements/public/CopyToClipboard/index.js +1 -0
  342. package/dist/elements/public/CopyToClipboard/index.js.map +1 -1
  343. package/dist/elements/public/CouponCard/CouponCard.d.ts +1 -9
  344. package/dist/elements/public/CouponCard/CouponCard.js +0 -11
  345. package/dist/elements/public/CouponCard/CouponCard.js.map +1 -1
  346. package/dist/elements/public/CouponCard/types.d.ts +1 -13
  347. package/dist/elements/public/CouponCard/types.js.map +1 -1
  348. package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +1 -21
  349. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +3 -24
  350. package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
  351. package/dist/elements/public/CouponCodeForm/index.d.ts +0 -1
  352. package/dist/elements/public/CouponCodeForm/index.js +0 -1
  353. package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
  354. package/dist/elements/public/CouponCodeForm/types.d.ts +0 -16
  355. package/dist/elements/public/CouponCodeForm/types.js.map +1 -1
  356. package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +1 -8
  357. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +0 -7
  358. package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -1
  359. package/dist/elements/public/CouponCodesForm/types.d.ts +0 -8
  360. package/dist/elements/public/CouponCodesForm/types.js.map +1 -1
  361. package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +0 -6
  362. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +0 -6
  363. package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +1 -1
  364. package/dist/elements/public/CouponForm/CouponForm.d.ts +1 -64
  365. package/dist/elements/public/CouponForm/CouponForm.js +3 -64
  366. package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
  367. package/dist/elements/public/CustomFieldCard/CustomFieldCard.d.ts +0 -6
  368. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js +0 -6
  369. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js.map +1 -1
  370. package/dist/elements/public/CustomFieldCard/TwoLineCard.d.ts +0 -8
  371. package/dist/elements/public/CustomFieldCard/TwoLineCard.js +0 -1
  372. package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
  373. package/dist/elements/public/CustomFieldCard/index.d.ts +1 -1
  374. package/dist/elements/public/CustomFieldCard/index.js +1 -1
  375. package/dist/elements/public/CustomFieldCard/index.js.map +1 -1
  376. package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +1 -20
  377. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +2 -19
  378. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  379. package/dist/elements/public/CustomFieldForm/types.d.ts +0 -16
  380. package/dist/elements/public/CustomFieldForm/types.js.map +1 -1
  381. package/dist/elements/public/Customer/Customer.d.ts +1 -38
  382. package/dist/elements/public/Customer/Customer.js +6 -37
  383. package/dist/elements/public/Customer/Customer.js.map +1 -1
  384. package/dist/elements/public/Customer/types.d.ts +3 -177
  385. package/dist/elements/public/Customer/types.js.map +1 -1
  386. package/dist/elements/public/CustomerCard/CustomerCard.d.ts +1 -7
  387. package/dist/elements/public/CustomerCard/CustomerCard.js +0 -9
  388. package/dist/elements/public/CustomerCard/CustomerCard.js.map +1 -1
  389. package/dist/elements/public/CustomerCard/types.d.ts +2 -10
  390. package/dist/elements/public/CustomerCard/types.js.map +1 -1
  391. package/dist/elements/public/CustomerForm/CustomerForm.d.ts +4 -38
  392. package/dist/elements/public/CustomerForm/CustomerForm.js +19 -38
  393. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  394. package/dist/elements/public/CustomerForm/types.d.ts +1 -27
  395. package/dist/elements/public/CustomerForm/types.js.map +1 -1
  396. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.d.ts +0 -2
  397. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +3 -1
  398. package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
  399. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js +3 -1
  400. package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js.map +1 -1
  401. package/dist/elements/public/DiscountCard/DiscountCard.d.ts +0 -6
  402. package/dist/elements/public/DiscountCard/DiscountCard.js +0 -6
  403. package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -1
  404. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +0 -6
  405. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +0 -6
  406. package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +1 -1
  407. package/dist/elements/public/DownloadableForm/DownloadableForm.d.ts +0 -24
  408. package/dist/elements/public/DownloadableForm/DownloadableForm.js +2 -24
  409. package/dist/elements/public/DownloadableForm/DownloadableForm.js.map +1 -1
  410. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +0 -6
  411. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +0 -6
  412. package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -1
  413. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +1 -20
  414. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +0 -19
  415. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
  416. package/dist/elements/public/EmailTemplateForm/types.d.ts +2 -16
  417. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -1
  418. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.d.ts +0 -7
  419. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js +0 -7
  420. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js.map +1 -1
  421. package/dist/elements/public/FilterAttributeForm/types.d.ts +0 -10
  422. package/dist/elements/public/FilterAttributeForm/types.js.map +1 -1
  423. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +1 -17
  424. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +0 -16
  425. package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -1
  426. package/dist/elements/public/GenerateCodesForm/types.d.ts +2 -16
  427. package/dist/elements/public/GenerateCodesForm/types.js.map +1 -1
  428. package/dist/elements/public/GiftCardCard/GiftCardCard.d.ts +1 -7
  429. package/dist/elements/public/GiftCardCard/GiftCardCard.js +0 -9
  430. package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -1
  431. package/dist/elements/public/GiftCardCard/types.d.ts +2 -10
  432. package/dist/elements/public/GiftCardCard/types.js.map +1 -1
  433. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +1 -26
  434. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +2 -25
  435. package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
  436. package/dist/elements/public/GiftCardCodeForm/types.d.ts +0 -20
  437. package/dist/elements/public/GiftCardCodeForm/types.js.map +1 -1
  438. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.d.ts +1 -11
  439. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +0 -10
  440. package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -1
  441. package/dist/elements/public/GiftCardCodesForm/types.d.ts +2 -12
  442. package/dist/elements/public/GiftCardCodesForm/types.js.map +1 -1
  443. package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +1 -30
  444. package/dist/elements/public/GiftCardForm/GiftCardForm.js +3 -30
  445. package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
  446. package/dist/elements/public/IntegrationForm/IntegrationForm.d.ts +2 -22
  447. package/dist/elements/public/IntegrationForm/IntegrationForm.js +7 -39
  448. package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -1
  449. package/dist/elements/public/IntegrationForm/index.d.ts +1 -1
  450. package/dist/elements/public/IntegrationForm/index.js +1 -1
  451. package/dist/elements/public/IntegrationForm/index.js.map +1 -1
  452. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +0 -6
  453. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +0 -6
  454. package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -1
  455. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +3 -77
  456. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +24 -88
  457. package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
  458. package/dist/elements/public/ItemCategoryForm/index.d.ts +2 -1
  459. package/dist/elements/public/ItemCategoryForm/index.js +2 -1
  460. package/dist/elements/public/ItemCategoryForm/index.js.map +1 -1
  461. package/dist/elements/public/ItemCategoryForm/types.d.ts +0 -52
  462. package/dist/elements/public/ItemCategoryForm/types.js.map +1 -1
  463. package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -87
  464. package/dist/elements/public/ItemForm/ItemForm.js +13 -100
  465. package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
  466. package/dist/elements/public/ItemForm/index.d.ts +2 -1
  467. package/dist/elements/public/ItemForm/index.js +2 -1
  468. package/dist/elements/public/ItemForm/index.js.map +1 -1
  469. package/dist/elements/public/ItemForm/types.d.ts +0 -60
  470. package/dist/elements/public/ItemForm/types.js.map +1 -1
  471. package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +0 -6
  472. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +0 -6
  473. package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -1
  474. package/dist/elements/public/ItemOptionCard/types.d.ts +2 -10
  475. package/dist/elements/public/ItemOptionCard/types.js.map +1 -1
  476. package/dist/elements/public/ItemOptionForm/ItemOptionForm.d.ts +0 -12
  477. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js +9 -16
  478. package/dist/elements/public/ItemOptionForm/ItemOptionForm.js.map +1 -1
  479. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +2 -85
  480. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +8 -89
  481. package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
  482. package/dist/elements/public/NativeIntegrationForm/types.d.ts +0 -90
  483. package/dist/elements/public/NativeIntegrationForm/types.js.map +1 -1
  484. package/dist/elements/public/NucleonElement/NucleonElement.js +14 -8
  485. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  486. package/dist/elements/public/PasskeyCard/PasskeyCard.d.ts +0 -6
  487. package/dist/elements/public/PasskeyCard/PasskeyCard.js +0 -6
  488. package/dist/elements/public/PasskeyCard/PasskeyCard.js.map +1 -1
  489. package/dist/elements/public/PasskeyCard/types.d.ts +0 -8
  490. package/dist/elements/public/PasskeyCard/types.js.map +1 -1
  491. package/dist/elements/public/PasskeyForm/PasskeyForm.d.ts +1 -19
  492. package/dist/elements/public/PasskeyForm/PasskeyForm.js +2 -20
  493. package/dist/elements/public/PasskeyForm/PasskeyForm.js.map +1 -1
  494. package/dist/elements/public/PasskeyForm/types.d.ts +0 -16
  495. package/dist/elements/public/PasskeyForm/types.js.map +1 -1
  496. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +1 -9
  497. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +0 -8
  498. package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
  499. package/dist/elements/public/PaymentMethodCard/types.d.ts +4 -11
  500. package/dist/elements/public/PaymentMethodCard/types.js.map +1 -1
  501. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +0 -6
  502. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +0 -6
  503. package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -1
  504. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +7 -21
  505. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +72 -82
  506. package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -1
  507. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.d.ts +0 -15
  508. package/dist/elements/public/PaymentsApiFraudProtectionForm/types.js.map +1 -1
  509. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +0 -6
  510. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +0 -6
  511. package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -1
  512. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +7 -42
  513. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +84 -103
  514. package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
  515. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.d.ts +1 -0
  516. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js +1 -0
  517. package/dist/elements/public/PaymentsApiPaymentMethodForm/index.js.map +1 -1
  518. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.d.ts +0 -29
  519. package/dist/elements/public/PaymentsApiPaymentMethodForm/types.js.map +1 -1
  520. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +0 -6
  521. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +0 -6
  522. package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -1
  523. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +3 -27
  524. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +7 -26
  525. package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -1
  526. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.d.ts +0 -14
  527. package/dist/elements/public/PaymentsApiPaymentPresetForm/types.js.map +1 -1
  528. package/dist/elements/public/ReportForm/ReportForm.d.ts +1 -17
  529. package/dist/elements/public/ReportForm/ReportForm.js +0 -16
  530. package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
  531. package/dist/elements/public/ReportForm/types.d.ts +2 -16
  532. package/dist/elements/public/ReportForm/types.js.map +1 -1
  533. package/dist/elements/public/ShippingContainerCard/ShippingContainerCard.d.ts +16 -0
  534. package/dist/elements/public/ShippingContainerCard/ShippingContainerCard.js +22 -0
  535. package/dist/elements/public/ShippingContainerCard/ShippingContainerCard.js.map +1 -0
  536. package/dist/elements/public/ShippingContainerCard/index.d.ts +5 -0
  537. package/dist/elements/public/ShippingContainerCard/index.js +7 -0
  538. package/dist/elements/public/ShippingContainerCard/index.js.map +1 -0
  539. package/dist/elements/public/ShippingContainerCard/types.d.ts +3 -0
  540. package/dist/elements/public/ShippingContainerCard/types.js.map +1 -0
  541. package/dist/elements/public/ShippingDropTypeCard/ShippingDropTypeCard.d.ts +16 -0
  542. package/dist/elements/public/ShippingDropTypeCard/ShippingDropTypeCard.js +22 -0
  543. package/dist/elements/public/ShippingDropTypeCard/ShippingDropTypeCard.js.map +1 -0
  544. package/dist/elements/public/ShippingDropTypeCard/index.d.ts +5 -0
  545. package/dist/elements/public/ShippingDropTypeCard/index.js +7 -0
  546. package/dist/elements/public/ShippingDropTypeCard/index.js.map +1 -0
  547. package/dist/elements/public/ShippingDropTypeCard/types.d.ts +3 -0
  548. package/dist/elements/public/ShippingDropTypeCard/types.js +2 -0
  549. package/dist/elements/public/ShippingDropTypeCard/types.js.map +1 -0
  550. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js +15 -17
  551. package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js.map +1 -1
  552. package/dist/elements/public/ShippingServiceCard/ShippingServiceCard.d.ts +16 -0
  553. package/dist/elements/public/ShippingServiceCard/ShippingServiceCard.js +30 -0
  554. package/dist/elements/public/ShippingServiceCard/ShippingServiceCard.js.map +1 -0
  555. package/dist/elements/public/ShippingServiceCard/index.d.ts +5 -0
  556. package/dist/elements/public/ShippingServiceCard/index.js +7 -0
  557. package/dist/elements/public/ShippingServiceCard/index.js.map +1 -0
  558. package/dist/elements/public/ShippingServiceCard/types.d.ts +3 -0
  559. package/dist/elements/public/ShippingServiceCard/types.js +2 -0
  560. package/dist/elements/public/ShippingServiceCard/types.js.map +1 -0
  561. package/dist/elements/public/SignInForm/SignInForm.d.ts +1 -19
  562. package/dist/elements/public/SignInForm/SignInForm.js +0 -18
  563. package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
  564. package/dist/elements/public/SignInForm/types.d.ts +0 -20
  565. package/dist/elements/public/SignInForm/types.js.map +1 -1
  566. package/dist/elements/public/StoreCard/StoreCard.d.ts +0 -6
  567. package/dist/elements/public/StoreCard/StoreCard.js +0 -6
  568. package/dist/elements/public/StoreCard/StoreCard.js.map +1 -1
  569. package/dist/elements/public/StoreForm/StoreForm.d.ts +1 -138
  570. package/dist/elements/public/StoreForm/StoreForm.js +2 -137
  571. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  572. package/dist/elements/public/StoreForm/types.d.ts +0 -94
  573. package/dist/elements/public/StoreForm/types.js.map +1 -1
  574. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +10 -48
  575. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +97 -149
  576. package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
  577. package/dist/elements/public/StoreShippingMethodForm/index.d.ts +7 -3
  578. package/dist/elements/public/StoreShippingMethodForm/index.js +7 -3
  579. package/dist/elements/public/StoreShippingMethodForm/index.js.map +1 -1
  580. package/dist/elements/public/StoreShippingMethodForm/types.d.ts +2 -34
  581. package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -1
  582. package/dist/elements/public/SubscriptionCard/types.d.ts +2 -7
  583. package/dist/elements/public/SubscriptionCard/types.js.map +1 -1
  584. package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +5 -37
  585. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +70 -143
  586. package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
  587. package/dist/elements/public/SubscriptionForm/types.d.ts +1 -26
  588. package/dist/elements/public/SubscriptionForm/types.js.map +1 -1
  589. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +3 -44
  590. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +6 -43
  591. package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -1
  592. package/dist/elements/public/SubscriptionSettingsForm/types.d.ts +0 -32
  593. package/dist/elements/public/SubscriptionSettingsForm/types.js.map +1 -1
  594. package/dist/elements/public/SubscriptionsTable/types.d.ts +0 -2
  595. package/dist/elements/public/SubscriptionsTable/types.js.map +1 -1
  596. package/dist/elements/public/Table/Table.d.ts +1 -2
  597. package/dist/elements/public/Table/Table.js +0 -1
  598. package/dist/elements/public/Table/Table.js.map +1 -1
  599. package/dist/elements/public/Table/types.d.ts +0 -5
  600. package/dist/elements/public/Table/types.js.map +1 -1
  601. package/dist/elements/public/TaxCard/TaxCard.d.ts +6 -12
  602. package/dist/elements/public/TaxCard/TaxCard.js +13 -30
  603. package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
  604. package/dist/elements/public/TaxCard/index.d.ts +2 -1
  605. package/dist/elements/public/TaxCard/index.js +2 -1
  606. package/dist/elements/public/TaxCard/index.js.map +1 -1
  607. package/dist/elements/public/TaxForm/TaxForm.d.ts +1 -41
  608. package/dist/elements/public/TaxForm/TaxForm.js +8 -48
  609. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  610. package/dist/elements/public/TaxForm/types.d.ts +2 -32
  611. package/dist/elements/public/TaxForm/types.js.map +1 -1
  612. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +1 -46
  613. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +0 -45
  614. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
  615. package/dist/elements/public/TemplateConfigForm/types.d.ts +2 -38
  616. package/dist/elements/public/TemplateConfigForm/types.js.map +1 -1
  617. package/dist/elements/public/TemplateForm/TemplateForm.d.ts +1 -17
  618. package/dist/elements/public/TemplateForm/TemplateForm.js +0 -16
  619. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  620. package/dist/elements/public/TemplateForm/types.d.ts +2 -16
  621. package/dist/elements/public/TemplateForm/types.js.map +1 -1
  622. package/dist/elements/public/TemplateSetCard/TemplateSetCard.d.ts +0 -6
  623. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js +0 -6
  624. package/dist/elements/public/TemplateSetCard/TemplateSetCard.js.map +1 -1
  625. package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +2 -33
  626. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +28 -71
  627. package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
  628. package/dist/elements/public/TemplateSetForm/index.d.ts +2 -1
  629. package/dist/elements/public/TemplateSetForm/index.js +2 -1
  630. package/dist/elements/public/TemplateSetForm/index.js.map +1 -1
  631. package/dist/elements/public/TemplateSetForm/types.d.ts +0 -22
  632. package/dist/elements/public/TemplateSetForm/types.js.map +1 -1
  633. package/dist/elements/public/Transaction/Transaction.d.ts +3 -0
  634. package/dist/elements/public/Transaction/Transaction.js +52 -59
  635. package/dist/elements/public/Transaction/Transaction.js.map +1 -1
  636. package/dist/elements/public/TransactionCard/TransactionCard.d.ts +1 -11
  637. package/dist/elements/public/TransactionCard/TransactionCard.js +0 -10
  638. package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
  639. package/dist/elements/public/TransactionCard/types.d.ts +2 -14
  640. package/dist/elements/public/TransactionCard/types.js.map +1 -1
  641. package/dist/elements/public/TransactionsTable/types.d.ts +0 -2
  642. package/dist/elements/public/TransactionsTable/types.js.map +1 -1
  643. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.d.ts +0 -6
  644. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js +6 -8
  645. package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js.map +1 -1
  646. package/dist/elements/public/UpdatePaymentMethodForm/types.d.ts +0 -8
  647. package/dist/elements/public/UpdatePaymentMethodForm/types.js.map +1 -1
  648. package/dist/elements/public/UserCard/UserCard.d.ts +0 -6
  649. package/dist/elements/public/UserCard/UserCard.js +0 -6
  650. package/dist/elements/public/UserCard/UserCard.js.map +1 -1
  651. package/dist/elements/public/UserForm/UserForm.d.ts +2 -28
  652. package/dist/elements/public/UserForm/UserForm.js +8 -33
  653. package/dist/elements/public/UserForm/UserForm.js.map +1 -1
  654. package/dist/elements/public/UserForm/index.d.ts +0 -1
  655. package/dist/elements/public/UserForm/index.js +0 -1
  656. package/dist/elements/public/UserForm/index.js.map +1 -1
  657. package/dist/elements/public/UserForm/types.d.ts +0 -20
  658. package/dist/elements/public/UserForm/types.js.map +1 -1
  659. package/dist/elements/public/WebhookForm/WebhookForm.d.ts +2 -28
  660. package/dist/elements/public/WebhookForm/WebhookForm.js +11 -32
  661. package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
  662. package/dist/elements/public/WebhookForm/index.d.ts +1 -1
  663. package/dist/elements/public/WebhookForm/index.js +1 -1
  664. package/dist/elements/public/WebhookForm/index.js.map +1 -1
  665. package/dist/elements/public/WebhookLogCard/WebhookLogCard.js +5 -6
  666. package/dist/elements/public/WebhookLogCard/WebhookLogCard.js.map +1 -1
  667. package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js +4 -3
  668. package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js.map +1 -1
  669. package/dist/elements/public/index.d.ts +3 -0
  670. package/dist/elements/public/index.defined.d.ts +3 -0
  671. package/dist/elements/public/index.defined.js +3 -0
  672. package/dist/elements/public/index.defined.js.map +1 -1
  673. package/dist/elements/public/index.js +3 -0
  674. package/dist/elements/public/index.js.map +1 -1
  675. package/dist/mixins/themeable.js +0 -5
  676. package/dist/mixins/themeable.js.map +1 -1
  677. package/dist/mixins/translatable.d.ts +3 -3
  678. package/dist/mixins/translatable.js +7 -16
  679. package/dist/mixins/translatable.js.map +1 -1
  680. package/package.json +2 -3
  681. package/dist/cdn/shared-157c52e5.js +0 -1
  682. package/dist/cdn/shared-272e7269.js +0 -1
  683. package/dist/cdn/shared-37391934.js +0 -1
  684. package/dist/cdn/shared-39fc8fed.js +0 -1
  685. package/dist/cdn/shared-66d2a0d7.js +0 -1
  686. package/dist/cdn/shared-7535b32d.js +0 -1
  687. package/dist/cdn/shared-8452c492.js +0 -1
  688. package/dist/cdn/shared-8bd53409.js +0 -1
  689. package/dist/cdn/shared-9c3b800b.js +0 -1
  690. package/dist/cdn/shared-e989e47e.js +0 -29
  691. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.d.ts +0 -31
  692. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js +0 -148
  693. package/dist/elements/internal/InternalAsyncDetailsControl/InternalAsyncDetailsControl.js.map +0 -1
  694. package/dist/elements/internal/InternalAsyncDetailsControl/index.d.ts +0 -8
  695. package/dist/elements/internal/InternalAsyncDetailsControl/index.js +0 -10
  696. package/dist/elements/internal/InternalAsyncDetailsControl/index.js.map +0 -1
  697. package/dist/elements/internal/InternalCreateControl/InternalCreateControl.js +0 -60
  698. package/dist/elements/internal/InternalCreateControl/InternalCreateControl.js.map +0 -1
  699. package/dist/elements/internal/InternalCreateControl/index.js +0 -7
  700. package/dist/elements/internal/InternalCreateControl/index.js.map +0 -1
  701. package/dist/elements/internal/InternalDetails/InternalDetails.d.ts +0 -22
  702. package/dist/elements/internal/InternalDetails/InternalDetails.js +0 -71
  703. package/dist/elements/internal/InternalDetails/InternalDetails.js.map +0 -1
  704. package/dist/elements/internal/InternalDetails/index.d.ts +0 -6
  705. package/dist/elements/internal/InternalDetails/index.js +0 -8
  706. package/dist/elements/internal/InternalDetails/index.js.map +0 -1
  707. package/dist/elements/public/CustomerPortal/types.d.ts +0 -198
  708. package/dist/elements/public/CustomerPortal/types.js.map +0 -1
  709. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.d.ts +0 -8
  710. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js +0 -52
  711. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/InternalItemCategoryFormTaxesControl.js.map +0 -1
  712. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.d.ts +0 -6
  713. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js +0 -8
  714. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControl/index.js.map +0 -1
  715. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.d.ts +0 -11
  716. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js +0 -83
  717. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/InternalItemCategoryFormTaxesControlItem.js.map +0 -1
  718. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.d.ts +0 -5
  719. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js +0 -7
  720. package/dist/elements/public/ItemCategoryForm/internal/InternalItemCategoryFormTaxesControlItem/index.js.map +0 -1
  721. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.d.ts +0 -5
  722. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js +0 -33
  723. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/InternalStoreShippingMethodFormServicesControl.js.map +0 -1
  724. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.d.ts +0 -6
  725. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js +0 -8
  726. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesControl/index.js.map +0 -1
  727. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.d.ts +0 -19
  728. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js +0 -96
  729. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/InternalStoreShippingMethodFormServicesPage.js.map +0 -1
  730. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.d.ts +0 -5
  731. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js +0 -7
  732. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPage/index.js.map +0 -1
  733. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.d.ts +0 -17
  734. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js +0 -45
  735. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/InternalStoreShippingMethodFormServicesPageItem.js.map +0 -1
  736. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.d.ts +0 -3
  737. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js +0 -5
  738. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItem/index.js.map +0 -1
  739. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.d.ts +0 -16
  740. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js +0 -49
  741. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/InternalStoreShippingMethodFormServicesPageItemContent.js.map +0 -1
  742. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.d.ts +0 -3
  743. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js +0 -5
  744. package/dist/elements/public/StoreShippingMethodForm/internal/InternalStoreShippingMethodFormServicesPageItemContent/index.js.map +0 -1
  745. /package/dist/elements/public/{CustomerPortal → ShippingContainerCard}/types.js +0 -0
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{_ as r}from"./shared-3c58ddf1.js";import{a as e}from"./shared-e989e47e.js";import{T as s}from"./shared-8452c492.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./shared-f090c63a.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-4e709717.js";let a,i,d,o=r=>r;const m=e(s,"payments-api-fraud-protection-card");class p extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return r(r({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var r,e;const s=super.renderBody({title:r=>t(a||(a=o`${0}`),r.helper.name),subtitle:r=>t(i||(i=o`${0}`),r.description)});if(!this.in({idle:"snapshot"}))return s;const m=p.defaultImageSrc,l=this.data;return t(d||(d=o` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(e=l?null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,l.type):null)&&void 0!==e?e:m,this.t("image_alt"),(r=>r.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-fraud-protection-card",p);export{p as PaymentsApiFraudProtectionCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{_ as r}from"./shared-701157ac.js";import{a as e}from"./shared-f2335b72.js";import{T as s}from"./shared-08d018f5.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./shared-d82f9e35.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";let a,i,o,d=r=>r;const m=e(s,"payments-api-fraud-protection-card");class c extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return r(r({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var r,e;const s=super.renderBody({title:r=>t(a||(a=d`${0}`),r.helper.name),subtitle:r=>t(i||(i=d`${0}`),r.description)});if(!this.in({idle:"snapshot"}))return s;const m=c.defaultImageSrc,p=this.data;return t(o||(o=d` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(e=p?null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,p.type):null)&&void 0!==e?e:m,this.t("image_alt"),(r=>r.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-fraud-protection-card",c);export{c as PaymentsApiFraudProtectionCard};
@@ -1 +1 @@
1
- import"./shared-15a947f3.js";import"./shared-ec0fb97f.js";import"./shared-1602c9a4.js";import"./shared-56b8e9ca.js";import"./shared-eeb2d7ab.js";import{I as e}from"./shared-9c3b800b.js";import"./foxy-nucleon-element.js";import"./shared-ecb7a183.js";import{_ as t,aM as r,l as o}from"./shared-3c58ddf1.js";import{a}from"./shared-e989e47e.js";import{i}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import{s as l}from"./shared-39fc8fed.js";import{h as d}from"./shared-9f5c636a.js";import"./shared-98f85be1.js";import"./shared-221d3788.js";import"./shared-43928f5a.js";import"./shared-61ade33e.js";import"./shared-75f3a59e.js";import"./shared-d7bb413b.js";import"./shared-b7cda8ba.js";import"./shared-e5f6ca48.js";import"./shared-51c4a6dd.js";import"./shared-bd99107c.js";import"./shared-2808f43a.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-2e2d45c4.js";import"./shared-c73f6e8a.js";import"./shared-0e9ad70e.js";import"./shared-51c3bc09.js";import"./shared-d67d56c2.js";import"./shared-9e014b51.js";import"./shared-5f65bdab.js";import"./shared-879fcb1f.js";import"./shared-21fec810.js";import"./shared-41e9ef02.js";import"./shared-82423f8b.js";import"./shared-651c44fa.js";import"./shared-a6e383ac.js";import"./shared-0f4947e8.js";import"./shared-85f44e3e.js";import"./shared-8d7e2e2c.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-71782a9e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let n,c,p,h,f,m,u,v,b,j,_=e=>e;const g=a(e,"payments-api-fraud-protection-form");class x extends g{constructor(){super(...arguments),this.getImageSrc=null,this.templates={},this.__availableFraudProtectionsLoaderId="availableFraudProtections"}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",({score_threshold_reject:e})=>"number"!=typeof e||(e<=100&&e>=0||"score-threshold-reject:v8n_out_of_range"),e=>{var t,r,o,a;const i=null!==(o=null===(r=null===(t=e.helper)||void 0===t?void 0:t.json)||void 0===r?void 0:r.blocks)&&void 0!==o?o:[];let s;try{s=JSON.parse(null!==(a=e.json)&&void 0!==a?a:"{}")}catch(e){s={}}for(const e of i)for(const t of e.fields)if("optional"in t&&!t.optional){const r=[e.parent_id,e.id,t.id].filter((e=>!!e));if(!d(s,r)&&"checkbox"!==t.type)return"json:v8n_invalid"}return!0}]}renderBody(){return this.form.type?this.__renderFraudProtectionConfig(this.form.type):this.__renderFraudProtectionSelector()}get __availableFraudProtectionsLoader(){return this.renderRoot.querySelector(`#${this.__availableFraudProtectionsLoaderId}`)}get __availableFraudProtectionsHref(){try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,o=e.exec(t).groups.presetId;return new URL(`/payment_presets/${o}/available_fraud_protections`,this.href||this.parent).toString()}catch(e){}}get __availableFraudProtections(){var e,t;return null===(t=null===(e=this.__availableFraudProtectionsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}__renderFraudProtectionSelector(){var e;const t=x.defaultImageSrc;return s(n||(n=_` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-i18n class="block text-xxl font-medium border-b border-contrast-10 pb-m" infer="" key="select_protection_title"> </foxy-i18n> <div data-testid="select-protection-list"> <ul class="-my-s grid grid-cols-1"> ${0} </ul> </div> `),i(this.__availableFraudProtectionsHref),this.__availableFraudProtectionsLoaderId,(()=>this.requestUpdate()),Object.entries(null!==(e=this.__availableFraudProtections)&&void 0!==e?e:{}).map((([e,r])=>{var o,a;return s(c||(c=_` <li class="-mx-s"> <button class="w-full block text-left hover-bg-contrast-5 p-s rounded" @click="${0}"> <figure class="flex items-center gap-m h-m"> <img class="relative h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="min-w-0 flex-1 truncate leading-s font-medium"> ${0}&ZeroWidthSpace; </figcaption> </figure> </button> </li> `),(()=>this.edit({type:e,helper:r})),null!==(a=null===(o=this.getImageSrc)||void 0===o?void 0:o.call(this,e))&&void 0!==a?a:t,(e=>{e.currentTarget.src=t}),r.name)})))}__renderFraudProtectionConfig(e){var t,r,o,a,i,l,d,n;const c=x.defaultImageSrc;return s(p||(p=_` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-medium text-xl text-center"> ${0}&ZeroWidthSpace; </figcaption> </figure> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} ${0} `),null!==(r=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:c,(e=>e.currentTarget.src=c),null!==(a=null===(o=this.form.helper)||void 0===o?void 0:o.name)&&void 0!==a?a:this.form.type,(null===(i=this.form.helper)||void 0===i?void 0:i.uses_rejection_threshold)?s(h||(h=_` <foxy-internal-integer-control infer="score-threshold-reject"> </foxy-internal-integer-control> `)):"",null===(d=null===(l=this.form.helper)||void 0===l?void 0:l.json)||void 0===d?void 0:d.blocks.map((e=>this.__renderBlock(e))),(null===(n=this.data)||void 0===n?void 0:n.type)?"":s(f||(f=_` <vaadin-button data-testid="select-another-button" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),super.renderBody())}__renderBlock(e){return s(m||(m=_`${0}`),e.fields.map((t=>{var r,a,i,d,n,c;const p=()=>{var r,a;let i;try{i=JSON.parse(null!==(r=this.form.json)&&void 0!==r?r:"")}catch(e){i={}}const s=[e.parent_id,e.id,t.id].filter((e=>!!e));return null!==(a=o(i,s))&&void 0!==a?a:i.default_value},h=r=>{var o;let a;try{a=JSON.parse(null!==(o=this.form.json)&&void 0!==o?o:"")}catch(e){a={}}const i=[e.parent_id,e.id,t.id].filter((e=>!!e));this.edit({json:JSON.stringify(l(a,i,r))})},f=t.options,m=["json",...[e.parent_id,e.id,t.id].filter((e=>!!e))].join("-").replace(/_/g,"-");return s(u||(u=_` ${0} `),"checkbox"===t.type?s(v||(v=_` <foxy-internal-checkbox-group-control helper-text="${0}" label="" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(r=t.description)&&void 0!==r?r:"",m,[{label:t.name,value:"checked"}],(()=>p()?["checked"]:[]),(e=>h(e.includes("checked")))):"select"===t.type?s(b||(b=_` <foxy-internal-select-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(a=t.description)&&void 0!==a?a:"",null!==(n=null===(d=null===(i=t.options)||void 0===i?void 0:i.find((e=>e.value===t.default_value)))||void 0===d?void 0:d.name)&&void 0!==n?n:this.t("default_additional_field_placeholder"),t.name,m,f.map((({name:e,value:t})=>({label:e,value:t}))),p,h):s(j||(j=_` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(c=t.description)&&void 0!==c?c:"",t.default_value||this.t("default_additional_field_placeholder"),t.name,m,p,h))})))}}customElements.define("foxy-payments-api-fraud-protection-form",x);export{x as PaymentsApiFraudProtectionForm};
1
+ import"./shared-c0e56e97.js";import"./shared-9f44b81f.js";import"./shared-66084f2e.js";import"./shared-004fc193.js";import"./shared-0e038fda.js";import{I as e}from"./shared-5cb6aca6.js";import"./foxy-nucleon-element.js";import"./shared-6d1556a0.js";import{_ as r,B as t,aM as o,l as a}from"./shared-701157ac.js";import{a as i}from"./shared-f2335b72.js";import{i as s}from"./shared-9803aa7c.js";import{h as d}from"./shared-dc73b9a5.js";import{s as n}from"./shared-365c8437.js";import{h as l}from"./shared-1d8edd03.js";import"./shared-24586cfb.js";import"./shared-cfdd6c21.js";import"./shared-add044d3.js";import"./shared-61ade33e.js";import"./shared-a4e0a78b.js";import"./shared-5c1e607b.js";import"./shared-a08d509a.js";import"./shared-b6376c8f.js";import"./shared-51c4a6dd.js";import"./shared-fee535ca.js";import"./shared-a5c48bf4.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-fbfa45bb.js";import"./shared-c4f5b03b.js";import"./shared-59d8b64e.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-44b101d0.js";import"./shared-1708eb3c.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-7004839c.js";import"./shared-58095d4b.js";import"./shared-651c44fa.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-f91d5706.js";import"./shared-57266e2a.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-9ee719e6.js";import"./shared-bba917bf.js";import"./shared-b44cf5a9.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let c,h,p,u,f,m,v,b,j,_,g,y,x=e=>e;const $=i(e,"payments-api-fraud-protection-form");class L extends ${constructor(){super(...arguments),this.getImageSrc=null,this.__availableFraudProtectionsLoaderId="availableFraudProtections"}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='M0 20.73v-9.9L10.83 0h9.9L0 20.73ZM0 0h9.41L0 9.41V0Zm0 22.14L22.14 0h9.9l-9.43 9.44-.61-.27-10.5 4.66v7-.29L0 32.04v-9.9Zm11.54-.23L0 33.46v9.9l14.14-14.14a15 15 0 0 1-2.6-7.3Zm3.2 8.12L.77 44h9.9l9.7-9.7a13.75 13.75 0 0 1-5.63-4.27Zm6.67 4.64L12.08 44h9.9L44 21.98v-9.9L32.16 23.92C31.01 29.15 27.05 33.6 22 34.83l-.59-.16Zm11.02-12.43L44 10.67V.77L31.42 13.35l1.08.48v7a13 13 0 0 1-.07 1.4Zm-1.99-9.32L43.35 0h-9.9l-9.87 9.87 6.86 3.05ZM23.4 44 44 23.4v9.9L33.3 44h-9.9Zm11.31 0L44 34.71V44h-9.29Z'/%3E%3Cpath fill='%23fff' d='M30.17 21.99H22V11.72l-8.17 3.63V22H22v10.42c4.34-1.34 7.55-5.63 8.17-10.43Z'/%3E%3C/svg%3E"}static get properties(){return r(r({},super.properties),{},{getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",({score_threshold_reject:e})=>"number"!=typeof e||(e<=100&&e>=0||"score-threshold-reject:v8n_out_of_range"),e=>{var r,t,o,a;const i=null!==(o=null===(t=null===(r=e.helper)||void 0===r?void 0:r.json)||void 0===t?void 0:t.blocks)&&void 0!==o?o:[];let s;try{s=JSON.parse(null!==(a=e.json)&&void 0!==a?a:"{}")}catch(e){s={}}for(const e of i)for(const r of e.fields)if("optional"in r&&!r.optional){const t=[e.parent_id,e.id,r.id].filter((e=>!!e));if(!l(s,t)&&"checkbox"!==r.type)return"json:v8n_invalid"}return!0}]}get hiddenSelector(){return new t(`header:copy-json ${super.hiddenSelector}`.trimEnd())}get headerTitleOptions(){var e;return r(r({},this.data),{},{context:null!==(e=this.form.type)&&void 0!==e?e:"new"})}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeader(...e){var r;return d(c||(c=x` <div> ${0} ${0} </div> `),super.renderHeader(...e),(null===(r=this.data)||void 0===r?void 0:r.type)||!this.form.type?d(h||(h=x``)):d(p||(p=x` <vaadin-button data-testid="select-another-button" theme="tertiary-inline" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())))}renderBody(){return this.form.type?this.__renderFraudProtectionConfig():this.__renderFraudProtectionSelector()}get __availableFraudProtectionsLoader(){return this.renderRoot.querySelector(`#${this.__availableFraudProtectionsLoaderId}`)}get __availableFraudProtectionsHref(){try{const e=o(/\/payment_presets\/(.+)\//,{presetId:1}),r=new URL(this.href||this.parent).pathname,t=e.exec(r).groups.presetId;return new URL(`/payment_presets/${t}/available_fraud_protections`,this.href||this.parent).toString()}catch(e){}}get __availableFraudProtections(){var e,r;return null===(r=null===(e=this.__availableFraudProtectionsLoader)||void 0===e?void 0:e.data)||void 0===r?void 0:r.values}__renderFraudProtectionSelector(){var e;return d(u||(u=x` ${0} <div class="grid grid-cols-2 gap-m" data-testid="select-protection-list"> ${0} </div> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),Object.entries(null!==(e=this.__availableFraudProtections)&&void 0!==e?e:{}).map((([e,r])=>this.__renderFraudProtectionButton({type:e,helper:r}))),s(this.__availableFraudProtectionsHref),this.__availableFraudProtectionsLoaderId,(()=>this.requestUpdate()))}__renderFraudProtectionButton({type:e,helper:r}){var t,o;const a=L.defaultImageSrc,i=null!==(o=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==o?o:a,s=e=>e.currentTarget.src=a;return d(f||(f=x` <button class="relative w-full block text-left p-s rounded bg-contrast-5 overflow-hidden transition-colors hover-bg-contrast-10 focus-outline-none focus-ring-2 focus-ring-primary-50" @click="${0}"> <img class="absolute top-0 left-0 w-1-2 h-full object-cover bg-center filter saturate-200 blur-3xl" style="transform:translate3d(0,0,0)" src="${0}" alt="" @error="${0}"> <figure class="relative flex flex-col gap-m"> <img class="h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="min-w-0 flex-1 truncate leading-s"> <div class="font-medium">${0}&ZeroWidthSpace;</div> <div class="text-xs text-secondary">${0}</div> </figcaption> </figure> </button> `),(()=>this.edit({type:e,helper:r})),i,s,i,s,r.name,e)}__renderFraudProtectionConfig(){var e,r,t;return d(m||(m=x` ${0} <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} ${0} `),this.renderHeader(),(null===(e=this.form.helper)||void 0===e?void 0:e.uses_rejection_threshold)?d(v||(v=x` <foxy-internal-integer-control infer="score-threshold-reject"> </foxy-internal-integer-control> `)):"",null===(t=null===(r=this.form.helper)||void 0===r?void 0:r.json)||void 0===t?void 0:t.blocks.map((e=>this.__renderBlock(e))),super.renderBody())}__renderBlock(e){return d(b||(b=x`${0}`),e.fields.map((r=>{var t,o,i,s,l,c;const h=()=>{var t,o;let i;try{i=JSON.parse(null!==(t=this.form.json)&&void 0!==t?t:"")}catch(e){i={}}const s=[e.parent_id,e.id,r.id].filter((e=>!!e));return null!==(o=a(i,s))&&void 0!==o?o:i.default_value},p=t=>{var o;let a;try{a=JSON.parse(null!==(o=this.form.json)&&void 0!==o?o:"")}catch(e){a={}}const i=[e.parent_id,e.id,r.id].filter((e=>!!e));this.edit({json:JSON.stringify(n(a,i,t))})},u=r.options,f=["json",...[e.parent_id,e.id,r.id].filter((e=>!!e))].join("-").replace(/_/g,"-");return d(j||(j=x` ${0} `),"checkbox"===r.type?d(_||(_=x` <foxy-internal-checkbox-group-control helper-text="${0}" label="" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(t=r.description)&&void 0!==t?t:"",f,[{label:r.name,value:"checked"}],(()=>h()?["checked"]:[]),(e=>p(e.includes("checked")))):"select"===r.type?d(g||(g=x` <foxy-internal-select-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(o=r.description)&&void 0!==o?o:"",null!==(l=null===(s=null===(i=r.options)||void 0===i?void 0:i.find((e=>e.value===r.default_value)))||void 0===s?void 0:s.name)&&void 0!==l?l:this.t("default_additional_field_placeholder"),r.name,f,u.map((({name:e,value:r})=>({label:e,value:r}))),h,p):d(y||(y=x` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(c=r.description)&&void 0!==c?c:"",r.default_value||this.t("default_additional_field_placeholder"),r.name,f,h,p))})))}}customElements.define("foxy-payments-api-fraud-protection-form",L);export{L as PaymentsApiFraudProtectionForm};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{_ as e}from"./shared-3c58ddf1.js";import{a as r}from"./shared-e989e47e.js";import{T as s}from"./shared-8452c492.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./shared-f090c63a.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-4e709717.js";let a,i,d,o=e=>e;const m=r(s,"payments-api-payment-method-card");class l extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return e(e({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var e,r;const s=super.renderBody({title:e=>t(a||(a=o`${0}`),e.helper.name),subtitle:e=>t(i||(i=o`${0}`),e.description)});if(!this.in({idle:"snapshot"}))return s;const m=l.defaultImageSrc,p=this.data;return t(d||(d=o` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(r=p?null===(e=this.getImageSrc)||void 0===e?void 0:e.call(this,p.type):null)&&void 0!==r?r:m,this.t("image_alt"),(e=>e.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-payment-method-card",l);export{l as PaymentsApiPaymentMethodCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{_ as e}from"./shared-701157ac.js";import{a as r}from"./shared-f2335b72.js";import{T as s}from"./shared-08d018f5.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./shared-d82f9e35.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";let a,i,d,o=e=>e;const m=r(s,"payments-api-payment-method-card");class l extends m{constructor(){super(...arguments),this.getImageSrc=null}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return e(e({},super.properties),{},{getImageSrc:{attribute:!1}})}renderBody(){var e,r;const s=super.renderBody({title:e=>t(a||(a=o`${0}`),e.helper.name),subtitle:e=>t(i||(i=o`${0}`),e.description)});if(!this.in({idle:"snapshot"}))return s;const m=l.defaultImageSrc,p=this.data;return t(d||(d=o` <figure class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1">${0}</figcaption> </figure> `),null!==(r=p?null===(e=this.getImageSrc)||void 0===e?void 0:e.call(this,p.type):null)&&void 0!==r?r:m,this.t("image_alt"),(e=>e.currentTarget.src=m),s)}}customElements.define("foxy-payments-api-payment-method-card",l);export{l as PaymentsApiPaymentMethodCard};
@@ -1 +1 @@
1
- import"./shared-15a947f3.js";import"./shared-617dbd76.js";import"./shared-7a5adb55.js";import"./shared-ec0fb97f.js";import"./shared-c9f4fe97.js";import"./shared-56b8e9ca.js";import"./shared-eeb2d7ab.js";import{I as e}from"./shared-9c3b800b.js";import"./foxy-nucleon-element.js";import"./shared-ecb7a183.js";import{_ as t,aM as r,l as a}from"./shared-3c58ddf1.js";import{a as i}from"./shared-e989e47e.js";import{i as o}from"./shared-9803aa7c.js";import{c as s}from"./shared-4e709717.js";import{h as l}from"./shared-dc73b9a5.js";import{h as n}from"./shared-9f5c636a.js";import{s as d}from"./shared-39fc8fed.js";import"./shared-98f85be1.js";import"./shared-221d3788.js";import"./shared-43928f5a.js";import"./shared-61ade33e.js";import"./shared-0e9ad70e.js";import"./shared-6c97a6b0.js";import"./shared-b7cda8ba.js";import"./shared-0f4947e8.js";import"./shared-651c44fa.js";import"./shared-41e9ef02.js";import"./shared-5f65bdab.js";import"./shared-879fcb1f.js";import"./shared-21fec810.js";import"./shared-82423f8b.js";import"./shared-51c3bc09.js";import"./shared-d67d56c2.js";import"./shared-d7bb413b.js";import"./shared-a6e383ac.js";import"./shared-e5f6ca48.js";import"./shared-51c4a6dd.js";import"./shared-bd99107c.js";import"./shared-2808f43a.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-2e2d45c4.js";import"./shared-75f3a59e.js";import"./shared-85f44e3e.js";import"./shared-8d7e2e2c.js";import"./foxy-copy-to-clipboard.js";import"./shared-71782a9e.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let c,h,f,p,u,m,_,v,g,y,b,x,$,j,k,S,V,w=e=>e;const M=i(e,"payments-api-payment-method-form");class L extends M{constructor(){super(...arguments),this.getImageSrc=null,this.templates={},this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__threeDSecureResponseGetValue=()=>{var e;return(null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response"))?["valid_only"]:[]},this.__threeDSecureResponseSetValue=e=>{const t=e.includes("valid_only")?"_require_valid_response":"",r=this.form.config_3d_secure,a=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${a}${t}`})},this.__threeDSecureResponseOptions=[{value:"valid_only",label:"option_valid_only"}],this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__tab=0}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{__tab:{attribute:!1},getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,a,i;const o=null!==(a=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==a?a:[];let s;try{s=JSON.parse(null!==(i=e.additional_fields)&&void 0!==i?i:"{}")}catch(e){s={}}for(const e of o)for(const t of e.fields)if("optional"in t&&!t.optional&&!n(s,t.id)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid";return!0}]}renderBody(){return this.form.type?this.__renderPaymentMethodConfig(this.form.type):this.__renderPaymentMethodSelector()}get __groupedAvailablePaymentMethods(){var e;return Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{if(r.is_deprecated)return e;const a=t.charAt(0).toUpperCase(),i=!/\w/.test(a)?"#":a,o=e.find((e=>e.name===i));return o?o.items.push({type:t,helper:r}):e.push({name:i,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethodsHref(){try{const e=r(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,a=e.exec(t).groups.presetId;return new URL(`/payment_presets/${a}/available_payment_methods`,this.href||this.parent).toString()}catch(e){}}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){return l(c||(c=w` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt=""> <figcaption class="relative min-w-0 font-medium text-xl text-center"> <foxy-i18n infer="" key="select_method_title"></foxy-i18n> </figcaption> </figure> <section data-testid="select-method-list" class="-mt-m"> ${0} </section> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),L.defaultImageSrc,this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>l(h||(h=w` <p class="font-medium text-tertiary py-m">${0}</p> <ul class="grid grid-cols-2 gap-m"> ${0} </ul> `),e,t.map((e=>l(f||(f=w`<li>${0}</li>`),this.__renderPaymentMethodButton(e))))))),o(this.__availablePaymentMethodsHref),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()))}__renderPaymentMethodConfig(e){var t,r,a,i,o,n;const d=L.defaultImageSrc;return l(p||(p=w` <figure data-testid="logo" class="relative flex flex-col gap-m p-m items-center"> <img class="relative h-xl w-xl object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <figcaption class="relative min-w-0 font-medium text-xl text-center"> <div>${0}&ZeroWidthSpace;</div> ${0} </figcaption> </figure> <div class="rounded border border-contrast-10"> <vaadin-tabs selected="${0}" theme="centered" @selected-changed="${0}"> <vaadin-tab><foxy-i18n infer="" key="tab_live"></foxy-i18n></vaadin-tab> <vaadin-tab><foxy-i18n infer="" key="tab_test"></foxy-i18n></vaadin-tab> </vaadin-tabs> <div class="overflow-hidden" style="--lumo-border-radius:var(--lumo-border-radius-s)"> <div data-testid="tab-content" class="grid grid-cols-2 gap-m transition-transform transform duration-300" style="${0}"> ${0} </div> </div> </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} `),null!==(r=null===(t=this.getImageSrc)||void 0===t?void 0:t.call(this,e))&&void 0!==r?r:d,(e=>e.currentTarget.src=d),null!==(i=null===(a=this.form.helper)||void 0===a?void 0:a.name)&&void 0!==i?i:this.form.type,(null===(o=this.data)||void 0===o?void 0:o.type)?"":l(u||(u=w` <vaadin-button data-testid="select-another-button" theme="tertiary-inline" class="text-m" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())),this.__tab,(e=>{var t;const r=e.currentTarget;this.__tab=null!==(t=r.selected)&&void 0!==t?t:0}),s({"width: calc(200% + var(--lumo-space-m));":!0,"--tw-translate-x: 0;":0===this.__tab,"--tw-translate-x: calc(-50% - (var(--lumo-space-m) / 2));":0!==this.__tab}),["live","test"].map(((e,t)=>{var r,a,i;const o=0===t?"":`${e}-`,n=0===t?this.__liveBlocks:this.__testBlocks;return l(m||(m=w` <div class="${0}"> ${0} ${0} ${0} ${0} </div> `),s({"grid grid-cols-1 gap-m p-m transition-opacity duration-300":!0,"opacity-100":this.__tab===t,"opacity-0":this.__tab!==t}),(null===(r=this.form.helper)||void 0===r?void 0:r.id_description)?l(_||(_=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,o):"",(null===(a=this.form.helper)||void 0===a?void 0:a.third_party_key_description)?l(v||(v=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,o):"",(null===(i=this.form.helper)||void 0===i?void 0:i.key_description)?l(g||(g=w` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,o):"",n.map((e=>this.__renderBlock(e))))})),(null===(n=this.form.helper)||void 0===n?void 0:n.supports_3d_secure)?l(y||(y=w` <foxy-internal-radio-group-control infer="three-d-secure-toggle" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?l(b||(b=w` <foxy-internal-checkbox-group-control infer="three-d-secure-response" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue,this.__threeDSecureResponseOptions):""):"",super.renderBody())}__renderPaymentMethodButton({type:e,helper:t}){var r,a;const i=L.defaultImageSrc,o=null!==(a=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==a?a:i,n=e=>e.currentTarget.src=i;return l(x||(x=w` <button class="${0}" ?disabled="${0}" title="${0}" @click="${0}"> <img class="absolute top-0 left-0 w-1-2 h-full object-cover bg-center filter saturate-200 blur-3xl" style="transform:translate3d(0,0,0)" src="${0}" alt="" ?hidden="${0}" @error="${0}"> <figure class="relative flex flex-col gap-m"> <img class="${0}" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <div class="font-medium">${0}&ZeroWidthSpace;</div> <div class="text-xs ${0}">${0}</div> </figcaption> </figure> </button> `),s({"relative w-full block text-left p-s rounded bg-contrast-5 overflow-hidden":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"transition-colors hover-bg-contrast-10":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,t.conflict?this.t("conflict_message",t.conflict):"",(()=>this.edit({type:e,helper:t})),o,!!t.conflict,n,s({"h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs":!0,"filter grayscale":!!t.conflict}),o,n,s({"min-w-0 flex-1 truncate leading-s":!0,"text-disabled":!!t.conflict}),t.name,t.conflict?"":"text-secondary",e)}__renderBlock(e){return l($||($=w`${0}`),e.fields.map((e=>{var t,r,i;const o=["additional-fields",e.id].join("-").replace(/_/g,"-"),s=()=>{var t,r;try{const i=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");return null!==(r=a(i,e.id))&&void 0!==r?r:i.default_value}catch(t){return e.default_value}},n=t=>{var r;try{const a=JSON.parse(null!==(r=this.form.additional_fields)&&void 0!==r?r:"{}");this.edit({additional_fields:JSON.stringify(d(a,e.id,t))})}catch(e){return""}},c=e.options;return l(j||(j=w` ${0} `),"checkbox"===e.type?l(k||(k=w` <foxy-internal-checkbox-group-control helper-text="${0}" label="" class="-mb-s" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(t=e.description)&&void 0!==t?t:"",o,[{label:e.name,value:"checked"}],(()=>s()?["checked"]:[]),(e=>{n(e.includes("checked"))})):"select"===e.type?l(S||(S=w` <foxy-internal-select-control helper-text="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(r=e.description)&&void 0!==r?r:"",e.name,o,c.map((({name:e,value:t})=>({label:e,value:t}))),s,n):l(V||(V=w` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(i=e.description)&&void 0!==i?i:"",e.default_value||this.t("default_additional_field_placeholder"),e.name,o,s,n))})))}}customElements.define("foxy-payments-api-payment-method-form",L);export{L as PaymentsApiPaymentMethodForm};
1
+ import"./shared-c0e56e97.js";import"./shared-ba5c9c0b.js";import"./shared-a05fe56c.js";import"./shared-9f44b81f.js";import"./shared-4761504a.js";import"./shared-004fc193.js";import"./shared-0e038fda.js";import{I as e}from"./shared-5cb6aca6.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{_ as t,B as r,aM as a,l as i}from"./shared-701157ac.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-f2335b72.js";import{i as l}from"./shared-9803aa7c.js";import{c as n}from"./shared-4e709717.js";import{h as d}from"./shared-dc73b9a5.js";import{h as c}from"./shared-1d8edd03.js";import{s as h}from"./shared-365c8437.js";import"./shared-24586cfb.js";import"./shared-cfdd6c21.js";import"./shared-add044d3.js";import"./shared-61ade33e.js";import"./shared-59d8b64e.js";import"./shared-25c57c74.js";import"./shared-a08d509a.js";import"./shared-ec696e1b.js";import"./shared-651c44fa.js";import"./shared-7004839c.js";import"./shared-1708eb3c.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-58095d4b.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-5c1e607b.js";import"./shared-fd410dee.js";import"./shared-b6376c8f.js";import"./shared-51c4a6dd.js";import"./shared-fee535ca.js";import"./shared-a5c48bf4.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-fbfa45bb.js";import"./shared-a4e0a78b.js";import"./shared-f91d5706.js";import"./shared-57266e2a.js";import"./foxy-copy-to-clipboard.js";import"./shared-9ee719e6.js";import"./shared-bba917bf.js";import"./shared-b44cf5a9.js";let p,f,u,m,_,v,y,b,g,$,x,j,S,k,V,M,w,L,P,H,I,Z,B=e=>e;const C=s(e,"payments-api-payment-method-form");class D extends C{constructor(){super(...arguments),this.getImageSrc=null,this.__availablePaymentMethodsLoaderId="availablePaymentMethodsLoader",this.__threeDSecureResponseGetValue=()=>{var e;return(null===(e=this.form.config_3d_secure)||void 0===e?void 0:e.endsWith("require_valid_response"))?["valid_only"]:[]},this.__threeDSecureResponseSetValue=e=>{const t=e.includes("valid_only")?"_require_valid_response":"",r=this.form.config_3d_secure,a=(null==r?void 0:r.startsWith("all_cards"))?"all_cards":"maestro_only";this.edit({config_3d_secure:`${a}${t}`})},this.__threeDSecureResponseOptions=[{value:"valid_only",label:"option_valid_only"}],this.__threeDSecureToggleGetValue=()=>{const e=this.form.config_3d_secure;return(null==e?void 0:e.startsWith("all_cards"))?"all_cards":(null==e?void 0:e.startsWith("maestro_only"))?"maestro_only":"off"},this.__threeDSecureToggleSetValue=e=>{var t;let r="";"all_cards"!==e&&"maestro_only"!==e||(r=(null===(t=this.form.config_3d_secure)||void 0===t?void 0:t.endsWith("require_valid_response"))?`${e}_require_valid_response`:e),this.edit({config_3d_secure:r})},this.__threeDSecureToggleOptions=[{value:"off",label:"option_off"},{value:"all_cards",label:"option_all_cards"},{value:"maestro_only",label:"option_maestro_only"}],this.__tab=0}static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 44 44'%3E%3Cpath fill='%23fff' d='m29.3 14 14-14H32.1l-14 14h11.2Zm2.7 9.9 12-12V.7L30.62 14.1A2 2 0 0 1 32 16v7.9ZM13.31 44h11.18L44 24.5V13.3l-12 12V28a2 2 0 0 1-2 2h-2.69l-14 14Zm-1.41 0H.7l14-14h11.2l-14 14Zm14 0h11.2l6.9-6.9V25.9L25.9 44Zm12.6 0H44v-5.5L38.5 44Z'/%3E%3Cpath fill='%23fff' d='M30 28H14v-6h16v6Zm0-10v-2H14v2h16ZM0 43.3l13.4-13.4A2 2 0 0 1 12 28v-7.9L0 32.12V43.3Z'/%3E%3Cpath fill='%23fff' d='M16.7 14H14c-1.11 0-1.99.89-1.99 2v2.7L0 30.7V19.52L19.52 0H30.7l-14 14Zm1.4-14H6.92L0 6.92V18.1L18.1 0ZM5.5 0H0v5.5L5.5 0Z'/%3E%3C/svg%3E"}static get properties(){return t(t({},super.properties),{},{__tab:{attribute:!1},getImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!e||e.length<=100||"description:v8n_too_long",({type:e})=>!!e||"type:v8n_required",e=>{var t,r,a,i;const o=null!==(a=null===(r=null===(t=e.helper)||void 0===t?void 0:t.additional_fields)||void 0===r?void 0:r.blocks)&&void 0!==a?a:[];let s;try{s=JSON.parse(null!==(i=e.additional_fields)&&void 0!==i?i:"{}")}catch(e){s={}}for(const e of o)for(const t of e.fields)if("optional"in t&&!t.optional&&!c(s,t.id)&&"checkbox"!==t.type)return"additional-fields:v8n_invalid";return!0}]}get hiddenSelector(){return new r(`header:copy-json ${super.hiddenSelector}`.trimEnd())}renderHeader(...e){var t;return d(p||(p=B` <div> ${0} ${0} </div> `),super.renderHeader(...e),(null===(t=this.data)||void 0===t?void 0:t.type)||!this.form.type?d(f||(f=B``)):d(u||(u=B` <vaadin-button data-testid="select-another-button" theme="tertiary-inline" @click="${0}"> <foxy-i18n infer="" key="select_another_button_label"></foxy-i18n> </vaadin-button> `),(()=>this.undo())))}get headerTitleOptions(){var e;return{context:this.form.type?"selected":"new",name:null===(e=this.form.helper)||void 0===e?void 0:e.name}}get headerSubtitleOptions(){if(this.href){const e=o(this.href),t=this.headerCopyIdValue;return e.startsWith("R")?{context:"regular",id:t}:{context:"hosted",id:t}}return{}}get headerCopyIdValue(){if(this.href){const e=o(this.href);return e.startsWith("R")?e.slice(1):e.slice(1).split("C")[0]}return""}renderBody(){const e=d(m||(m=B` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),l(this.__availablePaymentMethodsHref),this.__availablePaymentMethodsLoaderId,(()=>this.requestUpdate()));return d(_||(_=B`${0}${0}${0}`),this.renderHeader(),this.form.type?this.__renderPaymentMethodConfig():this.__renderPaymentMethodSelector(),e)}get __groupedAvailablePaymentMethods(){var e;return Object.entries(null!==(e=this.__availablePaymentMethods)&&void 0!==e?e:{}).sort(((e,t)=>e[0].localeCompare(t[0],"en"))).reduce(((e,[t,r])=>{if(r.is_deprecated)return e;const a=t.charAt(0).toUpperCase(),i=!/\w/.test(a)?"#":a,o=e.find((e=>e.name===i));return o?o.items.push({type:t,helper:r}):e.push({name:i,items:[{type:t,helper:r}]}),e}),[])}get __availablePaymentMethodsLoader(){return this.renderRoot.querySelector(`#${this.__availablePaymentMethodsLoaderId}`)}get __availablePaymentMethodsHref(){try{const e=a(/\/payment_presets\/(.+)\//,{presetId:1}),t=new URL(this.href||this.parent).pathname,r=e.exec(t).groups.presetId;return new URL(`/payment_presets/${r}/available_payment_methods`,this.href||this.parent).toString()}catch(e){}}get __availablePaymentMethods(){var e,t;return null===(t=null===(e=this.__availablePaymentMethodsLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.values}get __liveBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>e.is_live)))&&void 0!==r?r:[]}get __testBlocks(){var e,t,r;return null!==(r=null===(t=null===(e=this.form.helper)||void 0===e?void 0:e.additional_fields)||void 0===t?void 0:t.blocks.filter((e=>!e.is_live)))&&void 0!==r?r:[]}__renderPaymentMethodSelector(){const e=this.__availablePaymentMethodsLoader;return(null==e?void 0:e.data)?d(y||(y=B` <div> <section data-testid="select-method-list" class="-mt-m"> ${0} </section> </div> `),this.__groupedAvailablePaymentMethods.map((({name:e,items:t})=>d(b||(b=B` <p class="font-medium text-tertiary py-m">${0}</p> <ul class="grid grid-cols-2 gap-m"> ${0} </ul> `),e,t.map((e=>d(g||(g=B`<li>${0}</li>`),this.__renderPaymentMethodButton(e)))))))):d(v||(v=B` <foxy-spinner infer="list-spinner" state="${0}"> </foxy-spinner> `),(null==e?void 0:e.in("fail"))?"error":"busy")}__renderPaymentMethodConfig(){var e;return d($||($=B` <div class="rounded-t-l rounded-b-l border border-contrast-10"> <vaadin-tabs selected="${0}" theme="centered" @selected-changed="${0}"> <vaadin-tab><foxy-i18n infer="" key="tab_live"></foxy-i18n></vaadin-tab> <vaadin-tab><foxy-i18n infer="" key="tab_test"></foxy-i18n></vaadin-tab> </vaadin-tabs> <div class="overflow-hidden"> <div data-testid="tab-content" class="grid grid-cols-2 gap-m transition-transform transform duration-300" style="${0}"> ${0} </div> </div> </div> <foxy-internal-text-control infer="description"></foxy-internal-text-control> ${0} ${0} `),this.__tab,(e=>{var t;const r=e.currentTarget;this.__tab=null!==(t=r.selected)&&void 0!==t?t:0}),n({"width: calc(200% + var(--lumo-space-m));":!0,"--tw-translate-x: 0;":0===this.__tab,"--tw-translate-x: calc(-50% - (var(--lumo-space-m) / 2));":0!==this.__tab}),["live","test"].map(((e,t)=>{var r,a,i;const o=0===t?"":`${e}-`,s=0===t?this.__liveBlocks:this.__testBlocks;return d(x||(x=B` <div class="${0}"> ${0} ${0} ${0} ${0} </div> `),n({"grid grid-cols-1 gap-m p-m transition-opacity duration-300":!0,"opacity-100":this.__tab===t,"opacity-0":this.__tab!==t}),(null===(r=this.form.helper)||void 0===r?void 0:r.id_description)?d(j||(j=B` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-id"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.id_description,o):"",(null===(a=this.form.helper)||void 0===a?void 0:a.third_party_key_description)?d(S||(S=B` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}third-party-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.third_party_key_description,o):"",(null===(i=this.form.helper)||void 0===i?void 0:i.key_description)?d(k||(k=B` <foxy-internal-text-control placeholder="${0}" helper-text="" label="${0}" infer="${0}account-key"> </foxy-internal-text-control> `),this.t("default_additional_field_placeholder"),this.form.helper.key_description,o):"",s.map((e=>this.__renderBlock(e))))})),(null===(e=this.form.helper)||void 0===e?void 0:e.supports_3d_secure)?d(V||(V=B` <foxy-internal-radio-group-control infer="three-d-secure-toggle" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> ${0} `),this.__threeDSecureToggleGetValue,this.__threeDSecureToggleSetValue,this.__threeDSecureToggleOptions,this.form.config_3d_secure?d(M||(M=B` <foxy-internal-checkbox-group-control infer="three-d-secure-response" class="-mb-s" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__threeDSecureResponseGetValue,this.__threeDSecureResponseSetValue,this.__threeDSecureResponseOptions):""):"",super.renderBody())}__renderPaymentMethodButton({type:e,helper:t}){var r,a;const i=D.defaultImageSrc,o=null!==(a=null===(r=this.getImageSrc)||void 0===r?void 0:r.call(this,e))&&void 0!==a?a:i,s=e=>e.currentTarget.src=i;return d(w||(w=B` <button class="${0}" ?disabled="${0}" title="${0}" @click="${0}"> <img class="absolute top-0 left-0 w-1-2 h-full object-cover bg-center filter saturate-200 blur-3xl" style="transform:translate3d(0,0,0)" src="${0}" alt="" ?hidden="${0}" @error="${0}"> <figure class="relative flex flex-col gap-m"> <img class="${0}" src="${0}" alt="" @error="${0}"> <figcaption class="${0}"> <div class="font-medium">${0}&ZeroWidthSpace;</div> <div class="text-xs ${0}">${0}</div> </figcaption> </figure> </button> `),n({"relative w-full block text-left p-s rounded bg-contrast-5 overflow-hidden":!0,"focus-outline-none focus-ring-2 focus-ring-primary-50":!0,"transition-colors hover-bg-contrast-10":!t.conflict,"cursor-default":!!t.conflict}),!!t.conflict,t.conflict?this.t("conflict_message",t.conflict):"",(()=>this.edit({type:e,helper:t})),o,!!t.conflict,s,n({"h-m w-m object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs":!0,"filter grayscale":!!t.conflict}),o,s,n({"min-w-0 flex-1 truncate leading-s":!0,"text-disabled":!!t.conflict}),t.name,t.conflict?"":"text-secondary",e)}__renderBlock(e){return d(L||(L=B`${0}`),e.fields.map((e=>{var t,r,a;const o=["additional-fields",e.id].join("-").replace(/_/g,"-"),s=()=>{var t,r;try{const a=JSON.parse(null!==(t=this.form.additional_fields)&&void 0!==t?t:"{}");return null!==(r=i(a,e.id))&&void 0!==r?r:a.default_value}catch(t){return e.default_value}},l=t=>{var r;try{const a=JSON.parse(null!==(r=this.form.additional_fields)&&void 0!==r?r:"{}");this.edit({additional_fields:JSON.stringify(h(a,e.id,t))})}catch(e){return""}},n=e.options;return d(P||(P=B` ${0} `),"checkbox"===e.type?d(H||(H=B` <foxy-internal-checkbox-group-control helper-text="${0}" label="" class="-mb-s" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-checkbox-group-control> `),null!==(t=e.description)&&void 0!==t?t:"",o,[{label:e.name,value:"checked"}],(()=>s()?["checked"]:[]),(e=>{l(e.includes("checked"))})):"select"===e.type?d(I||(I=B` <foxy-internal-select-control helper-text="${0}" label="${0}" infer="${0}" .options="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-select-control> `),null!==(r=e.description)&&void 0!==r?r:"",e.name,o,n.map((({name:e,value:t})=>({label:e,value:t}))),s,l):d(Z||(Z=B` <foxy-internal-text-control helper-text="${0}" placeholder="${0}" label="${0}" infer="${0}" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> `),null!==(a=e.description)&&void 0!==a?a:"",e.default_value||this.t("default_additional_field_placeholder"),e.name,o,s,l))})))}}customElements.define("foxy-payments-api-payment-method-form",D);export{D as PaymentsApiPaymentMethodForm};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{a as s}from"./shared-e989e47e.js";import{T as e}from"./shared-8452c492.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-3c58ddf1.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./shared-f090c63a.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";let t,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{renderBody(){return super.renderBody({title:s=>a(t||(t=i`${0}`),s.description),subtitle:({is_live:s})=>a(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{a as s}from"./shared-f2335b72.js";import{T as e}from"./shared-08d018f5.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-701157ac.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./shared-d82f9e35.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";let t,d,i=s=>s;const o=s(e,"payments-api-payment-preset-card");class p extends o{renderBody(){return super.renderBody({title:s=>a(t||(t=i`${0}`),s.description),subtitle:({is_live:s})=>a(d||(d=i` <foxy-i18n class="${0}" infer="" key="status_${0}"> </foxy-i18n> `),r({"text-success":s}),s?"live":"test")})}}customElements.define("foxy-payments-api-payment-preset-card",p);export{p as PaymentsApiPaymentPresetCard};
@@ -1 +1 @@
1
- import"./shared-ec0fb97f.js";import"./shared-a827bcc6.js";import"./shared-eeb2d7ab.js";import{I as e}from"./shared-9c3b800b.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as t}from"./shared-3c58ddf1.js";import{a as r}from"./shared-e989e47e.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-75f3a59e.js";import"./shared-98f85be1.js";import"./shared-221d3788.js";import"./shared-43928f5a.js";import"./shared-61ade33e.js";import"./shared-d7bb413b.js";import"./shared-b7cda8ba.js";import"./shared-e5f6ca48.js";import"./shared-51c4a6dd.js";import"./shared-ecb7a183.js";import"./shared-343d1fd7.js";import"./shared-2808f43a.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-879fcb1f.js";import"./shared-21fec810.js";import"./shared-41e9ef02.js";import"./shared-15a947f3.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-71782a9e.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-85f44e3e.js";import"./shared-8d7e2e2c.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-d67d56c2.js";import"./shared-0e9ad70e.js";import"./shared-51c3bc09.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-8452c492.js";import"./shared-f090c63a.js";import"./shared-1602c9a4.js";import"./shared-c73f6e8a.js";import"./shared-9e014b51.js";import"./shared-56b8e9ca.js";import"./shared-5f65bdab.js";import"./shared-82423f8b.js";import"./shared-651c44fa.js";import"./shared-a6e383ac.js";import"./shared-0f4947e8.js";import"./foxy-nucleon-element.js";import"./shared-9f5c636a.js";import"./shared-617dbd76.js";import"./shared-6c97a6b0.js";import"./shared-7a5adb55.js";import"./shared-c9f4fe97.js";let s,o,i,p,d,n,m=e=>e;const h=r(e,"payments-api-payment-preset-form");class c extends h{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.templates={},this.__getIsPOEnabledValue=()=>this.form.is_purchase_order_enabled?["true"]:[],this.__setIsPOEnabledValue=e=>{this.edit({is_purchase_order_enabled:e.includes("true")})},this.__getIsLiveValue=()=>this.form.is_live?["live"]:["test"],this.__setIsLiveValue=e=>{this.edit({is_live:e.includes("live")})}}static get properties(){return t(t({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}renderBody(){const e=this.constructor;return a(s||(s=m` <foxy-internal-text-control infer="description"></foxy-internal-text-control> <div class="-mb-s"> <foxy-internal-checkbox-group-control infer="is-live" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="is-purchase-order-enabled" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} ${0} `),this.__getIsLiveValue,this.__setIsLiveValue,e.__isLiveOptions,this.__getIsPOEnabledValue,this.__setIsPOEnabledValue,e.__isPOEnabledOptions,this.data?a(o||(o=m` <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" alert .item="${0}" .form="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" .item="${0}" .form="${0}"> </foxy-internal-async-list-control> `),this.data._links["fx:payment_methods"].href,(e=>a(i||(i=m` <foxy-payments-api-payment-method-card parent="${0}" infer="payments-api-payment-method-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-payment-method-card> `),e.parent,e.href,this.getPaymentMethodImageSrc)),(e=>a(p||(p=m` <foxy-payments-api-payment-method-form parent="${0}" infer="payments-api-payment-method-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-payment-method-form> `),e.dialog.parent,e.dialog.href,this.getPaymentMethodImageSrc,e.handleFetch,e.handleUpdate)),this.data._links["fx:fraud_protections"].href,(e=>a(d||(d=m` <foxy-payments-api-fraud-protection-card parent="${0}" infer="payments-api-fraud-protection-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-fraud-protection-card> `),e.parent,e.href,this.getFraudProtectionImageSrc)),(e=>a(n||(n=m` <foxy-payments-api-fraud-protection-form parent="${0}" infer="payments-api-fraud-protection-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-fraud-protection-form> `),e.dialog.parent,e.dialog.href,this.getFraudProtectionImageSrc,e.handleFetch,e.handleUpdate))):"",super.renderBody())}}c.__isPOEnabledOptions=[{label:"option_true",value:"true"}],c.__isLiveOptions=[{label:"option_live",value:"live"}],customElements.define("foxy-payments-api-payment-preset-form",c);export{c as PaymentsApiPaymentPresetForm};
1
+ import"./shared-9f44b81f.js";import"./shared-2782886e.js";import"./shared-0e038fda.js";import{I as e}from"./shared-5cb6aca6.js";import"./foxy-payments-api-fraud-protection-card.js";import"./foxy-payments-api-fraud-protection-form.js";import"./foxy-payments-api-payment-method-card.js";import"./foxy-payments-api-payment-method-form.js";import{_ as r,B as t}from"./shared-701157ac.js";import{a}from"./shared-f2335b72.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-a4e0a78b.js";import"./shared-24586cfb.js";import"./shared-cfdd6c21.js";import"./shared-add044d3.js";import"./shared-61ade33e.js";import"./shared-5c1e607b.js";import"./shared-a08d509a.js";import"./shared-b6376c8f.js";import"./shared-51c4a6dd.js";import"./shared-6d1556a0.js";import"./shared-343d1fd7.js";import"./shared-a5c48bf4.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-7004839c.js";import"./shared-c0e56e97.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-b44cf5a9.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-f91d5706.js";import"./shared-57266e2a.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-0ed41a9e.js";import"./shared-59d8b64e.js";import"./shared-ae200b9f.js";import"./foxy-copy-to-clipboard.js";import"./shared-9ee719e6.js";import"./shared-bba917bf.js";import"./shared-bab2ea2c.js";import"./shared-08d018f5.js";import"./shared-d82f9e35.js";import"./shared-66084f2e.js";import"./shared-c4f5b03b.js";import"./shared-44b101d0.js";import"./shared-004fc193.js";import"./shared-1708eb3c.js";import"./shared-58095d4b.js";import"./shared-651c44fa.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./foxy-nucleon-element.js";import"./shared-1d8edd03.js";import"./shared-ba5c9c0b.js";import"./shared-25c57c74.js";import"./shared-a05fe56c.js";import"./shared-4761504a.js";let o,i,d,p,n,m,h=e=>e;const c=a(e,"payments-api-payment-preset-form");class f extends c{constructor(){super(...arguments),this.getFraudProtectionImageSrc=null,this.getPaymentMethodImageSrc=null,this.__getIsPOEnabledValue=()=>this.form.is_purchase_order_enabled?["true"]:[],this.__setIsPOEnabledValue=e=>{this.edit({is_purchase_order_enabled:e.includes("true")})},this.__getIsLiveValue=()=>this.form.is_live?["live"]:["test"],this.__setIsLiveValue=e=>{this.edit({is_live:e.includes("live")})}}static get properties(){return r(r({},super.properties),{},{getFraudProtectionImageSrc:{attribute:!1},getPaymentMethodImageSrc:{attribute:!1}})}static get v8n(){return[({description:e})=>!!e||"description:v8n_required",({description:e})=>e&&e.length<=100||"description:v8n_too_long"]}get hiddenSelector(){return new t(`header:copy-json ${super.hiddenSelector}`.trimEnd())}renderBody(){const e=this.constructor;return s(o||(o=h` ${0} <foxy-internal-text-control infer="description"></foxy-internal-text-control> <div class="-mb-s"> <foxy-internal-checkbox-group-control infer="is-live" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> <foxy-internal-checkbox-group-control infer="is-purchase-order-enabled" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} ${0} `),this.renderHeader(),this.__getIsLiveValue,this.__setIsLiveValue,e.__isLiveOptions,this.__getIsPOEnabledValue,this.__setIsPOEnabledValue,e.__isPOEnabledOptions,this.data?s(i||(i=h` <foxy-internal-async-list-control infer="payment-methods" first="${0}" limit="5" alert .item="${0}" .form="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="fraud-protections" first="${0}" limit="5" alert .item="${0}" .form="${0}"> </foxy-internal-async-list-control> `),this.data._links["fx:payment_methods"].href,(e=>s(d||(d=h` <foxy-payments-api-payment-method-card parent="${0}" infer="payments-api-payment-method-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-payment-method-card> `),e.parent,e.href,this.getPaymentMethodImageSrc)),(e=>s(p||(p=h` <foxy-payments-api-payment-method-form parent="${0}" infer="payments-api-payment-method-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-payment-method-form> `),e.dialog.parent,e.dialog.href,this.getPaymentMethodImageSrc,e.handleFetch,e.handleUpdate)),this.data._links["fx:fraud_protections"].href,(e=>s(n||(n=h` <foxy-payments-api-fraud-protection-card parent="${0}" infer="payments-api-fraud-protection-card" href="${0}" .getImageSrc="${0}"> </foxy-payments-api-fraud-protection-card> `),e.parent,e.href,this.getFraudProtectionImageSrc)),(e=>s(m||(m=h` <foxy-payments-api-fraud-protection-form parent="${0}" infer="payments-api-fraud-protection-form" href="${0}" id="form" .getImageSrc="${0}" @fetch="${0}" @update="${0}"> </foxy-payments-api-fraud-protection-form> `),e.dialog.parent,e.dialog.href,this.getFraudProtectionImageSrc,e.handleFetch,e.handleUpdate))):"",super.renderBody())}}f.__isPOEnabledOptions=[{label:"option_true",value:"true"}],f.__isLiveOptions=[{label:"option_live",value:"live"}],customElements.define("foxy-payments-api-payment-preset-form",f);export{f as PaymentsApiPaymentPresetForm};
@@ -1 +1 @@
1
- import{L as e}from"./shared-dc73b9a5.js";import{F as t}from"./shared-343d1fd7.js";import{aM as a,aF as s,_ as n}from"./shared-3c58ddf1.js";import{A as r}from"./shared-37391934.js";async function o(e){const t=await e;if(!t.ok)throw new Error(await t.text());return t.json()}async function i(e){var t;let s,n;try{const{hostedPaymentGatewaysHelperUrl:r,paymentGatewaysHelperUrl:i,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if("GET"!==d.method)throw s=405,new Error("Method not allowed. Allowed methods: GET.");const p=a(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}).exec(new URL(d.url).pathname).groups.presetId,h=o(m(r)),y=o(m(i)),u=null===(t=(await o(m(l(p))))._links["fx:payment_gateway"])||void 0===t?void 0:t.href,f=u?await o(m(u)):void 0,c=function(e){const{hostedPaymentGatewaysHelper:t,paymentGatewaysHelper:a,paymentPresetId:s,paymentGateway:n,base:r}=e,o=new URL(`./payment_presets/${s}/available_payment_methods`,r),i={};return Object.entries(t.values).forEach((([e,t])=>{i[e]=t})),Object.entries(a.values).forEach((([e,t])=>{i[e]=t,n&&(i[e].conflict={type:n.type,name:n.description})})),{_links:{self:{href:o.toString()}},values:i}}({hostedPaymentGatewaysHelper:await h,paymentGatewaysHelper:await y,paymentPresetId:p,paymentGateway:f,base:new URL(d.url).origin});n=JSON.stringify(c),s=200}catch(e){n=e instanceof Error?e.message:String(e),s=null!=s?s:500}return new Response(n,{status:s})}function l(e){const{paymentPresetId:t,base:a}=e;return{_links:{self:{href:new URL(`./payment_presets/${t}/available_fraud_protections`,a).toString()}},values:{minfraud:{name:"MaxMind minFraud",uses_rejection_threshold:!0,json:null},google_recaptcha:{name:"Google reCAPTCHA",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"config",name:"Configuration",type:"select",description:"Determines how reCAPTCHA is configured to operate.",default_value:"disabled",options:[{name:"Disabled",value:"disabled"},{name:"Always enabled",value:"enabled_always"},{name:"Enabled by errors",value:"enabled_by_errors"}]},{id:"private_key",name:"Private Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Private Key here.",default_value:""},{id:"site_key",name:"Site Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Site Key here.",default_value:""}]}]}},custom_precheckout_hook:{name:"Pre-Checkout Webhook",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"enabled",name:"Enabled",type:"checkbox",default_value:!1},{id:"url",name:"URL",type:"text",description:"Url of your Pre-Checkout Hook",default_value:""},{id:"failure_handling",name:"Failure handling",type:"select",description:"Determines what happens to the checkout submission if your webhook fails to respond correctly.",default_value:"",options:[{name:"Reject",value:"reject"},{name:"Approve",value:"approve"}]}]}]}}}}}async function d(e){let t,s;try{const{request:n}=e;if("GET"!==n.method)throw t=405,new Error("Method not allowed. Allowed methods: GET.");const r=l({paymentPresetId:a(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}).exec(new URL(n.url).pathname).groups.presetId,base:new URL(n.url).origin});s=JSON.stringify(r),t=200}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}const m=["_links"];function p(e){const{paymentMethodSetFraudProtectionId:t,paymentPresetId:a,fraudProtection:r,base:o}=e,{_links:i}=r,d=s(r,m),p=l({paymentPresetId:a,base:o}),h=`${new URL(i.self.href).pathname.split("/").pop()}C${t}`,y=new URL(`./payment_presets/${a}`,o),u=new URL(`./payment_presets/${a}/fraud_protections/${h}`,o);return n(n({_links:{self:{href:u.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:y.toString()}}},d),{},{helper:p.values[r.type]})}async function h(e){var t,s;let n,r;try{const{fraudProtectionsUrl:i,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if(!["GET","POST"].includes(d.method))throw n=405,new Error("Method not allowed. Allowed methods: GET, POST.");const h=new URL(d.url),y=a(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}).exec(h.pathname).groups.presetId,u=await o(m(l(y)));if("GET"===d.method){const e=parseInt(null!==(t=h.searchParams.get("offset"))&&void 0!==t?t:"0"),a=parseInt(null!==(s=h.searchParams.get("limit"))&&void 0!==s?s:"20"),i=new URL(u._links["fx:payment_method_set_fraud_protections"].href);i.searchParams.set("offset",String(Math.max(0,e-1))),i.searchParams.set("limit",String(a));const l=await o(m(i.toString())),f=await Promise.all(l._embedded["fx:payment_method_set_fraud_protections"].map((async e=>o(m(e._links["fx:fraud_protection"].href))))),c=function(e){const{paymentMethodSetFraudProtections:t,fraudProtections:a,paymentPresetId:s,base:n}=e,r=new URL(`/payment_presets/${s}/fraud_protections`,n);r.search=new URL(t._links.self.href).search;const o=new URL(r.toString());o.search=new URL(t._links.first.href).search;const i=new URL(r.toString());i.search=new URL(t._links.last.href).search;const l=new URL(r.toString());l.search=new URL(t._links.prev.href).search;const d=new URL(r.toString());d.search=new URL(t._links.next.href).search;const m=a.map((e=>{const a=t._embedded["fx:payment_method_set_fraud_protections"].find((t=>t.fraud_protection_uri===e._links.self.href));return p({paymentMethodSetFraudProtectionId:new URL(a._links.self.href).pathname.split("/").pop(),fraudProtection:e,paymentPresetId:s,base:n})}));return{_links:{first:{href:o.toString()},last:{href:i.toString()},prev:{href:l.toString()},next:{href:d.toString()},self:{href:r.toString()}},_embedded:{"fx:fraud_protections":m},returned_items:t.returned_items,total_items:t.total_items,offset:t.offset,limit:t.limit}}({paymentMethodSetFraudProtections:l,fraudProtections:f,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(c)}else{const e=await d.json();delete e.helper;const t=m(i,{method:"POST",body:JSON.stringify(e)}),a=await o(t),s=await o(m(u._links["fx:payment_method_set_fraud_protections"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:u._links.self.href,fraud_protection_uri:a._links.self.href})})),l=p({paymentMethodSetFraudProtectionId:new URL(s._links.self.href).pathname.split("/").pop(),fraudProtection:a,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(l)}}catch(e){r=e instanceof Error?e.message:String(e),n=null!=n?n:500}return new Response(r,{status:n})}async function y(e){let t,s;try{const{getPaymentMethodSetUrl:n,getFraudProtectionUrl:r,request:i,fetch:l}=e;if(!["GET","PATCH","DELETE"].includes(i.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const d=a(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),{presetId:m,protectionId:h}=d.exec(i.url).groups,y=n(m),u=h.substring(0,h.indexOf("C"));if("DELETE"===i.method){const e=(await o(l(y)))._links["fx:payment_method_set_fraud_protections"].href,t=new URL(e);t.searchParams.set("fraud_protection_id",u);const a=await o(l(t.toString())),s=a._embedded["fx:payment_method_set_fraud_protections"].map((e=>o(l(e._links.self.href,{method:"DELETE"}))));await Promise.all(s)}let f=await i.text();try{const e=JSON.parse(f);delete e.helper,f=JSON.stringify(e)}catch(e){}const c=l(r(u),{method:i.method,body:"PATCH"===i.method?f:null}),w=await o(c);s="DELETE"===i.method?JSON.stringify({message:"Fraud protection was successfully deleted."}):JSON.stringify(p({paymentMethodSetFraudProtectionId:h.substring(h.indexOf("C")+1),fraudProtection:w,paymentPresetId:m,base:new URL(i.url).origin}))}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}const u=["_links"];function f(e){const{paymentPresetId:t,helper:a,base:r}=e,o="paymentGateway"in e?e.paymentGateway:e.hostedPaymentGateway,{_links:i}=o,l=s(o,u),d=new URL(i.self.href).pathname.split("/").pop();let m;m="paymentMethodSetHostedPaymentGatewayId"in e?`H${d}C${e.paymentMethodSetHostedPaymentGatewayId}`:`R${d}`;const p=new URL(`./payment_presets/${t}`,r),h=new URL(`./payment_presets/${t}/payment_methods/${m}`,r);return n(n({_links:{self:{href:h.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:p.toString()}}},l),{},{helper:a})}async function c(e){var t,s,n,r;let i,l;try{const{hostedPaymentGatewaysHelperUrl:d,paymentGatewaysHelperUrl:m,hostedPaymentGatewaysUrl:p,getPaymentMethodSetUrl:h,paymentGatewaysUrl:y,request:u,fetch:c}=e;if(!["GET","POST"].includes(u.method))throw i=405,new Error("Method not allowed. Allowed methods: GET, POST.");const w=new URL(u.url),_=a(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}).exec(w.pathname).groups.presetId,[g,P,S]=await Promise.all([o(c(d)),o(c(m)),o(c(h(_)))]);if("GET"===u.method){const e=parseInt(null!==(t=w.searchParams.get("offset"))&&void 0!==t?t:"0"),a=parseInt(null!==(s=w.searchParams.get("limit"))&&void 0!==s?s:"20"),r=new URL(S._links["fx:payment_method_set_hosted_payment_gateways"].href);r.searchParams.set("offset",String(Math.max(0,e-1))),r.searchParams.set("limit",String(a));const d=null===(n=S._links["fx:payment_gateway"])||void 0===n?void 0:n.href,[m,p]=await Promise.all([d&&0===e?o(c(d)):null,o(c(r.toString()))]),h=await Promise.all(p._embedded["fx:payment_method_set_hosted_payment_gateways"].map((async e=>o(c(e._links["fx:hosted_payment_gateway"].href))))),y=function(e){var t,a;const{paymentMethodSetHostedPaymentGateways:s,hostedPaymentGatewaysHelper:n,hostedPaymentGateways:r,paymentGatewaysHelper:o,paymentPresetId:i,paymentGateway:l,query:d,base:m}=e,p=new URLSearchParams(d),h=parseInt(null!==(t=p.get("offset"))&&void 0!==t?t:"0"),y=parseInt(null!==(a=p.get("limit"))&&void 0!==a?a:"20"),u=s.total_items+(l?1:0),c=s.returned_items+(l&&"not-on-page"!==l?1:0),w=new URL(`/payment_presets/${i}/payment_methods`,m);w.search=d;const _=new URL(w.toString()),g=new URL(w.toString()),P=new URL(w.toString()),S=new URL(w.toString());_.searchParams.set("limit",String(y)),_.searchParams.set("offset",String(h)),g.searchParams.set("limit",String(y)),g.searchParams.set("offset",String(Math.max(0,u-y))),P.searchParams.set("limit",String(y)),P.searchParams.set("offset",String(Math.max(0,h-y))),S.searchParams.set("limit",String(y)),S.searchParams.set("offset",String(Math.min(h+y,Math.max(0,u-y))));const U=[...l&&"not-on-page"!==l?[l]:[],...r].map((e=>{const t=s._embedded["fx:payment_method_set_hosted_payment_gateways"].find((t=>t.hosted_payment_gateway_uri===e._links.self.href));return f(t?{paymentMethodSetHostedPaymentGatewayId:new URL(t._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:e,paymentPresetId:i,helper:n.values[e.type],base:m}:{paymentPresetId:i,paymentGateway:e,helper:o.values[e.type],base:m})}));return{_links:{first:{href:_.toString()},last:{href:g.toString()},prev:{href:P.toString()},next:{href:S.toString()},self:{href:w.toString()}},_embedded:{"fx:payment_methods":U},returned_items:c,total_items:u,offset:h,limit:y}}({paymentMethodSetHostedPaymentGateways:p,hostedPaymentGatewaysHelper:g,paymentGatewaysHelper:P,hostedPaymentGateways:h,paymentPresetId:_,paymentGateway:m||(d?"not-on-page":void 0),query:new URL(u.url).search,base:new URL(u.url).origin});i=200,l=JSON.stringify(y)}else{const e=await u.clone().json(),t=!!g.values[null!==(r=e.type)&&void 0!==r?r:""];if(delete e.helper,t){const t=await o(c(p,{method:"POST",body:JSON.stringify(e)})),a=await o(c(S._links["fx:payment_method_set_hosted_payment_gateways"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:S._links.self.href,hosted_payment_gateway_uri:t._links.self.href})})),s=f({paymentMethodSetHostedPaymentGatewayId:new URL(a._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:t,paymentPresetId:_,helper:g.values[t.type],base:new URL(u.url).origin});i=200,l=JSON.stringify(s)}else{const t=c(y,{method:u.method,body:JSON.stringify(e)}),a=await o(t),s={gateway_uri:a._links.self.href};await Promise.all([o(c(S._links.self.href,{method:"PATCH",body:JSON.stringify(s)})),S.gateway_uri?o(c(S.gateway_uri,{method:"DELETE"})):null]);const n=f({paymentPresetId:_,paymentGateway:a,helper:P.values[a.type],base:new URL(u.url).origin});i=200,l=JSON.stringify(n)}}}catch(e){l=e instanceof Error?e.message:String(e),i=null!=i?i:500}return new Response(l,{status:i})}const w=["_links"];function _(e){const{paymentMethodSet:t,base:a}=e,{_links:r}=t,o=s(t,w),i=new URL(t._links.self.href).pathname.split("/").pop(),l=new URL(`./payment_presets/${i}`,a),d=new URL(`./payment_presets/${i}/payment_methods`,a),m=new URL(`./payment_presets/${i}/fraud_protections`,a),p=new URL(`./payment_presets/${i}/available_payment_methods`,a),h=new URL(`./payment_presets/${i}/available_fraud_protections`,a);return n({_links:{self:{href:l.toString()},"fx:store":r["fx:store"],"fx:payment_methods":{href:d.toString()},"fx:fraud_protections":{href:m.toString()},"fx:available_payment_methods":{href:p.toString()},"fx:available_fraud_protections":{href:h.toString()}}},o)}const g=["_embedded","_links"];async function P(e){let t,a;try{const{paymentMethodSetsUrl:r,request:i,fetch:l}=e;if(!["GET","POST"].includes(i.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, POST.");const d=new URL(i.url),m=new URL(r);let p;if(m.search=d.search,"POST"===i.method){const e=l(m.toString(),{method:"POST",body:await i.text()});p=_({paymentMethodSet:await o(e),base:d.origin})}else p=function(e){const{paymentMethodSets:t,base:a}=e,{_embedded:r,_links:o}=t,i=s(t,g),l=new URL("./payment_presets",a),d=new URL(o.first.href);l.search=d.search;const m=new URL("./payment_presets",a),p=new URL(o.last.href);m.search=p.search;const h=new URL("./payment_presets",a),y=new URL(o.prev.href);h.search=y.search;const u=new URL("./payment_presets",a),f=new URL(o.next.href);u.search=f.search;const c=new URL("./payment_presets",a),w=new URL(o.self.href);return c.search=w.search,n(n({},i),{},{_links:{first:{href:l.toString()},last:{href:m.toString()},prev:{href:h.toString()},next:{href:u.toString()},self:{href:c.toString()}},_embedded:{"fx:payment_presets":r["fx:payment_method_sets"].map((e=>_({paymentMethodSet:e,base:a})))}})}({paymentMethodSets:await o(l(m.toString())),base:d.origin});a=JSON.stringify(p),t=200}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}async function S(e){let t,s;try{const{getPaymentMethodSetUrl:n,request:r,fetch:i}=e;if(!["GET","PATCH","DELETE"].includes(r.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const l=a(/payment_presets\/(.+)/,{presetId:1}).exec(r.url).groups.presetId,d=new URL(r.url),m=new URL(n(l));m.search=d.search;const p=await o(i(m.toString(),{method:r.method,body:"PATCH"===r.method?await r.text():null}));s="DELETE"===r.method?JSON.stringify({message:"Payment preset was successfully deleted."}):JSON.stringify(_({paymentMethodSet:p,base:new URL(r.url).origin}))}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}async function U(e){let t,s;try{const{hostedPaymentGatewaysHelperUrl:n,paymentGatewaysHelperUrl:r,getPaymentMethodSetHostedPaymentGatewayUrl:i,getHostedPaymentGatewayUrl:l,getPaymentMethodSetUrl:d,getPaymentGatewayUrl:m,request:p,fetch:h}=e;if(!["GET","PATCH","DELETE"].includes(p.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const y=a(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),{presetId:u,methodId:c}=y.exec(p.url).groups,w=c.startsWith("H"),_=d(u),g=c.substring(1,w?c.indexOf("C"):void 0),P=o(h(n)),S=o(h(r));if("DELETE"===p.method)if(w){const e=i(c.substring(c.indexOf("C")+1));await o(h(e,{method:"DELETE"}))}else{const e={gateway_uri:""},t=JSON.stringify(e);await o(h(_,{method:"PATCH",body:t}))}let U=await p.text();try{const e=JSON.parse(U);delete e.helper,U=JSON.stringify(e)}catch(e){}if(w){const e=h(l(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await P,a=await o(e);s="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(f({paymentMethodSetHostedPaymentGatewayId:c.substring(c.indexOf("C")+1),hostedPaymentGateway:a,paymentPresetId:u,helper:t.values[a.type],base:new URL(p.url).origin}))}else{const e=h(m(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await S,a=await o(e);s="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(f({paymentGateway:a,paymentPresetId:u,helper:t.values[a.type],base:new URL(p.url).origin}))}}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}class b extends e{constructor(){super(...arguments),this.paymentMethodSetHostedPaymentGatewayBaseUrl=null,this.paymentMethodSetHostedPaymentGatewaysUrl=null,this.hostedPaymentGatewaysHelperUrl=null,this.hostedPaymentGatewayBaseUrl=null,this.hostedPaymentGatewaysUrl=null,this.paymentGatewaysHelperUrl=null,this.paymentMethodSetBaseUrl=null,this.paymentMethodSetsUrl=null,this.fraudProtectionBaseUrl=null,this.fraudProtectionsUrl=null,this.paymentGatewayBaseUrl=null,this.paymentGatewaysUrl=null,this.__api=new r(this),this.__fetch=this.__api.fetch.bind(this.__api),this.__handleFetch=e=>{var s,n,r,o,l;if(!(e instanceof t))return;if(!e.request.url.startsWith("https://foxy-payments-api.element/"))return;if(e.defaultPrevented)return;const{paymentMethodSetHostedPaymentGatewaysUrl:m,hostedPaymentGatewaysHelperUrl:p,paymentGatewaysHelperUrl:u,hostedPaymentGatewaysUrl:f,paymentMethodSetsUrl:w,fraudProtectionsUrl:_,paymentGatewaysUrl:g}=this,b=null!==(s=this.paymentMethodSetHostedPaymentGatewayBaseUrl)&&void 0!==s?s:this.paymentMethodSetHostedPaymentGatewaysUrl,G=null!==(n=this.hostedPaymentGatewayBaseUrl)&&void 0!==n?n:this.hostedPaymentGatewaysUrl,L=null!==(r=this.paymentMethodSetBaseUrl)&&void 0!==r?r:this.paymentMethodSetsUrl,E=null!==(o=this.fraudProtectionBaseUrl)&&void 0!==o?o:this.fraudProtectionsUrl,R=null!==(l=this.paymentGatewayBaseUrl)&&void 0!==l?l:this.paymentGatewaysUrl;if(null===m)return;if(null===b)return;if(null===p)return;if(null===u)return;if(null===f)return;if(null===G)return;if(null===w)return;if(null===L)return;if(null===_)return;if(null===E)return;if(null===g)return;if(null===R)return;const v=e=>t=>{const a=new URL(e);return a.pathname.endsWith("/")||(a.pathname+="/"),a.pathname+=t,a.toString()},x=function(e){const t=[[a(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),U],[a(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}),d],[a(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}),i],[a(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),y],[a(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}),h],[a(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}),c],[a(/\/payment_presets\/(.+)/,{presetId:1}),S],[/\/payment_presets/,P]];for(const[a,s]of t)if(a.test(new URL(e.request.url).pathname))return s(e);return null}({hostedPaymentGatewaysHelperUrl:p,paymentGatewaysHelperUrl:u,hostedPaymentGatewaysUrl:f,paymentMethodSetsUrl:w,fraudProtectionsUrl:_,paymentGatewaysUrl:g,getPaymentMethodSetHostedPaymentGatewayUrl:v(m),getHostedPaymentGatewayUrl:v(G),getPaymentMethodSetUrl:v(L),getFraudProtectionUrl:v(E),getPaymentGatewayUrl:v(R),request:e.request,fetch:this.__fetch});x&&(e.preventDefault(),e.respondWith(x))}}static get properties(){return{paymentMethodSetHostedPaymentGatewayBaseUrl:{attribute:"payment-method-set-hosted-payment-gateway-base-url"},paymentMethodSetHostedPaymentGatewaysUrl:{attribute:"payment-method-set-hosted-payment-gateways-url"},hostedPaymentGatewaysHelperUrl:{attribute:"hosted-payment-gateways-helper-url"},hostedPaymentGatewayBaseUrl:{attribute:"hosted-payment-gateway-base-url"},hostedPaymentGatewaysUrl:{attribute:"hosted-payment-gateways-url"},paymentGatewaysHelperUrl:{attribute:"payment-gateways-helper-url"},paymentMethodSetBaseUrl:{attribute:"payment-method-set-base-url"},paymentMethodSetsUrl:{attribute:"payment-method-sets-url"},fraudProtectionBaseUrl:{attribute:"fraud-protection-base-url"},fraudProtectionsUrl:{attribute:"fraud-protections-url"},paymentGatewayBaseUrl:{attribute:"payment-gateway-base-url"},paymentGatewaysUrl:{attribute:"payment-gateways-url"}}}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}createRenderRoot(){return this}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}}customElements.define("foxy-payments-api",b);export{b as PaymentsApi};
1
+ import{L as e}from"./shared-dc73b9a5.js";import{F as t}from"./shared-343d1fd7.js";import{aM as a,aF as s,_ as n}from"./shared-701157ac.js";import{A as r}from"./shared-8f0251e9.js";async function o(e){const t=await e;if(!t.ok)throw new Error(await t.text());return t.json()}async function i(e){var t;let s,n;try{const{hostedPaymentGatewaysHelperUrl:r,paymentGatewaysHelperUrl:i,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if("GET"!==d.method)throw s=405,new Error("Method not allowed. Allowed methods: GET.");const p=a(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}).exec(new URL(d.url).pathname).groups.presetId,h=o(m(r)),y=o(m(i)),u=null===(t=(await o(m(l(p))))._links["fx:payment_gateway"])||void 0===t?void 0:t.href,f=u?await o(m(u)):void 0,c=function(e){const{hostedPaymentGatewaysHelper:t,paymentGatewaysHelper:a,paymentPresetId:s,paymentGateway:n,base:r}=e,o=new URL(`./payment_presets/${s}/available_payment_methods`,r),i={};return Object.entries(t.values).forEach((([e,t])=>{i[e]=t})),Object.entries(a.values).forEach((([e,t])=>{i[e]=t,n&&(i[e].conflict={type:n.type,name:n.description})})),{_links:{self:{href:o.toString()}},values:i}}({hostedPaymentGatewaysHelper:await h,paymentGatewaysHelper:await y,paymentPresetId:p,paymentGateway:f,base:new URL(d.url).origin});n=JSON.stringify(c),s=200}catch(e){n=e instanceof Error?e.message:String(e),s=null!=s?s:500}return new Response(n,{status:s})}function l(e){const{paymentPresetId:t,base:a}=e;return{_links:{self:{href:new URL(`./payment_presets/${t}/available_fraud_protections`,a).toString()}},values:{minfraud:{name:"MaxMind minFraud",uses_rejection_threshold:!0,json:null},google_recaptcha:{name:"Google reCAPTCHA",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"config",name:"Configuration",type:"select",description:"Determines how reCAPTCHA is configured to operate.",default_value:"disabled",options:[{name:"Disabled",value:"disabled"},{name:"Always enabled",value:"enabled_always"},{name:"Enabled by errors",value:"enabled_by_errors"}]},{id:"private_key",name:"Private Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Private Key here.",default_value:""},{id:"site_key",name:"Site Key",type:"text",optional:!0,description:"If using a custom subdomain, enter your Site Key here.",default_value:""}]}]}},custom_precheckout_hook:{name:"Pre-Checkout Webhook",uses_rejection_threshold:!1,json:{blocks:[{id:"",parent_id:"",fields:[{id:"enabled",name:"Enabled",type:"checkbox",default_value:!1},{id:"url",name:"URL",type:"text",description:"Url of your Pre-Checkout Hook",default_value:""},{id:"failure_handling",name:"Failure handling",type:"select",description:"Determines what happens to the checkout submission if your webhook fails to respond correctly.",default_value:"",options:[{name:"Reject",value:"reject"},{name:"Approve",value:"approve"}]}]}]}}}}}async function d(e){let t,s;try{const{request:n}=e;if("GET"!==n.method)throw t=405,new Error("Method not allowed. Allowed methods: GET.");const r=l({paymentPresetId:a(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}).exec(new URL(n.url).pathname).groups.presetId,base:new URL(n.url).origin});s=JSON.stringify(r),t=200}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}const m=["_links"];function p(e){const{paymentMethodSetFraudProtectionId:t,paymentPresetId:a,fraudProtection:r,base:o}=e,{_links:i}=r,d=s(r,m),p=l({paymentPresetId:a,base:o}),h=`${new URL(i.self.href).pathname.split("/").pop()}C${t}`,y=new URL(`./payment_presets/${a}`,o),u=new URL(`./payment_presets/${a}/fraud_protections/${h}`,o);return n(n({_links:{self:{href:u.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:y.toString()}}},d),{},{helper:p.values[r.type]})}async function h(e){var t,s;let n,r;try{const{fraudProtectionsUrl:i,getPaymentMethodSetUrl:l,request:d,fetch:m}=e;if(!["GET","POST"].includes(d.method))throw n=405,new Error("Method not allowed. Allowed methods: GET, POST.");const h=new URL(d.url),y=a(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}).exec(h.pathname).groups.presetId,u=await o(m(l(y)));if("GET"===d.method){const e=parseInt(null!==(t=h.searchParams.get("offset"))&&void 0!==t?t:"0"),a=parseInt(null!==(s=h.searchParams.get("limit"))&&void 0!==s?s:"20"),i=new URL(u._links["fx:payment_method_set_fraud_protections"].href);i.searchParams.set("offset",String(Math.max(0,e-1))),i.searchParams.set("limit",String(a));const l=await o(m(i.toString())),f=await Promise.all(l._embedded["fx:payment_method_set_fraud_protections"].map((async e=>o(m(e._links["fx:fraud_protection"].href))))),c=function(e){const{paymentMethodSetFraudProtections:t,fraudProtections:a,paymentPresetId:s,base:n}=e,r=new URL(`/payment_presets/${s}/fraud_protections`,n);r.search=new URL(t._links.self.href).search;const o=new URL(r.toString());o.search=new URL(t._links.first.href).search;const i=new URL(r.toString());i.search=new URL(t._links.last.href).search;const l=new URL(r.toString());l.search=new URL(t._links.prev.href).search;const d=new URL(r.toString());d.search=new URL(t._links.next.href).search;const m=a.map((e=>{const a=t._embedded["fx:payment_method_set_fraud_protections"].find((t=>t.fraud_protection_uri===e._links.self.href));return p({paymentMethodSetFraudProtectionId:new URL(a._links.self.href).pathname.split("/").pop(),fraudProtection:e,paymentPresetId:s,base:n})}));return{_links:{first:{href:o.toString()},last:{href:i.toString()},prev:{href:l.toString()},next:{href:d.toString()},self:{href:r.toString()}},_embedded:{"fx:fraud_protections":m},returned_items:t.returned_items,total_items:t.total_items,offset:t.offset,limit:t.limit}}({paymentMethodSetFraudProtections:l,fraudProtections:f,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(c)}else{const e=await d.json();delete e.helper;const t=m(i,{method:"POST",body:JSON.stringify(e)}),a=await o(t),s=await o(m(u._links["fx:payment_method_set_fraud_protections"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:u._links.self.href,fraud_protection_uri:a._links.self.href})})),l=p({paymentMethodSetFraudProtectionId:new URL(s._links.self.href).pathname.split("/").pop(),fraudProtection:a,paymentPresetId:y,base:new URL(d.url).origin});n=200,r=JSON.stringify(l)}}catch(e){r=e instanceof Error?e.message:String(e),n=null!=n?n:500}return new Response(r,{status:n})}async function y(e){let t,s;try{const{getPaymentMethodSetUrl:n,getFraudProtectionUrl:r,request:i,fetch:l}=e;if(!["GET","PATCH","DELETE"].includes(i.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const d=a(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),{presetId:m,protectionId:h}=d.exec(i.url).groups,y=n(m),u=h.substring(0,h.indexOf("C"));if("DELETE"===i.method){const e=(await o(l(y)))._links["fx:payment_method_set_fraud_protections"].href,t=new URL(e);t.searchParams.set("fraud_protection_id",u);const a=await o(l(t.toString())),s=a._embedded["fx:payment_method_set_fraud_protections"].map((e=>o(l(e._links.self.href,{method:"DELETE"}))));await Promise.all(s)}let f=await i.text();try{const e=JSON.parse(f);delete e.helper,f=JSON.stringify(e)}catch(e){}const c=l(r(u),{method:i.method,body:"PATCH"===i.method?f:null}),w=await o(c);s="DELETE"===i.method?JSON.stringify({message:"Fraud protection was successfully deleted."}):JSON.stringify(p({paymentMethodSetFraudProtectionId:h.substring(h.indexOf("C")+1),fraudProtection:w,paymentPresetId:m,base:new URL(i.url).origin}))}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}const u=["_links"];function f(e){const{paymentPresetId:t,helper:a,base:r}=e,o="paymentGateway"in e?e.paymentGateway:e.hostedPaymentGateway,{_links:i}=o,l=s(o,u),d=new URL(i.self.href).pathname.split("/").pop();let m;m="paymentMethodSetHostedPaymentGatewayId"in e?`H${d}C${e.paymentMethodSetHostedPaymentGatewayId}`:`R${d}`;const p=new URL(`./payment_presets/${t}`,r),h=new URL(`./payment_presets/${t}/payment_methods/${m}`,r);return n(n({_links:{self:{href:h.toString()},"fx:store":i["fx:store"],"fx:payment_preset":{href:p.toString()}}},l),{},{helper:a})}async function c(e){var t,s,n,r;let i,l;try{const{hostedPaymentGatewaysHelperUrl:d,paymentGatewaysHelperUrl:m,hostedPaymentGatewaysUrl:p,getPaymentMethodSetUrl:h,paymentGatewaysUrl:y,request:u,fetch:c}=e;if(!["GET","POST"].includes(u.method))throw i=405,new Error("Method not allowed. Allowed methods: GET, POST.");const w=new URL(u.url),_=a(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}).exec(w.pathname).groups.presetId,[g,P,S]=await Promise.all([o(c(d)),o(c(m)),o(c(h(_)))]);if("GET"===u.method){const e=parseInt(null!==(t=w.searchParams.get("offset"))&&void 0!==t?t:"0"),a=parseInt(null!==(s=w.searchParams.get("limit"))&&void 0!==s?s:"20"),r=new URL(S._links["fx:payment_method_set_hosted_payment_gateways"].href);r.searchParams.set("offset",String(Math.max(0,e-1))),r.searchParams.set("limit",String(a));const d=null===(n=S._links["fx:payment_gateway"])||void 0===n?void 0:n.href,[m,p]=await Promise.all([d&&0===e?o(c(d)):null,o(c(r.toString()))]),h=await Promise.all(p._embedded["fx:payment_method_set_hosted_payment_gateways"].map((async e=>o(c(e._links["fx:hosted_payment_gateway"].href))))),y=function(e){var t,a;const{paymentMethodSetHostedPaymentGateways:s,hostedPaymentGatewaysHelper:n,hostedPaymentGateways:r,paymentGatewaysHelper:o,paymentPresetId:i,paymentGateway:l,query:d,base:m}=e,p=new URLSearchParams(d),h=parseInt(null!==(t=p.get("offset"))&&void 0!==t?t:"0"),y=parseInt(null!==(a=p.get("limit"))&&void 0!==a?a:"20"),u=s.total_items+(l?1:0),c=s.returned_items+(l&&"not-on-page"!==l?1:0),w=new URL(`/payment_presets/${i}/payment_methods`,m);w.search=d;const _=new URL(w.toString()),g=new URL(w.toString()),P=new URL(w.toString()),S=new URL(w.toString());_.searchParams.set("limit",String(y)),_.searchParams.set("offset",String(h)),g.searchParams.set("limit",String(y)),g.searchParams.set("offset",String(Math.max(0,u-y))),P.searchParams.set("limit",String(y)),P.searchParams.set("offset",String(Math.max(0,h-y))),S.searchParams.set("limit",String(y)),S.searchParams.set("offset",String(Math.min(h+y,Math.max(0,u-y))));const U=[...l&&"not-on-page"!==l?[l]:[],...r].map((e=>{const t=s._embedded["fx:payment_method_set_hosted_payment_gateways"].find((t=>t.hosted_payment_gateway_uri===e._links.self.href));return f(t?{paymentMethodSetHostedPaymentGatewayId:new URL(t._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:e,paymentPresetId:i,helper:n.values[e.type],base:m}:{paymentPresetId:i,paymentGateway:e,helper:o.values[e.type],base:m})}));return{_links:{first:{href:_.toString()},last:{href:g.toString()},prev:{href:P.toString()},next:{href:S.toString()},self:{href:w.toString()}},_embedded:{"fx:payment_methods":U},returned_items:c,total_items:u,offset:h,limit:y}}({paymentMethodSetHostedPaymentGateways:p,hostedPaymentGatewaysHelper:g,paymentGatewaysHelper:P,hostedPaymentGateways:h,paymentPresetId:_,paymentGateway:m||(d?"not-on-page":void 0),query:new URL(u.url).search,base:new URL(u.url).origin});i=200,l=JSON.stringify(y)}else{const e=await u.clone().json(),t=!!g.values[null!==(r=e.type)&&void 0!==r?r:""];if(delete e.helper,t){const t=await o(c(p,{method:"POST",body:JSON.stringify(e)})),a=await o(c(S._links["fx:payment_method_set_hosted_payment_gateways"].href,{method:"POST",body:JSON.stringify({payment_method_set_uri:S._links.self.href,hosted_payment_gateway_uri:t._links.self.href})})),s=f({paymentMethodSetHostedPaymentGatewayId:new URL(a._links.self.href).pathname.split("/").pop(),hostedPaymentGateway:t,paymentPresetId:_,helper:g.values[t.type],base:new URL(u.url).origin});i=200,l=JSON.stringify(s)}else{const t=c(y,{method:u.method,body:JSON.stringify(e)}),a=await o(t),s={gateway_uri:a._links.self.href};await Promise.all([o(c(S._links.self.href,{method:"PATCH",body:JSON.stringify(s)})),S.gateway_uri?o(c(S.gateway_uri,{method:"DELETE"})):null]);const n=f({paymentPresetId:_,paymentGateway:a,helper:P.values[a.type],base:new URL(u.url).origin});i=200,l=JSON.stringify(n)}}}catch(e){l=e instanceof Error?e.message:String(e),i=null!=i?i:500}return new Response(l,{status:i})}const w=["_links"];function _(e){const{paymentMethodSet:t,base:a}=e,{_links:r}=t,o=s(t,w),i=new URL(t._links.self.href).pathname.split("/").pop(),l=new URL(`./payment_presets/${i}`,a),d=new URL(`./payment_presets/${i}/payment_methods`,a),m=new URL(`./payment_presets/${i}/fraud_protections`,a),p=new URL(`./payment_presets/${i}/available_payment_methods`,a),h=new URL(`./payment_presets/${i}/available_fraud_protections`,a);return n({_links:{self:{href:l.toString()},"fx:store":r["fx:store"],"fx:payment_methods":{href:d.toString()},"fx:fraud_protections":{href:m.toString()},"fx:available_payment_methods":{href:p.toString()},"fx:available_fraud_protections":{href:h.toString()}}},o)}const g=["_embedded","_links"];async function P(e){let t,a;try{const{paymentMethodSetsUrl:r,request:i,fetch:l}=e;if(!["GET","POST"].includes(i.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, POST.");const d=new URL(i.url),m=new URL(r);let p;if(m.search=d.search,"POST"===i.method){const e=l(m.toString(),{method:"POST",body:await i.text()});p=_({paymentMethodSet:await o(e),base:d.origin})}else p=function(e){const{paymentMethodSets:t,base:a}=e,{_embedded:r,_links:o}=t,i=s(t,g),l=new URL("./payment_presets",a),d=new URL(o.first.href);l.search=d.search;const m=new URL("./payment_presets",a),p=new URL(o.last.href);m.search=p.search;const h=new URL("./payment_presets",a),y=new URL(o.prev.href);h.search=y.search;const u=new URL("./payment_presets",a),f=new URL(o.next.href);u.search=f.search;const c=new URL("./payment_presets",a),w=new URL(o.self.href);return c.search=w.search,n(n({},i),{},{_links:{first:{href:l.toString()},last:{href:m.toString()},prev:{href:h.toString()},next:{href:u.toString()},self:{href:c.toString()}},_embedded:{"fx:payment_presets":r["fx:payment_method_sets"].map((e=>_({paymentMethodSet:e,base:a})))}})}({paymentMethodSets:await o(l(m.toString())),base:d.origin});a=JSON.stringify(p),t=200}catch(e){a=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(a,{status:t})}async function S(e){let t,s;try{const{getPaymentMethodSetUrl:n,request:r,fetch:i}=e;if(!["GET","PATCH","DELETE"].includes(r.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const l=a(/payment_presets\/(.+)/,{presetId:1}).exec(r.url).groups.presetId,d=new URL(r.url),m=new URL(n(l));m.search=d.search;const p=await o(i(m.toString(),{method:r.method,body:"PATCH"===r.method?await r.text():null}));s="DELETE"===r.method?JSON.stringify({message:"Payment preset was successfully deleted."}):JSON.stringify(_({paymentMethodSet:p,base:new URL(r.url).origin}))}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}async function U(e){let t,s;try{const{hostedPaymentGatewaysHelperUrl:n,paymentGatewaysHelperUrl:r,getPaymentMethodSetHostedPaymentGatewayUrl:i,getHostedPaymentGatewayUrl:l,getPaymentMethodSetUrl:d,getPaymentGatewayUrl:m,request:p,fetch:h}=e;if(!["GET","PATCH","DELETE"].includes(p.method))throw t=405,new Error("Method not allowed. Allowed methods: GET, PATCH, DELETE.");const y=a(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),{presetId:u,methodId:c}=y.exec(p.url).groups,w=c.startsWith("H"),_=d(u),g=c.substring(1,w?c.indexOf("C"):void 0),P=o(h(n)),S=o(h(r));if("DELETE"===p.method)if(w){const e=i(c.substring(c.indexOf("C")+1));await o(h(e,{method:"DELETE"}))}else{const e={gateway_uri:""},t=JSON.stringify(e);await o(h(_,{method:"PATCH",body:t}))}let U=await p.text();try{const e=JSON.parse(U);delete e.helper,U=JSON.stringify(e)}catch(e){}if(w){const e=h(l(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await P,a=await o(e);s="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(f({paymentMethodSetHostedPaymentGatewayId:c.substring(c.indexOf("C")+1),hostedPaymentGateway:a,paymentPresetId:u,helper:t.values[a.type],base:new URL(p.url).origin}))}else{const e=h(m(g),{method:p.method,body:"PATCH"===p.method?U:null}),t=await S,a=await o(e);s="DELETE"===p.method?JSON.stringify({message:"Payment method was successfully deleted."}):JSON.stringify(f({paymentGateway:a,paymentPresetId:u,helper:t.values[a.type],base:new URL(p.url).origin}))}}catch(e){s=e instanceof Error?e.message:String(e),t=null!=t?t:500}return new Response(s,{status:t})}class b extends e{constructor(){super(...arguments),this.paymentMethodSetHostedPaymentGatewayBaseUrl=null,this.paymentMethodSetHostedPaymentGatewaysUrl=null,this.hostedPaymentGatewaysHelperUrl=null,this.hostedPaymentGatewayBaseUrl=null,this.hostedPaymentGatewaysUrl=null,this.paymentGatewaysHelperUrl=null,this.paymentMethodSetBaseUrl=null,this.paymentMethodSetsUrl=null,this.fraudProtectionBaseUrl=null,this.fraudProtectionsUrl=null,this.paymentGatewayBaseUrl=null,this.paymentGatewaysUrl=null,this.__api=new r(this),this.__fetch=this.__api.fetch.bind(this.__api),this.__handleFetch=e=>{var s,n,r,o,l;if(!(e instanceof t))return;if(!e.request.url.startsWith("https://foxy-payments-api.element/"))return;if(e.defaultPrevented)return;const{paymentMethodSetHostedPaymentGatewaysUrl:m,hostedPaymentGatewaysHelperUrl:p,paymentGatewaysHelperUrl:u,hostedPaymentGatewaysUrl:f,paymentMethodSetsUrl:w,fraudProtectionsUrl:_,paymentGatewaysUrl:g}=this,b=null!==(s=this.paymentMethodSetHostedPaymentGatewayBaseUrl)&&void 0!==s?s:this.paymentMethodSetHostedPaymentGatewaysUrl,G=null!==(n=this.hostedPaymentGatewayBaseUrl)&&void 0!==n?n:this.hostedPaymentGatewaysUrl,L=null!==(r=this.paymentMethodSetBaseUrl)&&void 0!==r?r:this.paymentMethodSetsUrl,E=null!==(o=this.fraudProtectionBaseUrl)&&void 0!==o?o:this.fraudProtectionsUrl,R=null!==(l=this.paymentGatewayBaseUrl)&&void 0!==l?l:this.paymentGatewaysUrl;if(null===m)return;if(null===b)return;if(null===p)return;if(null===u)return;if(null===f)return;if(null===G)return;if(null===w)return;if(null===L)return;if(null===_)return;if(null===E)return;if(null===g)return;if(null===R)return;const v=e=>t=>{const a=new URL(e);return a.pathname.endsWith("/")||(a.pathname+="/"),a.pathname+=t,a.toString()},x=function(e){const t=[[a(/\/payment_presets\/(.+)\/payment_methods\/(.+)/,{presetId:1,methodId:2}),U],[a(/\/payment_presets\/(.+)\/available_fraud_protections/,{presetId:1}),d],[a(/\/payment_presets\/(.+)\/available_payment_methods/,{presetId:1}),i],[a(/\/payment_presets\/(.+)\/fraud_protections\/(.+)/,{presetId:1,protectionId:2}),y],[a(/\/payment_presets\/(.+)\/fraud_protections/,{presetId:1}),h],[a(/\/payment_presets\/(.+)\/payment_methods/,{presetId:1}),c],[a(/\/payment_presets\/(.+)/,{presetId:1}),S],[/\/payment_presets/,P]];for(const[a,s]of t)if(a.test(new URL(e.request.url).pathname))return s(e);return null}({hostedPaymentGatewaysHelperUrl:p,paymentGatewaysHelperUrl:u,hostedPaymentGatewaysUrl:f,paymentMethodSetsUrl:w,fraudProtectionsUrl:_,paymentGatewaysUrl:g,getPaymentMethodSetHostedPaymentGatewayUrl:v(m),getHostedPaymentGatewayUrl:v(G),getPaymentMethodSetUrl:v(L),getFraudProtectionUrl:v(E),getPaymentGatewayUrl:v(R),request:e.request,fetch:this.__fetch});x&&(e.preventDefault(),e.respondWith(x))}}static get properties(){return{paymentMethodSetHostedPaymentGatewayBaseUrl:{attribute:"payment-method-set-hosted-payment-gateway-base-url"},paymentMethodSetHostedPaymentGatewaysUrl:{attribute:"payment-method-set-hosted-payment-gateways-url"},hostedPaymentGatewaysHelperUrl:{attribute:"hosted-payment-gateways-helper-url"},hostedPaymentGatewayBaseUrl:{attribute:"hosted-payment-gateway-base-url"},hostedPaymentGatewaysUrl:{attribute:"hosted-payment-gateways-url"},paymentGatewaysHelperUrl:{attribute:"payment-gateways-helper-url"},paymentMethodSetBaseUrl:{attribute:"payment-method-set-base-url"},paymentMethodSetsUrl:{attribute:"payment-method-sets-url"},fraudProtectionBaseUrl:{attribute:"fraud-protection-base-url"},fraudProtectionsUrl:{attribute:"fraud-protections-url"},paymentGatewayBaseUrl:{attribute:"payment-gateway-base-url"},paymentGatewaysUrl:{attribute:"payment-gateways-url"}}}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}createRenderRoot(){return this}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}}customElements.define("foxy-payments-api",b);export{b as PaymentsApi};
@@ -1,4 +1,4 @@
1
- import"./shared-71782a9e.js";import"./shared-b7cda8ba.js";import{_ as e}from"./shared-3c58ddf1.js";import{s as l,h as t,c as a,L as s}from"./shared-dc73b9a5.js";import{T as n,O as r}from"./shared-8874ec69.js";import{o}from"./shared-8438d4ca.js";import{c as i}from"./shared-4e709717.js";import{i as d}from"./shared-9803aa7c.js";import{a as u}from"./shared-79d0699c.js";import{r as c}from"./shared-a0c6a159.js";import{R as v,T as p,a as b}from"./shared-e989e47e.js";import{I as h}from"./shared-2808f43a.js";import{C as f}from"./shared-bd99107c.js";import"./shared-221d3788.js";let g;const m=l(g||(g=(e=>e)`
1
+ import"./shared-b44cf5a9.js";import"./shared-a08d509a.js";import{_ as e}from"./shared-701157ac.js";import{s as l,h as t,c as a,L as s}from"./shared-dc73b9a5.js";import{T as n,O as r}from"./shared-8874ec69.js";import{o}from"./shared-8438d4ca.js";import{c as i}from"./shared-4e709717.js";import{i as d}from"./shared-9803aa7c.js";import{a as u}from"./shared-79d0699c.js";import{r as c}from"./shared-a0c6a159.js";import{R as v,T as p,a as b}from"./shared-f2335b72.js";import{I as h}from"./shared-a5c48bf4.js";import{C as f}from"./shared-fee535ca.js";import"./shared-cfdd6c21.js";let g;const m=l(g||(g=(e=>e)`
2
2
  <svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
4
4
  </svg>
@@ -1,4 +1,4 @@
1
- import{C as e}from"./shared-5c4a29b9.js";import{D as t,a as i}from"./shared-891b33ad.js";import{C as a,a as s}from"./shared-5f65bdab.js";import{h as n,C as r,P as d}from"./shared-221d3788.js";import{T as l,E as o}from"./shared-43928f5a.js";import"./shared-51c3bc09.js";import"./shared-0e9ad70e.js";import{T as h}from"./shared-d67d56c2.js";import{a as m}from"./shared-a6e383ac.js";import{C as _}from"./shared-61ade33e.js";import"./shared-75f3a59e.js";import"./shared-15a947f3.js";import"./shared-a006b7a9.js";import"./shared-85f44e3e.js";import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{_ as u}from"./shared-3c58ddf1.js";import"./shared-b7cda8ba.js";import"./shared-98f85be1.js";import"./shared-8b4ba63a.js";import{h as c,r as p}from"./shared-dc73b9a5.js";import{S as g,R as v,T as f,a as b}from"./shared-e989e47e.js";import{c as y}from"./shared-4e709717.js";import{C as k,a as T}from"./shared-f635c052.js";import"./shared-8d7e2e2c.js";import{G as x}from"./shared-b6c1aa47.js";import"./shared-82423f8b.js";import"./shared-21fec810.js";import"./shared-d7bb413b.js";import"./shared-741bfa42.js";import{M as $}from"./shared-e075ca81.js";import{C as D}from"./shared-bd99107c.js";import{N as E}from"./shared-272e7269.js";import{i as w}from"./shared-9803aa7c.js";import{l as S}from"./shared-22ba9566.js";import"./shared-85707e42.js";import"./shared-879fcb1f.js";import"./shared-41e9ef02.js";import"./shared-0f4947e8.js";import"./shared-651c44fa.js";import"./shared-6c97a6b0.js";import"./shared-71782a9e.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-c73f6e8a.js";import"./shared-9e014b51.js";import"./shared-849413bb.js";import"./shared-99940888.js";import"./shared-2e2d45c4.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";
1
+ import{C as e}from"./shared-db108ddb.js";import{D as t,a as i}from"./shared-4b209827.js";import{C as a,a as s}from"./shared-1708eb3c.js";import{h as n,C as r,P as d}from"./shared-cfdd6c21.js";import{T as l,E as o}from"./shared-add044d3.js";import"./shared-ae200b9f.js";import"./shared-59d8b64e.js";import{T as h}from"./shared-0ed41a9e.js";import{a as m}from"./shared-fd410dee.js";import{C as _}from"./shared-61ade33e.js";import"./shared-a4e0a78b.js";import"./shared-c0e56e97.js";import"./shared-32cac4bd.js";import"./shared-f91d5706.js";import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{_ as c}from"./shared-701157ac.js";import"./shared-a08d509a.js";import"./shared-24586cfb.js";import"./shared-bba917bf.js";import{h as u,r as p}from"./shared-dc73b9a5.js";import{S as g,R as v,T as f,a as b}from"./shared-f2335b72.js";import{c as y}from"./shared-4e709717.js";import{C as k,a as T}from"./shared-a28c9952.js";import"./shared-57266e2a.js";import{G as x}from"./shared-059680a0.js";import"./shared-58095d4b.js";import"./shared-fad783a0.js";import"./shared-5c1e607b.js";import"./shared-cf9c48f9.js";import{M as $}from"./shared-a79dbeb9.js";import{C as D}from"./shared-fee535ca.js";import{N as E}from"./shared-cbeb8587.js";import{i as w}from"./shared-9803aa7c.js";import{l as S}from"./shared-22ba9566.js";import"./shared-e4cc1191.js";import"./shared-414a0c9b.js";import"./shared-7004839c.js";import"./shared-ec696e1b.js";import"./shared-651c44fa.js";import"./shared-25c57c74.js";import"./shared-b44cf5a9.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-c4f5b03b.js";import"./shared-44b101d0.js";import"./shared-789e3185.js";import"./shared-99940888.js";import"./shared-fbfa45bb.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 Vaadin Ltd.
@@ -192,4 +192,4 @@ const Y=document.createElement("template");Y.innerHTML='<dom-module id="date-tim
192
192
  </div>
193
193
  <slot name="helper" slot="helper">[[helperText]]</slot>
194
194
  </vaadin-date-time-picker-custom-field>
195
- `}static get is(){return"vaadin-date-time-picker"}static get version(){return"1.4.0"}static get properties(){return{name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,value:!1},errorMessage:String,value:{type:String,notify:!0,value:"",observer:"__valueChanged"},min:{type:String,observer:"__minChanged"},max:{type:String,observer:"__maxChanged"},__minDateTime:{type:Date,value:""},__maxDateTime:{type:Date,value:""},datePlaceholder:{type:String},timePlaceholder:{type:String},helperText:{type:String,value:""},step:{type:Number},initialPosition:String,showWeekNumbers:{type:Boolean},label:{type:String,value:""},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date},__customFieldValueFormat:{type:Object,value:()=>({parseValue:e=>e.split("T"),formatValue:e=>e.join("T")})},i18n:{type:Object,value:()=>Object.assign({},U,G)}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder)","__timePlaceholderChanged(timePlaceholder)","__stepChanged(step)","__initialPositionChanged(initialPosition)","__showWeekNumbersChanged(showWeekNumbers)","__requiredChanged(required)","__invalidChanged(invalid)","__disabledChanged(disabled)","__readonlyChanged(readonly)","__i18nChanged(i18n.*)","__autoOpenDisabledChanged(autoOpenDisabled)"]}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999"}ready(){super.ready(),this.addEventListener("focusout",(e=>{e.relatedTarget!==this.__datePicker.$.overlay&&this.validate()})),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__filterElements=e=>e.nodeType===Node.ELEMENT_NODE,this.__datePickerChanged(),this.__timePickerChanged(),this.$.dateSlot.addEventListener("slotchange",this.__datePickerChanged.bind(this)),this.$.timeSlot.addEventListener("slotchange",this.__timePickerChanged.bind(this)),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>this.focus()))}focus(){this.$.customField.focus()}__syncI18n(e,t,i){(i=i||Object.keys(t.i18n)).forEach((i=>{t.i18n.hasOwnProperty(i)&&e.set(`i18n.${i}`,t.i18n[i])}))}__updateCustomFieldInputs(){const e=this.$.customField.inputs;this.__datePicker&&this.__timePicker&&(e[0]!==this.__datePicker||e[1]!==this.__timePicker)&&this.$.customField._setInputs([this.__datePicker,this.__timePicker])}__changeEventHandler(e){this.__doDispatchChange=!0}__removeChangeListener(e){e&&e.removeEventListener("change",this.__changeEventHandler,!1)}__addChangeListener(e){e.addEventListener("change",this.__changeEventHandler,!1)}__datePickerChanged(){const e=this.shadowRoot.querySelector('[part="date"]'),t=this.$.dateSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__datePicker!==t&&(this.__removeChangeListener(this.__datePicker),this.__addChangeListener(t),this.__datePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.datePlaceholder,t.invalid=this.invalid,t.initialPosition=this.initialPosition,t.showWeekNumbers=this.showWeekNumbers,this.__syncI18n(t,this,z)):(this.datePlaceholder=t.placeholder,this.initialPosition=t.initialPosition,this.showWeekNumbers=t.showWeekNumbers,this.__syncI18n(this,t,z)),t.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),t.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{},t._validateInput=()=>{})}__timePickerChanged(){const e=this.shadowRoot.querySelector('[part="time"]'),t=this.$.timeSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__timePicker!==t&&(this.__removeChangeListener(this.__timePicker),this.__addChangeListener(t),this.__timePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.timePlaceholder,t.step=this.step,t.invalid=this.invalid,this.__syncI18n(t,this,J)):(this.timePlaceholder=t.placeholder,this.step=t.step,this.__syncI18n(this,t,J)),this.__updateTimePickerMinMax(),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{})}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){const e=i._dateEquals,t=this.__parseDate(this.__datePicker.value),a=e(this.__minDateTime,this.__maxDateTime),s=this.__timePicker.value;this.__minDateTime&&e(t,this.__minDateTime)||a?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&e(t,this.__maxDateTime)||a?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue,this.__timePicker.value!==s&&(this.__timePicker.value=s)}}__i18nChanged(e){this.__datePicker&&this.__datePicker.set(e.path,e.value),this.__timePicker&&this.__timePicker.set(e.path,e.value)}__datePlaceholderChanged(e){this.__datePicker&&(this.__datePicker.placeholder=e)}__timePlaceholderChanged(e){this.__timePicker&&(this.__timePicker.placeholder=e)}__stepChanged(e){if(this.__timePicker&&this.__timePicker.step!==e){const t=this.__timePicker.value;this.__timePicker.step=e,this.__timePicker.value!==t&&this.__triggerCustomFieldValueUpdate()}}__triggerCustomFieldValueUpdate(){this.__timePicker&&this.__timePicker.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__initialPositionChanged(e){this.__datePicker&&(this.__datePicker.initialPosition=e)}__showWeekNumbersChanged(e){this.__datePicker&&(this.__datePicker.showWeekNumbers=e)}__invalidChanged(e){this.__datePicker&&(this.__datePicker.invalid=e),this.__timePicker&&(this.__timePicker.invalid=e)}__requiredChanged(e){this.__datePicker&&(this.__datePicker.required=e),this.__timePicker&&(this.__timePicker.required=e)}__disabledChanged(e){this.__datePicker&&(this.__datePicker.disabled=e),this.__timePicker&&(this.__timePicker.disabled=e)}__readonlyChanged(e){this.__datePicker&&(this.__datePicker.readonly=e),this.__timePicker&&(this.__timePicker.readonly=e)}__parseDate(e){return W.prototype._parseDate(e)}__formatDateISO(e,t){return e?W.prototype._formatISO(e):t}__formatTimeISO(e){return G.formatTime(e)}__parseTimeISO(e){return G.parseTime(e)}__parseDateTime(e){const[t,i]=e.split("T");if(!t||!i)return;const a=this.__parseDate(t);if(!a)return;const s=this.__parseTimeISO(i);return s?(a.setHours(parseInt(s.hours)),a.setMinutes(parseInt(s.minutes||0)),a.setSeconds(parseInt(s.seconds||0)),a.setMilliseconds(parseInt(s.milliseconds||0)),a):void 0}__formatDateTime(e){if(!e)return"";return`${this.__formatDateISO(e,"")}T${this.__dateToIsoTimeString(e)}`}__dateToIsoTimeString(e){return this.__formatTimeISO(this.__validateTime({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}))}__validateTime(e){return e&&(e.seconds=this.__stepSegment<3?void 0:e.seconds,e.milliseconds=this.__stepSegment<4?void 0:e.milliseconds),e}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){const e=this.$.customField.inputs.filter((e=>!e.checkValidity.call(e))).length>0,t=this.required&&this.$.customField.inputs.filter((e=>!e.value)).length>0;return!e&&!t}get __stepSegment(){const e=null==this.step?60:parseFloat(this.step);return e%3600==0?1:e%60!=0&&e?e%1==0?3:e<1?4:void 0:2}__dateTimeEquals(e,t){return!!i._dateEquals(e,t)&&(e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()&&e.getSeconds()===t.getSeconds()&&e.getMilliseconds()===t.getMilliseconds())}__handleDateTimeChange(e,t,i,a){if(!i)return this[e]="",void(this[t]="");const s=this.__parseDateTime(i);s?this.__dateTimeEquals(this[t],s)||(this[t]=s):this[e]=a}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__doDispatchChange&&(this.__dispatchChange(),this.validate())}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__selectedDateTimeChanged(e){const t=this.__formatDateTime(e);this.value!==t&&(this.value=t);if(!!this.$.customField.inputs[0].$){const e=this.__doDispatchChange;this.$.customField.value=""!==this.value?this.value:"T",this.__doDispatchChange=e}}__customFieldValueChanged(e){const t=e.detail.value;if("T"===t&&!this.__customFieldInitialValueChangeReceived)return void(this.__customFieldInitialValueChangeReceived=!0);const[i,a]=t.split("T");this.__oldDateValue!==i&&(this.__oldDateValue=i,this.__updateTimePickerMinMax()),i&&a?t!==this.value&&(this.value=t):this.value="",this.__doDispatchChange=!1}__autoOpenDisabledChanged(e){this.__datePicker&&(this.__datePicker.autoOpenDisabled=e),this.__timePicker&&(this.__timePicker.autoOpenDisabled=e)}}customElements.define(Q.is,Q);const X=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];function Z(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=0===i?X.length-1:i-1,s=e.getFullYear()-(0===i?1:0),n=X[a][0],r=new Date(s,n),d=X[a][2];return{start:r,end:new Date(new Date(s,d+1).getTime()-1)}}function ee(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=X[i][0],s=new Date(e.getFullYear(),a),n=X[i][2];return{start:s,end:new Date(new Date(e.getFullYear(),n+1).getTime()-1)}}function te(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()-1),end:new Date(new Date(e.getFullYear(),e.getMonth()).getTime()-1)}}function ie(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()),end:new Date(new Date(e.getFullYear(),e.getMonth()+1).getTime()-1)}}function ae(e=new Date){return{start:new Date(e.getFullYear()-1,0),end:new Date(new Date(e.getFullYear(),0).getTime()-1)}}function se(e=new Date){return{start:new Date(e.getFullYear(),0),end:new Date(new Date(e.getFullYear()+1,0).getTime()-1)}}function ne(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-365),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function re(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-30),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function de(e){return`${e.getFullYear().toString().padStart(4,"0")}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}`}let le,oe,he,me,_e,ue,ce,pe,ge,ve,fe,be,ye,ke,Te,xe=e=>e;const $e=g(v(f(D(b(E,"report-form")))));class De extends $e{constructor(){super(...arguments),this.templates={},this.__showRangeTime=!1}static get scopedElements(){return{"vaadin-date-time-picker":customElements.get("vaadin-date-time-picker"),"vaadin-date-picker":customElements.get("vaadin-date-picker"),"vaadin-checkbox":customElements.get("vaadin-checkbox"),"vaadin-select":customElements.get("vaadin-select"),"vaadin-button":customElements.get("vaadin-button"),"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-metadata":$,"x-choice":k,"x-group":x}}static get properties(){return u(u({},super.properties),{},{__showRangeTime:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name_required",({datetime_start:e})=>!!e||"datetime_start_required",({datetime_end:e})=>!!e||"datetime_end_required"]}render(){var e,t;const i=this.hiddenSelector;return c(le||(le=xe` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="space-y-m"> ${0} ${0} ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),i.matches("name",!0)?"":this.__renderName(),i.matches("range",!0)?"":this.__renderRange(),i.matches("timestamps",!0)||!this.data?"":this.__renderTimestamps(),i.matches("create",!0)||this.data?"":this.__renderCreate(),i.matches("delete",!0)||!this.data?"":this.__renderDelete(),y({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderName(){const e="name",t=["complete","customers","customers_ltv"],i=!this.in("idle")||this.disabledSelector.matches(e),a=this.readonlySelector.matches(e);return c(oe||(oe=xe` <div data-testid="${0}"> ${0} <x-group frame> <foxy-i18n lang="${0}" slot="header" key="name" ns="${0}"></foxy-i18n> <x-choice data-testid="name-choice" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} </x-choice> </x-group> ${0} </div> `),e,this.renderTemplateOrSlot(`${e}:before`),this.lang,this.ns,this.form.name,t,a,i,(e=>{e instanceof T&&this.edit({name:e.detail})}),t.map((e=>c(he||(he=xe` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="name_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="name_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),this.renderTemplateOrSlot(`${e}:after`))}__renderRangePreset(){var e;const t=[[u({value:"0",label:"preset_previous_quarter"},Z()),u({value:"1",label:"preset_previous_month"},te()),u({value:"2",label:"preset_previous_year"},ae())],[u({value:"3",label:"preset_this_quarter"},ee()),u({value:"4",label:"preset_this_month"},ie()),u({value:"5",label:"preset_this_year"},se())],[u({value:"6",label:"preset_last_365_days"},ne()),u({value:"7",label:"preset_last_30_days"},re())]],i=t.flat(1).find((e=>{const{datetime_end:t,datetime_start:i}=this.form;return i&&t&&de(e.start)===i&&de(e.end)===t}));return c(ge||(ge=xe` <div> <vaadin-select data-testid="range:preset" label="${0}" class="w-full -mt-m -mb-xs" ?disabled="${0}" ?readonly="${0}" .value="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> </div> `),this.t("preset"),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),S(null!==(e=null==i?void 0:i.value)&&void 0!==e?e:"custom"),(e=>{const i=c(me||(me=xe`<vaadin-item value="custom">${0}</vaadin-item>`),this.t("preset_custom")),a=c(_e||(_e=xe`<hr>`)),s=t.map((e=>{const t=e.map((({value:e,label:t})=>c(ue||(ue=xe`<vaadin-item value="${0}">${0}</vaadin-item>`),e,this.t(t))));return c(ce||(ce=xe`${0}${0}`),t,a)}));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),p(c(pe||(pe=xe`${0}${0}`),s,i),e.firstElementChild)}),(e=>{const i=e.currentTarget,a=t.flat(1).find((e=>e.value===i.value));a&&this.edit({datetime_start:de(a.start),datetime_end:de(a.end)})}))}__renderRangeDateTimePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return c(ve||(ve=xe` <vaadin-date-time-picker date-placeholder="${0}" time-placeholder="${0}" error-message="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-time-picker> `),this.t("select_date"),this.t("select_time"),w(i?this.t(i):void 0),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(e=>{const i=e.currentTarget;this.edit({[t]:i.value})}));var s,n}__renderRangeDatePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return c(fe||(fe=xe` <vaadin-date-picker error-message="${0}" placeholder="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),w(i?this.t(i):void 0),this.t("select_date"),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(i=>{const a=i.currentTarget,s="end"===e?"23:59:59":"00:00:00";this.edit({[t]:`${a.value}T${s}`})}));var s,n}__renderRange(){const e=this.__showRangeTime?this.__renderRangeDateTimePicker:this.__renderRangeDatePicker;return c(be||(be=xe` <div data-testid="range"> ${0} <x-group frame> <foxy-i18n slot="header" lang="${0}" key="range" ns="${0}"></foxy-i18n> <div style="--lumo-border-radius:var(--lumo-border-radius-s)" class="p-m grid gap-m ${0}"> <div class="${0}"> ${0} </div> ${0} ${0} <vaadin-checkbox data-testid="range:toggle" class="-my-xs w-full ${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="use_precise_time" ns="${0}"></foxy-i18n> </vaadin-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("range:before"),this.lang,this.ns,this.__showRangeTime?"grid-cols-1":"sm-grid-cols-2",this.__showRangeTime?"col-span-1":"sm-col-span-2",this.__renderRangePreset(),e.call(this,"start"),e.call(this,"end"),this.__showRangeTime?"col-span-1":"sm-col-span-2",!this.in("idle")||this.disabledSelector.matches("range",!0),this.__showRangeTime,(e=>{const t=e.currentTarget;this.__showRangeTime=t.checked}),this.lang,this.ns,this.renderTemplateOrSlot("range:after"))}__renderTimestamps(){return c(ye||(ye=xe` <div> ${0} <x-metadata data-testid="timestamps" .items="${0}"> </x-metadata> ${0} </div> `),this.renderTemplateOrSlot("timestamps:before"),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),a=this.in({idle:{snapshot:{dirty:"invalid"}}}),s=e||t||(i||a),n=this.in("idle");return c(ke||(ke=xe` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||s||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return c(Te||(Te=xe` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}}customElements.define("foxy-report-form",De);export{De as ReportForm};
195
+ `}static get is(){return"vaadin-date-time-picker"}static get version(){return"1.4.0"}static get properties(){return{name:{type:String},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,value:!1},errorMessage:String,value:{type:String,notify:!0,value:"",observer:"__valueChanged"},min:{type:String,observer:"__minChanged"},max:{type:String,observer:"__maxChanged"},__minDateTime:{type:Date,value:""},__maxDateTime:{type:Date,value:""},datePlaceholder:{type:String},timePlaceholder:{type:String},helperText:{type:String,value:""},step:{type:Number},initialPosition:String,showWeekNumbers:{type:Boolean},label:{type:String,value:""},autoOpenDisabled:Boolean,disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},autofocus:{type:Boolean},__selectedDateTime:{type:Date},__customFieldValueFormat:{type:Object,value:()=>({parseValue:e=>e.split("T"),formatValue:e=>e.join("T")})},i18n:{type:Object,value:()=>Object.assign({},U,G)}}}static get observers(){return["__selectedDateTimeChanged(__selectedDateTime)","__datePlaceholderChanged(datePlaceholder)","__timePlaceholderChanged(timePlaceholder)","__stepChanged(step)","__initialPositionChanged(initialPosition)","__showWeekNumbersChanged(showWeekNumbers)","__requiredChanged(required)","__invalidChanged(invalid)","__disabledChanged(disabled)","__readonlyChanged(readonly)","__i18nChanged(i18n.*)","__autoOpenDisabledChanged(autoOpenDisabled)"]}constructor(){super(),this.__defaultDateMinMaxValue=void 0,this.__defaultTimeMinValue="00:00:00.000",this.__defaultTimeMaxValue="23:59:59.999"}ready(){super.ready(),this.addEventListener("focusout",(e=>{e.relatedTarget!==this.__datePicker.$.overlay&&this.validate()})),this.__changeEventHandler=this.__changeEventHandler.bind(this),this.__filterElements=e=>e.nodeType===Node.ELEMENT_NODE,this.__datePickerChanged(),this.__timePickerChanged(),this.$.dateSlot.addEventListener("slotchange",this.__datePickerChanged.bind(this)),this.$.timeSlot.addEventListener("slotchange",this.__timePickerChanged.bind(this)),this.autofocus&&!this.disabled&&window.requestAnimationFrame((()=>this.focus()))}focus(){this.$.customField.focus()}__syncI18n(e,t,i){(i=i||Object.keys(t.i18n)).forEach((i=>{t.i18n.hasOwnProperty(i)&&e.set(`i18n.${i}`,t.i18n[i])}))}__updateCustomFieldInputs(){const e=this.$.customField.inputs;this.__datePicker&&this.__timePicker&&(e[0]!==this.__datePicker||e[1]!==this.__timePicker)&&this.$.customField._setInputs([this.__datePicker,this.__timePicker])}__changeEventHandler(e){this.__doDispatchChange=!0}__removeChangeListener(e){e&&e.removeEventListener("change",this.__changeEventHandler,!1)}__addChangeListener(e){e.addEventListener("change",this.__changeEventHandler,!1)}__datePickerChanged(){const e=this.shadowRoot.querySelector('[part="date"]'),t=this.$.dateSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__datePicker!==t&&(this.__removeChangeListener(this.__datePicker),this.__addChangeListener(t),this.__datePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.datePlaceholder,t.invalid=this.invalid,t.initialPosition=this.initialPosition,t.showWeekNumbers=this.showWeekNumbers,this.__syncI18n(t,this,z)):(this.datePlaceholder=t.placeholder,this.initialPosition=t.initialPosition,this.showWeekNumbers=t.showWeekNumbers,this.__syncI18n(this,t,z)),t.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue),t.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{},t._validateInput=()=>{})}__timePickerChanged(){const e=this.shadowRoot.querySelector('[part="time"]'),t=this.$.timeSlot.assignedNodes({flatten:!0}).filter(this.__filterElements)[0];this.__timePicker!==t&&(this.__removeChangeListener(this.__timePicker),this.__addChangeListener(t),this.__timePicker=t,this.__updateCustomFieldInputs(),t===e?(t.placeholder=this.timePlaceholder,t.step=this.step,t.invalid=this.invalid,this.__syncI18n(t,this,J)):(this.timePlaceholder=t.placeholder,this.step=t.step,this.__syncI18n(this,t,J)),this.__updateTimePickerMinMax(),t.required=this.required,t.disabled=this.disabled,t.readonly=this.readonly,t.autoOpenDisabled=this.autoOpenDisabled,t.validate=()=>{})}__updateTimePickerMinMax(){if(this.__timePicker&&this.__datePicker){const e=i._dateEquals,t=this.__parseDate(this.__datePicker.value),a=e(this.__minDateTime,this.__maxDateTime),s=this.__timePicker.value;this.__minDateTime&&e(t,this.__minDateTime)||a?this.__timePicker.min=this.__dateToIsoTimeString(this.__minDateTime):this.__timePicker.min=this.__defaultTimeMinValue,this.__maxDateTime&&e(t,this.__maxDateTime)||a?this.__timePicker.max=this.__dateToIsoTimeString(this.__maxDateTime):this.__timePicker.max=this.__defaultTimeMaxValue,this.__timePicker.value!==s&&(this.__timePicker.value=s)}}__i18nChanged(e){this.__datePicker&&this.__datePicker.set(e.path,e.value),this.__timePicker&&this.__timePicker.set(e.path,e.value)}__datePlaceholderChanged(e){this.__datePicker&&(this.__datePicker.placeholder=e)}__timePlaceholderChanged(e){this.__timePicker&&(this.__timePicker.placeholder=e)}__stepChanged(e){if(this.__timePicker&&this.__timePicker.step!==e){const t=this.__timePicker.value;this.__timePicker.step=e,this.__timePicker.value!==t&&this.__triggerCustomFieldValueUpdate()}}__triggerCustomFieldValueUpdate(){this.__timePicker&&this.__timePicker.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__initialPositionChanged(e){this.__datePicker&&(this.__datePicker.initialPosition=e)}__showWeekNumbersChanged(e){this.__datePicker&&(this.__datePicker.showWeekNumbers=e)}__invalidChanged(e){this.__datePicker&&(this.__datePicker.invalid=e),this.__timePicker&&(this.__timePicker.invalid=e)}__requiredChanged(e){this.__datePicker&&(this.__datePicker.required=e),this.__timePicker&&(this.__timePicker.required=e)}__disabledChanged(e){this.__datePicker&&(this.__datePicker.disabled=e),this.__timePicker&&(this.__timePicker.disabled=e)}__readonlyChanged(e){this.__datePicker&&(this.__datePicker.readonly=e),this.__timePicker&&(this.__timePicker.readonly=e)}__parseDate(e){return W.prototype._parseDate(e)}__formatDateISO(e,t){return e?W.prototype._formatISO(e):t}__formatTimeISO(e){return G.formatTime(e)}__parseTimeISO(e){return G.parseTime(e)}__parseDateTime(e){const[t,i]=e.split("T");if(!t||!i)return;const a=this.__parseDate(t);if(!a)return;const s=this.__parseTimeISO(i);return s?(a.setHours(parseInt(s.hours)),a.setMinutes(parseInt(s.minutes||0)),a.setSeconds(parseInt(s.seconds||0)),a.setMilliseconds(parseInt(s.milliseconds||0)),a):void 0}__formatDateTime(e){if(!e)return"";return`${this.__formatDateISO(e,"")}T${this.__dateToIsoTimeString(e)}`}__dateToIsoTimeString(e){return this.__formatTimeISO(this.__validateTime({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),milliseconds:e.getMilliseconds()}))}__validateTime(e){return e&&(e.seconds=this.__stepSegment<3?void 0:e.seconds,e.milliseconds=this.__stepSegment<4?void 0:e.milliseconds),e}validate(){return!(this.invalid=!this.checkValidity())}checkValidity(){const e=this.$.customField.inputs.filter((e=>!e.checkValidity.call(e))).length>0,t=this.required&&this.$.customField.inputs.filter((e=>!e.value)).length>0;return!e&&!t}get __stepSegment(){const e=null==this.step?60:parseFloat(this.step);return e%3600==0?1:e%60!=0&&e?e%1==0?3:e<1?4:void 0:2}__dateTimeEquals(e,t){return!!i._dateEquals(e,t)&&(e.getHours()===t.getHours()&&e.getMinutes()===t.getMinutes()&&e.getSeconds()===t.getSeconds()&&e.getMilliseconds()===t.getMilliseconds())}__handleDateTimeChange(e,t,i,a){if(!i)return this[e]="",void(this[t]="");const s=this.__parseDateTime(i);s?this.__dateTimeEquals(this[t],s)||(this[t]=s):this[e]=a}__valueChanged(e,t){this.__handleDateTimeChange("value","__selectedDateTime",e,t),this.__doDispatchChange&&(this.__dispatchChange(),this.validate())}__dispatchChange(){this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__minChanged(e,t){this.__handleDateTimeChange("min","__minDateTime",e,t),this.__datePicker&&(this.__datePicker.min=this.__formatDateISO(this.__minDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__maxChanged(e,t){this.__handleDateTimeChange("max","__maxDateTime",e,t),this.__datePicker&&(this.__datePicker.max=this.__formatDateISO(this.__maxDateTime,this.__defaultDateMinMaxValue)),this.__updateTimePickerMinMax()}__selectedDateTimeChanged(e){const t=this.__formatDateTime(e);this.value!==t&&(this.value=t);if(!!this.$.customField.inputs[0].$){const e=this.__doDispatchChange;this.$.customField.value=""!==this.value?this.value:"T",this.__doDispatchChange=e}}__customFieldValueChanged(e){const t=e.detail.value;if("T"===t&&!this.__customFieldInitialValueChangeReceived)return void(this.__customFieldInitialValueChangeReceived=!0);const[i,a]=t.split("T");this.__oldDateValue!==i&&(this.__oldDateValue=i,this.__updateTimePickerMinMax()),i&&a?t!==this.value&&(this.value=t):this.value="",this.__doDispatchChange=!1}__autoOpenDisabledChanged(e){this.__datePicker&&(this.__datePicker.autoOpenDisabled=e),this.__timePicker&&(this.__timePicker.autoOpenDisabled=e)}}customElements.define(Q.is,Q);const X=[[0,1,2],[3,4,5],[6,7,8],[9,10,11]];function Z(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=0===i?X.length-1:i-1,s=e.getFullYear()-(0===i?1:0),n=X[a][0],r=new Date(s,n),d=X[a][2];return{start:r,end:new Date(new Date(s,d+1).getTime()-1)}}function ee(e=new Date){const t=e.getMonth(),i=X.findIndex((e=>e.includes(t))),a=X[i][0],s=new Date(e.getFullYear(),a),n=X[i][2];return{start:s,end:new Date(new Date(e.getFullYear(),n+1).getTime()-1)}}function te(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()-1),end:new Date(new Date(e.getFullYear(),e.getMonth()).getTime()-1)}}function ie(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth()),end:new Date(new Date(e.getFullYear(),e.getMonth()+1).getTime()-1)}}function ae(e=new Date){return{start:new Date(e.getFullYear()-1,0),end:new Date(new Date(e.getFullYear(),0).getTime()-1)}}function se(e=new Date){return{start:new Date(e.getFullYear(),0),end:new Date(new Date(e.getFullYear()+1,0).getTime()-1)}}function ne(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-365),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function re(e=new Date){return{start:new Date(e.getFullYear(),e.getMonth(),e.getDate()-30),end:new Date(new Date(e.getFullYear(),e.getMonth(),e.getDate()+1).getTime()-1)}}function de(e){return`${e.getFullYear().toString().padStart(4,"0")}-${(e.getMonth()+1).toString().padStart(2,"0")}-${e.getDate().toString().padStart(2,"0")}T${e.getHours().toString().padStart(2,"0")}:${e.getMinutes().toString().padStart(2,"0")}:${e.getSeconds().toString().padStart(2,"0")}`}let le,oe,he,me,_e,ce,ue,pe,ge,ve,fe,be,ye,ke,Te,xe=e=>e;const $e=g(v(f(D(b(E,"report-form")))));class De extends $e{constructor(){super(...arguments),this.__showRangeTime=!1}static get scopedElements(){return{"vaadin-date-time-picker":customElements.get("vaadin-date-time-picker"),"vaadin-date-picker":customElements.get("vaadin-date-picker"),"vaadin-checkbox":customElements.get("vaadin-checkbox"),"vaadin-select":customElements.get("vaadin-select"),"vaadin-button":customElements.get("vaadin-button"),"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-metadata":$,"x-choice":k,"x-group":x}}static get properties(){return c(c({},super.properties),{},{__showRangeTime:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name_required",({datetime_start:e})=>!!e||"datetime_start_required",({datetime_end:e})=>!!e||"datetime_end_required"]}render(){var e,t;const i=this.hiddenSelector;return u(le||(le=xe` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="space-y-m"> ${0} ${0} ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),i.matches("name",!0)?"":this.__renderName(),i.matches("range",!0)?"":this.__renderRange(),i.matches("timestamps",!0)||!this.data?"":this.__renderTimestamps(),i.matches("create",!0)||this.data?"":this.__renderCreate(),i.matches("delete",!0)||!this.data?"":this.__renderDelete(),y({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in("idle")}),this.in("fail")?"error":this.in("busy")?"busy":"empty",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderName(){const e="name",t=["complete","customers","customers_ltv"],i=!this.in("idle")||this.disabledSelector.matches(e),a=this.readonlySelector.matches(e);return u(oe||(oe=xe` <div data-testid="${0}"> ${0} <x-group frame> <foxy-i18n lang="${0}" slot="header" key="name" ns="${0}"></foxy-i18n> <x-choice data-testid="name-choice" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} </x-choice> </x-group> ${0} </div> `),e,this.renderTemplateOrSlot(`${e}:before`),this.lang,this.ns,this.form.name,t,a,i,(e=>{e instanceof T&&this.edit({name:e.detail})}),t.map((e=>u(he||(he=xe` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="name_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="name_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),this.renderTemplateOrSlot(`${e}:after`))}__renderRangePreset(){var e;const t=[[c({value:"0",label:"preset_previous_quarter"},Z()),c({value:"1",label:"preset_previous_month"},te()),c({value:"2",label:"preset_previous_year"},ae())],[c({value:"3",label:"preset_this_quarter"},ee()),c({value:"4",label:"preset_this_month"},ie()),c({value:"5",label:"preset_this_year"},se())],[c({value:"6",label:"preset_last_365_days"},ne()),c({value:"7",label:"preset_last_30_days"},re())]],i=t.flat(1).find((e=>{const{datetime_end:t,datetime_start:i}=this.form;return i&&t&&de(e.start)===i&&de(e.end)===t}));return u(ge||(ge=xe` <div> <vaadin-select data-testid="range:preset" label="${0}" class="w-full -mt-m -mb-xs" ?disabled="${0}" ?readonly="${0}" .value="${0}" .renderer="${0}" @change="${0}"> </vaadin-select> </div> `),this.t("preset"),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),S(null!==(e=null==i?void 0:i.value)&&void 0!==e?e:"custom"),(e=>{const i=u(me||(me=xe`<vaadin-item value="custom">${0}</vaadin-item>`),this.t("preset_custom")),a=u(_e||(_e=xe`<hr>`)),s=t.map((e=>{const t=e.map((({value:e,label:t})=>u(ce||(ce=xe`<vaadin-item value="${0}">${0}</vaadin-item>`),e,this.t(t))));return u(ue||(ue=xe`${0}${0}`),t,a)}));e.firstElementChild||e.appendChild(document.createElement("vaadin-list-box")),p(u(pe||(pe=xe`${0}${0}`),s,i),e.firstElementChild)}),(e=>{const i=e.currentTarget,a=t.flat(1).find((e=>e.value===i.value));a&&this.edit({datetime_start:de(a.start),datetime_end:de(a.end)})}))}__renderRangeDateTimePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return u(ve||(ve=xe` <vaadin-date-time-picker date-placeholder="${0}" time-placeholder="${0}" error-message="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-time-picker> `),this.t("select_date"),this.t("select_time"),w(i?this.t(i):void 0),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(e=>{const i=e.currentTarget;this.edit({[t]:i.value})}));var s,n}__renderRangeDatePicker(e){const t="end"===e?"datetime_end":"datetime_start",i=this.errors.find((e=>e.startsWith(`${t}_`))),a=this.form[t];return u(fe||(fe=xe` <vaadin-date-picker error-message="${0}" placeholder="${0}" data-testid="range:${0}" class="w-full" label="${0}" step="1" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @change="${0}"> </vaadin-date-picker> `),w(i?this.t(i):void 0),this.t("select_date"),e,this.t(e),!this.in("idle")||this.disabledSelector.matches("range",!0),this.readonlySelector.matches("range",!0),(()=>!i),a?null!==(n=null===(s=/^\d{4}-\d{2}-\d{2}/.exec(a))||void 0===s?void 0:s[0])&&void 0!==n?n:"":"",(e=>"Enter"===e.key&&this.submit()),(i=>{const a=i.currentTarget,s="end"===e?"23:59:59":"00:00:00";this.edit({[t]:`${a.value}T${s}`})}));var s,n}__renderRange(){const e=this.__showRangeTime?this.__renderRangeDateTimePicker:this.__renderRangeDatePicker;return u(be||(be=xe` <div data-testid="range"> ${0} <x-group frame> <foxy-i18n slot="header" lang="${0}" key="range" ns="${0}"></foxy-i18n> <div style="--lumo-border-radius:var(--lumo-border-radius-s)" class="p-m grid gap-m ${0}"> <div class="${0}"> ${0} </div> ${0} ${0} <vaadin-checkbox data-testid="range:toggle" class="-my-xs w-full ${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <foxy-i18n lang="${0}" key="use_precise_time" ns="${0}"></foxy-i18n> </vaadin-checkbox> </div> </x-group> ${0} </div> `),this.renderTemplateOrSlot("range:before"),this.lang,this.ns,this.__showRangeTime?"grid-cols-1":"sm-grid-cols-2",this.__showRangeTime?"col-span-1":"sm-col-span-2",this.__renderRangePreset(),e.call(this,"start"),e.call(this,"end"),this.__showRangeTime?"col-span-1":"sm-col-span-2",!this.in("idle")||this.disabledSelector.matches("range",!0),this.__showRangeTime,(e=>{const t=e.currentTarget;this.__showRangeTime=t.checked}),this.lang,this.ns,this.renderTemplateOrSlot("range:after"))}__renderTimestamps(){return u(ye||(ye=xe` <div> ${0} <x-metadata data-testid="timestamps" .items="${0}"> </x-metadata> ${0} </div> `),this.renderTemplateOrSlot("timestamps:before"),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot("timestamps:after"))}__renderCreate(){const e=this.in({idle:{template:{clean:"invalid"}}}),t=this.in({idle:{template:{dirty:"invalid"}}}),i=this.in({idle:{snapshot:{clean:"invalid"}}}),a=this.in({idle:{snapshot:{dirty:"invalid"}}}),s=e||t||(i||a),n=this.in("idle");return u(ke||(ke=xe` <div> ${0} <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("create:before"),!n||s||this.disabledSelector.matches("create",!0),this.submit,this.ns,this.lang,this.renderTemplateOrSlot("create:after"))}__renderDelete(){return u(Te||(Te=xe` <div> <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} <vaadin-button data-testid="delete" theme="error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.lang,this.ns,(e=>!e.detail.cancelled&&this.delete()),this.renderTemplateOrSlot("delete:before"),!this.in("idle")||this.disabledSelector.matches("delete",!0),(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang,this.renderTemplateOrSlot("delete:after"))}}customElements.define("foxy-report-form",De);export{De as ReportForm};
@@ -1,4 +1,4 @@
1
- import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{T as n}from"./shared-7535b32d.js";import{a as e}from"./shared-e989e47e.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-3c58ddf1.js";import"./shared-dc73b9a5.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-4e709717.js";let a,s,o,r,t,i,l,d,m,f,y,h=n=>n;class p extends(e(n,"reports-table")){constructor(){super(...arguments),this.columns=[p.nameColumn,p.startColumn,p.endColumn,p.createdOnColumn,p.linkColumn]}}p.nameColumn={header:({html:n,lang:e,ns:s})=>n(a||(a=h`<foxy-i18n lang=${0} key="report_name" ns=${0}></foxy-i18n>`),e,s),cell:({html:n,data:e,lang:a,ns:o})=>{const r=`report_name_${e.name}`;return n(s||(s=h`<foxy-i18n class="font-medium" lang=${0} key=${0} ns=${0}></foxy-i18n>`),a,r,o)}},p.startColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(o||(o=h`<foxy-i18n lang=${0} key="range_start" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(r||(r=h`
1
+ import"./foxy-spinner.js";import"./shared-6d1556a0.js";import{T as n}from"./shared-293f9c07.js";import{a as e}from"./shared-f2335b72.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-701157ac.js";import"./shared-dc73b9a5.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./foxy-nucleon-element.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";let a,s,o,r,t,i,l,d,m,f,y,h=n=>n;class c extends(e(n,"reports-table")){constructor(){super(...arguments),this.columns=[c.nameColumn,c.startColumn,c.endColumn,c.createdOnColumn,c.linkColumn]}}c.nameColumn={header:({html:n,lang:e,ns:s})=>n(a||(a=h`<foxy-i18n lang=${0} key="report_name" ns=${0}></foxy-i18n>`),e,s),cell:({html:n,data:e,lang:a,ns:o})=>{const r=`report_name_${e.name}`;return n(s||(s=h`<foxy-i18n class="font-medium" lang=${0} key=${0} ns=${0}></foxy-i18n>`),a,r,o)}},c.startColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(o||(o=h`<foxy-i18n lang=${0} key="range_start" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(r||(r=h`
2
2
  <foxy-i18n
3
3
  options=${0}
4
4
  lang=${0}
@@ -6,7 +6,7 @@ import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{T as n}from"./shar
6
6
  ns=${0}
7
7
  >
8
8
  </foxy-i18n>
9
- `),JSON.stringify({value:e.datetime_start}),a,s)},p.endColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(t||(t=h`<foxy-i18n lang=${0} key="range_end" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(i||(i=h`
9
+ `),JSON.stringify({value:e.datetime_start}),a,s)},c.endColumn={hideBelow:"md",header:({html:n,lang:e,ns:a})=>n(t||(t=h`<foxy-i18n lang=${0} key="range_end" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(i||(i=h`
10
10
  <foxy-i18n
11
11
  options=${0}
12
12
  lang=${0}
@@ -14,7 +14,7 @@ import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{T as n}from"./shar
14
14
  ns=${0}
15
15
  >
16
16
  </foxy-i18n>
17
- `),JSON.stringify({value:e.datetime_end}),a,s)},p.createdOnColumn={header:({html:n,lang:e,ns:a})=>n(l||(l=h`<foxy-i18n lang=${0} key="created_on" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(d||(d=h`
17
+ `),JSON.stringify({value:e.datetime_end}),a,s)},c.createdOnColumn={header:({html:n,lang:e,ns:a})=>n(l||(l=h`<foxy-i18n lang=${0} key="created_on" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,data:e,lang:a,ns:s})=>n(d||(d=h`
18
18
  <foxy-i18n
19
19
  options=${0}
20
20
  lang=${0}
@@ -22,7 +22,7 @@ import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{T as n}from"./shar
22
22
  ns=${0}
23
23
  >
24
24
  </foxy-i18n>
25
- `),JSON.stringify({value:e.date_created}),a,s)},p.linkColumn={header:({html:n,lang:e,ns:a})=>n(m||(m=h`<foxy-i18n lang=${0} key="link" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,lang:e,data:a,ns:s})=>"ready"===a.status?n(f||(f=h`
25
+ `),JSON.stringify({value:e.date_created}),a,s)},c.linkColumn={header:({html:n,lang:e,ns:a})=>n(m||(m=h`<foxy-i18n lang=${0} key="link" ns=${0}></foxy-i18n>`),e,a),cell:({html:n,lang:e,data:a,ns:s})=>"ready"===a.status?n(f||(f=h`
26
26
  <a
27
27
  class="rounded font-medium text-primary transition-opacity hover-opacity-75 focus-outline-none focus-ring-2 focus-ring-primary-50"
28
28
  href=${0}
@@ -38,4 +38,4 @@ import"./foxy-spinner.js";import"./shared-ecb7a183.js";import{T as n}from"./shar
38
38
  ns="${0} link-spinner"
39
39
  >
40
40
  </foxy-spinner>
41
- `),"error"===a.status?"error":"busy",e,s)},customElements.define("foxy-reports-table",p);export{p as ReportsTable};
41
+ `),"error"===a.status?"error":"busy",e,s)},customElements.define("foxy-reports-table",c);export{c as ReportsTable};
@@ -1 +1 @@
1
- import"./shared-8bd53409.js";import"./foxy-nucleon-element.js";import"./shared-ecb7a183.js";import{a as e}from"./shared-e989e47e.js";import{I as t}from"./shared-f090c63a.js";import{i as s}from"./shared-9803aa7c.js";import{d as r}from"./shared-68aebcc4.js";import{h as d}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-3c58ddf1.js";import"./shared-2808f43a.js";import"./shared-343d1fd7.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-4e709717.js";let o,i,a,n,c,l=e=>e;const h=e(t,"shipment-card");class u extends h{constructor(){super(...arguments),this.__transactionLoaderId="transactionLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,h,u,p,y,f,m;const{address_name:_,address1:v,address2:x,city:$,region:j,postal_code:b}=null!==(e=this.data)&&void 0!==e?e:{},g={address_name:_,address1:v,address2:x,city:$,region:j,postal_code:b},L={amount:`${null===(t=this.data)||void 0===t?void 0:t.total_shipping} ${this.__currencyCode}`,currencyDisplay:this.__currencyDisplay},k=null===(h=this.data)||void 0===h?void 0:h.shipping_service_description,I=null!==(y=null===(p=null===(u=this.data)||void 0===u?void 0:u._embedded)||void 0===p?void 0:p["fx:items"])&&void 0!==y?y:[];return d(o||(o=l` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="space-y-s"> <div class="grid leading-s text-body"> <foxy-i18n class="truncate text-m font-medium" infer="" key="full_address" .options="${0}"> </foxy-i18n> <span class="truncate text-s text-secondary"> ${0} <foxy-i18n key="price" infer="" .options="${0}"></foxy-i18n> &bull; <foxy-i18n infer="" key="item" .options="${0}"></foxy-i18n> </span> </div> ${0} </div> `),s(null===(f=this.data)||void 0===f?void 0:f._links["fx:transaction"].href),this.__transactionLoaderId,(()=>this.requestUpdate()),s(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),g,k?d(i||(i=l`${0} &bull; `),r(k)):"",L,{count:I.length},I.length>0?d(a||(a=l` <div class="border-t border-dashed border-contrast-20"></div> <div class="overflow-auto"> <table class="text-s leading-s whitespace-nowrap"> <thead></thead> <tbody> ${0} </tbody> </table> </div> `),I.map((e=>{var t;const s=null===(t=e._embedded)||void 0===t?void 0:t["fx:item_category"],r=null==s?void 0:s.default_length_unit,o=null==s?void 0:s.default_weight_unit;return d(n||(n=l` <tr> <td class="pr-s font-medium"> ${0} </td> <td class="px-s text-secondary">${0}</td> <td class="px-s text-tertiary"> ${0}&times;${0}&times;${0} ${0} </td> <td class="px-s text-tertiary">${0} ${0}</td> <td class="pl-s font-medium"> <foxy-i18n infer="" key="quantity" .options="${0}"> </foxy-i18n> </td> </tr> `),e.code||d(c||(c=l`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),e.name,e.width,e.height,e.length,r,e.weight,o,{count:e.quantity})}))):"")}get isBodyReady(){return super.isBodyReady&&!!this.__currencyDisplay&&!!this.__currencyCode}get __transactionLoader(){return this.renderRoot.querySelector(`#${this.__transactionLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __currencyDisplay(){var e;const t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return t?t.use_international_currency_symbol?"code":"symbol":void 0}get __currencyCode(){var e,t;return null===(t=null===(e=this.__transactionLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.currency_code}}customElements.define("foxy-shipment-card",u);export{u as ShipmentCard};
1
+ import"./shared-7af96c0a.js";import"./foxy-nucleon-element.js";import"./shared-6d1556a0.js";import{a as e}from"./shared-f2335b72.js";import{I as t}from"./shared-d82f9e35.js";import{i as s}from"./shared-9803aa7c.js";import{d as r}from"./shared-bb35ee61.js";import{h as d}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-701157ac.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";let o,i,a,n,c,l=e=>e;const h=e(t,"shipment-card");class u extends h{constructor(){super(...arguments),this.__transactionLoaderId="transactionLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,h,u,p,f,y,m;const{address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j}=null!==(e=this.data)&&void 0!==e?e:{},g={address_name:_,address1:v,address2:x,city:$,region:b,postal_code:j},L={amount:`${null===(t=this.data)||void 0===t?void 0:t.total_shipping} ${this.__currencyCode}`,currencyDisplay:this.__currencyDisplay},k=null===(h=this.data)||void 0===h?void 0:h.shipping_service_description,I=null!==(f=null===(p=null===(u=this.data)||void 0===u?void 0:u._embedded)||void 0===p?void 0:p["fx:items"])&&void 0!==f?f:[];return d(o||(o=l` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="space-y-s"> <div class="grid leading-s text-body"> <foxy-i18n class="truncate text-m font-medium" infer="" key="full_address" .options="${0}"> </foxy-i18n> <span class="truncate text-s text-secondary"> ${0} <foxy-i18n key="price" infer="" .options="${0}"></foxy-i18n> &bull; <foxy-i18n infer="" key="item" .options="${0}"></foxy-i18n> </span> </div> ${0} </div> `),s(null===(y=this.data)||void 0===y?void 0:y._links["fx:transaction"].href),this.__transactionLoaderId,(()=>this.requestUpdate()),s(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),g,k?d(i||(i=l`${0} &bull; `),r(k)):"",L,{count:I.length},I.length>0?d(a||(a=l` <div class="border-t border-dashed border-contrast-20"></div> <div class="overflow-auto"> <table class="text-s leading-s whitespace-nowrap"> <thead></thead> <tbody> ${0} </tbody> </table> </div> `),I.map((e=>{var t;const s=null===(t=e._embedded)||void 0===t?void 0:t["fx:item_category"],r=null==s?void 0:s.default_length_unit,o=null==s?void 0:s.default_weight_unit;return d(n||(n=l` <tr> <td class="pr-s font-medium"> ${0} </td> <td class="px-s text-secondary">${0}</td> <td class="px-s text-tertiary"> ${0}&times;${0}&times;${0} ${0} </td> <td class="px-s text-tertiary">${0} ${0}</td> <td class="pl-s font-medium"> <foxy-i18n infer="" key="quantity" .options="${0}"> </foxy-i18n> </td> </tr> `),e.code||d(c||(c=l`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),e.name,e.width,e.height,e.length,r,e.weight,o,{count:e.quantity})}))):"")}get isBodyReady(){return super.isBodyReady&&!!this.__currencyDisplay&&!!this.__currencyCode}get __transactionLoader(){return this.renderRoot.querySelector(`#${this.__transactionLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __currencyDisplay(){var e;const t=null===(e=this.__storeLoader)||void 0===e?void 0:e.data;return t?t.use_international_currency_symbol?"code":"symbol":void 0}get __currencyCode(){var e,t;return null===(t=null===(e=this.__transactionLoader)||void 0===e?void 0:e.data)||void 0===t?void 0:t.currency_code}}customElements.define("foxy-shipment-card",u);export{u as ShipmentCard};
@@ -0,0 +1 @@
1
+ import"./shared-51c4a6dd.js";import"./shared-7af96c0a.js";import"./shared-6d1556a0.js";import{a as r}from"./shared-f2335b72.js";import{T as s}from"./shared-08d018f5.js";import{h as e}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-701157ac.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-d82f9e35.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";let a,d,o=r=>r;const t=r(s,"shipping-container-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(a||(a=o`${0}`),r.name),subtitle:({code:r})=>e(d||(d=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-container-card",i);export{i as ShippingContainerCard};
@@ -0,0 +1 @@
1
+ import"./shared-51c4a6dd.js";import"./shared-7af96c0a.js";import"./shared-6d1556a0.js";import{a as r}from"./shared-f2335b72.js";import{T as s}from"./shared-08d018f5.js";import{h as e}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-701157ac.js";import"./shared-a5c48bf4.js";import"./shared-343d1fd7.js";import"./shared-d82f9e35.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-cd96ff03.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-4e709717.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";let d,a,o=r=>r;const t=r(s,"shipping-drop-type-card");class i extends t{renderBody(){return super.renderBody({title:r=>e(d||(d=o`${0}`),r.name),subtitle:({code:r})=>e(a||(a=o` <foxy-i18n infer="" key="subtitle" .options="${0}"></foxy-i18n> `),{code:r})})}}customElements.define("foxy-shipping-drop-type-card",i);export{i as ShippingDropTypeCard};