@foxy.io/elements 1.33.0-beta.2 → 1.33.0

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 (195) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-api-browser.js +1 -1
  7. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  9. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  10. package/dist/cdn/foxy-attribute-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-form.js +1 -1
  12. package/dist/cdn/foxy-billing-address-card.js +1 -1
  13. package/dist/cdn/foxy-cancellation-form.js +1 -1
  14. package/dist/cdn/foxy-cart-card.js +1 -1
  15. package/dist/cdn/foxy-cart-form.js +1 -1
  16. package/dist/cdn/foxy-client-card.js +1 -1
  17. package/dist/cdn/foxy-client-form.js +1 -1
  18. package/dist/cdn/foxy-collection-page.js +1 -1
  19. package/dist/cdn/foxy-collection-pages.js +1 -1
  20. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  21. package/dist/cdn/foxy-coupon-card.js +1 -1
  22. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  24. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  26. package/dist/cdn/foxy-coupon-form.js +1 -1
  27. package/dist/cdn/foxy-custom-field-card.js +1 -1
  28. package/dist/cdn/foxy-custom-field-form.js +1 -1
  29. package/dist/cdn/foxy-customer-card.js +1 -1
  30. package/dist/cdn/foxy-customer-form.js +1 -1
  31. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  33. package/dist/cdn/foxy-customer-portal.js +1 -1
  34. package/dist/cdn/foxy-customer.js +4 -4
  35. package/dist/cdn/foxy-customers-table.js +1 -1
  36. package/dist/cdn/foxy-discount-builder.js +1 -1
  37. package/dist/cdn/foxy-discount-card.js +1 -1
  38. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  39. package/dist/cdn/foxy-donation.js +1 -1
  40. package/dist/cdn/foxy-downloadable-card.js +1 -1
  41. package/dist/cdn/foxy-downloadable-form.js +1 -1
  42. package/dist/cdn/foxy-email-template-card.js +1 -1
  43. package/dist/cdn/foxy-email-template-form.js +1 -1
  44. package/dist/cdn/foxy-error-entry-card.js +1 -1
  45. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  47. package/dist/cdn/foxy-form-dialog.js +1 -1
  48. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  49. package/dist/cdn/foxy-gift-card-card.js +1 -1
  50. package/dist/cdn/foxy-gift-card-code-card.js +1 -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 +1 -1
  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 +1 -1
  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-pagination.js +1 -1
  69. package/dist/cdn/foxy-passkey-card.js +1 -1
  70. package/dist/cdn/foxy-passkey-form.js +1 -1
  71. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  72. package/dist/cdn/foxy-payment-card.js +1 -1
  73. package/dist/cdn/foxy-payment-method-card.js +1 -1
  74. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  76. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  80. package/dist/cdn/foxy-query-builder.js +1 -1
  81. package/dist/cdn/foxy-report-form.js +1 -1
  82. package/dist/cdn/foxy-reports-table.js +1 -1
  83. package/dist/cdn/foxy-shipment-card.js +1 -1
  84. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  88. package/dist/cdn/foxy-sign-in-form.js +1 -1
  89. package/dist/cdn/foxy-spinner.js +2 -2
  90. package/dist/cdn/foxy-store-card.js +1 -1
  91. package/dist/cdn/foxy-store-form.js +1 -1
  92. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  93. package/dist/cdn/foxy-subscription-card.js +1 -1
  94. package/dist/cdn/foxy-subscription-form.js +1 -1
  95. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  96. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  97. package/dist/cdn/foxy-table.js +1 -1
  98. package/dist/cdn/foxy-tax-card.js +1 -1
  99. package/dist/cdn/foxy-tax-form.js +1 -1
  100. package/dist/cdn/foxy-template-config-form.js +1 -1
  101. package/dist/cdn/foxy-template-form.js +1 -1
  102. package/dist/cdn/foxy-template-set-card.js +1 -1
  103. package/dist/cdn/foxy-template-set-form.js +1 -1
  104. package/dist/cdn/foxy-transaction-card.js +1 -1
  105. package/dist/cdn/foxy-transaction.js +1 -1
  106. package/dist/cdn/foxy-transactions-table.js +6 -6
  107. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  108. package/dist/cdn/foxy-user-card.js +1 -1
  109. package/dist/cdn/foxy-user-form.js +1 -1
  110. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  111. package/dist/cdn/foxy-user-invitation-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-51efaf53.js → shared-02c737dc.js} +1 -1
  118. package/dist/cdn/{shared-359793d4.js → shared-08e73812.js} +1 -1
  119. package/dist/cdn/{shared-3bfbd5af.js → shared-0d4cdb19.js} +1 -1
  120. package/dist/cdn/{shared-91500a0f.js → shared-136942c7.js} +1 -1
  121. package/dist/cdn/{shared-53443b27.js → shared-148214ee.js} +1 -1
  122. package/dist/cdn/shared-1acbd965.js +1 -0
  123. package/dist/cdn/{shared-c671d5c7.js → shared-1d0d814b.js} +1 -1
  124. package/dist/cdn/{shared-ad3eea80.js → shared-25b83adb.js} +1 -1
  125. package/dist/cdn/{shared-b384e653.js → shared-2aee2a22.js} +1 -1
  126. package/dist/cdn/{shared-01cbaba9.js → shared-2ca888f6.js} +1 -1
  127. package/dist/cdn/{shared-c24bc616.js → shared-2dd2ff95.js} +1 -1
  128. package/dist/cdn/{shared-9b1b4c9d.js → shared-32566c11.js} +1 -1
  129. package/dist/cdn/{shared-81bf4ca2.js → shared-33c9ef32.js} +1 -1
  130. package/dist/cdn/{shared-f09454f9.js → shared-3db18172.js} +1 -1
  131. package/dist/cdn/{shared-97627d50.js → shared-3ebbd21d.js} +1 -1
  132. package/dist/cdn/{shared-838bd79c.js → shared-3ef5dcef.js} +1 -1
  133. package/dist/cdn/{shared-935adc3b.js → shared-433ff5ae.js} +1 -1
  134. package/dist/cdn/{shared-c86db2c0.js → shared-46189aae.js} +1 -1
  135. package/dist/cdn/{shared-3ca58fb9.js → shared-47fe9f56.js} +1 -1
  136. package/dist/cdn/{shared-b14bf56d.js → shared-4f33425a.js} +1 -1
  137. package/dist/cdn/{shared-bb9f0d8b.js → shared-52c9fa57.js} +1 -1
  138. package/dist/cdn/{shared-455856d9.js → shared-56ee26d7.js} +2 -2
  139. package/dist/cdn/{shared-91321de3.js → shared-57373d84.js} +1 -1
  140. package/dist/cdn/{shared-4b4c8ccf.js → shared-5cdec81e.js} +1 -1
  141. package/dist/cdn/{shared-4beb6fef.js → shared-62af0ef5.js} +1 -1
  142. package/dist/cdn/{shared-bdcf2d35.js → shared-636cf673.js} +1 -1
  143. package/dist/cdn/{shared-e0c93cfa.js → shared-6583e3f9.js} +1 -1
  144. package/dist/cdn/{shared-dbe8536b.js → shared-66e2a4ee.js} +1 -1
  145. package/dist/cdn/{shared-d367ea04.js → shared-67d1de9a.js} +1 -1
  146. package/dist/cdn/shared-684174e7.js +1 -0
  147. package/dist/cdn/{shared-eecba1f5.js → shared-69c7aec1.js} +1 -1
  148. package/dist/cdn/{shared-0d43de87.js → shared-69cdc370.js} +1 -1
  149. package/dist/cdn/{shared-b7dc7e64.js → shared-6b15ed9e.js} +1 -1
  150. package/dist/cdn/{shared-5452fdfe.js → shared-6b578d1a.js} +1 -1
  151. package/dist/cdn/{shared-fd1adc35.js → shared-6b5e4fe4.js} +1 -1
  152. package/dist/cdn/{shared-57164953.js → shared-705ce87a.js} +1 -1
  153. package/dist/cdn/{shared-6d7c1a2f.js → shared-70612035.js} +1 -1
  154. package/dist/cdn/{shared-4f852fd5.js → shared-77135874.js} +1 -1
  155. package/dist/cdn/{shared-1024aa20.js → shared-7edf38e9.js} +1 -1
  156. package/dist/cdn/{shared-6be8e65e.js → shared-83c8a2d2.js} +1 -1
  157. package/dist/cdn/{shared-6a8ccf0c.js → shared-8a65adfd.js} +1 -1
  158. package/dist/cdn/{shared-3a7db771.js → shared-8d5b9662.js} +1 -1
  159. package/dist/cdn/{shared-78bfc71e.js → shared-8d826ccb.js} +1 -1
  160. package/dist/cdn/{shared-b2bc3a0e.js → shared-95a591b3.js} +1 -1
  161. package/dist/cdn/{shared-b3d36746.js → shared-9dd252c7.js} +1 -1
  162. package/dist/cdn/{shared-ceafb6c3.js → shared-9ea762dc.js} +1 -1
  163. package/dist/cdn/{shared-e39760d5.js → shared-9f4fad24.js} +1 -1
  164. package/dist/cdn/{shared-e231722c.js → shared-a1f697c2.js} +1 -1
  165. package/dist/cdn/{shared-bbc53ef2.js → shared-a2616e4b.js} +1 -1
  166. package/dist/cdn/{shared-30cc688f.js → shared-a46c8030.js} +1 -1
  167. package/dist/cdn/{shared-0f4472d2.js → shared-a8f38962.js} +1 -1
  168. package/dist/cdn/{shared-317cb721.js → shared-a9b8c3ab.js} +1 -1
  169. package/dist/cdn/{shared-0b4a62e9.js → shared-a9f4e92e.js} +1 -1
  170. package/dist/cdn/{shared-14179b23.js → shared-b73aaedb.js} +1 -1
  171. package/dist/cdn/{shared-7448fda4.js → shared-b8ae5af7.js} +1 -1
  172. package/dist/cdn/{shared-68f01c8d.js → shared-b8c6eafc.js} +1 -1
  173. package/dist/cdn/{shared-529f2b48.js → shared-cb24170b.js} +1 -1
  174. package/dist/cdn/{shared-377e3168.js → shared-cc8ce493.js} +1 -1
  175. package/dist/cdn/shared-ccc7a886.js +1 -0
  176. package/dist/cdn/{shared-d6985b5f.js → shared-cfe76d01.js} +1 -1
  177. package/dist/cdn/{shared-1220bf7d.js → shared-d3ffbcb0.js} +1 -1
  178. package/dist/cdn/{shared-0203d3da.js → shared-e8744e04.js} +1 -1
  179. package/dist/cdn/{shared-e1dea184.js → shared-eb8a9f27.js} +1 -1
  180. package/dist/cdn/{shared-14bf37ae.js → shared-f0db16a5.js} +1 -1
  181. package/dist/cdn/{shared-4b52b410.js → shared-f4e03cdc.js} +1 -1
  182. package/dist/cdn/{shared-cacd4407.js → shared-f6f4bed5.js} +1 -1
  183. package/dist/cdn/{shared-3493737e.js → shared-f79438f8.js} +1 -1
  184. package/dist/cdn/{shared-08be5c32.js → shared-ff10b9fb.js} +1 -1
  185. package/dist/cdn/translations/store-form/en.json +10 -4
  186. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +4 -0
  187. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +21 -2
  188. package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +1 -1
  189. package/dist/elements/public/StoreForm/StoreForm.d.ts +4 -0
  190. package/dist/elements/public/StoreForm/StoreForm.js +89 -11
  191. package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
  192. package/package.json +2 -1
  193. package/dist/cdn/shared-0e83a899.js +0 -1
  194. package/dist/cdn/shared-2dd497e5.js +0 -1
  195. package/dist/cdn/shared-54d7dfdb.js +0 -1
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-6d7c1a2f.js";import{T as e}from"./shared-b384e653.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-fd1adc35.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let t,a,i=r=>r;class c extends(s(e,"discount-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=i`${0} &bull; ${0}`),s.name,s.code),subtitle:s=>r(a||(a=i` <foxy-i18n options="${0}" class="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({currencyDisplay:this.__currencyDisplay,amount:`${s.amount} ${this.__currency}`}),s.amount>=0?"text-success":"text-error",this.lang,this.ns)})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-discount-card",c);export{c as DiscountCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-70612035.js";import{T as e}from"./shared-2aee2a22.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-6b5e4fe4.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let t,a,i=r=>r;class o extends(s(e,"discount-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=i`${0} &bull; ${0}`),s.name,s.code),subtitle:s=>r(a||(a=i` <foxy-i18n options="${0}" class="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({currencyDisplay:this.__currencyDisplay,amount:`${s.amount} ${this.__currency}`}),s.amount>=0?"text-success":"text-error",this.lang,this.ns)})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-discount-card",o);export{o as DiscountCard};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-6d7c1a2f.js";import{T as e}from"./shared-b384e653.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-fd1adc35.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let t,a,c=r=>r;const i=s(e,"discount-detail-card");class d extends i{constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=c`${0}`),s.name),subtitle:s=>{let e;try{e=Math.abs(s.amount_per).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:this.__currencyDisplay,currency:this.__currency,style:"currency"})}catch(r){e="--"}return r(a||(a=c` <span class="${0}">${0}</span> `),s.amount_per>0?"text-success":"text-error",e)}})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-discount-detail-card",d);export{d as DiscountDetailCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import{h as r}from"./shared-dc73b9a5.js";import{a as s}from"./shared-70612035.js";import{T as e}from"./shared-2aee2a22.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-6b5e4fe4.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let t,a,c=r=>r;const i=s(e,"discount-detail-card");class o extends i{constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(t||(t=c`${0}`),s.name),subtitle:s=>{let e;try{e=Math.abs(s.amount_per).toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:this.__currencyDisplay,currency:this.__currency,style:"currency"})}catch(r){e="--"}return r(a||(a=c` <span class="${0}">${0}</span> `),s.amount_per>0?"text-success":"text-error",e)}})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-discount-detail-card",o);export{o as DiscountDetailCard};
@@ -1 +1 @@
1
- import{_ as t}from"./shared-d1195c27.js";import"./shared-935adc3b.js";import"./shared-97627d50.js";import"./shared-377e3168.js";import{h as e}from"./shared-dc73b9a5.js";import{x as s}from"./shared-6d7c1a2f.js";import{p as i}from"./shared-3bfbd5af.js";import{C as r}from"./shared-0b4a62e9.js";import{C as n}from"./shared-e1dea184.js";import"./shared-57164953.js";import{D as a,I as o}from"./shared-ceafb6c3.js";import{E as c}from"./shared-d6985b5f.js";import{G as m}from"./shared-9b1b4c9d.js";import"./shared-78bfc71e.js";import"./shared-4b52b410.js";import"./shared-c24bc616.js";import"./shared-f09454f9.js";import"./shared-eecba1f5.js";import"./shared-08be5c32.js";import"./shared-ad3eea80.js";import"./shared-5452fdfe.js";import"./shared-e231722c.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-61ade33e.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-4e709717.js";import"./shared-838bd79c.js";import"./shared-cacd4407.js";import"./shared-1024aa20.js";import"./shared-3493737e.js";import"./shared-6be8e65e.js";import"./shared-b2bc3a0e.js";import"./shared-651c44fa.js";import"./shared-455856d9.js";import"./shared-317cb721.js";import"./shared-99940888.js";import"./shared-fcdb896f.js";import"./shared-c518ece2.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-1220bf7d.js";import"./shared-4b4c8ccf.js";class h extends CustomEvent{constructor(t){super("change",{detail:t})}}class d extends CustomEvent{constructor(){super("submit",{cancelable:!0})}}let u,l,p,y,g,f,b,$,j=t=>t;class x extends s{constructor(){super("donation"),this.currency=null,this.amount=null,this.store=null,this.name=null,this.custom=null,this.amounts=null,this.frequency=null,this.frequencies=null,this.designation=null,this.designations=null,this.comment=null,this.anonymity=!1,this.anonymous=!1,this.image=null,this.code=null,this.url=null,this.cart="checkout",this.target="_top"}static get scopedElements(){return{"vaadin-text-area":customElements.get("vaadin-text-area"),"x-error-screen":c,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":a,"x-checkbox":r,"x-choice":n,"x-group":m,"x-i18n":o}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},custom:{type:Array},amount:{type:Number},amounts:{type:Array},frequency:{type:String},frequencies:{type:Array},designation:{type:Array},designations:{type:Array},comment:{type:String},anonymity:{reflect:!0,type:Boolean},anonymous:{reflect:!0,type:Boolean},image:{type:String},store:{type:String},name:{type:String},code:{type:String},url:{type:String},cart:{type:String},target:{type:String},empty:{type:String}})}static get events(){return{change:h,submit:d}}submit(){this.dispatchEvent(new d)&&this.__form.submit()}render(){var t,s;if(!(this.currency&&this.amount&&this.store&&this.name))return e(u||(u=j` <x-error-screen data-testid="error" type="setup_needed" class="relative"></x-error-screen> `));const i=this.store.includes(".")?this.store:`${this.store}.foxycart.com`;return e(l||(l=j` <form target="${0}" class="sr-only" method="POST" action="https://${0}/cart" data-testid="form"> ${0} </form> <section> ${0} </section> <section> ${0} </section> <section> ${0} </section> <section> ${0} <div class="flex flex-wrap -m-s"> ${0} <div class="flex-1 p-s"> <vaadin-button class="w-full" theme="primary" data-testid="submit" @click="${0}"> <x-i18n .opts="${0}" lang="${0}" key="${0}" ns="${0}"> </x-i18n> </vaadin-button> </div> </div> </section> `),this.target,i,[...this.__data.entries()].map((([t,s])=>e(p||(p=j`<input type="hidden" name="${0}" value="${0}">`),t,s))),this.amounts&&this.amounts.length>0?e(y||(y=j` <x-group frame> <x-i18n ns="${0}" lang="${0}" key="amount" slot="header"></x-i18n> <x-choice ?custom="${0}" .getText="${0}" .items="${0}" .value="${0}" type="number" lang="${0}" min="1" ns="${0}" data-testid="amount" @change="${0}"> </x-choice> </x-group> <slot name="amount" class="block my-m"></slot> `),this.ns,this.lang,!!(null===(t=this.custom)||void 0===t?void 0:t.includes("amount")),(t=>this.__translateAmount(parseFloat(t))),this.amounts.map(String),this.amount.toString(),this.lang,this.ns,(t=>{const e=parseFloat(t.detail);this.amount=isNaN(e)?1:e})):"",this.designations&&this.designations.length>0?e(g||(g=j` <x-dropdown .label="${0}" .items="${0}" .value="${0}" data-testid="designation" @change="${0}"> </x-dropdown> <slot name="designation" class="block my-m"></slot> `),this._t("designation").toString(),this.designations,Array.isArray(this.designation)?"${this.designation[0]}: ${this.designation[1]}":this.designation,(t=>{this.designation=t.detail})):"","string"==typeof this.comment?e(f||(f=j` <vaadin-text-area placeholder="${0}" value="${0}" label="${0}" class="w-full" data-testid="comment" @input="${0}"> </vaadin-text-area> <slot name="comment" class="block my-m"></slot> `),this._t("comment_placeholder").toString(),this.comment,this._t("comment_label").toString(),(t=>{t.stopPropagation(),this.comment=t.target.value})):"",this.anonymity?e(b||(b=j` <x-checkbox class="my-m" data-testid="anonymity" ?checked="${0}" @change="${0}"> ${0} </x-checkbox> `),this.anonymous,(t=>this.anonymous=t.detail),this._t("anonymous")):"",this.frequencies&&this.frequencies.length>0?e($||($=j` <div class="flex-1 p-s"> <x-dropdown .value="${0}" .items="${0}" .getText="${0}" data-testid="frequency" @change="${0}"> </x-dropdown> </div> `),this.frequency,this.frequencies,this.__translateFrequency.bind(this),(t=>{this.frequency=t.detail})):"",(()=>this.submit()),{amount:this.__translateAmount(this.amount),frequency:this.frequency?this.__translateFrequency(this.frequency):""},this.lang,this.frequency&&!(null===(s=this.frequencies)||void 0===s?void 0:s.length)?"donate_recurrently":"donate",this.ns)}updated(){this.dispatchEvent(new h(this.__data))}get __data(){const t=new FormData;return"string"==typeof this.designation&&t.set("Designation",this.designation.trim()),"number"==typeof this.amount&&"string"==typeof this.currency&&t.set("price",`${this.amount.toFixed(2)}${this.currency}`),this.frequency&&t.set("sub_frequency",this.frequency),"string"==typeof this.comment&&t.set("Comment",this.comment.trim()),"string"==typeof this.image&&t.set("image",this.image),"string"==typeof this.code&&t.set("code",this.code),"string"==typeof this.name&&t.set("name",this.name.trim()),"string"==typeof this.url&&t.set("url",this.url),"string"==typeof this.cart&&t.set("cart",this.cart),this.empty&&t.set("empty",this.empty),this.anonymous&&t.set("Anonymous","true"),t.set("quantity","1"),t}get __form(){return this.shadowRoot.querySelector("form")}__translateFrequency(t){if(!t||t.match(/^\s*$/))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:s}=i(t);return this._t("frequency",{units:this._t(s,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:0,currency:this.currency,style:"currency"})}}customElements.define("foxy-donation",x);export{x as Donation};
1
+ import{_ as t}from"./shared-d1195c27.js";import"./shared-433ff5ae.js";import"./shared-3ebbd21d.js";import"./shared-cc8ce493.js";import{h as e}from"./shared-dc73b9a5.js";import{y as s}from"./shared-70612035.js";import{p as i}from"./shared-0d4cdb19.js";import{C as r}from"./shared-a9f4e92e.js";import{C as n}from"./shared-eb8a9f27.js";import"./shared-705ce87a.js";import{D as a,I as o}from"./shared-9ea762dc.js";import{E as c}from"./shared-cfe76d01.js";import{G as m}from"./shared-32566c11.js";import"./shared-8d826ccb.js";import"./shared-f4e03cdc.js";import"./shared-2dd2ff95.js";import"./shared-3db18172.js";import"./shared-69c7aec1.js";import"./shared-ff10b9fb.js";import"./shared-25b83adb.js";import"./shared-6b578d1a.js";import"./shared-a1f697c2.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-61ade33e.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-4e709717.js";import"./shared-3ef5dcef.js";import"./shared-f6f4bed5.js";import"./shared-7edf38e9.js";import"./shared-f79438f8.js";import"./shared-83c8a2d2.js";import"./shared-95a591b3.js";import"./shared-651c44fa.js";import"./shared-56ee26d7.js";import"./shared-a9b8c3ab.js";import"./shared-99940888.js";import"./shared-fcdb896f.js";import"./shared-c518ece2.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-d3ffbcb0.js";import"./shared-5cdec81e.js";class h extends CustomEvent{constructor(t){super("change",{detail:t})}}class d extends CustomEvent{constructor(){super("submit",{cancelable:!0})}}let u,l,p,y,f,g,b,$,j=t=>t;class x extends s{constructor(){super("donation"),this.currency=null,this.amount=null,this.store=null,this.name=null,this.custom=null,this.amounts=null,this.frequency=null,this.frequencies=null,this.designation=null,this.designations=null,this.comment=null,this.anonymity=!1,this.anonymous=!1,this.image=null,this.code=null,this.url=null,this.cart="checkout",this.target="_top"}static get scopedElements(){return{"vaadin-text-area":customElements.get("vaadin-text-area"),"x-error-screen":c,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":a,"x-checkbox":r,"x-choice":n,"x-group":m,"x-i18n":o}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},custom:{type:Array},amount:{type:Number},amounts:{type:Array},frequency:{type:String},frequencies:{type:Array},designation:{type:Array},designations:{type:Array},comment:{type:String},anonymity:{reflect:!0,type:Boolean},anonymous:{reflect:!0,type:Boolean},image:{type:String},store:{type:String},name:{type:String},code:{type:String},url:{type:String},cart:{type:String},target:{type:String},empty:{type:String}})}static get events(){return{change:h,submit:d}}submit(){this.dispatchEvent(new d)&&this.__form.submit()}render(){var t,s;if(!(this.currency&&this.amount&&this.store&&this.name))return e(u||(u=j` <x-error-screen data-testid="error" type="setup_needed" class="relative"></x-error-screen> `));const i=this.store.includes(".")?this.store:`${this.store}.foxycart.com`;return e(l||(l=j` <form target="${0}" class="sr-only" method="POST" action="https://${0}/cart" data-testid="form"> ${0} </form> <section> ${0} </section> <section> ${0} </section> <section> ${0} </section> <section> ${0} <div class="flex flex-wrap -m-s"> ${0} <div class="flex-1 p-s"> <vaadin-button class="w-full" theme="primary" data-testid="submit" @click="${0}"> <x-i18n .opts="${0}" lang="${0}" key="${0}" ns="${0}"> </x-i18n> </vaadin-button> </div> </div> </section> `),this.target,i,[...this.__data.entries()].map((([t,s])=>e(p||(p=j`<input type="hidden" name="${0}" value="${0}">`),t,s))),this.amounts&&this.amounts.length>0?e(y||(y=j` <x-group frame> <x-i18n ns="${0}" lang="${0}" key="amount" slot="header"></x-i18n> <x-choice ?custom="${0}" .getText="${0}" .items="${0}" .value="${0}" type="number" lang="${0}" min="1" ns="${0}" data-testid="amount" @change="${0}"> </x-choice> </x-group> <slot name="amount" class="block my-m"></slot> `),this.ns,this.lang,!!(null===(t=this.custom)||void 0===t?void 0:t.includes("amount")),(t=>this.__translateAmount(parseFloat(t))),this.amounts.map(String),this.amount.toString(),this.lang,this.ns,(t=>{const e=parseFloat(t.detail);this.amount=isNaN(e)?1:e})):"",this.designations&&this.designations.length>0?e(f||(f=j` <x-dropdown .label="${0}" .items="${0}" .value="${0}" data-testid="designation" @change="${0}"> </x-dropdown> <slot name="designation" class="block my-m"></slot> `),this._t("designation").toString(),this.designations,Array.isArray(this.designation)?"${this.designation[0]}: ${this.designation[1]}":this.designation,(t=>{this.designation=t.detail})):"","string"==typeof this.comment?e(g||(g=j` <vaadin-text-area placeholder="${0}" value="${0}" label="${0}" class="w-full" data-testid="comment" @input="${0}"> </vaadin-text-area> <slot name="comment" class="block my-m"></slot> `),this._t("comment_placeholder").toString(),this.comment,this._t("comment_label").toString(),(t=>{t.stopPropagation(),this.comment=t.target.value})):"",this.anonymity?e(b||(b=j` <x-checkbox class="my-m" data-testid="anonymity" ?checked="${0}" @change="${0}"> ${0} </x-checkbox> `),this.anonymous,(t=>this.anonymous=t.detail),this._t("anonymous")):"",this.frequencies&&this.frequencies.length>0?e($||($=j` <div class="flex-1 p-s"> <x-dropdown .value="${0}" .items="${0}" .getText="${0}" data-testid="frequency" @change="${0}"> </x-dropdown> </div> `),this.frequency,this.frequencies,this.__translateFrequency.bind(this),(t=>{this.frequency=t.detail})):"",(()=>this.submit()),{amount:this.__translateAmount(this.amount),frequency:this.frequency?this.__translateFrequency(this.frequency):""},this.lang,this.frequency&&!(null===(s=this.frequencies)||void 0===s?void 0:s.length)?"donate_recurrently":"donate",this.ns)}updated(){this.dispatchEvent(new h(this.__data))}get __data(){const t=new FormData;return"string"==typeof this.designation&&t.set("Designation",this.designation.trim()),"number"==typeof this.amount&&"string"==typeof this.currency&&t.set("price",`${this.amount.toFixed(2)}${this.currency}`),this.frequency&&t.set("sub_frequency",this.frequency),"string"==typeof this.comment&&t.set("Comment",this.comment.trim()),"string"==typeof this.image&&t.set("image",this.image),"string"==typeof this.code&&t.set("code",this.code),"string"==typeof this.name&&t.set("name",this.name.trim()),"string"==typeof this.url&&t.set("url",this.url),"string"==typeof this.cart&&t.set("cart",this.cart),this.empty&&t.set("empty",this.empty),this.anonymous&&t.set("Anonymous","true"),t.set("quantity","1"),t}get __form(){return this.shadowRoot.querySelector("form")}__translateFrequency(t){if(!t||t.match(/^\s*$/))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:s}=i(t);return this._t("frequency",{units:this._t(s,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:0,currency:this.currency,style:"currency"})}}customElements.define("foxy-donation",x);export{x as Donation};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./shared-0e83a899.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import{a as e}from"./shared-6d7c1a2f.js";import{T as s}from"./shared-b384e653.js";import{h as t,s as r}from"./shared-dc73b9a5.js";import"./shared-fd1adc35.js";import"./shared-e8b8c8d0.js";import"./shared-d1195c27.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";let a,i,o,n,d,l,c=e=>e;const m=e(s,"downloadable-card");class h extends m{renderBody(){const e=this.__extension;return t(a||(a=c` <div class="flex gap-s"> <div class="w-s h-s flex-shrink-0 rounded-s bg-contrast-5 flex" aria-hidden="true"> ${0} </div> <div class="flex-1 min-w-0"> ${0} </div> </div> `),e.length<5?this.__renderExtension(e):r(i||(i=c`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="m-auto" style="width: 64%; height: 64%"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`)),super.renderBody({title:e=>t(o||(o=c` <span class="inline-flex w-full items-center"> <span class="mr-auto truncate min-w-0">${0} &bull; ${0}</span> <span class="text-s text-tertiary font-normal flex-shrink-0"> ${0} ${0} </span> </span> `),e.name,e.code,r(n||(n=c`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="inline" style="width: 1.15em; height: 1.15em"><path d="M10.75 10.818v2.614A3.13 3.13 0 0011.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 00-1.138-.432zM8.33 8.62c.053.055.115.11.184.164.208.16.46.284.736.363V6.603a2.45 2.45 0 00-.35.13c-.14.065-.27.143-.386.233-.377.292-.514.627-.514.909 0 .184.058.39.202.592.037.051.08.102.128.152z" /><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-6a.75.75 0 01.75.75v.316a3.78 3.78 0 011.653.713c.426.33.744.74.925 1.2a.75.75 0 01-1.395.55 1.35 1.35 0 00-.447-.563 2.187 2.187 0 00-.736-.363V9.3c.698.093 1.383.32 1.959.696.787.514 1.29 1.27 1.29 2.13 0 .86-.504 1.616-1.29 2.13-.576.377-1.261.603-1.96.696v.299a.75.75 0 11-1.5 0v-.3c-.697-.092-1.382-.318-1.958-.695-.482-.315-.857-.717-1.078-1.188a.75.75 0 111.359-.636c.08.173.245.376.54.569.313.205.706.353 1.138.432v-2.748a3.782 3.782 0 01-1.653-.713C6.9 9.433 6.5 8.681 6.5 7.875c0-.805.4-1.558 1.097-2.096a3.78 3.78 0 011.653-.713V4.75A.75.75 0 0110 4z" clip-rule="evenodd" /></svg>`)),this.__formattedPrice),subtitle:e=>t(d||(d=c`${0} (${0})`),e.file_name,this.__formattedFileSize)}))}get __formattedFileSize(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_size)&&void 0!==s?s:0,r=1024,a=1048576,i=1024*a,o={maximumFractionDigits:2},n=this.lang||"en";try{return t/i>1?`${(t/i).toLocaleString(n,o)} GB`:t/a>1?`${(t/a).toLocaleString(n,o)} MB`:t/r>1?`${(t/r).toLocaleString(n,o)} KB`:`${t.toLocaleString(n,o)} B`}catch(e){return`${t} B`}}get __formattedPrice(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.price)&&void 0!==s?s:0;try{return t.toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2})}catch(e){return String(t)}}get __extension(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_name.split(".").filter((e=>!!e)))&&void 0!==s?s:[];return t.length<2?"?????":t.pop()}__renderExtension(e){const s=`font: 700 calc(var(--lumo-size-s) / ${Math.max(2,e.length)}) sans-serif`;return t(l||(l=c`<span style="${0}" class="m-auto font-medium uppercase">${0}</span>`),s,e)}}customElements.define("foxy-downloadable-card",h);export{h as DownloadableCard};
1
+ import"./shared-51c4a6dd.js";import"./shared-ccc7a886.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import{a as e}from"./shared-70612035.js";import{T as s}from"./shared-2aee2a22.js";import{h as t,s as r}from"./shared-dc73b9a5.js";import"./shared-6b5e4fe4.js";import"./shared-e8b8c8d0.js";import"./shared-d1195c27.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";let a,i,o,n,d,l,c=e=>e;const m=e(s,"downloadable-card");class h extends m{renderBody(){const e=this.__extension;return t(a||(a=c` <div class="flex gap-s"> <div class="w-s h-s flex-shrink-0 rounded-s bg-contrast-5 flex" aria-hidden="true"> ${0} </div> <div class="flex-1 min-w-0"> ${0} </div> </div> `),e.length<5?this.__renderExtension(e):r(i||(i=c`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="m-auto" style="width: 64%; height: 64%"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`)),super.renderBody({title:e=>t(o||(o=c` <span class="inline-flex w-full items-center"> <span class="mr-auto truncate min-w-0">${0} &bull; ${0}</span> <span class="text-s text-tertiary font-normal flex-shrink-0"> ${0} ${0} </span> </span> `),e.name,e.code,r(n||(n=c`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="inline" style="width: 1.15em; height: 1.15em"><path d="M10.75 10.818v2.614A3.13 3.13 0 0011.888 13c.482-.315.612-.648.612-.875 0-.227-.13-.56-.612-.875a3.13 3.13 0 00-1.138-.432zM8.33 8.62c.053.055.115.11.184.164.208.16.46.284.736.363V6.603a2.45 2.45 0 00-.35.13c-.14.065-.27.143-.386.233-.377.292-.514.627-.514.909 0 .184.058.39.202.592.037.051.08.102.128.152z" /><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-6a.75.75 0 01.75.75v.316a3.78 3.78 0 011.653.713c.426.33.744.74.925 1.2a.75.75 0 01-1.395.55 1.35 1.35 0 00-.447-.563 2.187 2.187 0 00-.736-.363V9.3c.698.093 1.383.32 1.959.696.787.514 1.29 1.27 1.29 2.13 0 .86-.504 1.616-1.29 2.13-.576.377-1.261.603-1.96.696v.299a.75.75 0 11-1.5 0v-.3c-.697-.092-1.382-.318-1.958-.695-.482-.315-.857-.717-1.078-1.188a.75.75 0 111.359-.636c.08.173.245.376.54.569.313.205.706.353 1.138.432v-2.748a3.782 3.782 0 01-1.653-.713C6.9 9.433 6.5 8.681 6.5 7.875c0-.805.4-1.558 1.097-2.096a3.78 3.78 0 011.653-.713V4.75A.75.75 0 0110 4z" clip-rule="evenodd" /></svg>`)),this.__formattedPrice),subtitle:e=>t(d||(d=c`${0} (${0})`),e.file_name,this.__formattedFileSize)}))}get __formattedFileSize(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_size)&&void 0!==s?s:0,r=1024,a=1048576,i=1024*a,o={maximumFractionDigits:2},n=this.lang||"en";try{return t/i>1?`${(t/i).toLocaleString(n,o)} GB`:t/a>1?`${(t/a).toLocaleString(n,o)} MB`:t/r>1?`${(t/r).toLocaleString(n,o)} KB`:`${t.toLocaleString(n,o)} B`}catch(e){return`${t} B`}}get __formattedPrice(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.price)&&void 0!==s?s:0;try{return t.toLocaleString(this.lang||"en",{maximumFractionDigits:2,minimumFractionDigits:2})}catch(e){return String(t)}}get __extension(){var e,s;const t=null!==(s=null===(e=this.data)||void 0===e?void 0:e.file_name.split(".").filter((e=>!!e)))&&void 0!==s?s:[];return t.length<2?"?????":t.pop()}__renderExtension(e){const s=`font: 700 calc(var(--lumo-size-s) / ${Math.max(2,e.length)}) sans-serif`;return t(l||(l=c`<span style="${0}" class="m-auto font-medium uppercase">${0}</span>`),s,e)}}customElements.define("foxy-downloadable-card",h);export{h as DownloadableCard};
@@ -1,4 +1,4 @@
1
- import{a as e,I as t}from"./shared-2dd497e5.js";import"./shared-ad3eea80.js";import"./shared-08be5c32.js";import"./shared-78bfc71e.js";import"./shared-935adc3b.js";import{h as r,P as a,B as o}from"./shared-e0c93cfa.js";import{E as i,T as s}from"./shared-359793d4.js";import"./shared-5452fdfe.js";import"./shared-3bfbd5af.js";import{w as l,a as n}from"./shared-6d7c1a2f.js";import{c as d,h as A}from"./shared-dc73b9a5.js";import{i as u}from"./shared-9803aa7c.js";import{c as p}from"./shared-4e709717.js";import"./shared-3493737e.js";import{_ as c,B as m}from"./shared-d1195c27.js";import{A as h}from"./shared-c518ece2.js";import"./shared-91500a0f.js";import"./shared-bbc53ef2.js";import{I as g}from"./shared-0203d3da.js";import"./foxy-nucleon-element.js";import"./shared-51c4a6dd.js";import"./shared-d1cb97c6.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-61ade33e.js";import"./shared-6be8e65e.js";import"./shared-c24bc616.js";import"./shared-b2bc3a0e.js";import"./shared-4b52b410.js";import"./shared-651c44fa.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-455856d9.js";import"./shared-317cb721.js";import"./shared-838bd79c.js";import"./shared-22ba9566.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./foxy-copy-to-clipboard.js";import"./shared-dbe8536b.js";import"./shared-e231722c.js";import"./shared-bb9f0d8b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const f=r`<dom-module id="lumo-progress-bar" theme-for="vaadin-progress-bar">
1
+ import{a as e,I as t}from"./shared-684174e7.js";import"./shared-25b83adb.js";import"./shared-ff10b9fb.js";import"./shared-8d826ccb.js";import"./shared-433ff5ae.js";import{h as r,P as a,B as o}from"./shared-6583e3f9.js";import{E as i,T as s}from"./shared-08e73812.js";import"./shared-6b578d1a.js";import"./shared-0d4cdb19.js";import{x as l,a as n}from"./shared-70612035.js";import{c as d,h as A}from"./shared-dc73b9a5.js";import{i as u}from"./shared-9803aa7c.js";import{c as p}from"./shared-4e709717.js";import"./shared-f79438f8.js";import{_ as c,B as m}from"./shared-d1195c27.js";import{A as h}from"./shared-c518ece2.js";import"./shared-136942c7.js";import"./shared-a2616e4b.js";import{I as g}from"./shared-e8744e04.js";import"./foxy-nucleon-element.js";import"./shared-51c4a6dd.js";import"./shared-d1cb97c6.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-61ade33e.js";import"./shared-83c8a2d2.js";import"./shared-2dd2ff95.js";import"./shared-95a591b3.js";import"./shared-f4e03cdc.js";import"./shared-651c44fa.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-56ee26d7.js";import"./shared-a9b8c3ab.js";import"./shared-3ef5dcef.js";import"./shared-22ba9566.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./foxy-copy-to-clipboard.js";import"./shared-66e2a4ee.js";import"./shared-a1f697c2.js";import"./shared-52c9fa57.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const f=r`<dom-module id="lumo-progress-bar" theme-for="vaadin-progress-bar">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import{a as e}from"./shared-6d7c1a2f.js";import{T as t}from"./shared-b384e653.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-fd1adc35.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let s,d,o=e=>e;const a=e(t,"email-template-card");class m extends a{renderBody(){return super.renderBody({title:e=>r(s||(s=o`${0}`),e.description),subtitle:e=>r(d||(d=o`<foxy-i18n infer="" key="${0}"></foxy-i18n>`),this.__getType(e))})}__getType(e){const{content_html_url:t,content_text_url:r}=e,{content_html:s,content_text:d}=e;return!d||r||s||t?!s||t||d||r?!t||r||s||d?!r||t||d||s?s||t||d||r?"type_mixed":"type_default":"type_custom_text_url":"type_custom_html_url":"type_custom_html":"type_custom_text"}}customElements.define("foxy-email-template-card",m);export{m as EmailTemplateCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import{a as e}from"./shared-70612035.js";import{T as t}from"./shared-2aee2a22.js";import{h as r}from"./shared-dc73b9a5.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-6b5e4fe4.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let s,d,o=e=>e;const a=e(t,"email-template-card");class m extends a{renderBody(){return super.renderBody({title:e=>r(s||(s=o`${0}`),e.description),subtitle:e=>r(d||(d=o`<foxy-i18n infer="" key="${0}"></foxy-i18n>`),this.__getType(e))})}__getType(e){const{content_html_url:t,content_text_url:r}=e,{content_html:s,content_text:d}=e;return!d||r||s||t?!s||t||d||r?!t||r||s||d?!r||t||d||s?s||t||d||r?"type_mixed":"type_default":"type_custom_text_url":"type_custom_html_url":"type_custom_html":"type_custom_text"}}customElements.define("foxy-email-template-card",m);export{m as EmailTemplateCard};
@@ -1 +1 @@
1
- import"./shared-d367ea04.js";import"./shared-529f2b48.js";import"./shared-53443b27.js";import"./shared-6a8ccf0c.js";import"./shared-bbc53ef2.js";import{I as t}from"./shared-0203d3da.js";import"./shared-935adc3b.js";import{a as e}from"./shared-2dd497e5.js";import"./shared-3bfbd5af.js";import{_ as r,B as s}from"./shared-d1195c27.js";import{N as a}from"./shared-e8b8c8d0.js";import{h as o}from"./shared-dc73b9a5.js";import{a as n}from"./shared-6d7c1a2f.js";import{i}from"./shared-9803aa7c.js";import"./shared-a0c6a159.js";import"./shared-3493737e.js";import"./shared-08be5c32.js";import"./shared-e0c93cfa.js";import"./shared-6be8e65e.js";import"./shared-c24bc616.js";import"./shared-5452fdfe.js";import"./shared-b2bc3a0e.js";import"./shared-359793d4.js";import"./shared-4b52b410.js";import"./shared-ad3eea80.js";import"./shared-651c44fa.js";import"./shared-78bfc71e.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-61ade33e.js";import"./shared-455856d9.js";import"./shared-317cb721.js";import"./shared-4e709717.js";import"./shared-dbe8536b.js";import"./shared-e231722c.js";import"./shared-22ba9566.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-17a61265.js";import"./foxy-copy-to-clipboard.js";import"./shared-bb9f0d8b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-51c4a6dd.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let l,c=t=>t;customElements.define("foxy-internal-email-template-form-async-action",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"";return o(l||(l=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=e?e:""}`.trim(),"busy"===t||this.disabled,this.__submit,t)}async __submit(){var t,e;if("busy"!==this.__state)try{this.__state="busy";const r=new a.API(this),s=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=s.ok?"idle":"fail",s.ok&&(null===(e=this.nucleon)||void 0===e||e.refresh())}catch(t){this.__state="fail"}}});let h,m=t=>t;const d=n(t,"email-template-form");class f extends d{constructor(){super(...arguments),this.__templateLanguageOptions=[{rawLabel:"Nunjucks",value:"nunjucks"},{rawLabel:"Handlebars",value:"handlebars"},{rawLabel:"Pug",value:"pug"},{rawLabel:"Twig",value:"twig"},{rawLabel:"EJS",value:"ejs"}],this.__toggleGetValue=()=>!!this.form.subject,this.__toggleSetValue=t=>{this.edit({subject:t?this.t("general.subject.default_value"):""})}}get readonlySelector(){const t=[super.readonlySelector.toString()],e=this.form.subject;return this.form.content_html_url&&e&&t.unshift("content-html"),this.form.content_text_url&&e&&t.unshift("content-text"),new s(t.join(" ").trim())}get disabledSelector(){const t=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_html_url&&this.data.content_text_url||t.unshift("html-source:cache","text-source:cache"),this.form.subject||t.unshift("general:template-language","html-source","text-source","content-html","content-text"),new s(t.join(" ").trim())}get hiddenSelector(){var t,e,r;const a=[super.hiddenSelector.toString()];return(null===(t=this.data)||void 0===t?void 0:t.content_html_url)||a.unshift("html-source:cache"),(null===(e=this.data)||void 0===e?void 0:e.content_text_url)||a.unshift("text-source:cache"),(null===(r=this.data)||void 0===r?void 0:r.subject)||this.form.subject||a.unshift("general:template-language","general:subject","html-source","text-source","content-html","content-text"),new s(a.join(" ").trim())}renderBody(){var t,e;return o(h||(h=m` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="subject"> </foxy-internal-text-control> <foxy-internal-select-control layout="summary-item" infer="template-language" .options="${0}"> </foxy-internal-select-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content-html"></foxy-internal-source-control> <foxy-internal-summary-control infer="html-source"> <foxy-internal-text-control layout="summary-item" infer="content-html-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> <foxy-internal-source-control infer="content-text"></foxy-internal-source-control> <foxy-internal-summary-control infer="text-source"> <foxy-internal-text-control layout="summary-item" infer="content-text-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.__toggleGetValue,this.__toggleSetValue,this.__templateLanguageOptions,this.renderTemplateOrSlot(),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:cache"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(t){const e=await super._sendPost(t);if(t.content_html_url&&t.content_text_url){const t=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(t,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(e._links.self.href)}async _sendPatch(t){const e=await super._sendPatch(t);if(!t.content_html_url&&!t.content_text_url)return e;const r=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(e._links.self.href)}}customElements.define("foxy-email-template-form",f);export{f as EmailTemplateForm};
1
+ import"./shared-67d1de9a.js";import"./shared-cb24170b.js";import"./shared-148214ee.js";import"./shared-8a65adfd.js";import"./shared-a2616e4b.js";import{I as t}from"./shared-e8744e04.js";import"./shared-433ff5ae.js";import{a as e}from"./shared-684174e7.js";import"./shared-0d4cdb19.js";import{_ as r,B as a}from"./shared-d1195c27.js";import{N as s}from"./shared-e8b8c8d0.js";import{h as o}from"./shared-dc73b9a5.js";import{a as n}from"./shared-70612035.js";import{i}from"./shared-9803aa7c.js";import"./shared-a0c6a159.js";import"./shared-f79438f8.js";import"./shared-ff10b9fb.js";import"./shared-6583e3f9.js";import"./shared-83c8a2d2.js";import"./shared-2dd2ff95.js";import"./shared-6b578d1a.js";import"./shared-95a591b3.js";import"./shared-08e73812.js";import"./shared-f4e03cdc.js";import"./shared-25b83adb.js";import"./shared-651c44fa.js";import"./shared-8d826ccb.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-61ade33e.js";import"./shared-56ee26d7.js";import"./shared-a9b8c3ab.js";import"./shared-4e709717.js";import"./shared-66e2a4ee.js";import"./shared-a1f697c2.js";import"./shared-22ba9566.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-d1cb97c6.js";import"./shared-17a61265.js";import"./foxy-copy-to-clipboard.js";import"./shared-52c9fa57.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-51c4a6dd.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let l,c=t=>t;customElements.define("foxy-internal-email-template-form-async-action",class extends e{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return r(r({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const t=this.__state,e="fail"===t?"error":"";return o(l||(l=c` <vaadin-button theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),`${this.theme} ${null!=e?e:""}`.trim(),"busy"===t||this.disabled,this.__submit,t)}async __submit(){var t,e;if("busy"!==this.__state)try{this.__state="busy";const r=new s.API(this),a=await r.fetch(null!==(t=this.href)&&void 0!==t?t:"",{method:"POST"});this.__state=a.ok?"idle":"fail",a.ok&&(null===(e=this.nucleon)||void 0===e||e.refresh())}catch(t){this.__state="fail"}}});let h,m=t=>t;const d=n(t,"email-template-form");class f extends d{constructor(){super(...arguments),this.__templateLanguageOptions=[{rawLabel:"Nunjucks",value:"nunjucks"},{rawLabel:"Handlebars",value:"handlebars"},{rawLabel:"Pug",value:"pug"},{rawLabel:"Twig",value:"twig"},{rawLabel:"EJS",value:"ejs"}],this.__toggleGetValue=()=>!!this.form.subject,this.__toggleSetValue=t=>{this.edit({subject:t?this.t("general.subject.default_value"):""})}}get readonlySelector(){const t=[super.readonlySelector.toString()],e=this.form.subject;return this.form.content_html_url&&e&&t.unshift("content-html"),this.form.content_text_url&&e&&t.unshift("content-text"),new a(t.join(" ").trim())}get disabledSelector(){const t=[super.disabledSelector.toString()];return this.in({idle:{snapshot:"clean"}})&&this.data.content_html_url&&this.data.content_text_url||t.unshift("html-source:cache","text-source:cache"),this.form.subject||t.unshift("general:template-language","html-source","text-source","content-html","content-text"),new a(t.join(" ").trim())}get hiddenSelector(){var t,e,r;const s=[super.hiddenSelector.toString()];return(null===(t=this.data)||void 0===t?void 0:t.content_html_url)||s.unshift("html-source:cache"),(null===(e=this.data)||void 0===e?void 0:e.content_text_url)||s.unshift("text-source:cache"),(null===(r=this.data)||void 0===r?void 0:r.subject)||this.form.subject||s.unshift("general:template-language","general:subject","html-source","text-source","content-html","content-text"),new a(s.join(" ").trim())}renderBody(){var t,e;return o(h||(h=m` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="description"> </foxy-internal-text-control> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="subject"> </foxy-internal-text-control> <foxy-internal-select-control layout="summary-item" infer="template-language" .options="${0}"> </foxy-internal-select-control> </foxy-internal-summary-control> ${0} <foxy-internal-source-control infer="content-html"></foxy-internal-source-control> <foxy-internal-summary-control infer="html-source"> <foxy-internal-text-control layout="summary-item" infer="content-html-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> <foxy-internal-source-control infer="content-text"></foxy-internal-source-control> <foxy-internal-summary-control infer="text-source"> <foxy-internal-text-control layout="summary-item" infer="content-text-url"> </foxy-internal-text-control> <foxy-internal-email-template-form-async-action theme="tertiary-inline" infer="cache" href="${0}"> </foxy-internal-email-template-form-async-action> </foxy-internal-summary-control> ${0} `),this.renderHeader(),this.__toggleGetValue,this.__toggleSetValue,this.__templateLanguageOptions,this.renderTemplateOrSlot(),i(null===(t=this.data)||void 0===t?void 0:t._links["fx:cache"].href),i(null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href),super.renderBody())}async _sendPost(t){const e=await super._sendPost(t);if(t.content_html_url&&t.content_text_url){const t=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(t,{method:"POST"})).ok)throw["error:failed_to_cache"]}return await this._fetch(e._links.self.href)}async _sendPatch(t){const e=await super._sendPatch(t);if(!t.content_html_url&&!t.content_text_url)return e;const r=e._links["fx:cache"].href;if(!(await new f.API(this).fetch(r,{method:"POST"})).ok)throw["error:failed_to_cache"];return await this._fetch(e._links.self.href)}}customElements.define("foxy-email-template-form",f);export{f as EmailTemplateForm};
@@ -1 +1 @@
1
- import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,c as t,h as a}from"./shared-dc73b9a5.js";import{T as i,a as n,S as o}from"./shared-6d7c1a2f.js";import{c as d}from"./shared-4e709717.js";import{G as l}from"./shared-9b1b4c9d.js";import"./foxy-nucleon-element.js";import{g as c}from"./shared-bab2ea2c.js";import{N as p}from"./shared-e8b8c8d0.js";import{d as u}from"./shared-641786b2.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let m,f,h,y=e=>e;class x extends(i(r)){constructor(){super(...arguments),this.data=[]}static get properties(){return{data:{type:Array}}}static get styles(){return[super.styles,t(m||(m=y`dd,dt{display:inline-block;overflow:hidden;vertical-align:top;overflow-wrap:anywhere}dt{min-width:calc(5 * var(--lumo-size-l));padding-right:.5em}dd{max-width:calc(15 * var(--lumo-size-l));min-width:calc(10 * var(--lumo-size-l))}`))]}render(){return a(f||(f=y` <dl class="space-y-s"> ${0} </dl> `),this.data.map((e=>{const s=String(e[1]).trim();return a(h||(h=y` <div> <dt class="text-secondary truncate">${0}</dt> <dd class="${0}">${0}</dd> </div> `),e[0],d({"text-tertiary":!s}),s||"–")})))}}let g,v,$=e=>e;const _=["_links","_embedded"],b=n(i(o(p)));class j extends b{static get scopedElements(){return{"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x}}render(){if(this.in({idle:"snapshot"})){const s=this.data,{_links:r,_embedded:t}=s,i=e(s,_);try{const e=c(r.self.href);null!==e&&(i.id=e)}catch(e){}return a(g||(g=$` <x-data-list aria-live="polite" aria-busy="false" class="leading-s text-s" data="${0}"> </x-data-list> `),JSON.stringify(Array.from(Object.entries(i))))}const s=this.in("busy");return a(v||(v=$` <div aria-live="polite" aria-busy="${0}" data-testid="wrapper" class="flex justify-center"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> `),s,this.in("fail")?"error":s?"busy":"empty",this.lang,this.ns)}}let w,k,S,E,O,N,z,T,G,J,P,A=e=>e;const R=n(i(o(p)),"error-entry-card");class D extends R{constructor(){super(...arguments),this.open=!1}static get scopedElements(){return{"x-resource-viewer":j,"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x,"iron-icon":customElements.get("iron-icon"),"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get properties(){return s(s({},super.properties),{},{open:{type:Boolean,reflect:!0}})}render(){var e,s;const r=this.data,t=this.in("busy");if(r){const{hide_error:e}=r,{open:s}=this;return a(w||(w=A` <details aria-busy="${0}" aria-live="polite" class="text-body w-full" ?open="${0}" @toggle="${0}"> <summary class="rounded-s ring-offset-4 ring-offset-base ring-primary-50 focus-outline-none focus-ring-2"> <div style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="${0}"> ${0} </div> </summary> ${0} </details> `),t,s,this.__handleToggle,d({"border-l-2 leading-s relative cursor-pointer":!0,"border-contrast":e&&!s,"border-primary":!e,"border-error":e&&s,"h-l":!s}),this.__renderSummary(r),s?this.__renderDetails(r):"")}return a(k||(k=A` <div aria-busy="${0}" aria-live="polite" style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="flex items-center justify-center border-l-2 leading-s relative border-contrast-10 h-l"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),t,t?"busy":this.in("fail")?"error":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderGetOrPostValues(e,s){const r=new URLSearchParams(u(e||s));return a(S||(S=A` <div class="relative leading-xs pt-s"> <div class="absolute font-medium right-0 text-tertiary text-xs top-0 mt-s">${0}</div> <x-data-list data="${0}"></x-data-list> </div> `),e?"GET":"POST",JSON.stringify(Array.from(r.entries())))}__renderReferrer(e){return a(E||(E=A` <span class="text-secondary">Navigated from</span> <a target="_blank" class="font-medium text-primary hover-underline" href="${0}" rel="nofollow noopener noreferrer"> ${0} </a> `),e,e)}__renderSummary(e){return a(O||(O=A` <div class="text-s absolute right-0 top-0 text-tertiary"> <iron-icon icon="icons:expand-${0}"></iron-icon> </div> <div class="text-s mb-xs ${0}"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </div> <p class="${0} overflow-hidden font-medium"> ${0} </p> `),this.open?"less":"more",e.hide_error?"text-error":"text-primary",JSON.stringify({value:e.date_created}),this.lang,this.ns,JSON.stringify({value:e.date_created}),this.lang,this.ns,this.open?"":"truncate",e.error_message)}__renderDetails(e){return a(N||(N=A` <div class="space-y-m pt-m"> ${0} ${0} ${0} </div> `),e.referrer||e.get_values||e.post_values?a(z||(z=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="request" ns="${0}"></foxy-i18n> <div class="mx-xs p-s text-s divide-y divide-contrast-10 space-y-s"> <p> <span class="block font-medium">${0}</span> ${0} </p> ${0} </div> </x-group> `),this.lang,this.ns,e.url,e.referrer?this.__renderReferrer(e.referrer):"",e.get_values||e.post_values?this.__renderGetOrPostValues(e.get_values,e.post_values):""):"",e.ip_address||e.ip_country||e.user_agent?a(T||(T=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="client" ns="${0}"></foxy-i18n> <div class="text-s flex flex-col mx-xs p-s"> <span class="font-medium"> ${0} ${0} </span> ${0} </div> </x-group> `),this.lang,this.ns,e.ip_address,e.ip_country?a(G||(G=A`<span class="text-tertiary"> • </span>${0}`),e.ip_country):"",e.user_agent?a(J||(J=A`<span class="text-secondary">${0}</span>`),e.user_agent):""):"",Object.entries(e._links).map((([e,s])=>["self","fx:store","curies"].includes(e)?"":a(P||(P=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <x-resource-viewer class="p-s mx-xs" href="${0}" lang="${0}" ns="${0}"> </x-resource-viewer> </x-group> `),this.lang,e.substr(3),this.ns,s.href,this.lang,this.ns))))}__handleToggle(e){var s;const r=e.target;r.open&&!1===(null===(s=this.data)||void 0===s?void 0:s.hide_error)&&(this.edit({hide_error:!0}),this.submit()),this.open=r.open}}customElements.define("foxy-error-entry-card",D);export{D as ErrorEntryCard};
1
+ import{aH as e,_ as s}from"./shared-d1195c27.js";import{L as r,c as t,h as a}from"./shared-dc73b9a5.js";import{T as i,a as n,S as o}from"./shared-70612035.js";import{c as d}from"./shared-4e709717.js";import{G as l}from"./shared-32566c11.js";import"./foxy-nucleon-element.js";import{g as c}from"./shared-bab2ea2c.js";import{N as p}from"./shared-e8b8c8d0.js";import{d as u}from"./shared-641786b2.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let m,f,h,y=e=>e;class x extends(i(r)){constructor(){super(...arguments),this.data=[]}static get properties(){return{data:{type:Array}}}static get styles(){return[super.styles,t(m||(m=y`dd,dt{display:inline-block;overflow:hidden;vertical-align:top;overflow-wrap:anywhere}dt{min-width:calc(5 * var(--lumo-size-l));padding-right:.5em}dd{max-width:calc(15 * var(--lumo-size-l));min-width:calc(10 * var(--lumo-size-l))}`))]}render(){return a(f||(f=y` <dl class="space-y-s"> ${0} </dl> `),this.data.map((e=>{const s=String(e[1]).trim();return a(h||(h=y` <div> <dt class="text-secondary truncate">${0}</dt> <dd class="${0}">${0}</dd> </div> `),e[0],d({"text-tertiary":!s}),s||"–")})))}}let g,v,$=e=>e;const _=["_links","_embedded"],b=n(i(o(p)));class j extends b{static get scopedElements(){return{"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x}}render(){if(this.in({idle:"snapshot"})){const s=this.data,{_links:r,_embedded:t}=s,i=e(s,_);try{const e=c(r.self.href);null!==e&&(i.id=e)}catch(e){}return a(g||(g=$` <x-data-list aria-live="polite" aria-busy="false" class="leading-s text-s" data="${0}"> </x-data-list> `),JSON.stringify(Array.from(Object.entries(i))))}const s=this.in("busy");return a(v||(v=$` <div aria-live="polite" aria-busy="${0}" data-testid="wrapper" class="flex justify-center"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> `),s,this.in("fail")?"error":s?"busy":"empty",this.lang,this.ns)}}let w,k,S,E,O,N,z,T,G,J,P,A=e=>e;const R=n(i(o(p)),"error-entry-card");class D extends R{constructor(){super(...arguments),this.open=!1}static get scopedElements(){return{"x-resource-viewer":j,"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x,"iron-icon":customElements.get("iron-icon"),"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get properties(){return s(s({},super.properties),{},{open:{type:Boolean,reflect:!0}})}render(){var e,s;const r=this.data,t=this.in("busy");if(r){const{hide_error:e}=r,{open:s}=this;return a(w||(w=A` <details aria-busy="${0}" aria-live="polite" class="text-body w-full" ?open="${0}" @toggle="${0}"> <summary class="rounded-s ring-offset-4 ring-offset-base ring-primary-50 focus-outline-none focus-ring-2"> <div style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="${0}"> ${0} </div> </summary> ${0} </details> `),t,s,this.__handleToggle,d({"border-l-2 leading-s relative cursor-pointer":!0,"border-contrast":e&&!s,"border-primary":!e,"border-error":e&&s,"h-l":!s}),this.__renderSummary(r),s?this.__renderDetails(r):"")}return a(k||(k=A` <div aria-busy="${0}" aria-live="polite" style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="flex items-center justify-center border-l-2 leading-s relative border-contrast-10 h-l"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),t,t?"busy":this.in("fail")?"error":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderGetOrPostValues(e,s){const r=new URLSearchParams(u(e||s));return a(S||(S=A` <div class="relative leading-xs pt-s"> <div class="absolute font-medium right-0 text-tertiary text-xs top-0 mt-s">${0}</div> <x-data-list data="${0}"></x-data-list> </div> `),e?"GET":"POST",JSON.stringify(Array.from(r.entries())))}__renderReferrer(e){return a(E||(E=A` <span class="text-secondary">Navigated from</span> <a target="_blank" class="font-medium text-primary hover-underline" href="${0}" rel="nofollow noopener noreferrer"> ${0} </a> `),e,e)}__renderSummary(e){return a(O||(O=A` <div class="text-s absolute right-0 top-0 text-tertiary"> <iron-icon icon="icons:expand-${0}"></iron-icon> </div> <div class="text-s mb-xs ${0}"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </div> <p class="${0} overflow-hidden font-medium"> ${0} </p> `),this.open?"less":"more",e.hide_error?"text-error":"text-primary",JSON.stringify({value:e.date_created}),this.lang,this.ns,JSON.stringify({value:e.date_created}),this.lang,this.ns,this.open?"":"truncate",e.error_message)}__renderDetails(e){return a(N||(N=A` <div class="space-y-m pt-m"> ${0} ${0} ${0} </div> `),e.referrer||e.get_values||e.post_values?a(z||(z=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="request" ns="${0}"></foxy-i18n> <div class="mx-xs p-s text-s divide-y divide-contrast-10 space-y-s"> <p> <span class="block font-medium">${0}</span> ${0} </p> ${0} </div> </x-group> `),this.lang,this.ns,e.url,e.referrer?this.__renderReferrer(e.referrer):"",e.get_values||e.post_values?this.__renderGetOrPostValues(e.get_values,e.post_values):""):"",e.ip_address||e.ip_country||e.user_agent?a(T||(T=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="client" ns="${0}"></foxy-i18n> <div class="text-s flex flex-col mx-xs p-s"> <span class="font-medium"> ${0} ${0} </span> ${0} </div> </x-group> `),this.lang,this.ns,e.ip_address,e.ip_country?a(G||(G=A`<span class="text-tertiary"> • </span>${0}`),e.ip_country):"",e.user_agent?a(J||(J=A`<span class="text-secondary">${0}</span>`),e.user_agent):""):"",Object.entries(e._links).map((([e,s])=>["self","fx:store","curies"].includes(e)?"":a(P||(P=A` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <x-resource-viewer class="p-s mx-xs" href="${0}" lang="${0}" ns="${0}"> </x-resource-viewer> </x-group> `),this.lang,e.substr(3),this.ns,s.href,this.lang,this.ns))))}__handleToggle(e){var s;const r=e.target;r.open&&!1===(null===(s=this.data)||void 0===s?void 0:s.hide_error)&&(this.edit({hide_error:!0}),this.submit()),this.open=r.open}}customElements.define("foxy-error-entry-card",D);export{D as ErrorEntryCard};
@@ -1 +1 @@
1
- import"./shared-0e83a899.js";import"./foxy-nucleon-element.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-6d7c1a2f.js";import{I as r}from"./shared-fd1adc35.js";import{i as s}from"./shared-9803aa7c.js";import{c as a}from"./shared-4e709717.js";import{d as o}from"./shared-641786b2.js";import{h as i}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-3bfbd5af.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,n,u=e=>e;const c=t(r,"filter-attribute-card");class h extends c{constructor(){super(...arguments),this.getCountLoaderHref=null,this.__countLoaderId="countLoader",this.__refreshTimeout=null}static get properties(){return e(e({},super.properties),{},{countRefreshInterval:{attribute:"count-refresh-interval",type:Number},getCountLoaderHref:{attribute:!1}})}disconnectedCallback(){super.disconnectedCallback(),"number"==typeof this.__refreshTimeout&&clearTimeout(this.__refreshTimeout)}updated(e){if(super.updated(e),"number"!=typeof this.__refreshTimeout){const e=this.constructor.countRefreshInterval;this.__refreshTimeout=setTimeout((()=>{var e;return null===(e=this.__getCountLoader())||void 0===e?void 0:e.refresh()}),e)}}render(){var e,t;const r=this.constructor,c=null===(t=null===(e=this.__getCountLoader())||void 0===e?void 0:e.data)||void 0===t?void 0:t.total_items;let h;try{this.data&&this.getCountLoaderHref&&(h=new URL(this.getCountLoaderHref(o(this.data.value))),h.searchParams.set("limit","1"))}catch(e){h=void 0}return i(d||(d=u` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="${0}"> <span class="${0}"> ${0} </span> <span class="${0}"> ${0} </span> </div> `),s(null==h?void 0:h.toString()),this.__countLoaderId,(()=>this.requestUpdate()),a({"transition-colors flex gap-s font-medium text-m leading-xs rounded-s":!0,"bg-contrast-5":!this.in("fail")&&!this.data,"bg-error-10":this.in("fail")}),a({"transition-opacity truncate min-w-0":!0,"opacity-0":!this.data}),this.__getValueParam(r.filterNameKey)||i(n||(n=u`<foxy-i18n infer="" key="no_name"></foxy-i18n>`)),a({"transition-opacity bg-contrast-5 px-xs rounded-s":!0,"opacity-0":!this.data||"number"!=typeof c}),null!=c?c:0)}__getCountLoader(){return this.renderRoot.querySelector(`#${this.__countLoaderId}`)}__getValueParam(e){var t,r,s;try{return null!==(s=new URL(o(null!==(r=null===(t=this.data)||void 0===t?void 0:t.value)&&void 0!==r?r:""),"https://example.com").searchParams.get(e))&&void 0!==s?s:""}catch(e){return""}}}h.countRefreshInterval=6e5,h.filterQueryKey="filter_query",h.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-card",h);export{h as FilterAttributeCard};
1
+ import"./shared-ccc7a886.js";import"./foxy-nucleon-element.js";import{_ as e}from"./shared-d1195c27.js";import{a as t}from"./shared-70612035.js";import{I as r}from"./shared-6b5e4fe4.js";import{i as s}from"./shared-9803aa7c.js";import{c as a}from"./shared-4e709717.js";import{d as o}from"./shared-641786b2.js";import{h as i}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-0d4cdb19.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let n,d,u=e=>e;const c=t(r,"filter-attribute-card");class h extends c{constructor(){super(...arguments),this.getCountLoaderHref=null,this.__countLoaderId="countLoader",this.__refreshTimeout=null}static get properties(){return e(e({},super.properties),{},{countRefreshInterval:{attribute:"count-refresh-interval",type:Number},getCountLoaderHref:{attribute:!1}})}disconnectedCallback(){super.disconnectedCallback(),"number"==typeof this.__refreshTimeout&&clearTimeout(this.__refreshTimeout)}updated(e){if(super.updated(e),"number"!=typeof this.__refreshTimeout){const e=this.constructor.countRefreshInterval;this.__refreshTimeout=setTimeout((()=>{var e;return null===(e=this.__getCountLoader())||void 0===e?void 0:e.refresh()}),e)}}render(){var e,t;const r=this.constructor,c=null===(t=null===(e=this.__getCountLoader())||void 0===e?void 0:e.data)||void 0===t?void 0:t.total_items;let h;try{this.data&&this.getCountLoaderHref&&(h=new URL(this.getCountLoaderHref(o(this.data.value))),h.searchParams.set("limit","1"))}catch(e){h=void 0}return i(n||(n=u` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="${0}"> <span class="${0}"> ${0} </span> <span class="${0}"> ${0} </span> </div> `),s(null==h?void 0:h.toString()),this.__countLoaderId,(()=>this.requestUpdate()),a({"transition-colors flex gap-s font-medium text-m leading-xs rounded-s":!0,"bg-contrast-5":!this.in("fail")&&!this.data,"bg-error-10":this.in("fail")}),a({"transition-opacity truncate min-w-0":!0,"opacity-0":!this.data}),this.__getValueParam(r.filterNameKey)||i(d||(d=u`<foxy-i18n infer="" key="no_name"></foxy-i18n>`)),a({"transition-opacity bg-contrast-5 px-xs rounded-s":!0,"opacity-0":!this.data||"number"!=typeof c}),null!=c?c:0)}__getCountLoader(){return this.renderRoot.querySelector(`#${this.__countLoaderId}`)}__getValueParam(e){var t,r,s;try{return null!==(s=new URL(o(null!==(r=null===(t=this.data)||void 0===t?void 0:t.value)&&void 0!==r?r:""),"https://example.com").searchParams.get(e))&&void 0!==s?s:""}catch(e){return""}}}h.countRefreshInterval=6e5,h.filterQueryKey="filter_query",h.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-card",h);export{h as FilterAttributeCard};
@@ -1 +1 @@
1
- import{a as e}from"./shared-2dd497e5.js";import"./shared-935adc3b.js";import"./shared-3bfbd5af.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-bbc53ef2.js";import{I as r}from"./shared-0203d3da.js";import"./shared-01cbaba9.js";import{_ as s,B as a}from"./shared-d1195c27.js";import{a as i}from"./shared-6d7c1a2f.js";import{d as o,e as d}from"./shared-641786b2.js";import"./shared-51c4a6dd.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-08be5c32.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-61ade33e.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-ad3eea80.js";import"./shared-78bfc71e.js";import"./shared-4e709717.js";import"./shared-22ba9566.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./foxy-copy-to-clipboard.js";import"./shared-dbe8536b.js";import"./shared-5452fdfe.js";import"./shared-e231722c.js";import"./shared-bb9f0d8b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-8874ec69.js";import"./shared-8438d4ca.js";import"./shared-79d0699c.js";import"./shared-a0c6a159.js";let n,l,m=e=>e;customElements.define("foxy-internal-filter-attribute-form-action-control",class extends e{renderControl(){const e=this.nucleon,r=null==e?void 0:e.in({idle:{snapshot:"dirty"}}),s=!!(null==e?void 0:e.data);return t(n||(n=m` <div class="grid grid-cols-2 gap-m"> ${0} <vaadin-button theme="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </vaadin-button> </div> `),s&&r?t(l||(l=m` <vaadin-button theme="contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>null==e?void 0:e.undo())):"",s?r?"secondary":"error":"success",s&&r?"":"col-span-2",this.disabled,(()=>!s||r?null==e?void 0:e.submit():null==e?void 0:e.delete()),s?r?"update":"delete":"create")}});let h,c=e=>e;const u=i(r,"filter-attribute-form");class p extends u{constructor(){super(...arguments),this.pathname=null,this.options=[],this.__filterNameGetValue=()=>{const e=this.constructor;return this.__getValueParam(e.filterNameKey)},this.__filterNameSetValue=e=>{const t=this.constructor;this.__setValueParam(t.filterNameKey,e)}}static get properties(){return s(s({},super.properties),{},{pathname:{},options:{type:Array}})}get hiddenSelector(){const e=[],t=this.constructor,r=this.__getValueParam(t.filterQueryKey),s=!!this.data;return s||e.push("filter-name"),r||s||e.push("action"),new a(`${e.join(" ")} ${super.hiddenSelector}`.trim())}renderBody(){const e=this.constructor;return t(h||(h=c` <foxy-query-builder infer="filter-query" .options="${0}" .value="${0}" @change="${0}"> </foxy-query-builder> <foxy-internal-text-control infer="filter-name" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-filter-attribute-form-action-control infer="action"> </foxy-internal-filter-attribute-form-action-control> `),this.options,this.__getValueParam(e.filterQueryKey),this.__handleFilterQueryChange,this.__filterNameGetValue,this.__filterNameSetValue)}updated(e){var t;if(super.updated(e),"string"==typeof this.form.value){const e=new URL(o(this.form.value),"https://example.com");e.pathname=null!==(t=this.pathname)&&void 0!==t?t:"";const r=d(e.toString().substring(e.origin.length));r!==this.form.value&&this.edit({value:r})}}submit(){const e=this.constructor;this.edit({visibility:e.attributeVisibility,name:e.attributeName}),super.submit()}__getValueParam(e){var t,r;try{return null!==(r=new URL(o(null!==(t=this.form.value)&&void 0!==t?t:""),"https://example.com").searchParams.get(e))&&void 0!==r?r:""}catch(e){return""}}__setValueParam(e,t){var r;try{const s=new URL(o(null!==(r=this.form.value)&&void 0!==r?r:""),"https://example.com");s.searchParams.set(e,t),this.edit({value:d(s.toString().substring(s.origin.length))})}catch(e){}}__handleFilterQueryChange(e){var t;const r=this.constructor,s=e.currentTarget;this.__setValueParam(r.filterQueryKey,null!==(t=s.value)&&void 0!==t?t:"")}}p.attributeVisibility="restricted",p.filterQueryKey="filter_query",p.attributeName="foxy-admin-bookmark",p.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-form",p);export{p as FilterAttributeForm};
1
+ import{a as e}from"./shared-684174e7.js";import"./shared-433ff5ae.js";import"./shared-0d4cdb19.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-a2616e4b.js";import{I as r}from"./shared-e8744e04.js";import"./shared-2ca888f6.js";import{_ as s,B as a}from"./shared-d1195c27.js";import{a as i}from"./shared-70612035.js";import{d as o,e as n}from"./shared-641786b2.js";import"./shared-51c4a6dd.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-17a61265.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-ff10b9fb.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-61ade33e.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-25b83adb.js";import"./shared-8d826ccb.js";import"./shared-4e709717.js";import"./shared-22ba9566.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./foxy-copy-to-clipboard.js";import"./shared-66e2a4ee.js";import"./shared-6b578d1a.js";import"./shared-a1f697c2.js";import"./shared-52c9fa57.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-8874ec69.js";import"./shared-8438d4ca.js";import"./shared-79d0699c.js";import"./shared-a0c6a159.js";let d,l,m=e=>e;customElements.define("foxy-internal-filter-attribute-form-action-control",class extends e{renderControl(){const e=this.nucleon,r=null==e?void 0:e.in({idle:{snapshot:"dirty"}}),s=!!(null==e?void 0:e.data);return t(d||(d=m` <div class="grid grid-cols-2 gap-m"> ${0} <vaadin-button theme="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </vaadin-button> </div> `),s&&r?t(l||(l=m` <vaadin-button theme="contrast" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="reset"></foxy-i18n> </vaadin-button> `),this.disabled,(()=>null==e?void 0:e.undo())):"",s?r?"secondary":"error":"success",s&&r?"":"col-span-2",this.disabled,(()=>!s||r?null==e?void 0:e.submit():null==e?void 0:e.delete()),s?r?"update":"delete":"create")}});let h,c=e=>e;const u=i(r,"filter-attribute-form");class p extends u{constructor(){super(...arguments),this.pathname=null,this.options=[],this.__filterNameGetValue=()=>{const e=this.constructor;return this.__getValueParam(e.filterNameKey)},this.__filterNameSetValue=e=>{const t=this.constructor;this.__setValueParam(t.filterNameKey,e)}}static get properties(){return s(s({},super.properties),{},{pathname:{},options:{type:Array}})}get hiddenSelector(){const e=[],t=this.constructor,r=this.__getValueParam(t.filterQueryKey),s=!!this.data;return s||e.push("filter-name"),r||s||e.push("action"),new a(`${e.join(" ")} ${super.hiddenSelector}`.trim())}renderBody(){const e=this.constructor;return t(h||(h=c` <foxy-query-builder infer="filter-query" .options="${0}" .value="${0}" @change="${0}"> </foxy-query-builder> <foxy-internal-text-control infer="filter-name" .getValue="${0}" .setValue="${0}"> </foxy-internal-text-control> <foxy-internal-filter-attribute-form-action-control infer="action"> </foxy-internal-filter-attribute-form-action-control> `),this.options,this.__getValueParam(e.filterQueryKey),this.__handleFilterQueryChange,this.__filterNameGetValue,this.__filterNameSetValue)}updated(e){var t;if(super.updated(e),"string"==typeof this.form.value){const e=new URL(o(this.form.value),"https://example.com");e.pathname=null!==(t=this.pathname)&&void 0!==t?t:"";const r=n(e.toString().substring(e.origin.length));r!==this.form.value&&this.edit({value:r})}}submit(){const e=this.constructor;this.edit({visibility:e.attributeVisibility,name:e.attributeName}),super.submit()}__getValueParam(e){var t,r;try{return null!==(r=new URL(o(null!==(t=this.form.value)&&void 0!==t?t:""),"https://example.com").searchParams.get(e))&&void 0!==r?r:""}catch(e){return""}}__setValueParam(e,t){var r;try{const s=new URL(o(null!==(r=this.form.value)&&void 0!==r?r:""),"https://example.com");s.searchParams.set(e,t),this.edit({value:n(s.toString().substring(s.origin.length))})}catch(e){}}__handleFilterQueryChange(e){var t;const r=this.constructor,s=e.currentTarget;this.__setValueParam(r.filterQueryKey,null!==(t=s.value)&&void 0!==t?t:"")}}p.attributeVisibility="restricted",p.filterQueryKey="filter_query",p.attributeName="foxy-admin-bookmark",p.filterNameKey="filter_name",customElements.define("foxy-filter-attribute-form",p);export{p as FilterAttributeForm};
@@ -1 +1 @@
1
- import"./shared-3bfbd5af.js";import"./shared-c86db2c0.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{h as r}from"./shared-dc73b9a5.js";import{A as o}from"./shared-c518ece2.js";import{D as s}from"./shared-57164953.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-99940888.js";import"./shared-6d7c1a2f.js";import"./shared-17a61265.js";import"./shared-935adc3b.js";import"./shared-08be5c32.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-61ade33e.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";let d,p,l=e=>e;class h extends s{constructor(){super(...arguments),this.closeOnPatch=!1,this.keepOpenOnDelete=!1,this.keepOpenOnPost=!1,this.related=[],this.parent="",this.props={},this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))},this.__handleUpdate=e=>{var t;if(!(e instanceof i))return;const r=null===(t=e.detail)||void 0===t?void 0:t.result,o=i.UpdateResult,s=e.currentTarget;(!this.keepOpenOnDelete&&r===o.ResourceDeleted||!this.keepOpenOnPost&&r===o.ResourceCreated||this.closeOnPatch&&r===o.ResourceUpdated&&0===s.errors.length)&&(this.open=!1),this.parent!==s.parent&&(this.parent=s.parent),this.href!==s.href&&(this.href=s.href),this.closable=!s.in("busy"),this.editable=s.in({idle:{template:{dirty:"valid"}}})||s.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},props:{type:Object},parent:{type:String},related:{type:Array},closeOnPatch:{type:Boolean,attribute:"close-on-patch"},keepOpenOnPost:{type:Boolean,attribute:"keep-open-on-post"},keepOpenOnDelete:{type:Boolean,attribute:"keep-open-on-delete"}})}get hiddenSelector(){return new t(`submit undo ${super.hiddenSelector}`.trim())}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledSelector.toString()}\n readonlycontrols=\${options.dialog.readonlySelector.toString()}\n hiddencontrols=\${options.dialog.hiddenSelector.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n ...=\${options.spread(options.dialog.props)}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return r(d||(d=l` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return r(p||(p=l`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,spread:a,dialog:this,html:r}))})))}async hide(e=!1){if(!e||!this.editable)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",h);export{h as FormDialog};
1
+ import"./shared-0d4cdb19.js";import"./shared-46189aae.js";import{_ as e,B as t}from"./shared-d1195c27.js";import{h as r}from"./shared-dc73b9a5.js";import{A as o}from"./shared-c518ece2.js";import{D as s}from"./shared-705ce87a.js";import{F as n}from"./shared-343d1fd7.js";import{U as i}from"./shared-cd96ff03.js";import{s as a}from"./shared-99940888.js";import"./shared-70612035.js";import"./shared-17a61265.js";import"./shared-433ff5ae.js";import"./shared-ff10b9fb.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-61ade33e.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-4e709717.js";let d,p,l=e=>e;class h extends s{constructor(){super(...arguments),this.closeOnPatch=!1,this.keepOpenOnDelete=!1,this.keepOpenOnPost=!1,this.related=[],this.parent="",this.props={},this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new o(this).fetch(e.request)))},this.__handleUpdate=e=>{var t;if(!(e instanceof i))return;const r=null===(t=e.detail)||void 0===t?void 0:t.result,o=i.UpdateResult,s=e.currentTarget;(!this.keepOpenOnDelete&&r===o.ResourceDeleted||!this.keepOpenOnPost&&r===o.ResourceCreated||this.closeOnPatch&&r===o.ResourceUpdated&&0===s.errors.length)&&(this.open=!1),this.parent!==s.parent&&(this.parent=s.parent),this.href!==s.href&&(this.href=s.href),this.closable=!s.in("busy"),this.editable=s.in({idle:{template:{dirty:"valid"}}})||s.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},props:{type:Object},parent:{type:String},related:{type:Array},closeOnPatch:{type:Boolean,attribute:"close-on-patch"},keepOpenOnPost:{type:Boolean,attribute:"keep-open-on-post"},keepOpenOnDelete:{type:Boolean,attribute:"keep-open-on-delete"}})}get hiddenSelector(){return new t(`submit undo ${super.hiddenSelector}`.trim())}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledSelector.toString()}\n readonlycontrols=\${options.dialog.readonlySelector.toString()}\n hiddencontrols=\${options.dialog.hiddenSelector.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n ...=\${options.spread(options.dialog.props)}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return r(d||(d=l` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return r(p||(p=l`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,spread:a,dialog:this,html:r}))})))}async hide(e=!1){if(!e||!this.editable)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",h);export{h as FormDialog};
@@ -1 +1 @@
1
- import"./shared-838bd79c.js";import"./shared-377e3168.js";import"./shared-cacd4407.js";import{I as e}from"./shared-2dd497e5.js";import{_ as r,B as s}from"./shared-d1195c27.js";import{i as t}from"./shared-9803aa7c.js";import{h as i}from"./shared-dc73b9a5.js";import"./shared-91500a0f.js";import"./shared-529f2b48.js";import"./shared-bbc53ef2.js";import{I as o}from"./shared-0203d3da.js";import{a}from"./shared-6d7c1a2f.js";import"./shared-ad3eea80.js";import"./shared-e0c93cfa.js";import"./shared-08be5c32.js";import"./shared-78bfc71e.js";import"./shared-f09454f9.js";import"./shared-61ade33e.js";import"./shared-359793d4.js";import"./shared-51c4a6dd.js";import"./shared-3bfbd5af.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-935adc3b.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./foxy-copy-to-clipboard.js";import"./shared-dbe8536b.js";import"./shared-5452fdfe.js";import"./shared-e231722c.js";import"./shared-bb9f0d8b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let n,d,l,h=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.showControls=!1,this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return r(r({},super.properties),{},{showControls:{type:Boolean,attribute:"show-controls"},prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,r;return i(n||(n=h` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?has-controls="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),t(this._errorMessage),this.placeholder,this.helperText,this.label,t(null!==(e=this.min)&&void 0!==e?e:void 0),t(null!==(r=this.max)&&void 0!==r?r:void 0),this.showControls,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}),this.prefix?i(d||(d=h`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(l||(l=h`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});let m,c=e=>e;const p=a(o,"generate-codes-form");class f extends p{constructor(){super(...arguments),this.__exampleGetValue=()=>{var e,r;const s=null!==(e=this.form.prefix)&&void 0!==e?e:"",t=(null!==(r=this.form.length)&&void 0!==r?r:6)-s.length;if(t>0)return["1V3BJ3USJKSS1BYANMNBT7AJ06R6QQ8RB0VPPL03ATQVY186X2","P4YNSW7NSSAY43PL4H7BKHDUVNAE9UR13FC0XAAJHDLZWW8AJC","7DGT4Q91FV4KK095WLX1ML1HFNU6ZCGVBVPMGR7D3P52A9UFTB"].map((e=>`${s}${e.slice(0,t)}`)).join("\n")}}static get v8n(){return[({prefix:e="",length:r=6})=>r-e.length>0&&r<=50&&!(null==e?void 0:e.includes(" "))||"error:invalid_form"]}get readonlySelector(){const e=["example",super.readonlySelector.toString()];return this.href&&e.push("length number-of-codes current-balance prefix"),new s(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("delete timestamps"),this.href&&e.push("example"),this.errors.includes("error:invalid_form")&&e.push("example"),new s(e.join(" ").trim())}renderBody(){return i(m||(m=c` <foxy-internal-text-control infer="prefix"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-m"> <foxy-internal-integer-control infer="length" min="1"></foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-codes" min="1"> </foxy-internal-integer-control> </div> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> <foxy-internal-source-control infer="example" .getValue="${0}"> </foxy-internal-source-control> ${0} `),this.__exampleGetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-generate-codes-form",f);export{f as GenerateCodesForm};
1
+ import"./shared-3ef5dcef.js";import"./shared-cc8ce493.js";import"./shared-f6f4bed5.js";import{I as e}from"./shared-684174e7.js";import{_ as r,B as s}from"./shared-d1195c27.js";import{i as t}from"./shared-9803aa7c.js";import{h as i}from"./shared-dc73b9a5.js";import"./shared-136942c7.js";import"./shared-cb24170b.js";import"./shared-a2616e4b.js";import{I as o}from"./shared-e8744e04.js";import{a}from"./shared-70612035.js";import"./shared-25b83adb.js";import"./shared-6583e3f9.js";import"./shared-ff10b9fb.js";import"./shared-8d826ccb.js";import"./shared-3db18172.js";import"./shared-61ade33e.js";import"./shared-08e73812.js";import"./shared-51c4a6dd.js";import"./shared-0d4cdb19.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-433ff5ae.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./foxy-copy-to-clipboard.js";import"./shared-66e2a4ee.js";import"./shared-6b578d1a.js";import"./shared-a1f697c2.js";import"./shared-52c9fa57.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let n,d,l,h=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.showControls=!1,this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return r(r({},super.properties),{},{showControls:{type:Boolean,attribute:"show-controls"},prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,r;return i(n||(n=h` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?has-controls="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),t(this._errorMessage),this.placeholder,this.helperText,this.label,t(null!==(e=this.min)&&void 0!==e?e:void 0),t(null!==(r=this.max)&&void 0!==r?r:void 0),this.showControls,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var r;return"Enter"===e.key&&(null===(r=this.nucleon)||void 0===r?void 0:r.submit())}),(e=>{const r=e.currentTarget;this._value=parseInt(r.value)}),this.prefix?i(d||(d=h`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?i(l||(l=h`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});let m,c=e=>e;const p=a(o,"generate-codes-form");class f extends p{constructor(){super(...arguments),this.__exampleGetValue=()=>{var e,r;const s=null!==(e=this.form.prefix)&&void 0!==e?e:"",t=(null!==(r=this.form.length)&&void 0!==r?r:6)-s.length;if(t>0)return["1V3BJ3USJKSS1BYANMNBT7AJ06R6QQ8RB0VPPL03ATQVY186X2","P4YNSW7NSSAY43PL4H7BKHDUVNAE9UR13FC0XAAJHDLZWW8AJC","7DGT4Q91FV4KK095WLX1ML1HFNU6ZCGVBVPMGR7D3P52A9UFTB"].map((e=>`${s}${e.slice(0,t)}`)).join("\n")}}static get v8n(){return[({prefix:e="",length:r=6})=>r-e.length>0&&r<=50&&!(null==e?void 0:e.includes(" "))||"error:invalid_form"]}get readonlySelector(){const e=["example",super.readonlySelector.toString()];return this.href&&e.push("length number-of-codes current-balance prefix"),new s(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return e.unshift("delete timestamps"),this.href&&e.push("example"),this.errors.includes("error:invalid_form")&&e.push("example"),new s(e.join(" ").trim())}renderBody(){return i(m||(m=c` <foxy-internal-text-control infer="prefix"></foxy-internal-text-control> <div class="grid grid-cols-2 gap-m"> <foxy-internal-integer-control infer="length" min="1"></foxy-internal-integer-control> <foxy-internal-integer-control infer="number-of-codes" min="1"> </foxy-internal-integer-control> </div> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> <foxy-internal-source-control infer="example" .getValue="${0}"> </foxy-internal-source-control> ${0} `),this.__exampleGetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-generate-codes-form",f);export{f as GenerateCodesForm};
@@ -1 +1 @@
1
- import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-d1cb97c6.js";import{N as s}from"./shared-e8b8c8d0.js";import{T as i,a as r}from"./shared-6d7c1a2f.js";import{c as a}from"./shared-4e709717.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,o,n,l,c,p=t=>t;const h=i(e(r(s,"gift-card-card")));class f extends h{render(){var e,s;const i=this.hiddenSelector;return t(d||(d=p` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("status",!0)?"":this.__renderStatus(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderTitle(){var e,s,i,r;const a=null!==(s=null===(e=this.data)||void 0===e?void 0:e.name)&&void 0!==s?s:t(o||(o=p`&ZeroWidthSpace;`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:t(n||(n=p`&ZeroWidthSpace;`));return t(l||(l=p` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <div class="text-tertiary uppercase text-s flex-shrink-0">${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),a,d,this.renderTemplateOrSlot("title:after"))}__renderStatus(){var e;const s=null===(e=this.data)||void 0===e?void 0:e.expires_after;return t(c||(c=p` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-secondary" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:s}),this.lang,s?"expires_after_value":"never_expires",this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-gift-card-card",f);export{f as GiftCardCard};
1
+ import"./shared-51c4a6dd.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import{h as t}from"./shared-dc73b9a5.js";import{C as e}from"./shared-d1cb97c6.js";import{N as s}from"./shared-e8b8c8d0.js";import{T as i,a as r}from"./shared-70612035.js";import{c as a}from"./shared-4e709717.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-9803aa7c.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,o,n,l,c,p=t=>t;const h=i(e(r(s,"gift-card-card")));class m extends h{render(){var e,s;const i=this.hiddenSelector;return t(d||(d=p` <div aria-busy="${0}" aria-live="polite" class="relative leading-s font-lumo text-m"> <div class="${0}"> ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" class="m-auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),a({"transition-opacity":!0,"opacity-0":!this.data}),i.matches("title",!0)?"":this.__renderTitle(),i.matches("status",!0)?"":this.__renderStatus(),a({"pointer-events-none absolute inset-0 flex transition-opacity":!0,"opacity-0":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__renderTitle(){var e,s,i,r;const a=null!==(s=null===(e=this.data)||void 0===e?void 0:e.name)&&void 0!==s?s:t(o||(o=p`&ZeroWidthSpace;`)),d=null!==(r=null===(i=this.data)||void 0===i?void 0:i.currency_code)&&void 0!==r?r:t(n||(n=p`&ZeroWidthSpace;`));return t(l||(l=p` <div data-testid="title"> ${0} <div class="flex items-center justify-between"> <div class="font-medium truncate">${0}</div> <div class="text-tertiary uppercase text-s flex-shrink-0">${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("title:before"),a,d,this.renderTemplateOrSlot("title:after"))}__renderStatus(){var e;const s=null===(e=this.data)||void 0===e?void 0:e.expires_after;return t(c||(c=p` <div data-testid="status"> ${0} <foxy-i18n options="${0}" class="block truncate text-s text-secondary" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("status:before"),JSON.stringify({value:s}),this.lang,s?"expires_after_value":"never_expires",this.ns,this.renderTemplateOrSlot("status:after"))}}customElements.define("foxy-gift-card-card",m);export{m as GiftCardCard};
@@ -1 +1 @@
1
- import"./shared-0e83a899.js";import"./foxy-nucleon-element.js";import"./shared-3bfbd5af.js";import{a as e}from"./shared-6d7c1a2f.js";import{I as r}from"./shared-fd1adc35.js";import{i as t}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let o,d=e=>e;const a=e(r,"gift-card-code-card");class i extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}get isBodyReady(){var e,r;return super.isBodyReady&&!!(null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data)&&!!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data)}renderBody(){var e,r,a,i,n;const c=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,f=null===(r=this.__storeLoader)||void 0===r?void 0:r.data;return s(o||(o=d` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="current_balance" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.data,{currencyDisplay:(null==f?void 0:f.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==c?void 0:c.currency_code}`},this.data,t(null===(i=this.data)||void 0===i?void 0:i._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),t(null===(n=this.data)||void 0===n?void 0:n._links["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()))}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-card",i);export{i as GiftCardCodeCard};
1
+ import"./shared-ccc7a886.js";import"./foxy-nucleon-element.js";import"./shared-0d4cdb19.js";import{a as e}from"./shared-70612035.js";import{I as r}from"./shared-6b5e4fe4.js";import{i as t}from"./shared-9803aa7c.js";import{h as s}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";let o,d=e=>e;const a=e(r,"gift-card-code-card");class i extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}get isBodyReady(){var e,r;return super.isBodyReady&&!!(null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data)&&!!(null===(r=this.__storeLoader)||void 0===r?void 0:r.data)}renderBody(){var e,r,a,i,n;const c=null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data,f=null===(r=this.__storeLoader)||void 0===r?void 0:r.data;return s(o||(o=d` <section class="h-s flex flex-col justify-center leading-xs"> <p class="flex items-center justify-between min-w-0"> <foxy-i18n infer="" class="block truncate text-m font-medium" key="line_1" .options="${0}"> </foxy-i18n> <foxy-i18n infer="" class="text-s text-tertiary" key="current_balance" .options="${0}"> </foxy-i18n> </p> <p class="text-s text-secondary min-w-0"> <foxy-i18n infer="" class="block truncate" key="line_2" .options="${0}"> </foxy-i18n> </p> </section> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.data,{currencyDisplay:(null==f?void 0:f.use_international_currency_symbol)?"code":"symbol",value:`${null===(a=this.data)||void 0===a?void 0:a.current_balance} ${null==c?void 0:c.currency_code}`},this.data,t(null===(i=this.data)||void 0===i?void 0:i._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),t(null===(n=this.data)||void 0===n?void 0:n._links["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()))}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-card",i);export{i as GiftCardCodeCard};
@@ -1 +1 @@
1
- import"./shared-14179b23.js";import"./shared-b3d36746.js";import"./shared-d367ea04.js";import"./shared-91500a0f.js";import"./shared-91321de3.js";import"./shared-bbc53ef2.js";import{I as e}from"./shared-0203d3da.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-6d7c1a2f.js";import{T as i}from"./shared-8874ec69.js";import{i as a}from"./shared-9803aa7c.js";import{h as d}from"./shared-dc73b9a5.js";import"./shared-935adc3b.js";import"./shared-08be5c32.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-61ade33e.js";import"./shared-2dd497e5.js";import"./shared-51c4a6dd.js";import"./shared-3bfbd5af.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./foxy-copy-to-clipboard.js";import"./shared-dbe8536b.js";import"./shared-5452fdfe.js";import"./shared-e231722c.js";import"./shared-bb9f0d8b.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./shared-4e709717.js";import"./shared-99940888.js";import"./shared-7448fda4.js";import"./shared-6be8e65e.js";import"./shared-c24bc616.js";import"./shared-b2bc3a0e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-a0c6a159.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-838bd79c.js";import"./shared-ad3eea80.js";import"./shared-78bfc71e.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-3a7db771.js";import"./shared-4b52b410.js";import"./shared-4b4c8ccf.js";import"./shared-455856d9.js";import"./shared-317cb721.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-22ba9566.js";import"./shared-0e83a899.js";import"./shared-fd1adc35.js";let n,l=e=>e;const m=s(e,"gift-card-code-form");class c extends m{constructor(){super(...arguments),this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__customerGetValue=()=>{var e,r,t;const o=null===(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:customer"])||void 0===t?void 0:t.href,s=this.form.customer_id;return void 0===s?o:this.getCustomerHref(s)},this.__customerSetValue=e=>{const r=o(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:i.String,path:"id",label:"filters.id"},{type:i.String,path:"tax_id",label:"filters.tax_id"},{type:i.String,path:"email",label:"filters.email"},{type:i.String,path:"first_name",label:"filters.first_name"},{type:i.String,path:"last_name",label:"filters.last_name"},{type:i.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:i.Date,path:"last_login_date",label:"filters.last_login_date"},{type:i.Date,path:"date_created",label:"filters.date_created"},{type:i.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>!e||e.length<=50||"code:v8n_too_long",({code:e})=>!(null==e?void 0:e.includes(" "))||"code:v8n_has_spaces",({current_balance:e})=>"number"==typeof e||"current-balance:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString(),"cart-item"];return new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new t(e.join(" ").trim())}renderBody(){var e,r,t,o,s,i,m,c;let f;try{const o=new URL(null!==(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==t?t:"");o.searchParams.set("zoom","item_options"),f=o.toString()}catch(e){f=void 0}return d(n||(n=l` ${0} <foxy-internal-summary-control infer="settings"> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="current-balance"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-resource-picker-control infer="customer" first="${0}" item="foxy-customer-card" .getValue="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-resource-picker-control infer="cart-item" item="foxy-item-card" .getValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-async-list-control infer="logs" first="${0}" limit="5" item="foxy-gift-card-code-log-card"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),a(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,(()=>f),a(null===(m=null===(i=this.data)||void 0===i?void 0:i._links)||void 0===m?void 0:m["fx:gift_card_code_logs"].href),super.renderBody(),a(null===(c=this.data)||void 0===c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",c);export{c as GiftCardCodeForm};
1
+ import"./shared-b73aaedb.js";import"./shared-9dd252c7.js";import"./shared-67d1de9a.js";import"./shared-136942c7.js";import"./shared-57373d84.js";import"./shared-a2616e4b.js";import{I as e}from"./shared-e8744e04.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-70612035.js";import{T as a}from"./shared-8874ec69.js";import{i}from"./shared-9803aa7c.js";import{h as d}from"./shared-dc73b9a5.js";import"./shared-433ff5ae.js";import"./shared-ff10b9fb.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-61ade33e.js";import"./shared-684174e7.js";import"./shared-51c4a6dd.js";import"./shared-0d4cdb19.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./foxy-copy-to-clipboard.js";import"./shared-66e2a4ee.js";import"./shared-6b578d1a.js";import"./shared-a1f697c2.js";import"./shared-52c9fa57.js";import"./foxy-nucleon-element.js";import"./foxy-form-dialog.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./shared-4e709717.js";import"./shared-99940888.js";import"./shared-b8ae5af7.js";import"./shared-83c8a2d2.js";import"./shared-2dd2ff95.js";import"./shared-95a591b3.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-a0c6a159.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-3ef5dcef.js";import"./shared-25b83adb.js";import"./shared-8d826ccb.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-8d5b9662.js";import"./shared-f4e03cdc.js";import"./shared-5cdec81e.js";import"./shared-56ee26d7.js";import"./shared-a9b8c3ab.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./shared-22ba9566.js";import"./shared-ccc7a886.js";import"./shared-6b5e4fe4.js";let n,l=e=>e;const c=s(e,"gift-card-code-form");class m extends c{constructor(){super(...arguments),this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__customerGetValue=()=>{var e,r,t;const o=null===(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:customer"])||void 0===t?void 0:t.href,s=this.form.customer_id;return void 0===s?o:this.getCustomerHref(s)},this.__customerSetValue=e=>{const r=o(e);this.edit({customer_id:"number"==typeof r?r:""})},this.__customerFilters=[{type:a.String,path:"id",label:"filters.id"},{type:a.String,path:"tax_id",label:"filters.tax_id"},{type:a.String,path:"email",label:"filters.email"},{type:a.String,path:"first_name",label:"filters.first_name"},{type:a.String,path:"last_name",label:"filters.last_name"},{type:a.Boolean,path:"is_anonymous",label:"filters.is_anonymous",list:[{label:"filters.is_anonymous_true",value:"true"},{label:"filters.is_anonymous_false",value:"false"}]},{type:a.Date,path:"last_login_date",label:"filters.last_login_date"},{type:a.Date,path:"date_created",label:"filters.date_created"},{type:a.Date,path:"date_modified",label:"filters.date_modified"}],this.__storeLoaderId="storeLoader"}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({code:e})=>!!e||"code:v8n_required",({code:e})=>!e||e.length<=50||"code:v8n_too_long",({code:e})=>!(null==e?void 0:e.includes(" "))||"code:v8n_has_spaces",({current_balance:e})=>"number"==typeof e||"current-balance:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString(),"cart-item"];return new t(e.join(" ").trim())}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href||e.push("customer","cart-item","logs"),new t(e.join(" ").trim())}renderBody(){var e,r,t,o,s,a,c,m;let f;try{const o=new URL(null!==(t=null===(r=null===(e=this.data)||void 0===e?void 0:e._links)||void 0===r?void 0:r["fx:provisioned_by_transaction_detail_id"].href)&&void 0!==t?t:"");o.searchParams.set("zoom","item_options"),f=o.toString()}catch(e){f=void 0}return d(n||(n=l` ${0} <foxy-internal-summary-control infer="settings"> <foxy-internal-text-control layout="summary-item" infer="code"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" infer="current-balance"> </foxy-internal-number-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-resource-picker-control infer="customer" first="${0}" item="foxy-customer-card" .getValue="${0}" .setValue="${0}" .filters="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-resource-picker-control infer="cart-item" item="foxy-item-card" .getValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-async-list-control infer="logs" first="${0}" limit="5" item="foxy-gift-card-code-log-card"> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),i(null===(s=null===(o=this.__storeLoader)||void 0===o?void 0:o.data)||void 0===s?void 0:s._links["fx:customers"].href),this.__customerGetValue,this.__customerSetValue,this.__customerFilters,(()=>f),i(null===(c=null===(a=this.data)||void 0===a?void 0:a._links)||void 0===c?void 0:c["fx:gift_card_code_logs"].href),super.renderBody(),i(null===(m=this.data)||void 0===m?void 0:m._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-code-form",m);export{m as GiftCardCodeForm};
@@ -1 +1 @@
1
- import"./shared-0e83a899.js";import"./foxy-nucleon-element.js";import"./shared-3bfbd5af.js";import{a as e}from"./shared-6d7c1a2f.js";import{I as t}from"./shared-fd1adc35.js";import{i as r}from"./shared-9803aa7c.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,a=e=>e;const i=e(t,"gift-card-code-log-card");class n extends i{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,i,n;const f=this.data,c=null!==(e=null==f?void 0:f.balance_adjustment)&&void 0!==e?e:0,l="number"==typeof(null==f?void 0:f.transaction_id),_=l?"title_used":"title_updated_via_api",u=l?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==f?void 0:f.transaction_id},h={date_created:null==f?void 0:f.date_created,month:"short"},m={currencyDisplay:(null===(t=this.__store)||void 0===t?void 0:t.use_international_currency_symbol)?"code":"symbol",signDisplay:"exceptZero",amount:`${c} ${null===(i=this.__giftCard)||void 0===i?void 0:i.currency_code}`};return o(d||(d=a` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="leading-s"> <div class="flex justify-between items-center"> <span class="text-body font-medium truncate"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </span> <span class="text-s text-tertiary flex-shrink-0"> <foxy-i18n infer="" key="date" .options="${0}"></foxy-i18n> </span> </div> <div class="text-s text-secondary truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> <span class="text-tertiary">&bull;</span> <span class="${0}"> <foxy-i18n infer="" key="adjustment" .options="${0}"></foxy-i18n> </span> </div> </div> `),r(null===(n=null==f?void 0:f._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==f?void 0:f._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===c,"text-success":c>0,"text-error":c<0}),m)}get isBodyReady(){return super.isBodyReady&&!!this.__giftCard&&!!this.__store}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __giftCard(){var e;return null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data}get __store(){var e;return null===(e=this.__storeLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-gift-card-code-log-card",n);export{n as GiftCardCodeLogCard};
1
+ import"./shared-ccc7a886.js";import"./foxy-nucleon-element.js";import"./shared-0d4cdb19.js";import{a as e}from"./shared-70612035.js";import{I as t}from"./shared-6b5e4fe4.js";import{i as r}from"./shared-9803aa7c.js";import{c as s}from"./shared-4e709717.js";import{h as o}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let i,d=e=>e;const a=e(t,"gift-card-code-log-card");class n extends a{constructor(){super(...arguments),this.__giftCardLoaderId="giftCardLoader",this.__storeLoaderId="storeLoader"}renderBody(){var e,t,a,n;const c=this.data,f=null!==(e=null==c?void 0:c.balance_adjustment)&&void 0!==e?e:0,l="number"==typeof(null==c?void 0:c.transaction_id),_=l?"title_used":"title_updated_via_api",u=l?"subtitle_transaction":"subtitle_no_transaction",p={transaction_id:null==c?void 0:c.transaction_id},h={date_created:null==c?void 0:c.date_created,month:"short"},m={currencyDisplay:(null===(t=this.__store)||void 0===t?void 0:t.use_international_currency_symbol)?"code":"symbol",signDisplay:"exceptZero",amount:`${f} ${null===(a=this.__giftCard)||void 0===a?void 0:a.currency_code}`};return o(i||(i=d` <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="leading-s"> <div class="flex justify-between items-center"> <span class="text-body font-medium truncate"> <foxy-i18n infer="" key="${0}"></foxy-i18n> </span> <span class="text-s text-tertiary flex-shrink-0"> <foxy-i18n infer="" key="date" .options="${0}"></foxy-i18n> </span> </div> <div class="text-s text-secondary truncate"> <foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n> <span class="text-tertiary">&bull;</span> <span class="${0}"> <foxy-i18n infer="" key="adjustment" .options="${0}"></foxy-i18n> </span> </div> </div> `),r(null===(n=null==c?void 0:c._links)||void 0===n?void 0:n["fx:gift_card"].href),this.__giftCardLoaderId,(()=>this.requestUpdate()),r(null==c?void 0:c._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()),_,h,u,p,s({"text-tertiary":0===f,"text-success":f>0,"text-error":f<0}),m)}get isBodyReady(){return super.isBodyReady&&!!this.__giftCard&&!!this.__store}get __giftCardLoader(){return this.renderRoot.querySelector(`#${this.__giftCardLoaderId}`)}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}get __giftCard(){var e;return null===(e=this.__giftCardLoader)||void 0===e?void 0:e.data}get __store(){var e;return null===(e=this.__storeLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-gift-card-code-log-card",n);export{n as GiftCardCodeLogCard};
@@ -1 +1 @@
1
- import"./shared-4beb6fef.js";import"./shared-91500a0f.js";import{I as r}from"./shared-0203d3da.js";import{a as e}from"./shared-6d7c1a2f.js";import{B as s}from"./shared-d1195c27.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-dbe8536b.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-08be5c32.js";import"./shared-5452fdfe.js";import"./shared-e231722c.js";import"./shared-2dd497e5.js";import"./shared-51c4a6dd.js";import"./shared-3bfbd5af.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-99940888.js";import"./shared-838bd79c.js";import"./shared-ad3eea80.js";import"./shared-78bfc71e.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-61ade33e.js";import"./shared-935adc3b.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./foxy-copy-to-clipboard.js";import"./shared-bb9f0d8b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let d,a=r=>r;const o=e(r,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var r,e;return null!==(e=null===(r=this.form.gift_card_codes)||void 0===r?void 0:r.map((r=>({value:r}))))&&void 0!==e?e:[]},this.__giftCardCodesSetValue=r=>{this.edit({gift_card_codes:r.map((({value:r})=>r.split(" ").map((r=>r.trim())))).flat().filter(((r,e,s)=>s.indexOf(r)===e))})}}static get v8n(){return[({gift_card_codes:r})=>r&&r.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const r=[super.readonlySelector.toString()];return this.href&&r.push("gift-card-codes"),new s(r.join(" ").trim())}get hiddenSelector(){const r=["delete timestamps",super.hiddenSelector.toString()];return new s(r.join(" ").trim())}renderBody(){return t(d||(d=a` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(r){const e=JSON.stringify(r),s=await this._fetch(this.parent,{body:e,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
1
+ import"./shared-62af0ef5.js";import"./shared-136942c7.js";import{I as e}from"./shared-e8744e04.js";import{a as r}from"./shared-70612035.js";import{B as s}from"./shared-d1195c27.js";import{h as t}from"./shared-dc73b9a5.js";import"./shared-66e2a4ee.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-ff10b9fb.js";import"./shared-6b578d1a.js";import"./shared-a1f697c2.js";import"./shared-684174e7.js";import"./shared-51c4a6dd.js";import"./shared-0d4cdb19.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-9803aa7c.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-4e709717.js";import"./shared-a0c6a159.js";import"./shared-22ba9566.js";import"./shared-99940888.js";import"./shared-3ef5dcef.js";import"./shared-25b83adb.js";import"./shared-8d826ccb.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-61ade33e.js";import"./shared-433ff5ae.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./foxy-copy-to-clipboard.js";import"./shared-52c9fa57.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,d=e=>e;const o=r(e,"gift-card-codes-form");class i extends o{constructor(){super(...arguments),this.__giftCardCodesGetValue=()=>{var e,r;return null!==(r=null===(e=this.form.gift_card_codes)||void 0===e?void 0:e.map((e=>({value:e}))))&&void 0!==r?r:[]},this.__giftCardCodesSetValue=e=>{this.edit({gift_card_codes:e.map((({value:e})=>e.split(" ").map((e=>e.trim())))).flat().filter(((e,r,s)=>s.indexOf(e)===r))})}}static get v8n(){return[({gift_card_codes:e})=>e&&e.length>0||"gift-card-codes:v8n_required"]}get readonlySelector(){const e=[super.readonlySelector.toString()];return this.href&&e.push("gift-card-codes"),new s(e.join(" ").trim())}get hiddenSelector(){const e=["delete timestamps",super.hiddenSelector.toString()];return new s(e.join(" ").trim())}renderBody(){return t(a||(a=d` <foxy-internal-editable-list-control infer="gift-card-codes" .getValue="${0}" .setValue="${0}"> </foxy-internal-editable-list-control> <foxy-internal-number-control infer="current-balance" min="0"></foxy-internal-number-control> ${0} `),this.__giftCardCodesGetValue,this.__giftCardCodesSetValue,super.renderBody())}async _sendPost(e){const r=JSON.stringify(e),s=await this._fetch(this.parent,{body:r,method:"POST"});return this.status={key:"success"},s}}customElements.define("foxy-gift-card-codes-form",i);export{i as GiftCardCodesForm};
@@ -1 +1 @@
1
- import"./shared-81bf4ca2.js";import"./shared-14bf37ae.js";import"./shared-4beb6fef.js";import"./shared-b3d36746.js";import"./shared-3ca58fb9.js";import"./shared-d367ea04.js";import"./shared-53443b27.js";import"./shared-6a8ccf0c.js";import"./shared-91500a0f.js";import"./shared-bbc53ef2.js";import{I as e}from"./shared-0203d3da.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-dc73b9a5.js";import{R as a,a as s}from"./shared-6d7c1a2f.js";import{i as n}from"./shared-9803aa7c.js";import"./shared-7448fda4.js";import"./shared-08be5c32.js";import"./shared-e0c93cfa.js";import"./shared-359793d4.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5452fdfe.js";import"./shared-bb9f0d8b.js";import"./shared-3bfbd5af.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-935adc3b.js";import"./shared-4e709717.js";import"./shared-2dd497e5.js";import"./shared-51c4a6dd.js";import"./foxy-form-dialog.js";import"./shared-c86db2c0.js";import"./shared-57164953.js";import"./shared-dbe8536b.js";import"./shared-e231722c.js";import"./shared-22ba9566.js";import"./shared-6be8e65e.js";import"./shared-c24bc616.js";import"./shared-b2bc3a0e.js";import"./foxy-swipe-actions.js";import"./shared-838bd79c.js";import"./shared-ad3eea80.js";import"./shared-78bfc71e.js";import"./shared-377e3168.js";import"./shared-f09454f9.js";import"./shared-cacd4407.js";import"./shared-1024aa20.js";import"./shared-3493737e.js";import"./shared-4b52b410.js";import"./shared-651c44fa.js";import"./shared-455856d9.js";import"./shared-317cb721.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-529f2b48.js";import"./shared-b384e653.js";import"./shared-fd1adc35.js";import"./shared-0e83a899.js";import"./shared-14179b23.js";import"./shared-91321de3.js";import"./shared-3a7db771.js";import"./shared-4b4c8ccf.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./shared-4f852fd5.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let c,l,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(c||(c=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,c,m,p,u;let _;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),_=t.toString()}catch(e){_=void 0}return o(l||(l=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,_,{".getCustomerHref":this.getCustomerHref},this.__codesActions,this.__codesFilters,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(s=null===(a=this.__storeLoader)||void 0===a?void 0:a.data)||void 0===s?void 0:s._links["fx:item_categories"].href),n(null===(c=this.data)||void 0===c?void 0:c._links["fx:gift_card_item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links.self.href),n(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),super.renderBody(),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
1
+ import"./shared-33c9ef32.js";import"./shared-f0db16a5.js";import"./shared-62af0ef5.js";import"./shared-9dd252c7.js";import"./shared-47fe9f56.js";import"./shared-67d1de9a.js";import"./shared-148214ee.js";import"./shared-8a65adfd.js";import"./shared-136942c7.js";import"./shared-a2616e4b.js";import{I as e}from"./shared-e8744e04.js";import"./foxy-generate-codes-form.js";import"./foxy-gift-card-codes-form.js";import"./foxy-item-category-card.js";import"./foxy-gift-card-code-card.js";import"./foxy-gift-card-code-form.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{_ as r,B as t}from"./shared-d1195c27.js";import{T as i}from"./shared-8874ec69.js";import{h as o}from"./shared-dc73b9a5.js";import{R as a,a as s}from"./shared-70612035.js";import{i as n}from"./shared-9803aa7c.js";import"./shared-b8ae5af7.js";import"./shared-ff10b9fb.js";import"./shared-6583e3f9.js";import"./shared-08e73812.js";import"./shared-61ade33e.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-6b578d1a.js";import"./shared-52c9fa57.js";import"./shared-0d4cdb19.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";import"./shared-d1cb97c6.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-a0c6a159.js";import"./shared-99940888.js";import"./foxy-pagination.js";import"./shared-433ff5ae.js";import"./shared-4e709717.js";import"./shared-684174e7.js";import"./shared-51c4a6dd.js";import"./foxy-form-dialog.js";import"./shared-46189aae.js";import"./shared-705ce87a.js";import"./shared-66e2a4ee.js";import"./shared-a1f697c2.js";import"./shared-22ba9566.js";import"./shared-83c8a2d2.js";import"./shared-2dd2ff95.js";import"./shared-95a591b3.js";import"./foxy-swipe-actions.js";import"./shared-3ef5dcef.js";import"./shared-25b83adb.js";import"./shared-8d826ccb.js";import"./shared-cc8ce493.js";import"./shared-3db18172.js";import"./shared-f6f4bed5.js";import"./shared-7edf38e9.js";import"./shared-f79438f8.js";import"./shared-f4e03cdc.js";import"./shared-651c44fa.js";import"./shared-56ee26d7.js";import"./shared-a9b8c3ab.js";import"./foxy-copy-to-clipboard.js";import"./shared-bab2ea2c.js";import"./shared-cb24170b.js";import"./shared-2aee2a22.js";import"./shared-6b5e4fe4.js";import"./shared-ccc7a886.js";import"./shared-b73aaedb.js";import"./shared-57373d84.js";import"./shared-8d5b9662.js";import"./shared-5cdec81e.js";import"./shared-79d0699c.js";import"./shared-43e2c3f6.js";import"./foxy-gift-card-code-log-card.js";import"./foxy-customer-card.js";import"./shared-77135874.js";const d=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btc","btn","bwp","byn","bzd","cad","cdf","chf","clf","clp","cnh","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ggp","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","imp","inr","iqd","irr","isk","jep","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mru","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","sll","sos","srd","ssp","std","stn","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","ves","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpd","xpf","xpt","yer","zar","zmw","zwl"];let l,c,f=e=>e;const m=a(s(e,"gift-card-form"));class p extends m{constructor(){var e;super(...arguments),e=this,this.getCustomerHref=e=>`https://api.foxycart.com/customers/${e}`,this.__provisioningMaxBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_max},this.__provisioningMaxBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:i>e?e:i,initial_balance_max:e}})},this.__provisioningMinBalanceValueGetter=()=>{var e;return null===(e=this.form.provisioning_config)||void 0===e?void 0:e.initial_balance_min},this.__provisioningMinBalanceValueSetter=e=>{var r,t;const i=null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_max)&&void 0!==t?t:e;this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:e,initial_balance_max:i<e?e:i}})},this.__provisioningToggleValueGetter=()=>{var e;return!!(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)},this.__provisioningToggleValueSetter=e=>{var r,t,i,o;e?this.edit({provisioning_config:{allow_autoprovisioning:!0,initial_balance_min:null!==(t=null===(r=this.form.provisioning_config)||void 0===r?void 0:r.initial_balance_min)&&void 0!==t?t:0,initial_balance_max:null!==(o=null===(i=this.form.provisioning_config)||void 0===i?void 0:i.initial_balance_max)&&void 0!==o?o:0}}):this.edit({provisioning_config:null})},this.__productCodeRestrictionsGetValue=()=>{var e;return null===(e=this.form.product_code_restrictions)||void 0===e?void 0:e.split(",").filter((e=>!!e.trim())).map((e=>({value:e,label:e.startsWith("-")?this.t("product-code-restrictions.label_block",{value:e.substring(1)}):this.t("product-code-restrictions.label_allow",{value:e})})))},this.__productCodeRestrictionsSetValue=e=>{this.edit({product_code_restrictions:e.map((({value:e,unit:r})=>"block"===r?`-${e}`:e)).filter(((e,r,t)=>!!e&&t.indexOf(e)===r)).join(",")})},this.__currencyCodeGetValue=()=>{var e;return null===(e=this.form.currency_code)||void 0===e?void 0:e.toLowerCase()},this.__storeLoaderId="storeLoader",this.__codesFilters=[{label:"code",path:"code",type:i.String},{label:"current_balance",path:"current_balance",type:i.Number},{label:"end_date",path:"end_date",type:i.Date},{label:"date_created",path:"date_created",type:i.Date},{label:"date_modified",path:"date_modified",type:i.Date}],this.__codesActions=[{theme:"contrast",state:"idle",text:"copy_button_text",onClick:async function(r){e.__codesActions[0].state="busy",e.__codesActions=[...e.__codesActions];try{await navigator.clipboard.writeText(r.code),e.__codesActions[0].state="end"}catch(r){e.__codesActions[0].state="error"}finally{e.__codesActions=[...e.__codesActions],setTimeout((()=>{e.__codesActions[0].state="idle",e.__codesActions=[...e.__codesActions]}),1e3)}}}]}static get properties(){return r(r({},super.properties),{},{getCustomerHref:{attribute:!1}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!e||e.length<=50||"name:v8n_too_long",e=>{var r;if(null===(r=e.provisioning_config)||void 0===r?void 0:r.allow_autoprovisioning){if(!e.sku)return"sku:v8n_required";if(e.sku.length>200)return"sku:v8n_too_long"}return!0},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_min;return!("number"==typeof t&&t<0)||"min-balance:v8n_negative"},e=>{var r;const t=null===(r=e.provisioning_config)||void 0===r?void 0:r.initial_balance_max;return!("number"==typeof t&&t<0)||"max-balance:v8n_negative"},({product_code_restrictions:e})=>!e||e.length<=5e3||"product-code-restrictions:v8n_too_long"]}get hiddenSelector(){var e;const r=[super.hiddenSelector.toString()];return this.data||r.push("codes","category-restrictions","attributes"),(null===(e=this.form.provisioning_config)||void 0===e?void 0:e.allow_autoprovisioning)||r.push("provisioning:sku","provisioning:min-balance","provisioning:max-balance"),new t(r.join(" ").trim())}get headerSubtitleOptions(){return{id:this.headerCopyIdValue}}renderHeaderActions(e){return o(l||(l=f` <foxy-internal-bulk-add-action-control parent="${0}" infer="generate" form="foxy-generate-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> <foxy-internal-bulk-add-action-control parent="${0}" infer="import" form="foxy-gift-card-codes-form" .related="${0}"> </foxy-internal-bulk-add-action-control> ${0} `),e._links["fx:generate_codes"].href,[e._links["fx:gift_card_codes"].href],e._links["fx:gift_card_codes"].href,[e._links["fx:gift_card_codes"].href],super.renderHeaderActions(e))}renderBody(){var e,r,t,i,a,s,l,m,p,u;let _;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:gift_card_codes"].href)&&void 0!==r?r:"");t.searchParams.set("order","date_created desc"),_=t.toString()}catch(e){_=void 0}return o(c||(c=f` ${0} <foxy-internal-summary-control infer="general"> <foxy-internal-text-control layout="summary-item" infer="name"> </foxy-internal-text-control> <foxy-internal-select-control property="currency_code" layout="summary-item" infer="currency" .getValue="${0}" .options="${0}"> </foxy-internal-select-control> <foxy-internal-frequency-control property="expires_after" layout="summary-item" infer="expires"> </foxy-internal-frequency-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="provisioning"> <foxy-internal-switch-control infer="toggle" .getValue="${0}" .setValue="${0}"> </foxy-internal-switch-control> <foxy-internal-text-control layout="summary-item" infer="sku"></foxy-internal-text-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="min-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="max-balance" min="0" .getValue="${0}" .setValue="${0}"> </foxy-internal-number-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="codes" item="foxy-gift-card-code-card" form="foxy-gift-card-code-form" alert .formProps="${0}" .actions="${0}" .filters="${0}"> </foxy-internal-async-list-control> <foxy-internal-editable-list-control infer="product-code-restrictions" .getValue="${0}" .setValue="${0}" .units="${0}"> </foxy-internal-editable-list-control> <foxy-internal-async-resource-link-list-control foreign-key-for-uri="item_category_uri" foreign-key-for-id="item_category_id" own-key-for-uri="gift_card_uri" options-href="${0}" links-href="${0}" embed-key="fx:gift_card_item_categories" own-uri="${0}" infer="category-restrictions" limit="5" item="foxy-item-category-card"> </foxy-internal-async-resource-link-list-control> <foxy-internal-async-list-control first="${0}" limit="5" infer="attributes" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> ${0} <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),this.__currencyCodeGetValue,d.map((e=>({label:this.t(`general.currency.code_${e}`),value:e}))),this.__provisioningToggleValueGetter,this.__provisioningToggleValueSetter,n(null===(t=this.form.currency_code)||void 0===t?void 0:t.toUpperCase()),this.__provisioningMinBalanceValueGetter,this.__provisioningMinBalanceValueSetter,n(null===(i=this.form.currency_code)||void 0===i?void 0:i.toUpperCase()),this.__provisioningMaxBalanceValueGetter,this.__provisioningMaxBalanceValueSetter,_,{".getCustomerHref":this.getCustomerHref},this.__codesActions,this.__codesFilters,this.__productCodeRestrictionsGetValue,this.__productCodeRestrictionsSetValue,[{label:this.t("product-code-restrictions.unit_allow"),value:"allow"},{label:this.t("product-code-restrictions.unit_block"),value:"block"}],n(null===(s=null===(a=this.__storeLoader)||void 0===a?void 0:a.data)||void 0===s?void 0:s._links["fx:item_categories"].href),n(null===(l=this.data)||void 0===l?void 0:l._links["fx:gift_card_item_categories"].href),n(null===(m=this.data)||void 0===m?void 0:m._links.self.href),n(null===(p=this.data)||void 0===p?void 0:p._links["fx:attributes"].href),super.renderBody(),n(null===(u=this.data)||void 0===u?void 0:u._links["fx:store"].href),this.__storeLoaderId,(()=>this.requestUpdate()))}get __storeLoader(){return this.renderRoot.querySelector(`#${this.__storeLoaderId}`)}}customElements.define("foxy-gift-card-form",p);export{p as GiftCardForm};
@@ -1,4 +1,4 @@
1
- import"./shared-08be5c32.js";import{h as t,P as e}from"./shared-e0c93cfa.js";import{E as r,T as o}from"./shared-359793d4.js";import{I as a}from"./shared-651c44fa.js";import"./shared-ad3eea80.js";import{L as i}from"./shared-1220bf7d.js";import{I as s}from"./shared-317cb721.js";import{a as n}from"./shared-b2bc3a0e.js";import{a as l}from"./shared-5452fdfe.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-3bfbd5af.js";import"./shared-935adc3b.js";import"./shared-bb9f0d8b.js";import{_ as d}from"./shared-d1195c27.js";import{C as c}from"./shared-d1cb97c6.js";import{R as m,a as h,T as u}from"./shared-6d7c1a2f.js";import{N as f}from"./shared-e8b8c8d0.js";import{c as p,h as b}from"./shared-dc73b9a5.js";import{c as v}from"./shared-4e709717.js";import{i as g}from"./shared-9803aa7c.js";import{r as y}from"./shared-a0c6a159.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-61ade33e.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
1
+ import"./shared-ff10b9fb.js";import{h as t,P as e}from"./shared-6583e3f9.js";import{E as r,T as o}from"./shared-08e73812.js";import{I as a}from"./shared-651c44fa.js";import"./shared-25b83adb.js";import{L as i}from"./shared-d3ffbcb0.js";import{I as s}from"./shared-a9b8c3ab.js";import{a as n}from"./shared-95a591b3.js";import{a as l}from"./shared-6b578d1a.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-0d4cdb19.js";import"./shared-433ff5ae.js";import"./shared-52c9fa57.js";import{_ as d}from"./shared-d1195c27.js";import{C as c}from"./shared-d1cb97c6.js";import{R as m,a as h,T as u}from"./shared-70612035.js";import{N as f}from"./shared-e8b8c8d0.js";import{c as p,h as b}from"./shared-dc73b9a5.js";import{c as v}from"./shared-4e709717.js";import{i as g}from"./shared-9803aa7c.js";import{r as y}from"./shared-a0c6a159.js";import"./shared-c518ece2.js";import"./shared-343d1fd7.js";import"./shared-cd96ff03.js";import"./shared-17a61265.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";import"./shared-61ade33e.js";const w=t`<dom-module id="lumo-tab" theme-for="vaadin-tab">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- export{I as I18n}from"./shared-3bfbd5af.js";import"./shared-d1195c27.js";import"./shared-dc73b9a5.js";import"./shared-6d7c1a2f.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";
1
+ export{I as I18n}from"./shared-0d4cdb19.js";import"./shared-d1195c27.js";import"./shared-dc73b9a5.js";import"./shared-70612035.js";import"./shared-343d1fd7.js";import"./shared-17a61265.js";
@@ -1 +1 @@
1
- import"./shared-0e83a899.js";import"./shared-3bfbd5af.js";import{a as s}from"./shared-6d7c1a2f.js";import{I as e}from"./shared-fd1adc35.js";import{c as a}from"./shared-4e709717.js";import{h as t}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-5452fdfe.js";import"./shared-e0c93cfa.js";import"./shared-bb9f0d8b.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,r,i=s=>s;const o=s(e,"integration-card");class n extends o{renderBody(){var s;const e=this.data,o=new Date(1e3*(null!==(s=null==e?void 0:e.expires)&&void 0!==s?s:0)),n=o>new Date;return t(d||(d=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==e?void 0:e.project_name,a({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==e?void 0:e.project_description)?e.project_description:t(r||(r=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==e?void 0:e.client_id,null==e?void 0:e.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};
1
+ import"./shared-ccc7a886.js";import"./shared-0d4cdb19.js";import{a as s}from"./shared-70612035.js";import{I as e}from"./shared-6b5e4fe4.js";import{c as t}from"./shared-4e709717.js";import{h as a}from"./shared-dc73b9a5.js";import"./foxy-spinner.js";import"./shared-6b578d1a.js";import"./shared-6583e3f9.js";import"./shared-52c9fa57.js";import"./shared-d1195c27.js";import"./shared-17a61265.js";import"./shared-343d1fd7.js";import"./shared-e8b8c8d0.js";import"./shared-c518ece2.js";import"./shared-cd96ff03.js";import"./shared-9cf15285.js";import"./shared-019348d7.js";import"./shared-1aff7995.js";import"./shared-fcdb896f.js";let d,r,i=s=>s;const o=s(e,"integration-card");class n extends o{renderBody(){var s;const e=this.data,o=new Date(1e3*(null!==(s=null==e?void 0:e.expires)&&void 0!==s?s:0)),n=o>new Date;return a(d||(d=i` <div class="flex flex-wrap gap-xs leading-s"> <div class="min-w-full"> <div class="flex justify-between gap-s"> <span class="font-medium truncate min-w-0"> ${0}&ZeroWidthSpace; </span> <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s"> ${0} </div> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">ID</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> <div class="text-secondary text-xs bg-contrast-5 rounded overflow-hidden flex"> <span class="font-medium px-xs bg-contrast-5" lang="en">Email</span> <span class="px-xs"><code>${0}</code>&ZeroWidthSpace;</span> </div> </div> `),null==e?void 0:e.project_name,t({"whitespace-nowrap font-tnum text-s":!0,"text-tertiary":n,"text-error":!n}),n?"active":"expired",{date:o,month:"short",day:"2-digit"},(null==e?void 0:e.project_description)?e.project_description:a(r||(r=i`<foxy-i18n infer="" key="no_description"></foxy-i18n>`)),null==e?void 0:e.client_id,null==e?void 0:e.added_by_email)}}customElements.define("foxy-integration-card",n);export{n as IntegrationCard};