@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-8bd53409.js";import"./foxy-nucleon-element.js";import"./shared-ecb7a183.js";import{_ as e}from"./shared-3c58ddf1.js";import{a as t}from"./shared-e989e47e.js";import{C as i}from"./shared-bd99107c.js";import{p as r}from"./shared-66d2a0d7.js";import{I as o}from"./shared-f090c63a.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.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 d,l,n,c,u,_,h=e=>e;const v=i(t(o,"item-card"));class p extends v{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,v,f,m,y,x;const L=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,$=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],g=null!==(v=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==v?v:0,C=this.__currencyDisplay,H=this.__currencyCode;return s(d||(d=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(f=this.data)||void 0===f?void 0:f.image),(e=>{e.currentTarget.src=p.__placeholder}),(null===(m=this.data)||void 0===m?void 0:m.name)||s(l||(l=h`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),L,{amount:`${g} ${H}`,currencyDisplay:C},(null===(y=this.data)||void 0===y?void 0:y.code)||void 0,(null===(x=this.data)||void 0===x?void 0:x.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?s(n||(n=h` <span> &bull; </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",$&&$.length>0?s(c||(c=h` <div class="mt-m"> ${0} </div> `),$.map((e=>s(u||(u=h` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?s(_||(_=h` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${H}`,signDisplay:"exceptZero",currencyDisplay:C})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}p.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",p);export{p as ItemCard};
1
+ import"./shared-7af96c0a.js";import"./foxy-nucleon-element.js";import"./shared-6d1556a0.js";import{_ as e}from"./shared-701157ac.js";import{a as t}from"./shared-f2335b72.js";import{C as i}from"./shared-fee535ca.js";import{p as r}from"./shared-6740ee7a.js";import{I as o}from"./shared-d82f9e35.js";import{i as a}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.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 d,l,n,c,u,_,h=e=>e;const v=i(t(o,"item-card"));class f extends v{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){var e,t,i,r,o,v,p,m,y,x;const L=null!==(t=null===(e=this.data)||void 0===e?void 0:e.quantity)&&void 0!==t?t:0,$=null===(r=null===(i=this.data)||void 0===i?void 0:i._embedded)||void 0===r?void 0:r["fx:item_options"],g=null!==(v=null===(o=this.data)||void 0===o?void 0:o.price)&&void 0!==v?v:0,C=this.__currencyDisplay,H=this.__currencyCode;return s(d||(d=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="flex items-start leading-xs" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-s bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="" @error="${0}"> <div class="flex-1 min-w-0"> <div class="h-s flex items-center"> <div class="min-w-0 flex-1 leading-s"> <div class="flex items-center justify-between"> <div class="truncate text-m font-medium"> ${0} </div> <span class="text-s text-tertiary whitespace-nowrap"> ${0} &times; <foxy-i18n .options="${0}" key="price" infer=""> </foxy-i18n> </span> </div> <div class="truncate text-secondary text-s"> ${0} ${0} &ZeroWidthSpace; </div> </div> </div> ${0} </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),a(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),a(null===(p=this.data)||void 0===p?void 0:p.image),(e=>{e.currentTarget.src=f.__placeholder}),(null===(m=this.data)||void 0===m?void 0:m.name)||s(l||(l=h`<foxy-i18n infer="" key="no_code"></foxy-i18n>`)),L,{amount:`${g} ${H}`,currencyDisplay:C},(null===(y=this.data)||void 0===y?void 0:y.code)||void 0,(null===(x=this.data)||void 0===x?void 0:x.subscription_frequency)&&!this.hiddenSelector.matches("autorenew-icon",!0)?s(n||(n=h` <span> &bull; </span> <foxy-i18n infer="" key="${0}" .options="${0}"> </foxy-i18n> `),this.__subinfoKey,this.__subinfoOptions):"",$&&$.length>0?s(c||(c=h` <div class="mt-m"> ${0} </div> `),$.map((e=>s(u||(u=h` <div data-testclass="option" class="flex items-center gap-s text-s leading-s"> <div class="truncate text-secondary"> ${0}: <span class="font-medium text-body">${0}</span> </div> ${0} </div> `),e.name,e.value,e.price_mod?s(_||(_=h` <div class="border-t border-dashed border-contrast-10 flex-1"></div> <div class="whitespace-nowrap text-tertiary"> <foxy-i18n options="${0}" key="price" infer=""> </foxy-i18n> </div> `),JSON.stringify({amount:`${e.price_mod} ${H}`,signDisplay:"exceptZero",currencyDisplay:C})):"")))):"")}get isBodyReady(){const e=!!this.__currencyDisplay&&!!this.__currencyCode;return super.isBodyReady&&e}get __transactionTemplateHref(){var e,t,i;try{const r=null===(e=this.data)||void 0===e?void 0:e._links,o=new URL(null!==(i=null===(t=null==r?void 0:r["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==i?i:"");return o.searchParams.set("zoom","transaction_template"),o.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,i,r;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(r=null===(i=this.__store)||void 0===i?void 0:i._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const i=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==i?void 0:i["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const i=`#${this.__transactionTemplateLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const i=`#${this.__defaultTemplateSetLoaderId}`,r=this.renderRoot.querySelector(i);return null!==(t=null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const i=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const i=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const i=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const i=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const i=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(i))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t||this.data&&!this.data._links["fx:store"]?"symbol":void 0}get __currencyCode(){var e,t,i,r;const o=this.__transaction;if(o)return o.currency_code;{const o=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==o?void 0:o.currency_code)return o.currency_code;{const e=this.__localeCodesHelper,o=null===(i=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===i?void 0:i.locale_code,a=o?null==e?void 0:e.values[o]:void 0;if(a)return null===(r=/Currency: ([A-Z]{3})/g.exec(a))||void 0===r?void 0:r[1]}}}get __subinfoOptions(){var t,i,o;const a=this.__currencyDisplay;if(void 0===a)return;const s=this.__currencyCode;if(void 0===s)return;const d=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===d)return;const l=null===(i=this.data)||void 0===i?void 0:i.subscription_frequency;if(void 0===l)return;const n=null===(o=this.data)||void 0===o?void 0:o.subscription_start_date;return void 0!==n?e(e({},r(l)),{},{amount:`${d} ${s}`,currencyDisplay:a,startDate:n}):void 0}get __subinfoKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.subscription_frequency;if(t)return"subinfo_"+(".5m"===t?"twice_a_month":"recurring")}}f.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",f);export{f as ItemCard};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import{a as r}from"./shared-e989e47e.js";import{T as s}from"./shared-8452c492.js";import{h as e}from"./shared-dc73b9a5.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-ecb7a183.js";import"./shared-3c58ddf1.js";import"./shared-343d1fd7.js";import"./shared-2808f43a.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 d,a,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(d||(d=t`${0}`),r.name),subtitle:r=>e(a||(a=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.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"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-6d1556a0.js";import"./shared-701157ac.js";import"./shared-343d1fd7.js";import"./shared-a5c48bf4.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,d,t=r=>r;const o=r(s,"item-category-card");class m extends o{renderBody(){return super.renderBody({title:r=>e(a||(a=t`${0}`),r.name),subtitle:r=>e(d||(d=t`${0}`),r.code)})}}customElements.define("foxy-item-category-card",m);export{m as ItemCategoryCard};
@@ -1 +1 @@
1
- import"./shared-7a5adb55.js";import"./shared-1602c9a4.js";import"./shared-28e988c6.js";import"./shared-56b8e9ca.js";import"./shared-eeb2d7ab.js";import{I as e}from"./shared-9c3b800b.js";import"./foxy-discount-builder.js";import"./foxy-nucleon-element.js";import{a as t}from"./shared-e5f6ca48.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-75f3a59e.js";import{TaxCard as i}from"./foxy-tax-card.js";import{_ as r}from"./shared-3c58ddf1.js";import{i as n}from"./shared-9803aa7c.js";import{h as o}from"./shared-dc73b9a5.js";import{a}from"./shared-e989e47e.js";import"./shared-5f65bdab.js";import"./shared-98f85be1.js";import"./shared-221d3788.js";import"./shared-879fcb1f.js";import"./shared-21fec810.js";import"./shared-b7cda8ba.js";import"./shared-41e9ef02.js";import"./shared-43928f5a.js";import"./shared-82423f8b.js";import"./shared-0e9ad70e.js";import"./shared-651c44fa.js";import"./shared-51c3bc09.js";import"./shared-d67d56c2.js";import"./shared-d7bb413b.js";import"./shared-61ade33e.js";import"./shared-a6e383ac.js";import"./shared-0f4947e8.js";import"./shared-37391934.js";import"./shared-343d1fd7.js";import"./shared-c73f6e8a.js";import"./shared-9e014b51.js";import"./shared-ecb7a183.js";import"./shared-2808f43a.js";import"./shared-15a947f3.js";import"./shared-85f44e3e.js";import"./shared-8d7e2e2c.js";import"./shared-bd99107c.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-71782a9e.js";import"./foxy-spinner.js";import"./shared-272e7269.js";import"./shared-cd96ff03.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-bab2ea2c.js";import"./shared-a0c6a159.js";import"./shared-8438d4ca.js";import"./shared-51c4a6dd.js";import"./shared-99940888.js";import"./shared-8bd53409.js";import"./shared-f090c63a.js";let l,s=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control-item",class extends i{constructor(){super(...arguments),this.taxItemCategories=null,this.itemCategory=null,this.__resourceElementIsBusy=!1,this.__queryElementData=null}static get properties(){return r(r({},super.properties),{},{taxItemCategories:{attribute:"tax-item-categories"},itemCategory:{attribute:"item-category"}})}render(){var e,t,i,r,a;const d=null===(i=null===(t=null===(e=this.__queryElementData)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t["fx:tax_item_categories"])||void 0===i?void 0:i[0];let m;try{const e=new URL(null!==(r=this.taxItemCategories)&&void 0!==r?r:""),t=new URL(this.href).pathname.split("/").pop();if(!t)throw new Error;e.searchParams.set("tax_id",t),e.searchParams.set("limit","1"),m=e.toString()}catch(e){m=void 0}return o(l||(l=s` <foxy-nucleon href="${0}" id="query" @update="${0}"> <foxy-nucleon parent="${0}" href="${0}" id="resource" @update="${0}"> </foxy-nucleon> </foxy-nucleon> <vaadin-checkbox class="px-m py-s block overflow-hidden" ?disabled="${0}" ?checked="${0}" @change="${0}"> ${0} </vaadin-checkbox> `),n(m),(e=>{const t=e.currentTarget;this.__queryElementData=t.data,this.requestUpdate()}),n(null!==(a=this.taxItemCategories)&&void 0!==a?a:void 0),n(null==d?void 0:d._links.self.href),(e=>{const t=e.currentTarget;this.__resourceElementIsBusy=!t.in("idle"),this.requestUpdate()}),!this.__queryElementData||this.__resourceElementIsBusy||this.disabled,!!d,(e=>{const t=e.currentTarget,i=this.renderRoot.querySelector("#resource");t.checked?(i.edit({tax_uri:this.data._links.self.href,item_category_uri:this.itemCategory}),i.submit()):i.delete()}),super.render())}});let d,m=e=>e;customElements.define("foxy-internal-item-category-form-taxes-control",class extends t{constructor(){super(...arguments),this.taxes=null}static get properties(){return r(r({},super.properties),{},{taxes:{}})}renderControl(){var e,t,i,r;const n=this.nucleon;let a;try{const t=new URL(null!==(e=this.taxes)&&void 0!==e?e:"");t.searchParams.set("limit","5"),a=t.toString()}catch(e){a=null!==(t=this.taxes)&&void 0!==t?t:""}return o(d||(d=m` <foxy-i18n class="block text-s font-medium text-secondary leading-none mb-s" infer="" key="title"> </foxy-i18n> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page class="block mb-s divide-y divide-contrast-10 border border-contrast-10 rounded-t-l rounded-b-l" infer="" item="foxy-internal-item-category-form-taxes-control-item" .props="${0}"> </foxy-collection-page> </foxy-pagination> <foxy-i18n class="block text-xs text-secondary leading-xs mt-xs" infer="" key="helper_text"> </foxy-i18n> `),a,{"tax-item-categories":null!==(r=null===(i=null==n?void 0:n.form._links)||void 0===i?void 0:i["fx:tax_item_categories"].href)&&void 0!==r?r:"","item-category":null==n?void 0:n.href})}});let p,c,_,f,u,h,y,x,g,v,b,j,$=e=>e;class w extends(a(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.templates={},this.taxes=null,this.__giftRecipientEmailTemplateLoaderId="gift-recipient-email-template-loader",this.__customerEmailTemplateLoaderId="customer-email-template-loader",this.__adminEmailTemplateLoaderId="admin-email-template-loader"}static get properties(){return r(r({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative",({send_admin_email:e,admin_email:t})=>!e||!!t||"admin-email:v8n_required"]}renderBody(){var e,t,i,r,a,l,s;const d=this.form.item_delivery_type,m=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return o(p||(p=$` <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="code" class="col-span-2"></foxy-internal-text-control> <foxy-internal-select-control infer="handling-fee-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control infer="item-delivery-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="discount-name" class="col-span-2"> </foxy-internal-text-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="admin-email-template-uri" class="${0}" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="customer-email-template-uri" class="col-span-2" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="gift-recipient-email-template-uri" class="col-span-2" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> ${0} </div> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),w.__handlingFeeTypeOptions,"none"===m?"":o(c||(c=$` ${0} ${0} ${0} `),this.__renderHandlingFee(),m.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===m?this.__renderHandlingFeeMinimum():""),w.__itemDeliveryTypeOptions,"downloaded"===d?this.__renderDownloadDeliveryControls():"flat_rate"===d?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===d?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",this.form.discount_name?this.__renderDiscountBuilder():"",n(null!==(t=this.emailTemplates)&&void 0!==t?t:void 0),this.form.send_admin_email?"":"col-span-2",null===(i=this.__adminEmailTemplateLoader)||void 0===i?void 0:i.data,(e=>{this.edit({send_admin_email:!!e.detail,admin_email:e.detail?this.form.admin_email:""})}),this.form.send_admin_email?this.__renderAdminEmail():"",n(null!==(r=this.emailTemplates)&&void 0!==r?r:void 0),null===(a=this.__customerEmailTemplateLoader)||void 0===a?void 0:a.data,(e=>this.edit({send_customer_email:!!e.detail})),n(null!==(l=this.emailTemplates)&&void 0!==l?l:void 0),null===(s=this.__giftRecipientEmailTemplateLoader)||void 0===s?void 0:s.data,this.data?this.__renderTaxes():"",super.renderBody(),n(this.form.customer_email_template_uri||void 0),this.__customerEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.gift_recipient_email_template_uri||void 0),this.__giftRecipientEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.admin_email_template_uri||void 0),this.__adminEmailTemplateLoaderId,(()=>this.requestUpdate()))}get __giftRecipientEmailTemplateLoader(){const e=this.__giftRecipientEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __customerEmailTemplateLoader(){const e=this.__customerEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __adminEmailTemplateLoader(){const e=this.__adminEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}__renderHandlingFee(){return o(_||(_=$` <foxy-internal-number-control infer="handling-fee" class="${0}"> </foxy-internal-number-control> `),"flat_percent"===this.form.handling_fee_type?"":"col-span-2")}__renderHandlingFeePercentage(){return o(f||(f=$` <foxy-internal-number-control infer="handling-fee-percentage"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return o(u||(u=$` <foxy-internal-number-control infer="handling-fee-minimum"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return o(h||(h=$` <foxy-internal-integer-control infer="max-downloads-per-customer"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-downloads-time-period"> </foxy-internal-integer-control> `))}__renderFlatRateControls(){return o(y||(y=$` <foxy-internal-number-control infer="shipping-flat-rate"> </foxy-internal-number-control> <foxy-internal-select-control infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),w.__shippingFlatRateTypeOptions)}__renderShippingControls(){return o(x||(x=$` <foxy-internal-integer-control infer="default-weight" class="col-span-2"> </foxy-internal-integer-control> <foxy-internal-select-control infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),w.__defaultWeightUnitOptions,w.__defaultLengthUnitOptions)}__renderCustomsValue(){return o(g||(g=$` <foxy-internal-number-control infer="customs-value" class="col-span-2"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const i={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return o(v||(v=$` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),i,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}__renderAdminEmail(){return o(b||(b=$`<foxy-internal-text-control infer="admin-email"> </foxy-internal-text-control>`))}__renderTaxes(){var e;return o(j||(j=$` <foxy-internal-item-category-form-taxes-control taxes="${0}" class="col-span-2" infer="taxes"> </foxy-internal-item-category-form-taxes-control> `),n(null!==(e=this.taxes)&&void 0!==e?e:void 0))}}w.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],w.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],w.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],w.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],w.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",w);export{w as ItemCategoryForm};
1
+ import"./shared-b3681c71.js";import"./shared-a05fe56c.js";import"./shared-66084f2e.js";import"./shared-824d0804.js";import"./shared-004fc193.js";import"./shared-0e038fda.js";import{I as e}from"./shared-5cb6aca6.js";import"./foxy-discount-builder.js";import"./foxy-nucleon-element.js";import"./foxy-tax-card.js";import{_ as t,B as i}from"./shared-701157ac.js";import{a as r}from"./shared-f2335b72.js";import{i as n}from"./shared-9803aa7c.js";import{h as a}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"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-a08d509a.js";import"./shared-b44cf5a9.js";import"./shared-6d1556a0.js";import"./shared-343d1fd7.js";import"./shared-a5c48bf4.js";import"./shared-fee535ca.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-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-c0e56e97.js";import"./shared-4e709717.js";import"./shared-b6376c8f.js";import"./shared-51c4a6dd.js";import"./shared-bab2ea2c.js";import"./shared-1708eb3c.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-7004839c.js";import"./shared-58095d4b.js";import"./shared-59d8b64e.js";import"./shared-651c44fa.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-5c1e607b.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-c4f5b03b.js";import"./shared-44b101d0.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-8438d4ca.js";import"./shared-08d018f5.js";import"./shared-d82f9e35.js";let o,l,s,d,m,p,_,c,f,u,h,y=e=>e;class g extends(r(e,"item-category-form")){constructor(){super(...arguments),this.emailTemplates=null,this.taxes=null,this.__giftRecipientEmailTemplateLoaderId="gift-recipient-email-template-loader",this.__customerEmailTemplateLoaderId="customer-email-template-loader",this.__adminEmailTemplateLoaderId="admin-email-template-loader"}static get properties(){return t(t({},super.properties),{},{emailTemplates:{attribute:"email-templates"},taxes:{}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>e&&e.length<=50||"code:v8n_too_long",({name:e})=>!!e||"name:v8n_required",({name:e})=>e&&e.length<=50||"name:v8n_too_long",({item_delivery_type:e})=>!!e||"item-delivery-type:v8n_required",({item_delivery_type:e,max_downloads_per_customer:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-per-customer:v8n_required",({max_downloads_per_customer:e})=>"number"!=typeof e||e>=0||"max-downloads-per-customer:v8n_negative",({item_delivery_type:e,max_downloads_time_period:t})=>"downloaded"!==e||"number"==typeof t||"max-downloads-time-period:v8n_required",({max_downloads_time_period:e})=>"number"!=typeof e||e>=0||"max-downloads-time-period:v8n_negative",({customs_value:e})=>"number"!=typeof e||e>=0||"customs-value:v8n_negative",({item_delivery_type:e,default_weight:t})=>"shipped"!==e||"number"==typeof t||"default-weight:v8n_required",({default_weight:e})=>"number"!=typeof e||e>=0||"default-weight:v8n_negative",({item_delivery_type:e,default_weight_unit:t})=>"shipped"!==e||"string"==typeof t||"default-weight-unit:v8n_required",({item_delivery_type:e,default_length_unit:t})=>"shipped"!==e||"string"==typeof t||"default-length-unit:v8n_required",({item_delivery_type:e,shipping_flat_rate:t})=>"flat_rate"!==e||"number"==typeof t||"shipping-flat-rate:v8n_required",({shipping_flat_rate:e})=>"number"!=typeof e||e>=0||"shipping-flat-rate:v8n_negative",({item_delivery_type:e,shipping_flat_rate_type:t})=>"flat_rate"!==e||"string"==typeof t||"shipping-flat-rate-type:v8n_required",({handling_fee_type:e})=>!!e||"handling-fee-type:v8n_required",({handling_fee_type:e,handling_fee_minimum:t})=>"flat_percent_with_minimum"!==e||"number"==typeof t||"handling-fee-minimum:v8n_required",({handling_fee_minimum:e})=>"number"!=typeof e||e>=0||"handling-fee-minimum:v8n_negative",({handling_fee_type:e,handling_fee_percentage:t})=>"flat_percent_with_minimum"!==e&&"flat_percent"!==e||"number"==typeof t||"handling-fee-percentage:v8n_required",({handling_fee_percentage:e})=>"number"!=typeof e||e>=0||"handling-fee-percentage:v8n_negative",({send_admin_email:e,admin_email:t})=>!e||!!t||"admin-email:v8n_required"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data||e.unshift("taxes"),new i(e.join(" ").trim())}renderBody(){var e,t,i,r,s,d,m,p,_,c;const f=this.form.item_delivery_type,u=null!==(e=this.form.handling_fee_type)&&void 0!==e?e:"none";return a(o||(o=y` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="code" class="col-span-2"></foxy-internal-text-control> <foxy-internal-select-control infer="handling-fee-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-select-control infer="item-delivery-type" class="col-span-2" .options="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="discount-name" class="col-span-2"> </foxy-internal-text-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="admin-email-template-uri" class="${0}" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> ${0} <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="customer-email-template-uri" class="col-span-2" .selectedItem="${0}" @change="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-combo-box-control item-label-path="description" item-value-path="_links.self.href" first="${0}" infer="gift-recipient-email-template-uri" class="col-span-2" .selectedItem="${0}"> </foxy-internal-async-combo-box-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="tax_uri" foreign-key-for-id="tax_id" own-key-for-uri="item_category_uri" own-uri="${0}" embed-key="fx:tax_item_categories" options-href="${0}" links-href="${0}" infer="taxes" class="col-span-2" limit="5" item="foxy-tax-card"> </foxy-internal-async-resource-link-list-control> </div> ${0} <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),g.__handlingFeeTypeOptions,"none"===u?"":a(l||(l=y` ${0} ${0} ${0} `),this.__renderHandlingFee(),u.includes("percent")?this.__renderHandlingFeePercentage():"","flat_percent_with_minimum"===u?this.__renderHandlingFeeMinimum():""),g.__itemDeliveryTypeOptions,"downloaded"===f?this.__renderDownloadDeliveryControls():"flat_rate"===f?[this.__renderFlatRateControls(),this.__renderCustomsValue()]:"shipped"===f?[this.__renderShippingControls(),this.__renderCustomsValue()]:"",this.form.discount_name?this.__renderDiscountBuilder():"",n(null!==(t=this.emailTemplates)&&void 0!==t?t:void 0),this.form.send_admin_email?"":"col-span-2",null===(i=this.__adminEmailTemplateLoader)||void 0===i?void 0:i.data,(e=>{this.edit({send_admin_email:!!e.detail,admin_email:e.detail?this.form.admin_email:""})}),this.form.send_admin_email?this.__renderAdminEmail():"",n(null!==(r=this.emailTemplates)&&void 0!==r?r:void 0),null===(s=this.__customerEmailTemplateLoader)||void 0===s?void 0:s.data,(e=>this.edit({send_customer_email:!!e.detail})),n(null!==(d=this.emailTemplates)&&void 0!==d?d:void 0),null===(m=this.__giftRecipientEmailTemplateLoader)||void 0===m?void 0:m.data,n(null===(p=this.data)||void 0===p?void 0:p._links.self.href),n(null!==(_=this.taxes)&&void 0!==_?_:void 0),n(null===(c=this.data)||void 0===c?void 0:c._links["fx:tax_item_categories"].href),super.renderBody(),n(this.form.customer_email_template_uri||void 0),this.__customerEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.gift_recipient_email_template_uri||void 0),this.__giftRecipientEmailTemplateLoaderId,(()=>this.requestUpdate()),n(this.form.admin_email_template_uri||void 0),this.__adminEmailTemplateLoaderId,(()=>this.requestUpdate()))}get __giftRecipientEmailTemplateLoader(){const e=this.__giftRecipientEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __customerEmailTemplateLoader(){const e=this.__customerEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}get __adminEmailTemplateLoader(){const e=this.__adminEmailTemplateLoaderId;return this.renderRoot.querySelector(`#${e}`)}__renderHandlingFee(){return a(s||(s=y` <foxy-internal-number-control infer="handling-fee" class="${0}"> </foxy-internal-number-control> `),"flat_percent"===this.form.handling_fee_type?"":"col-span-2")}__renderHandlingFeePercentage(){return a(d||(d=y` <foxy-internal-number-control infer="handling-fee-percentage"> </foxy-internal-number-control> `))}__renderHandlingFeeMinimum(){return a(m||(m=y` <foxy-internal-number-control infer="handling-fee-minimum"> </foxy-internal-number-control> `))}__renderDownloadDeliveryControls(){return a(p||(p=y` <foxy-internal-integer-control infer="max-downloads-per-customer"> </foxy-internal-integer-control> <foxy-internal-integer-control infer="max-downloads-time-period"> </foxy-internal-integer-control> `))}__renderFlatRateControls(){return a(_||(_=y` <foxy-internal-number-control infer="shipping-flat-rate"> </foxy-internal-number-control> <foxy-internal-select-control infer="shipping-flat-rate-type" .options="${0}"> </foxy-internal-select-control> `),g.__shippingFlatRateTypeOptions)}__renderShippingControls(){return a(c||(c=y` <foxy-internal-integer-control infer="default-weight" class="col-span-2"> </foxy-internal-integer-control> <foxy-internal-select-control infer="default-weight-unit" .options="${0}"> </foxy-internal-select-control> <foxy-internal-select-control infer="default-length-unit" .options="${0}"> </foxy-internal-select-control> `),g.__defaultWeightUnitOptions,g.__defaultLengthUnitOptions)}__renderCustomsValue(){return a(f||(f=y` <foxy-internal-number-control infer="customs-value" class="col-span-2"> </foxy-internal-number-control> `))}__renderDiscountBuilder(){var e,t;const i={name:null!==(e=this.form.discount_name)&&void 0!==e?e:"",type:this.form.discount_type||"quantity_amount",details:null!==(t=this.form.discount_details)&&void 0!==t?t:""};return a(u||(u=y` <foxy-discount-builder infer="discount-builder" class="col-span-2" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> `),i,(e=>{const t=e.currentTarget;this.edit({discount_name:t.parsedValue.name,discount_type:t.parsedValue.type,discount_details:t.parsedValue.details})}))}__renderAdminEmail(){return a(h||(h=y`<foxy-internal-text-control infer="admin-email"> </foxy-internal-text-control>`))}}g.__shippingFlatRateTypeOptions=[{label:"option_per_order",value:"per_order"},{label:"option_per_shipment",value:"per_shipment"}],g.__defaultWeightUnitOptions=[{label:"option_lbs",value:"LBS"},{label:"option_kgs",value:"KGS"}],g.__defaultLengthUnitOptions=[{label:"option_in",value:"IN"},{label:"option_cm",value:"CM"}],g.__itemDeliveryTypeOptions=[{label:"option_notshipped",value:"notshipped"},{label:"option_downloaded",value:"downloaded"},{label:"option_flat_rate",value:"flat_rate"},{label:"option_shipped",value:"shipped"},{label:"option_pickup",value:"pickup"}],g.__handlingFeeTypeOptions=[{label:"option_none",value:"none"},{label:"option_flat_per_order",value:"flat_per_order"},{label:"option_flat_per_item",value:"flat_per_item"},{label:"option_flat_percent",value:"flat_percent"},{label:"option_flat_percent_with_minimum",value:"flat_percent_with_minimum"}],customElements.define("foxy-item-category-form",g);export{g as ItemCategoryForm};
@@ -1,4 +1,4 @@
1
- import"./shared-98f85be1.js";import"./shared-0e9ad70e.js";import{h as e,P as t}from"./shared-221d3788.js";import{E as r,T as o}from"./shared-43928f5a.js";import{C as i}from"./shared-61ade33e.js";import"./shared-7a5adb55.js";import"./shared-a827bcc6.js";import"./shared-0ac853c6.js";import"./shared-9bd371c7.js";import"./shared-1602c9a4.js";import"./shared-28e988c6.js";import"./shared-eeb2d7ab.js";import"./shared-213b9416.js";import{I as s}from"./shared-9c3b800b.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-discount-builder.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as a}from"./shared-3c58ddf1.js";import{a as n}from"./shared-e989e47e.js";import{i as l}from"./shared-9803aa7c.js";import{h as d}from"./shared-dc73b9a5.js";import"./shared-5f65bdab.js";import"./shared-879fcb1f.js";import"./shared-21fec810.js";import"./shared-b7cda8ba.js";import"./shared-41e9ef02.js";import"./shared-82423f8b.js";import"./shared-651c44fa.js";import"./shared-51c3bc09.js";import"./shared-d67d56c2.js";import"./shared-d7bb413b.js";import"./shared-a6e383ac.js";import"./shared-0f4947e8.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-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-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-c73f6e8a.js";import"./shared-9e014b51.js";import"./shared-5c4a29b9.js";import"./shared-849413bb.js";import"./shared-891b33ad.js";import"./shared-85707e42.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-8452c492.js";import"./shared-f090c63a.js";import"./shared-8438d4ca.js";import"./foxy-nucleon-element.js";import"./shared-c9f4fe97.js";import"./shared-739a8fe4.js";const m=e`<dom-module id="lumo-details" theme-for="vaadin-details">
1
+ import"./shared-24586cfb.js";import"./shared-59d8b64e.js";import{h as e,P as t}from"./shared-cfdd6c21.js";import{E as r,T as o}from"./shared-add044d3.js";import{C as i}from"./shared-61ade33e.js";import"./shared-0da6e42c.js";import"./shared-2782886e.js";import"./shared-b42c6fe3.js";import"./shared-484b31eb.js";import"./shared-66084f2e.js";import"./shared-824d0804.js";import"./shared-0e038fda.js";import"./shared-421708b0.js";import{I as s}from"./shared-5cb6aca6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as a}from"./shared-701157ac.js";import{a as n}from"./shared-f2335b72.js";import{i as l}from"./shared-9803aa7c.js";import{h as d}from"./shared-dc73b9a5.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-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"./foxy-form-dialog.js";import"./shared-f91d5706.js";import"./shared-c0e56e97.js";import"./shared-57266e2a.js";import"./shared-4e709717.js";import"./shared-99940888.js";import"./shared-414a0c9b.js";import"./shared-fad783a0.js";import"./shared-a08d509a.js";import"./shared-7004839c.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-b44cf5a9.js";import"./shared-a0c6a159.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-c4f5b03b.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-5c1e607b.js";import"./shared-44b101d0.js";import"./shared-db108ddb.js";import"./shared-1708eb3c.js";import"./shared-58095d4b.js";import"./shared-651c44fa.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-789e3185.js";import"./shared-4b209827.js";import"./shared-e4cc1191.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.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-8438d4ca.js";import"./foxy-nucleon-element.js";import"./shared-4761504a.js";import"./shared-23061fb2.js";const m=e`<dom-module id="lumo-details" theme-for="vaadin-details">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -176,4 +176,4 @@ class c extends(i(r(o(t)))){static get template(){return e`
176
176
  <div part="content" aria-hidden\$="[[_getAriaHidden(opened)]]">
177
177
  <slot></slot>
178
178
  </div>
179
- `}static get is(){return"vaadin-details"}static get version(){return"1.2.1"}static get properties(){return{opened:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"}}}get _collapsible(){return this.shadowRoot.querySelector('[part="content"]')}get focusElement(){return this.shadowRoot.querySelector('[part="summary"]')}_focus(){this.focusElement&&!this._isShiftTabbing&&(this._keyboardActive&&this.focusElement.focus(),this._setFocused(!0))}ready(){super.ready(),this._collapsible.addEventListener("keydown",(e=>{e.shiftKey&&9===e.keyCode&&e.stopPropagation()}))}_getAriaExpanded(e){return e?"true":"false"}_getAriaHidden(e){return e?"false":"true"}_openedChanged(e){this._collapsible.style.maxHeight=e?"":"0px"}_onToggleClick(e){this.opened=!this.opened}_onToggleKeyDown(e){[13,32].indexOf(e.keyCode)>-1&&(e.preventDefault(),this.opened=!this.opened)}}customElements.define(c.is,c);let p,f,h,u=e=>e;class y extends(n(s,"item-form")){constructor(){super(...arguments),this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.coupons=null,this.templates={},this.__itemsLink=""}static get properties(){return a(a({},super.properties),{},{customerAddresses:{type:String,attribute:"customer-addresses"},itemCategories:{type:String,attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},coupons:{type:String}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({price:e})=>"number"==typeof e&&!isNaN(e)||"price:v8n_required",({price:e})=>"number"==typeof e&&e>=0||"price:v8n_negative",({quantity:e})=>"number"==typeof e&&e>=1||"quantity:v8n_less_than_one"]}renderBody(){var e,t,r;return d(p||(p=u` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-s"> <foxy-internal-number-control infer="price"></foxy-internal-number-control> <foxy-internal-integer-control infer="quantity"></foxy-internal-integer-control> </div> <foxy-internal-async-combo-box-control item-value-path="_links.self.href" item-label-path="name" first="${0}" infer="item-category-uri"> </foxy-internal-async-combo-box-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-text-control infer="parent-code"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-s"> <foxy-internal-integer-control infer="quantity-min"></foxy-internal-integer-control> <foxy-internal-integer-control infer="quantity-max"></foxy-internal-integer-control> </div> <div> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="dimensions"></foxy-i18n> <div class="grid grid-cols-2 gap-s pt-m"> <foxy-internal-number-control infer="weight"></foxy-internal-number-control> <foxy-internal-number-control infer="width"></foxy-internal-number-control> <foxy-internal-number-control infer="height"></foxy-internal-number-control> <foxy-internal-number-control infer="length"></foxy-internal-number-control> </div> </vaadin-details> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="subscriptions"></foxy-i18n> <div class="space-y-m pt-m"> <foxy-internal-frequency-control infer="subscription-frequency"> </foxy-internal-frequency-control> <foxy-internal-date-control infer="subscription-start-date"> </foxy-internal-date-control> <foxy-internal-date-control infer="subscription-end-date"></foxy-internal-date-control> </div> </vaadin-details> </div> <foxy-internal-text-area-control infer="url"></foxy-internal-text-area-control> <foxy-internal-text-area-control infer="image"></foxy-internal-text-area-control> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="discount"></foxy-i18n> <div class="space-y-m pt-m"> <foxy-internal-text-control infer="discount-name"></foxy-internal-text-control> <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> </div> </vaadin-details> <foxy-internal-async-combo-box-control item-value-path="address_name" item-label-path="address_name" first="${0}" infer="shipto"> </foxy-internal-async-combo-box-control> <foxy-internal-date-control infer="expires" format="unix"></foxy-internal-date-control> ${0} ${0} ${0} `),l(null!==(e=null==this?void 0:this.itemCategories)&&void 0!==e?e:void 0),{details:this.form.discount_details,type:this.form.discount_type,name:this.form.discount_name},(e=>{const t=e.currentTarget.parsedValue;this.edit({discount_details:t.details,discount_type:t.type,discount_name:t.name})}),l(null!==(t=null==this?void 0:this.customerAddresses)&&void 0!==t?t:void 0),this.data?d(f||(f=u` <foxy-internal-async-list-control label="${0}" infer="item-options" first="${0}" limit="5" form="foxy-item-option-form" item="foxy-item-option-card" alert .related="${0}" .props="${0}"> </foxy-internal-async-list-control> `),this.t("item-options.title"),this.data._links["fx:item_options"].href,this.__itemOptionRelatedUrls,{"locale-codes":null!==(r=this.localeCodes)&&void 0!==r?r:""}):"",this.data?d(h||(h=u` <foxy-internal-async-list-control label="${0}" infer="discount-details" first="${0}" limit="5" item="foxy-discount-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control label="${0}" infer="coupon-details" first="${0}" limit="5" item="foxy-coupon-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control label="${0}" infer="attributes" first="${0}" limit="5" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> `),this.t("discount-details.title"),this.data._links["fx:discount_details"].href,this.t("coupon-details.title"),this.data._links["fx:coupon_details"].href,this.t("attributes.title"),this.data._links["fx:attributes"].href):"",super.renderBody())}async _sendGet(){const e=await super._sendGet();if(e._links["fx:subscription"]){const t=e._links["fx:subscription"].href,r=(await super._fetch(t))._links["fx:transaction_template"].href,o=await super._fetch(r);return this.__itemsLink=o._links["fx:items"].href,e}if(e._links["fx:transaction"]){const t=await super._fetch(e._links["fx:transaction"].href);return this.__itemsLink=t._links["fx:items"].href,e}if(e._links["fx:cart"]){const t=await super._fetch(e._links["fx:cart"].href);return this.__itemsLink=t._links["fx:items"].href,e}return e}get __itemOptionRelatedUrls(){var e,t;const r=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links)&&void 0!==t?t:{},o=[];return r["fx:subscription"]&&o.push(r["fx:subscription"].href),r["fx:transaction"]&&o.push(r["fx:transaction"].href),r["fx:shipment"]&&o.push(r["fx:shipment"].href),r["fx:cart"]&&o.push(r["fx:cart"].href),this.__itemsLink&&o.push(this.__itemsLink),o}}customElements.define("foxy-item-form",y);export{y as ItemForm};
179
+ `}static get is(){return"vaadin-details"}static get version(){return"1.2.1"}static get properties(){return{opened:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"}}}get _collapsible(){return this.shadowRoot.querySelector('[part="content"]')}get focusElement(){return this.shadowRoot.querySelector('[part="summary"]')}_focus(){this.focusElement&&!this._isShiftTabbing&&(this._keyboardActive&&this.focusElement.focus(),this._setFocused(!0))}ready(){super.ready(),this._collapsible.addEventListener("keydown",(e=>{e.shiftKey&&9===e.keyCode&&e.stopPropagation()}))}_getAriaExpanded(e){return e?"true":"false"}_getAriaHidden(e){return e?"false":"true"}_openedChanged(e){this._collapsible.style.maxHeight=e?"":"0px"}_onToggleClick(e){this.opened=!this.opened}_onToggleKeyDown(e){[13,32].indexOf(e.keyCode)>-1&&(e.preventDefault(),this.opened=!this.opened)}}customElements.define(c.is,c);let p,f,h,u=e=>e;class y extends(n(s,"item-form")){constructor(){super(...arguments),this.customerAddresses=null,this.itemCategories=null,this.localeCodes=null,this.coupons=null,this.__itemsLink=""}static get properties(){return a(a({},super.properties),{},{customerAddresses:{type:String,attribute:"customer-addresses"},itemCategories:{type:String,attribute:"item-categories"},localeCodes:{attribute:"locale-codes"},coupons:{type:String}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({price:e})=>"number"==typeof e&&!isNaN(e)||"price:v8n_required",({price:e})=>"number"==typeof e&&e>=0||"price:v8n_negative",({quantity:e})=>"number"==typeof e&&e>=1||"quantity:v8n_less_than_one"]}get headerSubtitleOptions(){var e;return{context:(null===(e=this.data)||void 0===e?void 0:e.is_future_line_item)?"future_line_item":"regular"}}renderBody(){var e,t;return d(p||(p=u` ${0} <foxy-internal-text-control infer="name"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-s"> <foxy-internal-number-control infer="price"></foxy-internal-number-control> <foxy-internal-integer-control infer="quantity"></foxy-internal-integer-control> </div> <foxy-internal-resource-picker-control first="${0}" infer="item-category-uri" item="foxy-item-category-card"> </foxy-internal-resource-picker-control> <foxy-internal-text-control infer="code"></foxy-internal-text-control> <foxy-internal-text-control infer="parent-code"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-s"> <foxy-internal-integer-control infer="quantity-min"></foxy-internal-integer-control> <foxy-internal-integer-control infer="quantity-max"></foxy-internal-integer-control> </div> <div> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="dimensions"></foxy-i18n> <div class="grid grid-cols-2 gap-s pt-m"> <foxy-internal-number-control infer="weight"></foxy-internal-number-control> <foxy-internal-number-control infer="width"></foxy-internal-number-control> <foxy-internal-number-control infer="height"></foxy-internal-number-control> <foxy-internal-number-control infer="length"></foxy-internal-number-control> </div> </vaadin-details> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="subscriptions"></foxy-i18n> <div class="space-y-m pt-m"> <foxy-internal-frequency-control infer="subscription-frequency"> </foxy-internal-frequency-control> <foxy-internal-date-control infer="subscription-start-date"> </foxy-internal-date-control> <foxy-internal-date-control infer="subscription-end-date"></foxy-internal-date-control> </div> </vaadin-details> </div> <foxy-internal-text-area-control infer="url"></foxy-internal-text-area-control> <foxy-internal-text-area-control infer="image"></foxy-internal-text-area-control> <vaadin-details theme="reverse"> <foxy-i18n infer="" slot="summary" key="discount"></foxy-i18n> <div class="space-y-m pt-m"> <foxy-internal-text-control infer="discount-name"></foxy-internal-text-control> <foxy-discount-builder infer="discount-builder" .parsedValue="${0}" @change="${0}"> </foxy-discount-builder> </div> </vaadin-details> <foxy-internal-text-control infer="shipto"></foxy-internal-text-control> <foxy-internal-date-control infer="expires" format="unix"></foxy-internal-date-control> ${0} ${0} ${0} `),this.renderHeader(),l(null!==(e=null==this?void 0:this.itemCategories)&&void 0!==e?e:void 0),{details:this.form.discount_details,type:this.form.discount_type,name:this.form.discount_name},(e=>{const t=e.currentTarget.parsedValue;this.edit({discount_details:t.details,discount_type:t.type,discount_name:t.name})}),this.data?d(f||(f=u` <foxy-internal-async-list-control label="${0}" infer="item-options" first="${0}" limit="5" form="foxy-item-option-form" item="foxy-item-option-card" alert .related="${0}" .props="${0}"> </foxy-internal-async-list-control> `),this.t("item-options.title"),this.data._links["fx:item_options"].href,this.__itemOptionRelatedUrls,{"locale-codes":null!==(t=this.localeCodes)&&void 0!==t?t:""}):"",this.data?d(h||(h=u` <foxy-internal-async-list-control label="${0}" infer="discount-details" first="${0}" limit="5" item="foxy-discount-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control label="${0}" infer="coupon-details" first="${0}" limit="5" item="foxy-coupon-detail-card"> </foxy-internal-async-list-control> <foxy-internal-async-list-control label="${0}" infer="attributes" first="${0}" limit="5" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> `),this.t("discount-details.title"),this.data._links["fx:discount_details"].href,this.t("coupon-details.title"),this.data._links["fx:coupon_details"].href,this.t("attributes.title"),this.data._links["fx:attributes"].href):"",super.renderBody())}async _sendGet(){const e=await super._sendGet();if(e._links["fx:subscription"]){const t=e._links["fx:subscription"].href,r=(await super._fetch(t))._links["fx:transaction_template"].href,o=await super._fetch(r);return this.__itemsLink=o._links["fx:items"].href,e}if(e._links["fx:transaction"]){const t=await super._fetch(e._links["fx:transaction"].href);return this.__itemsLink=t._links["fx:items"].href,e}if(e._links["fx:cart"]){const t=await super._fetch(e._links["fx:cart"].href);return this.__itemsLink=t._links["fx:items"].href,e}return e}get __itemOptionRelatedUrls(){var e,t;const r=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links)&&void 0!==t?t:{},o=[];return r["fx:subscription"]&&o.push(r["fx:subscription"].href),r["fx:transaction"]&&o.push(r["fx:transaction"].href),r["fx:shipment"]&&o.push(r["fx:shipment"].href),r["fx:cart"]&&o.push(r["fx:cart"].href),this.__itemsLink&&o.push(this.__itemsLink),o}}customElements.define("foxy-item-form",y);export{y as ItemForm};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{_ as e}from"./shared-3c58ddf1.js";import{a as t}from"./shared-e989e47e.js";import{T as r}from"./shared-8452c492.js";import{i as o}from"./shared-9803aa7c.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-272e7269.js";import"./shared-37391934.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-2808f43a.js";import"./shared-12e531b8.js";import"./shared-90ddf541.js";import"./shared-39fc8fed.js";import"./shared-2e2d45c4.js";import"./shared-b7cda8ba.js";import"./shared-221d3788.js";import"./shared-71782a9e.js";import"./shared-ecb7a183.js";import"./shared-bd99107c.js";import"./shared-f090c63a.js";import"./shared-4e709717.js";let d,i,s,l,n=e=>e;const c=t(r,"item-option-card");class u extends c{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__currencyDisplay,t=this.__currencyCode;return a(d||(d=n` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),o(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),super.renderBody({title:r=>{if(!t||!e)return a(i||(i=n`&ZeroWidthSpace;`));let o;try{o=Math.abs(r.price_mod).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:e,currency:t,style:"currency"})}catch(e){o="--"}return a(s||(s=n`${0} &bull; ${0} &bull; ${0}`),r.name,o,r.weight_mod)},subtitle:e=>a(l||(l=n`${0}`),e.value)}))}get isBodyReady(){return super.isBodyReady&&!!this.__currencyCode&&!!this.__currencyDisplay}get __transactionTemplateHref(){var e,t,r;try{const o=null===(e=this.data)||void 0===e?void 0:e._links,a=new URL(null!==(r=null===(t=null==o?void 0:o["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==r?r:"");return a.searchParams.set("zoom","transaction_template"),a.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,r,o;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(o=null===(r=this.__store)||void 0===r?void 0:r._links["fx:template_sets"].href)&&void 0!==o?o:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const r=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==r?void 0:r["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=`#${this.__transactionTemplateLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const r=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const r=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyCode(){var e,t,r,o,a;const d=this.__transaction;if(d)return d.currency_code;{const d=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==d?void 0:d.currency_code)return d.currency_code;{const e=this.__localeCodesHelper,d=null===(r=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===r?void 0:r.locale_code,i=d?null==e?void 0:e.values[d]:void 0;if(i)return null!==(a=null===(o=/Currency: ([A-Z]{3})/g.exec(i))||void 0===o?void 0:o[1])&&void 0!==a?a:null}}}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-item-option-card",u);export{u as ItemOptionCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{_ as e}from"./shared-701157ac.js";import{a as t}from"./shared-f2335b72.js";import{T as r}from"./shared-08d018f5.js";import{i as o}from"./shared-9803aa7c.js";import{h as a}from"./shared-dc73b9a5.js";import"./shared-cbeb8587.js";import"./shared-8f0251e9.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-a5c48bf4.js";import"./shared-ecec6a10.js";import"./shared-042969fe.js";import"./shared-365c8437.js";import"./shared-fbfa45bb.js";import"./shared-a08d509a.js";import"./shared-cfdd6c21.js";import"./shared-b44cf5a9.js";import"./shared-6d1556a0.js";import"./shared-fee535ca.js";import"./shared-d82f9e35.js";import"./shared-4e709717.js";let d,i,s,l,n=e=>e;const c=t(r,"item-option-card");class u extends c{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__transactionLoaderId="transactionLoader",this.__templateSetLoaderId="templateSetLoader",this.__storeLoaderId="storeLoader",this.__cartLoaderId="cartLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__currencyDisplay,t=this.__currencyCode;return a(d||(d=n` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__transactionHref),this.__transactionLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),o(this.__cartHref),this.__cartLoaderId,(()=>this.requestUpdate()),super.renderBody({title:r=>{if(!t||!e)return a(i||(i=n`&ZeroWidthSpace;`));let o;try{o=Math.abs(r.price_mod).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:e,currency:t,style:"currency"})}catch(e){o="--"}return a(s||(s=n`${0} &bull; ${0} &bull; ${0}`),r.name,o,r.weight_mod)},subtitle:e=>a(l||(l=n`${0}`),e.value)}))}get isBodyReady(){return super.isBodyReady&&!!this.__currencyCode&&!!this.__currencyDisplay}get __transactionTemplateHref(){var e,t,r;try{const o=null===(e=this.data)||void 0===e?void 0:e._links,a=new URL(null!==(r=null===(t=null==o?void 0:o["fx:subscription"])||void 0===t?void 0:t.href)&&void 0!==r?r:"");return a.searchParams.set("zoom","transaction_template"),a.toString()}catch(e){}}get __defaultTemplateSetHref(){var e,t,r,o;if(""===(null===(t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate)||void 0===t?void 0:t.template_set_uri))try{const e=new URL(null!==(o=null===(r=this.__store)||void 0===r?void 0:r._links["fx:template_sets"].href)&&void 0!==o?o:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __transactionHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction"])||void 0===t?void 0:t.href}get __templateSetHref(){var e;const t=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(!(null==t?void 0:t.currency_code))return(null==t?void 0:t.template_set_uri)||void 0}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __cartHref(){var e,t;const r=null===(e=this.data)||void 0===e?void 0:e._links;return null===(t=null==r?void 0:r["fx:cart"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=`#${this.__transactionTemplateLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:transaction_template"])&&void 0!==t?t:null}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,o=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==o?void 0:o.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __transaction(){var e,t;const r=`#${this.__transactionLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __cart(){var e,t;const r=`#${this.__cartLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyCode(){var e,t,r,o,a;const d=this.__transaction;if(d)return d.currency_code;{const d=null!==(e=this.__cart)&&void 0!==e?e:this.__transactionTemplate;if(null==d?void 0:d.currency_code)return d.currency_code;{const e=this.__localeCodesHelper,d=null===(r=null!==(t=this.__templateSet)&&void 0!==t?t:this.__defaultTemplateSet)||void 0===r?void 0:r.locale_code,i=d?null==e?void 0:e.values[d]:void 0;if(i)return null!==(a=null===(o=/Currency: ([A-Z]{3})/g.exec(i))||void 0===o?void 0:o[1])&&void 0!==a?a:null}}}get __currencyDisplay(){var e;return(null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol)?"code":"symbol"}}customElements.define("foxy-item-option-card",u);export{u as ItemOptionCard};
@@ -1 +1 @@
1
- import"./shared-28e988c6.js";import"./shared-eeb2d7ab.js";import{I as r}from"./shared-9c3b800b.js";import{a as e}from"./shared-e989e47e.js";import{h as o}from"./shared-dc73b9a5.js";import"./shared-c73f6e8a.js";import"./shared-0e9ad70e.js";import"./shared-221d3788.js";import"./shared-98f85be1.js";import"./shared-51c3bc09.js";import"./shared-d67d56c2.js";import"./shared-d7bb413b.js";import"./shared-61ade33e.js";import"./shared-43928f5a.js";import"./shared-e5f6ca48.js";import"./shared-51c4a6dd.js";import"./shared-ecb7a183.js";import"./shared-3c58ddf1.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-15a947f3.js";import"./shared-85f44e3e.js";import"./shared-8d7e2e2c.js";import"./shared-4e709717.js";import"./foxy-copy-to-clipboard.js";import"./shared-71782a9e.js";import"./shared-b7cda8ba.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,t=r=>r;class a extends(e(r,"item-option-form")){static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=100||"name:v8n_too_long",({value:r})=>!!r||"value:v8n_required",({value:r})=>!!r&&r.length<=1024||"value:v8n_too_long"]}renderBody(){return o(s||(s=t` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-text-control infer="value"></foxy-internal-text-control> <foxy-internal-number-control infer="price-mod"></foxy-internal-number-control> <foxy-internal-number-control infer="weight-mod"></foxy-internal-number-control> ${0} `),super.renderBody())}}customElements.define("foxy-item-option-form",a);export{a as ItemOptionForm};
1
+ import"./shared-824d0804.js";import"./shared-0e038fda.js";import{I as r}from"./shared-5cb6aca6.js";import{a as e}from"./shared-f2335b72.js";import{h as s}from"./shared-dc73b9a5.js";import"./shared-c4f5b03b.js";import"./shared-59d8b64e.js";import"./shared-cfdd6c21.js";import"./shared-24586cfb.js";import"./shared-ae200b9f.js";import"./shared-0ed41a9e.js";import"./shared-5c1e607b.js";import"./shared-61ade33e.js";import"./shared-add044d3.js";import"./shared-b6376c8f.js";import"./shared-51c4a6dd.js";import"./shared-6d1556a0.js";import"./shared-701157ac.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-c0e56e97.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-a08d509a.js";import"./shared-bba917bf.js";import"./shared-b44cf5a9.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,o=r=>r;class t extends(e(r,"item-option-form")){static get v8n(){return[({name:r})=>!!r||"name:v8n_required",({name:r})=>!!r&&r.length<=100||"name:v8n_too_long",({value:r})=>!!r||"value:v8n_required",({value:r})=>!!r&&r.length<=1024||"value:v8n_too_long"]}renderBody(){return s(a||(a=o` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control infer="name" class="col-span-2"></foxy-internal-text-control> <foxy-internal-text-control infer="value" class="col-span-2"></foxy-internal-text-control> <foxy-internal-number-control infer="price-mod"></foxy-internal-number-control> <foxy-internal-number-control infer="weight-mod"></foxy-internal-number-control> </div> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-item-option-form",t);export{t as ItemOptionForm};
@@ -1 +1 @@
1
- import{_ as t}from"./shared-3c58ddf1.js";import"./shared-15a947f3.js";import{L as e,c as i,h as s}from"./shared-dc73b9a5.js";import{p as r}from"./shared-ecb7a183.js";import"./shared-b7cda8ba.js";import"./shared-98f85be1.js";import"./shared-8b4ba63a.js";import{y as a,S as n,x as o}from"./shared-e989e47e.js";import"./shared-f635c052.js";import"./shared-8d7e2e2c.js";import{I as h,D as c}from"./shared-a006b7a9.js";import{E as d}from"./shared-fca5f5e3.js";import"./shared-51c3bc09.js";import"./shared-82423f8b.js";import"./shared-21fec810.js";import"./shared-d7bb413b.js";import"./shared-741bfa42.js";import"./shared-0e9ad70e.js";import"./shared-c73f6e8a.js";import"./shared-d67d56c2.js";import"./shared-9e014b51.js";import"./shared-71782a9e.js";import{s as l}from"./shared-99940888.js";import"./shared-221d3788.js";import"./shared-43928f5a.js";import"./shared-61ade33e.js";import"./shared-343d1fd7.js";import"./shared-2808f43a.js";import"./shared-849413bb.js";import"./shared-5c4a29b9.js";import"./shared-5f65bdab.js";import"./shared-879fcb1f.js";import"./shared-41e9ef02.js";import"./shared-651c44fa.js";import"./shared-a6e383ac.js";import"./shared-0f4947e8.js";import"./shared-2e2d45c4.js";import"./shared-37391934.js";import"./shared-bd99107c.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-6c97a6b0.js";import"./shared-85707e42.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var f;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(f||(f={}));class y extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(f.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(f.Default);this.quantity>1&&this.__insertImage(f.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,f.Previous),e&&(this.__setImageState(e,f.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(f.BeforeEnter),f.Default)):t&&this.__setImageState(t,f.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,f.Default),i=t):(t&&this.__setImageState(t,f.Excluded),i=e),i&&(this.__setImageState(i,f.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(f.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,f.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=y.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}y.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let b,v,w,x,q,E,I,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(b||(b=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=l({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,h,c,d]=this.data;return s(v||(v=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,h?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(E||(E=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(I||(I=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),d?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,e,i,e)}}let j,D,k=t=>t;class A extends S{static get scopedElements(){return{"x-pic":y}}}class L extends S{static get scopedElements(){return{"x-pic":A}}}class N extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":y,"x-bundle-grid":L}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=l({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(j||(j=k`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(D||(D=k`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":d,"x-preview":N,"x-i18n":h}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,t.setAttribute("data-bundled",""),this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":d,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{R as Item,K as ItemsForm};
1
+ import{_ as t}from"./shared-701157ac.js";import"./shared-c0e56e97.js";import{L as e,c as i,h as s}from"./shared-dc73b9a5.js";import{p as r}from"./shared-6d1556a0.js";import"./shared-a08d509a.js";import"./shared-24586cfb.js";import"./shared-bba917bf.js";import{y as a,S as n,x as o}from"./shared-f2335b72.js";import"./shared-a28c9952.js";import"./shared-57266e2a.js";import{I as c,D as d}from"./shared-32cac4bd.js";import{E as h}from"./shared-80b9cb48.js";import"./shared-ae200b9f.js";import"./shared-58095d4b.js";import"./shared-fad783a0.js";import"./shared-5c1e607b.js";import"./shared-cf9c48f9.js";import"./shared-59d8b64e.js";import"./shared-c4f5b03b.js";import"./shared-0ed41a9e.js";import"./shared-44b101d0.js";import"./shared-b44cf5a9.js";import{s as l}from"./shared-99940888.js";import"./shared-cfdd6c21.js";import"./shared-add044d3.js";import"./shared-61ade33e.js";import"./shared-343d1fd7.js";import"./shared-a5c48bf4.js";import"./shared-789e3185.js";import"./shared-db108ddb.js";import"./shared-1708eb3c.js";import"./shared-414a0c9b.js";import"./shared-7004839c.js";import"./shared-651c44fa.js";import"./shared-fd410dee.js";import"./shared-ec696e1b.js";import"./shared-fbfa45bb.js";import"./shared-8f0251e9.js";import"./shared-fee535ca.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";import"./shared-25c57c74.js";import"./shared-e4cc1191.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var f;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(f||(f={}));class y extends e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(f.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(f.Default);this.quantity>1&&this.__insertImage(f.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,f.Previous),e&&(this.__setImageState(e,f.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(f.BeforeEnter),f.Default)):t&&this.__setImageState(t,f.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,f.Default),i=t):(t&&this.__setImageState(t,f.Excluded),i=e),i&&(this.__setImageState(i,f.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(f.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,f.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),i.addEventListener("error",(()=>i.src=y.placeholder)),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}y.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let b,v,w,x,q,E,I,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(b||(b=C`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=l({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,c,d,h]=this.data;return s(v||(v=C` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,c?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,d?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,r,e,t>102?s(E||(E=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(I||(I=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let j,D,k=t=>t;class A extends S{static get scopedElements(){return{"x-pic":y}}}class L extends S{static get scopedElements(){return{"x-pic":A}}}class N extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":y,"x-bundle-grid":L}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=l({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(j||(j=k`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(D||(D=k`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class P extends o{static get properties(){return t(t({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let F,T,O,V,M,H,B,Z=t=>t;class R extends P{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=R.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(F||(F=Z`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":h,"x-preview":N,"x-i18n":c}}static get properties(){return t(t({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(T||(T=Z`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(O||(O=Z` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(V||(V=Z` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(M||(M=Z` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,t.setAttribute("data-bundled",""),this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends P{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");K.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":d,"x-item":R}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:t=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return e.filter(K.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(Q||(Q=G` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(X||(X=G` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(z||(z=G`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(()=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",K),customElements.define("foxy-item",R);export{R as Item,K as ItemsForm};