@foxy.io/elements 1.43.0-beta.3 → 1.43.0-beta.4

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 (210) 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 +11 -11
  34. package/dist/cdn/foxy-customer.js +1 -1
  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-experimental-add-to-cart-builder.js +1 -1
  46. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  48. package/dist/cdn/foxy-form-dialog.js +1 -1
  49. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  50. package/dist/cdn/foxy-gift-card-card.js +1 -1
  51. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  54. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  55. package/dist/cdn/foxy-gift-card-form.js +1 -1
  56. package/dist/cdn/foxy-i18n-editor.js +1 -1
  57. package/dist/cdn/foxy-i18n.js +1 -1
  58. package/dist/cdn/foxy-integration-card.js +1 -1
  59. package/dist/cdn/foxy-integration-form.js +1 -1
  60. package/dist/cdn/foxy-item-card.js +1 -1
  61. package/dist/cdn/foxy-item-category-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-form.js +1 -1
  63. package/dist/cdn/foxy-item-form.js +1 -1
  64. package/dist/cdn/foxy-item-option-card.js +1 -1
  65. package/dist/cdn/foxy-item-option-form.js +1 -1
  66. package/dist/cdn/foxy-items-form.js +1 -1
  67. package/dist/cdn/foxy-native-integration-card.js +1 -1
  68. package/dist/cdn/foxy-native-integration-form.js +1 -1
  69. package/dist/cdn/foxy-pagination.js +1 -1
  70. package/dist/cdn/foxy-passkey-card.js +1 -1
  71. package/dist/cdn/foxy-passkey-form.js +1 -1
  72. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  73. package/dist/cdn/foxy-payment-card.js +1 -1
  74. package/dist/cdn/foxy-payment-method-card.js +1 -1
  75. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  77. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  81. package/dist/cdn/foxy-query-builder.js +1 -1
  82. package/dist/cdn/foxy-report-form.js +1 -1
  83. package/dist/cdn/foxy-reports-table.js +1 -1
  84. package/dist/cdn/foxy-shipment-card.js +1 -1
  85. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  89. package/dist/cdn/foxy-sign-in-form.js +1 -1
  90. package/dist/cdn/foxy-spinner.js +2 -2
  91. package/dist/cdn/foxy-store-card.js +1 -1
  92. package/dist/cdn/foxy-store-form.js +1 -1
  93. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  94. package/dist/cdn/foxy-subscription-card.js +1 -1
  95. package/dist/cdn/foxy-subscription-form.js +1 -1
  96. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  97. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  98. package/dist/cdn/foxy-table.js +1 -1
  99. package/dist/cdn/foxy-tax-card.js +1 -1
  100. package/dist/cdn/foxy-tax-form.js +1 -1
  101. package/dist/cdn/foxy-template-config-form.js +1 -1
  102. package/dist/cdn/foxy-template-form.js +1 -1
  103. package/dist/cdn/foxy-template-set-card.js +1 -1
  104. package/dist/cdn/foxy-template-set-form.js +1 -1
  105. package/dist/cdn/foxy-transaction-card.js +1 -1
  106. package/dist/cdn/foxy-transaction.js +1 -1
  107. package/dist/cdn/foxy-transactions-table.js +7 -7
  108. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  109. package/dist/cdn/foxy-user-card.js +1 -1
  110. package/dist/cdn/foxy-user-form.js +1 -1
  111. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  112. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  113. package/dist/cdn/foxy-users-table.js +1 -1
  114. package/dist/cdn/foxy-webhook-card.js +1 -1
  115. package/dist/cdn/foxy-webhook-form.js +1 -1
  116. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  117. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  118. package/dist/cdn/{shared-3558bfae.js → shared-070211c0.js} +1 -1
  119. package/dist/cdn/{shared-457789d7.js → shared-0e605594.js} +1 -1
  120. package/dist/cdn/{shared-206d3153.js → shared-0fa21237.js} +1 -1
  121. package/dist/cdn/{shared-cd3cfea5.js → shared-0fb90a71.js} +1 -1
  122. package/dist/cdn/{shared-6540a584.js → shared-140c6b70.js} +1 -1
  123. package/dist/cdn/{shared-a715e3e5.js → shared-160072f2.js} +1 -1
  124. package/dist/cdn/{shared-7b5bdf0e.js → shared-1b4a3e56.js} +1 -1
  125. package/dist/cdn/{shared-0993c2f5.js → shared-1f95aa71.js} +1 -1
  126. package/dist/cdn/{shared-2ebcaabc.js → shared-28253ef3.js} +1 -1
  127. package/dist/cdn/{shared-5aacbf1f.js → shared-2b328555.js} +1 -1
  128. package/dist/cdn/{shared-8b0d25e5.js → shared-2c7e0ed1.js} +1 -1
  129. package/dist/cdn/shared-2d3bdc6b.js +1 -0
  130. package/dist/cdn/{shared-21a445d9.js → shared-34a7df04.js} +1 -1
  131. package/dist/cdn/{shared-aab4ed2b.js → shared-364b98a1.js} +1 -1
  132. package/dist/cdn/{shared-2c00e6b1.js → shared-3c64ecdd.js} +1 -1
  133. package/dist/cdn/{shared-a3234358.js → shared-3eb6e232.js} +1 -1
  134. package/dist/cdn/{shared-12bab9de.js → shared-3f4549ba.js} +1 -1
  135. package/dist/cdn/{shared-ee689ddc.js → shared-4388f7ea.js} +1 -1
  136. package/dist/cdn/{shared-2f17b0fa.js → shared-46a20973.js} +1 -1
  137. package/dist/cdn/{shared-264bea6b.js → shared-48129732.js} +1 -1
  138. package/dist/cdn/{shared-0584a904.js → shared-50a355d6.js} +1 -1
  139. package/dist/cdn/{shared-9363a954.js → shared-5492f8eb.js} +1 -1
  140. package/dist/cdn/{shared-9006bac2.js → shared-59c064c2.js} +1 -1
  141. package/dist/cdn/{shared-e52d2fdd.js → shared-5a6e4a7b.js} +1 -1
  142. package/dist/cdn/{shared-3e3c5095.js → shared-5af5ab06.js} +1 -1
  143. package/dist/cdn/{shared-03b67a3d.js → shared-6313b188.js} +1 -1
  144. package/dist/cdn/{shared-6a65acb4.js → shared-69c7ad04.js} +1 -1
  145. package/dist/cdn/{shared-5700fbfd.js → shared-742899dc.js} +1 -1
  146. package/dist/cdn/{shared-bdbdf963.js → shared-7d1512e1.js} +1 -1
  147. package/dist/cdn/{shared-74a5f2a4.js → shared-7e18a7d9.js} +1 -1
  148. package/dist/cdn/{shared-3ffa26c1.js → shared-8530fbae.js} +1 -1
  149. package/dist/cdn/{shared-944fab16.js → shared-88a1cb23.js} +1 -1
  150. package/dist/cdn/{shared-90a8d5cf.js → shared-8a570d01.js} +1 -1
  151. package/dist/cdn/{shared-1b627cc5.js → shared-8a743005.js} +1 -1
  152. package/dist/cdn/{shared-76c608e2.js → shared-9884fb7d.js} +1 -1
  153. package/dist/cdn/{shared-ab0bbad5.js → shared-9bfb584b.js} +1 -1
  154. package/dist/cdn/{shared-1af6aa1d.js → shared-a0fbe3ef.js} +5 -5
  155. package/dist/cdn/{shared-998c0ace.js → shared-a16ef278.js} +1 -1
  156. package/dist/cdn/{shared-68d1075b.js → shared-a41ccdc7.js} +3 -3
  157. package/dist/cdn/{shared-aedaf182.js → shared-a4871405.js} +1 -1
  158. package/dist/cdn/{shared-ddda911c.js → shared-a89e8a07.js} +1 -1
  159. package/dist/cdn/{shared-f497cd69.js → shared-acee789f.js} +1 -1
  160. package/dist/cdn/{shared-80dafe85.js → shared-ad8d209a.js} +1 -1
  161. package/dist/cdn/{shared-2db6b377.js → shared-b15efc37.js} +1 -1
  162. package/dist/cdn/{shared-02acac7f.js → shared-c16f05d9.js} +1 -1
  163. package/dist/cdn/{shared-8dd6f543.js → shared-ce0df878.js} +1 -1
  164. package/dist/cdn/{shared-2557c0c4.js → shared-cf6122d9.js} +1 -1
  165. package/dist/cdn/{shared-10c8f21c.js → shared-d3aefd9b.js} +1 -1
  166. package/dist/cdn/{shared-be7af87f.js → shared-d3f37507.js} +1 -1
  167. package/dist/cdn/{shared-19b43f73.js → shared-d4928805.js} +1 -1
  168. package/dist/cdn/{shared-6ebe5ef5.js → shared-d8b0432a.js} +1 -1
  169. package/dist/cdn/{shared-b2bd7666.js → shared-db50afd9.js} +1 -1
  170. package/dist/cdn/shared-dc1fc2e6.js +1 -0
  171. package/dist/cdn/shared-dfe59df6.js +1 -0
  172. package/dist/cdn/{shared-cd0ae051.js → shared-e02936f0.js} +3 -3
  173. package/dist/cdn/{shared-6eebe353.js → shared-e126cf44.js} +2 -2
  174. package/dist/cdn/shared-e82550b1.js +40 -0
  175. package/dist/cdn/{shared-8259d01b.js → shared-ebfb86b5.js} +1 -1
  176. package/dist/cdn/{shared-1c252319.js → shared-f2be9863.js} +1 -1
  177. package/dist/cdn/{shared-109cfbba.js → shared-f2e8070b.js} +1 -1
  178. package/dist/cdn/{shared-13ba9f3a.js → shared-f3590d20.js} +2 -2
  179. package/dist/cdn/{shared-049295b7.js → shared-f7b4a4f6.js} +1 -1
  180. package/dist/cdn/{shared-3e0b2588.js → shared-fa482a7d.js} +1 -1
  181. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +5 -4
  182. package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
  183. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js +6 -6
  184. package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js.map +1 -1
  185. package/dist/elements/public/Donation/Donation.d.ts +3 -0
  186. package/dist/elements/public/Donation/Donation.js +19 -0
  187. package/dist/elements/public/Donation/Donation.js.map +1 -1
  188. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js +4 -15
  189. package/dist/elements/public/FilterAttributeForm/FilterAttributeForm.js.map +1 -1
  190. package/dist/elements/public/QueryBuilder/QueryBuilder.d.ts +2 -0
  191. package/dist/elements/public/QueryBuilder/QueryBuilder.js +5 -0
  192. package/dist/elements/public/QueryBuilder/QueryBuilder.js.map +1 -1
  193. package/dist/elements/public/QueryBuilder/components/AdvancedInput.js +2 -1
  194. package/dist/elements/public/QueryBuilder/components/AdvancedInput.js.map +1 -1
  195. package/dist/elements/public/QueryBuilder/components/SimpleInput.js +9 -2
  196. package/dist/elements/public/QueryBuilder/components/SimpleInput.js.map +1 -1
  197. package/dist/elements/public/QueryBuilder/utils/parse.js +19 -16
  198. package/dist/elements/public/QueryBuilder/utils/parse.js.map +1 -1
  199. package/dist/elements/public/QueryBuilder/utils/stringify.js +22 -45
  200. package/dist/elements/public/QueryBuilder/utils/stringify.js.map +1 -1
  201. package/dist/elements/public/QueryBuilder/utils/zoom.d.ts +3 -0
  202. package/dist/elements/public/QueryBuilder/utils/zoom.js +29 -0
  203. package/dist/elements/public/QueryBuilder/utils/zoom.js.map +1 -0
  204. package/dist/mixins/themeable.js +0 -6
  205. package/dist/mixins/themeable.js.map +1 -1
  206. package/package.json +1 -1
  207. package/dist/cdn/shared-2f1ced90.js +0 -1
  208. package/dist/cdn/shared-88a59a2e.js +0 -1
  209. package/dist/cdn/shared-dd7e85be.js +0 -1
  210. package/dist/cdn/shared-f4be6924.js +0 -40
@@ -1 +1 @@
1
- import"./shared-68d1075b.js";import"./shared-8dd6f543.js";import"./shared-2db6b377.js";import"./shared-12bab9de.js";import"./shared-80dafe85.js";import"./shared-aedaf182.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-7b5bdf0e.js";import{h as e}from"./shared-ba5c42c7.js";import{C as s}from"./shared-c782b9fa.js";import{N as t}from"./shared-da95bb48.js";import{T as i,a as r}from"./shared-ddda911c.js";import{c as a}from"./shared-4e709717.js";import{i as d}from"./shared-53e42a77.js";import{v as o}from"./shared-b738ee96.js";import"./shared-3e3c5095.js";import"./shared-2c00e6b1.js";import"./shared-0993c2f5.js";import"./shared-ab0bbad5.js";import"./shared-03b67a3d.js";import"./shared-be7af87f.js";import"./shared-76c608e2.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let n,l,m,h,c=e=>e;const p=i(s(r(t,"access-recovery-form")));class f extends p{constructor(){super(...arguments),this.__checkEmailValidity=()=>!this.errors.some((e=>e.startsWith("email"))),this.__renderEmail=()=>{var s;const t=this.in("fail"),i=this.in("busy"),r=this.in({idle:"snapshot"}),a=this.errors.filter((e=>e.startsWith("email"))).map((e=>e.replace("email","v8n"))),o=a[0]?this.t(a[0]).toString():"";return e(n||(n=c` <div> ${0} <vaadin-email-field error-message="${0}" data-testid="email" class="w-full" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-email-field> ${0} </div> `),this.renderTemplateOrSlot("email:before"),o,this.t("email").toString(),d(null===(s=this.form.detail)||void 0===s?void 0:s.email),i||r||t||this.disabledSelector.matches("email",!0),this.readonlySelector.matches("email",!0),this.__checkEmailValidity,(e=>{this.edit({detail:{email:e.target.value},type:"email"})}),(e=>{"Enter"===e.key&&this.submit()}),this.renderTemplateOrSlot("email:after"))},this.__renderMessage=()=>{const s=this.in("fail"),t=s?"bg-error-10 text-error":"bg-success-10 text-success",i=s?"lumo:error":"lumo:cog",r=s?"unknown_error":"recover_access_success";return e(l||(l=c` <div> ${0} <p class="leading-s flex items-start text-s rounded p-s ${0}"> <iron-icon class="flex-shrink-0 icon-inline text-l mr-s" icon="${0}"></iron-icon> <foxy-i18n lang="${0}" key="${0}" ns="${0}" data-testid="message"></foxy-i18n> </p> ${0} </div> `),this.renderTemplateOrSlot("message:before"),t,i,this.lang,r,this.ns,this.renderTemplateOrSlot("message:after"))},this.__renderSubmit=()=>{const s=this.in("fail"),t=0===this.errors.length,i=this.in("busy"),r=this.in({idle:"snapshot"}),a=i||r||!t||s;return e(m||(m=c` <div> ${0} <vaadin-button data-testid="submit" class="w-full" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),a||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.lang,this.ns,this.renderTemplateOrSlot("submit:after"))}}static get v8n(){return[({detail:e})=>(null==e?void 0:e.email)&&e.email.length>0||"email_required",({detail:e})=>{var s;return o(null!==(s=null==e?void 0:e.email)&&void 0!==s?s:"")||"email_invalid_email"}]}render(){var s,t;const i=this.hiddenSelector,r=this.in({idle:"snapshot"})||this.in("fail"),d=this.in("busy");return e(h||(h=c` <main data-testid="wrapper" aria-live="polite" aria-busy="${0}" class="relative font-lumo text-m leading-m space-y-m"> ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="busy" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </main> `),d,i.matches("email",!0)?"":this.__renderEmail(),i.matches("message",!0)||!r?"":this.__renderMessage(),i.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!d}),this.lang,this.ns,null!==(t=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==t?t:"")}async _sendPost(e){const s=JSON.stringify(e),i=await this._fetch(this.parent,{body:s,method:"POST"}),r=t.Rumour(this.group),a=[...this.related,this.parent];return r.share({data:i,related:a,source:i._links.self.href}),i}}customElements.define("foxy-access-recovery-form",f);export{f as AccessRecoveryForm};
1
+ import"./shared-a41ccdc7.js";import"./shared-ce0df878.js";import"./shared-b15efc37.js";import"./shared-3f4549ba.js";import"./shared-ad8d209a.js";import"./shared-a4871405.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{h as e}from"./shared-ba5c42c7.js";import{C as s}from"./shared-c782b9fa.js";import{N as t}from"./shared-da95bb48.js";import{T as i,a as r}from"./shared-a89e8a07.js";import{c as a}from"./shared-4e709717.js";import{i as o}from"./shared-53e42a77.js";import{v as d}from"./shared-b738ee96.js";import"./shared-5af5ab06.js";import"./shared-3c64ecdd.js";import"./shared-1f95aa71.js";import"./shared-9bfb584b.js";import"./shared-6313b188.js";import"./shared-d3f37507.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let n,l,m,h,c=e=>e;const p=i(s(r(t,"access-recovery-form")));class f extends p{constructor(){super(...arguments),this.__checkEmailValidity=()=>!this.errors.some((e=>e.startsWith("email"))),this.__renderEmail=()=>{var s;const t=this.in("fail"),i=this.in("busy"),r=this.in({idle:"snapshot"}),a=this.errors.filter((e=>e.startsWith("email"))).map((e=>e.replace("email","v8n"))),d=a[0]?this.t(a[0]).toString():"";return e(n||(n=c` <div> ${0} <vaadin-email-field error-message="${0}" data-testid="email" class="w-full" label="${0}" value="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-email-field> ${0} </div> `),this.renderTemplateOrSlot("email:before"),d,this.t("email").toString(),o(null===(s=this.form.detail)||void 0===s?void 0:s.email),i||r||t||this.disabledSelector.matches("email",!0),this.readonlySelector.matches("email",!0),this.__checkEmailValidity,(e=>{this.edit({detail:{email:e.target.value},type:"email"})}),(e=>{"Enter"===e.key&&this.submit()}),this.renderTemplateOrSlot("email:after"))},this.__renderMessage=()=>{const s=this.in("fail"),t=s?"bg-error-10 text-error":"bg-success-10 text-success",i=s?"lumo:error":"lumo:cog",r=s?"unknown_error":"recover_access_success";return e(l||(l=c` <div> ${0} <p class="leading-s flex items-start text-s rounded p-s ${0}"> <iron-icon class="flex-shrink-0 icon-inline text-l mr-s" icon="${0}"></iron-icon> <foxy-i18n lang="${0}" key="${0}" ns="${0}" data-testid="message"></foxy-i18n> </p> ${0} </div> `),this.renderTemplateOrSlot("message:before"),t,i,this.lang,r,this.ns,this.renderTemplateOrSlot("message:after"))},this.__renderSubmit=()=>{const s=this.in("fail"),t=0===this.errors.length,i=this.in("busy"),r=this.in({idle:"snapshot"}),a=i||r||!t||s;return e(m||(m=c` <div> ${0} <vaadin-button data-testid="submit" class="w-full" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),a||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.lang,this.ns,this.renderTemplateOrSlot("submit:after"))}}static get v8n(){return[({detail:e})=>(null==e?void 0:e.email)&&e.email.length>0||"email_required",({detail:e})=>{var s;return d(null!==(s=null==e?void 0:e.email)&&void 0!==s?s:"")||"email_invalid_email"}]}render(){var s,t;const i=this.hiddenSelector,r=this.in({idle:"snapshot"})||this.in("fail"),o=this.in("busy");return e(h||(h=c` <main data-testid="wrapper" aria-live="polite" aria-busy="${0}" class="relative font-lumo text-m leading-m space-y-m"> ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="busy" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </main> `),o,i.matches("email",!0)?"":this.__renderEmail(),i.matches("message",!0)||!r?"":this.__renderMessage(),i.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!o}),this.lang,this.ns,null!==(t=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==t?t:"")}async _sendPost(e){const s=JSON.stringify(e),i=await this._fetch(this.parent,{body:s,method:"POST"}),r=t.Rumour(this.group),a=[...this.related,this.parent];return r.share({data:i,related:a,source:i._links.self.href}),i}}customElements.define("foxy-access-recovery-form",f);export{f as AccessRecoveryForm};
@@ -1,4 +1,4 @@
1
- import"./shared-80dafe85.js";import"./shared-76c608e2.js";import{h as c}from"./shared-3e3c5095.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-7b5bdf0e.js";import{h}from"./shared-ba5c42c7.js";import{C as a}from"./shared-c782b9fa.js";import{N as t}from"./shared-da95bb48.js";import{T as s,a as i}from"./shared-ddda911c.js";import{c as l}from"./shared-4e709717.js";import"./shared-be7af87f.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";
1
+ import"./shared-ad8d209a.js";import"./shared-9884fb7d.js";import{h as c}from"./shared-5af5ab06.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{h}from"./shared-ba5c42c7.js";import{C as a}from"./shared-c782b9fa.js";import{N as t}from"./shared-da95bb48.js";import{T as s,a as i}from"./shared-a89e8a07.js";import{c as l}from"./shared-4e709717.js";import"./shared-d3f37507.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
@@ -1 +1 @@
1
- import"./shared-6eebe353.js";import"./shared-206d3153.js";import"./shared-ee689ddc.js";import{I as e}from"./shared-3558bfae.js";import{a as r}from"./shared-ddda911c.js";import{B as t}from"./shared-7fec42f2.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-1c252319.js";import"./shared-12bab9de.js";import"./shared-3e3c5095.js";import"./shared-03b67a3d.js";import"./shared-2db6b377.js";import"./shared-2c00e6b1.js";import"./shared-be7af87f.js";import"./shared-049295b7.js";import"./shared-5212ef4f.js";import"./shared-7b5bdf0e.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-6ebe5ef5.js";import"./shared-9006bac2.js";import"./shared-0993c2f5.js";import"./shared-cd0ae051.js";import"./shared-ab0bbad5.js";import"./shared-8dd6f543.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./foxy-copy-to-clipboard.js";import"./shared-2557c0c4.js";import"./shared-80dafe85.js";import"./shared-aedaf182.js";import"./shared-76c608e2.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const a={AF:[],AX:[],AL:[],DZ:[],AS:[],AD:[],AO:[],AI:[],AQ:[],AG:[],AR:[],AM:[],AW:[],AU:["ACT","NSW","NT","QLD","SA","TAS","VIC","WA"],AT:["BL","KN","NO","OO","SB","ST","TI","VB","WI"],AZ:[],BS:[],BH:[],BD:[],BB:[],BY:[],BE:[],BZ:[],BJ:[],BM:[],BT:[],BO:[],BQ:["BO","SA","SE"],BA:[],BW:[],BV:[],BR:[],IO:[],BN:[],BG:[],BF:[],BI:[],KH:[],CM:[],CA:["AB","BC","MB","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT"],CV:[],CW:[],KY:[],CF:[],TD:[],CL:[],CN:[],CX:[],CC:[],CO:[],KM:[],CG:[],CD:[],CK:[],CR:[],CI:[],HR:[],CU:[],CY:[],CZ:[],DK:[],DJ:[],DM:[],DO:[],EC:[],EG:[],SV:[],SX:[],GQ:[],ER:[],EE:[],ET:[],FK:[],FO:[],FJ:[],FI:[],FR:[],GF:[],PF:[],TF:[],GA:[],GM:[],GE:[],DE:["BW","BY","BE","BB","HB","HH","HE","MV","NI","NW","RP","SL","SN","ST","SH","TH"],GH:[],GI:[],GR:[],GL:[],GD:[],GP:[],GU:[],GT:[],GG:[],GN:[],GW:[],GY:[],HT:[],HM:[],VA:[],HN:[],HK:[],HU:[],IS:[],IN:["AN","AP","AR","AS","BR","CH","CT","DN","DD","DL","GA","GJ","HR","HP","JK","JH","KA","KL","LD","MP","MH","MN","ML","MZ","NL","OR","PY","PB","RJ","SK","TN","TG","TR","UT","UP","WB"],ID:[],IR:[],IQ:[],IE:["CW","CN","CE","CO","DL","D","G","KY","KE","KK","LS","LM","LK","LD","LH","MO","MH","MN","OY","RN","SO","TA","WD","WH","WX","WW"],IM:[],IL:[],IT:[],JM:[],JP:["10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","05","02","07","01","08","03","04","09","06"],JE:[],JO:[],KZ:[],KE:[],KI:[],KP:[],KR:[],KW:[],KG:[],LA:[],LV:[],LB:[],LS:[],LR:[],LY:[],LI:[],LT:[],LU:[],MO:[],MK:[],MG:[],MW:[],MY:[],MV:[],ML:[],MT:[],MH:[],MQ:[],MR:[],MU:[],YT:[],MX:[],FM:[],MD:[],MC:[],MN:[],ME:[],MS:[],MA:[],MZ:[],MM:[],NA:[],NR:[],NP:[],NL:[],NC:[],NZ:[],NI:[],NE:[],NG:[],NU:[],NF:[],MP:[],NO:["10","11","12","14","15","16","17","18","19","20","30","34","38","42","46","50","54","01","02","03","04","05","06","07","08","09"],OM:[],PK:[],PW:[],PS:[],PA:[],PG:[],PY:[],PE:[],PH:[],PN:[],PL:[],PT:[],PR:[],QA:[],RE:[],RO:[],RU:[],RW:[],BL:[],SH:[],KN:[],LC:[],MF:[],PM:[],VC:[],WS:[],SM:[],SS:[],ST:[],SA:[],SN:[],RS:[],SC:[],SL:[],SG:[],SK:[],SI:[],SB:[],SO:[],ZA:[],GS:[],ES:["A Coruna","Alava","Albacete","Alicante","Almeria","Asturias","Avila","Badajoz","Baleares","Barcelona","Burgos","Caceres","Cadiz","CN","Cantabria","Castellon","Ceuta","Ciudad Real","Cordoba","Cuenca","Gipuzkoa","Girona","Granada","Guadalajara","Guipuzcoa","Huelva","Huesca","Jaen","La Rioja","Las Palmas","Leon","Lleida","Lugo","Madrid","Malaga","Melilla","Murcia","Navarra","Ourense","Palencia","Pontevedra","Salamanca","Santa Cruz de Tenerife","Segovia","Sevilla","Soria","Tarragona","Teruel","Toledo","Valencia","Valladolid","Vizcaya","Zamora","Zaragoza"],LK:[],SD:[],SR:[],SJ:[],SZ:[],SE:[],CH:["AG","AR","AI","BL","BS","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TI","TG","UR","VS","VD","ZH","ZG"],SY:[],TW:[],TJ:[],TZ:[],TH:[],TL:[],TG:[],TK:[],TO:[],TT:[],TN:[],TR:[],TM:[],TC:[],TV:[],UG:[],UA:[],AE:[],GB:[],US:["AL","AK","AS","AZ","AR","AF","AA","AC","AE","AM","AP","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"],UM:[],UY:[],UZ:[],VU:[],VE:[],VN:[],VG:[],VI:[],WF:[],EH:[],YE:[],ZM:[],ZW:[]};let s,n,i,d=e=>e;const l=r(e,"address-form");class c extends l{constructor(){super(...arguments),this.__ignoreAddressRestrictionsGetValue=()=>this.form.ignore_address_restrictions?["true"]:[],this.__ignoreAddressRestrictionsSetValue=e=>{this.edit({ignore_address_restrictions:e.includes("true")})},this.__ignoreAddressRestrictionsOptions=[{label:"option_true",value:"true"}],this.__countrySetValue=e=>{this.edit({country:e,region:""})}}static get v8n(){return[({address_name:e})=>e&&e.length>0||"address-name:v8n_required",({address_name:e})=>!e||e.length<=100||"address-name:v8n_too_long",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({region:e})=>!e||e.length<=50||"region:v8n_too_long",({city:e})=>!e||e.length<=50||"city:v8n_too_long",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long",({company:e})=>!e||e.length<=50||"company:v8n_too_long",({address2:e})=>!e||e.length<=100||"address-two:v8n_too_long",({address1:e})=>e&&e.length>0||"address-one:v8n_required",({address1:e})=>!e||e.length<=100||"address-one:v8n_too_long",({postal_code:e})=>!e||e.length<=50||"postal-code:v8n_too_long"]}get hiddenSelector(){var e,r;const o=[super.hiddenSelector.toString()];return(!!(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)||!!(null===(r=this.data)||void 0===r?void 0:r.is_default_billing))&&o.unshift("delete","address-name","header:copy-id"),new t(o.join(" ").trim())}get headerTitleKey(){var e,r;return(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)?"title_default_shipping":(null===(r=this.data)||void 0===r?void 0:r.is_default_billing)?"title_default_billing":super.headerTitleKey}renderBody(){const e=this.__regionOptions;return o(s||(s=d` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="address-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-one" property="address1"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-two" property="address2"> </foxy-internal-text-control> <foxy-internal-select-control infer="country" .options="${0}" .setValue="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="city"></foxy-internal-text-control> <foxy-internal-text-control infer="postal-code"></foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="ignore-address-restrictions" class="col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} `),this.renderHeader(),this.__countryOptions,this.__countrySetValue,e.length>0?o(n||(n=d` <foxy-internal-select-control infer="region" .options="${0}"> </foxy-internal-select-control> `),e):o(i||(i=d`<foxy-internal-text-control infer="region"></foxy-internal-text-control>`)),this.__ignoreAddressRestrictionsGetValue,this.__ignoreAddressRestrictionsSetValue,this.__ignoreAddressRestrictionsOptions,super.renderBody())}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let r;try{r=(await e.json())._embedded["fx:errors"][0].message}catch(r){throw e}throw r.includes("Country is invalid or disallowed by store configuration")?["error:country_banned"]:r.includes("this address name already exists for this customer")?["error:address_name_exists"]:e}}get __countryOptions(){return Object.keys(a).map((e=>({label:this.t(`country_${e.toLowerCase()}`),value:e})))}get __regionOptions(){var e,r;const t=null!==(e=this.form.country)&&void 0!==e?e:"";return(null!==(r=a[t])&&void 0!==r?r:[]).map((e=>({label:this.t(`country_${t.toLowerCase()}_region_${e.toLowerCase()}`),value:e})))}}customElements.define("foxy-address-form",c);export{c as AddressForm};
1
+ import"./shared-e126cf44.js";import"./shared-0fa21237.js";import"./shared-4388f7ea.js";import{I as e}from"./shared-070211c0.js";import{a as r}from"./shared-a89e8a07.js";import{B as t}from"./shared-7fec42f2.js";import{h as o}from"./shared-ba5c42c7.js";import"./shared-f2be9863.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-b15efc37.js";import"./shared-3c64ecdd.js";import"./shared-d3f37507.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-1b4a3e56.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-1f95aa71.js";import"./shared-e02936f0.js";import"./shared-9bfb584b.js";import"./shared-ce0df878.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-copy-to-clipboard.js";import"./shared-cf6122d9.js";import"./shared-ad8d209a.js";import"./shared-a4871405.js";import"./shared-9884fb7d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";const a={AF:[],AX:[],AL:[],DZ:[],AS:[],AD:[],AO:[],AI:[],AQ:[],AG:[],AR:[],AM:[],AW:[],AU:["ACT","NSW","NT","QLD","SA","TAS","VIC","WA"],AT:["BL","KN","NO","OO","SB","ST","TI","VB","WI"],AZ:[],BS:[],BH:[],BD:[],BB:[],BY:[],BE:[],BZ:[],BJ:[],BM:[],BT:[],BO:[],BQ:["BO","SA","SE"],BA:[],BW:[],BV:[],BR:[],IO:[],BN:[],BG:[],BF:[],BI:[],KH:[],CM:[],CA:["AB","BC","MB","NB","NL","NT","NS","NU","ON","PE","QC","SK","YT"],CV:[],CW:[],KY:[],CF:[],TD:[],CL:[],CN:[],CX:[],CC:[],CO:[],KM:[],CG:[],CD:[],CK:[],CR:[],CI:[],HR:[],CU:[],CY:[],CZ:[],DK:[],DJ:[],DM:[],DO:[],EC:[],EG:[],SV:[],SX:[],GQ:[],ER:[],EE:[],ET:[],FK:[],FO:[],FJ:[],FI:[],FR:[],GF:[],PF:[],TF:[],GA:[],GM:[],GE:[],DE:["BW","BY","BE","BB","HB","HH","HE","MV","NI","NW","RP","SL","SN","ST","SH","TH"],GH:[],GI:[],GR:[],GL:[],GD:[],GP:[],GU:[],GT:[],GG:[],GN:[],GW:[],GY:[],HT:[],HM:[],VA:[],HN:[],HK:[],HU:[],IS:[],IN:["AN","AP","AR","AS","BR","CH","CT","DN","DD","DL","GA","GJ","HR","HP","JK","JH","KA","KL","LD","MP","MH","MN","ML","MZ","NL","OR","PY","PB","RJ","SK","TN","TG","TR","UT","UP","WB"],ID:[],IR:[],IQ:[],IE:["CW","CN","CE","CO","DL","D","G","KY","KE","KK","LS","LM","LK","LD","LH","MO","MH","MN","OY","RN","SO","TA","WD","WH","WX","WW"],IM:[],IL:[],IT:[],JM:[],JP:["10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","05","02","07","01","08","03","04","09","06"],JE:[],JO:[],KZ:[],KE:[],KI:[],KP:[],KR:[],KW:[],KG:[],LA:[],LV:[],LB:[],LS:[],LR:[],LY:[],LI:[],LT:[],LU:[],MO:[],MK:[],MG:[],MW:[],MY:[],MV:[],ML:[],MT:[],MH:[],MQ:[],MR:[],MU:[],YT:[],MX:[],FM:[],MD:[],MC:[],MN:[],ME:[],MS:[],MA:[],MZ:[],MM:[],NA:[],NR:[],NP:[],NL:[],NC:[],NZ:[],NI:[],NE:[],NG:[],NU:[],NF:[],MP:[],NO:["10","11","12","14","15","16","17","18","19","20","30","34","38","42","46","50","54","01","02","03","04","05","06","07","08","09"],OM:[],PK:[],PW:[],PS:[],PA:[],PG:[],PY:[],PE:[],PH:[],PN:[],PL:[],PT:[],PR:[],QA:[],RE:[],RO:[],RU:[],RW:[],BL:[],SH:[],KN:[],LC:[],MF:[],PM:[],VC:[],WS:[],SM:[],SS:[],ST:[],SA:[],SN:[],RS:[],SC:[],SL:[],SG:[],SK:[],SI:[],SB:[],SO:[],ZA:[],GS:[],ES:["A Coruna","Alava","Albacete","Alicante","Almeria","Asturias","Avila","Badajoz","Baleares","Barcelona","Burgos","Caceres","Cadiz","CN","Cantabria","Castellon","Ceuta","Ciudad Real","Cordoba","Cuenca","Gipuzkoa","Girona","Granada","Guadalajara","Guipuzcoa","Huelva","Huesca","Jaen","La Rioja","Las Palmas","Leon","Lleida","Lugo","Madrid","Malaga","Melilla","Murcia","Navarra","Ourense","Palencia","Pontevedra","Salamanca","Santa Cruz de Tenerife","Segovia","Sevilla","Soria","Tarragona","Teruel","Toledo","Valencia","Valladolid","Vizcaya","Zamora","Zaragoza"],LK:[],SD:[],SR:[],SJ:[],SZ:[],SE:[],CH:["AG","AR","AI","BL","BS","BE","FR","GE","GL","GR","JU","LU","NE","NW","OW","SH","SZ","SO","SG","TI","TG","UR","VS","VD","ZH","ZG"],SY:[],TW:[],TJ:[],TZ:[],TH:[],TL:[],TG:[],TK:[],TO:[],TT:[],TN:[],TR:[],TM:[],TC:[],TV:[],UG:[],UA:[],AE:[],GB:[],US:["AL","AK","AS","AZ","AR","AF","AA","AC","AE","AM","AP","CA","CO","CT","DE","DC","FM","FL","GA","GU","HI","ID","IL","IN","IA","KS","KY","LA","ME","MH","MD","MA","MI","MN","MS","MO","MT","NE","NV","NH","NJ","NM","NY","NC","ND","MP","OH","OK","OR","PA","PR","RI","SC","SD","TN","TX","UT","VT","VI","VA","WA","WV","WI","WY"],UM:[],UY:[],UZ:[],VU:[],VE:[],VN:[],VG:[],VI:[],WF:[],EH:[],YE:[],ZM:[],ZW:[]};let s,n,i,d=e=>e;const l=r(e,"address-form");class c extends l{constructor(){super(...arguments),this.__ignoreAddressRestrictionsGetValue=()=>this.form.ignore_address_restrictions?["true"]:[],this.__ignoreAddressRestrictionsSetValue=e=>{this.edit({ignore_address_restrictions:e.includes("true")})},this.__ignoreAddressRestrictionsOptions=[{label:"option_true",value:"true"}],this.__countrySetValue=e=>{this.edit({country:e,region:""})}}static get v8n(){return[({address_name:e})=>e&&e.length>0||"address-name:v8n_required",({address_name:e})=>!e||e.length<=100||"address-name:v8n_too_long",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({region:e})=>!e||e.length<=50||"region:v8n_too_long",({city:e})=>!e||e.length<=50||"city:v8n_too_long",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long",({company:e})=>!e||e.length<=50||"company:v8n_too_long",({address2:e})=>!e||e.length<=100||"address-two:v8n_too_long",({address1:e})=>e&&e.length>0||"address-one:v8n_required",({address1:e})=>!e||e.length<=100||"address-one:v8n_too_long",({postal_code:e})=>!e||e.length<=50||"postal-code:v8n_too_long"]}get hiddenSelector(){var e,r;const o=[super.hiddenSelector.toString()];return(!!(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)||!!(null===(r=this.data)||void 0===r?void 0:r.is_default_billing))&&o.unshift("delete","address-name","header:copy-id"),new t(o.join(" ").trim())}get headerTitleKey(){var e,r;return(null===(e=this.data)||void 0===e?void 0:e.is_default_shipping)?"title_default_shipping":(null===(r=this.data)||void 0===r?void 0:r.is_default_billing)?"title_default_billing":super.headerTitleKey}renderBody(){const e=this.__regionOptions;return o(s||(s=d` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="address-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-one" property="address1"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="address-two" property="address2"> </foxy-internal-text-control> <foxy-internal-select-control infer="country" .options="${0}" .setValue="${0}"> </foxy-internal-select-control> ${0} <foxy-internal-text-control infer="city"></foxy-internal-text-control> <foxy-internal-text-control infer="postal-code"></foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="ignore-address-restrictions" class="col-span-2" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> </div> ${0} `),this.renderHeader(),this.__countryOptions,this.__countrySetValue,e.length>0?o(n||(n=d` <foxy-internal-select-control infer="region" .options="${0}"> </foxy-internal-select-control> `),e):o(i||(i=d`<foxy-internal-text-control infer="region"></foxy-internal-text-control>`)),this.__ignoreAddressRestrictionsGetValue,this.__ignoreAddressRestrictionsSetValue,this.__ignoreAddressRestrictionsOptions,super.renderBody())}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let r;try{r=(await e.json())._embedded["fx:errors"][0].message}catch(r){throw e}throw r.includes("Country is invalid or disallowed by store configuration")?["error:country_banned"]:r.includes("this address name already exists for this customer")?["error:address_name_exists"]:e}}get __countryOptions(){return Object.keys(a).map((e=>({label:this.t(`country_${e.toLowerCase()}`),value:e})))}get __regionOptions(){var e,r;const t=null!==(e=this.form.country)&&void 0!==e?e:"";return(null!==(r=a[t])&&void 0!==r?r:[]).map((e=>({label:this.t(`country_${t.toLowerCase()}_region_${e.toLowerCase()}`),value:e})))}}customElements.define("foxy-address-form",c);export{c as AddressForm};
@@ -1 +1 @@
1
- import"./shared-88a59a2e.js";import"./foxy-nucleon-element.js";import"./shared-7b5bdf0e.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-ada5e9f5.js";import{a as r}from"./shared-ddda911c.js";import{C as s}from"./shared-c782b9fa.js";import{p as o}from"./shared-2f1ced90.js";import{I as i}from"./shared-a715e3e5.js";import{i as a}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let n,l,_,u,c,m,f,h=e=>e;const p=s(r(i,"admin-subscription-card"));class v extends p{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__customerLoaderId="customerLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__customer,r=this.__transactionTemplate,s=this.__priceKey,o=this.__priceOptions,i=this.__summaryOptions,p=this.__summaryKey,v=t(this.data);return d(n||(n=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s text-tertiary"> <div class="flex items-center space-x-s"> <span class="block flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s"> ${0} </span> </div> <div class="truncate text-s ${0}"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} ${0} (${0}) </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()),a(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),i&&p?d(l||(l=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),p,i):d(_||(_=h`&ZeroWidthSpace;`)),o&&s?d(u||(u=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,o):d(c||(c=h`&ZeroWidthSpace;`)),"failed"===v?"text-error":"text-secondary",this.data&&v?d(m||(m=h`<foxy-i18n infer="" key="status_${0}" .options="${0}"></foxy-i18n>`),v,this.data):d(f||(f=h`&ZeroWidthSpace;`)),null==e?void 0:e.first_name,null==e?void 0:e.last_name,null==r?void 0:r.customer_email)}get isBodyReady(){return super.isBodyReady&&!!this.__items&&!!this.__currencyCode&&!!this.__currencyDisplay&&!!this.__customer}get __transactionTemplateHref(){var e,t;const r=this.data;if(!r)return;if("_embedded"in r&&"fx:transaction_template"in r._embedded)return;const s=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction_template"].href)&&void 0!==t?t:"");return s.searchParams.set("zoom","items"),s.toString()}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){const e=this.__transactionTemplate;if(!(null==e?void 0:e.currency_code))return(null==e?void 0:e.template_set_uri)||void 0}get __customerHref(){var e,t,r,s;if(!("fx:customer"in(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})))return null===(s=null===(r=this.data)||void 0===r?void 0:r._links["fx:customer"])||void 0===s?void 0:s.href}get __itemsHref(){const e=this.__transactionTemplate;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:transaction_template"in r._embedded)return r._embedded["fx:transaction_template"];{const r=`#${this.__transactionTemplateLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __customer(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:customer"in r._embedded)return r._embedded["fx:customer"];{const r=`#${this.__customerLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __items(){const e=this.__transactionTemplate;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);return(null==t?void 0:t.data)?{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __summaryOptions(){var e;const{array:t,count:r}=null!==(e=this.__items)&&void 0!==e?e:{};if(t&&r)return{firstItem:t[0],count:r,countMinus1:r-1}}get __summaryKey(){const e=this.__items;if(e)return e.isApproximateCount?"summary_approximate":"summary"}get __currencyCode(){var e,t,r;const s=this.__transactionTemplate;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,o=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,i=o?null==s?void 0:s.values[o]:void 0;if(i)return null===(r=/Currency: ([A-Z]{3})/g.exec(i))||void 0===r?void 0:r[1]}}get __priceOptions(){var t,r;const s=this.__currencyDisplay;if(void 0===s)return;const i=this.__currencyCode;if(void 0===i)return;const a=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===a)return;const d=null===(r=this.data)||void 0===r?void 0:r.frequency;return void 0!==d?e(e({},o(d)),{},{amount:`${a} ${i}`,currencyDisplay:s}):void 0}get __priceKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.frequency;if(t)return"price_"+(".5m"===t?"twice_a_month":"recurring")}}customElements.define("foxy-admin-subscription-card",v);export{v as AdminSubscriptionCard};
1
+ import"./shared-dfe59df6.js";import"./foxy-nucleon-element.js";import"./shared-1b4a3e56.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-ada5e9f5.js";import{a as r}from"./shared-a89e8a07.js";import{C as s}from"./shared-c782b9fa.js";import{p as o}from"./shared-2d3bdc6b.js";import{I as i}from"./shared-160072f2.js";import{i as a}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let n,l,_,u,c,m,f,h=e=>e;const p=s(r(i,"admin-subscription-card"));class v extends p{constructor(){super(...arguments),this.localeCodes=null,this.__transactionTemplateLoaderId="transactionTemplateLoader",this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__customerLoaderId="customerLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{attribute:"locale-codes"}})}renderBody(){const e=this.__customer,r=this.__transactionTemplate,s=this.__priceKey,o=this.__priceOptions,i=this.__summaryOptions,p=this.__summaryKey,v=t(this.data);return d(n||(n=h` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s text-tertiary"> <div class="flex items-center space-x-s"> <span class="block flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s"> ${0} </span> </div> <div class="truncate text-s ${0}"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} ${0} (${0}) </div> </div> `),a(this.__transactionTemplateHref),this.__transactionTemplateLoaderId,(()=>this.requestUpdate()),a(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),a(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),a(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),a(this.__customerHref),this.__customerLoaderId,(()=>this.requestUpdate()),a(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),a(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),i&&p?d(l||(l=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),p,i):d(_||(_=h`&ZeroWidthSpace;`)),o&&s?d(u||(u=h`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,o):d(c||(c=h`&ZeroWidthSpace;`)),"failed"===v?"text-error":"text-secondary",this.data&&v?d(m||(m=h`<foxy-i18n infer="" key="status_${0}" .options="${0}"></foxy-i18n>`),v,this.data):d(f||(f=h`&ZeroWidthSpace;`)),null==e?void 0:e.first_name,null==e?void 0:e.last_name,null==r?void 0:r.customer_email)}get isBodyReady(){return super.isBodyReady&&!!this.__items&&!!this.__currencyCode&&!!this.__currencyDisplay&&!!this.__customer}get __transactionTemplateHref(){var e,t;const r=this.data;if(!r)return;if("_embedded"in r&&"fx:transaction_template"in r._embedded)return;const s=new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:transaction_template"].href)&&void 0!==t?t:"");return s.searchParams.set("zoom","items"),s.toString()}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.__transactionTemplate)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){const e=this.__transactionTemplate;if(!(null==e?void 0:e.currency_code))return(null==e?void 0:e.template_set_uri)||void 0}get __customerHref(){var e,t,r,s;if(!("fx:customer"in(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})))return null===(s=null===(r=this.data)||void 0===r?void 0:r._links["fx:customer"])||void 0===s?void 0:s.href}get __itemsHref(){const e=this.__transactionTemplate;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __transactionTemplate(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:transaction_template"in r._embedded)return r._embedded["fx:transaction_template"];{const r=`#${this.__transactionTemplateLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __customer(){var e,t;const r=this.data;if(r&&"_embedded"in r&&"fx:customer"in r._embedded)return r._embedded["fx:customer"];{const r=`#${this.__customerLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}}get __items(){const e=this.__transactionTemplate;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);return(null==t?void 0:t.data)?{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}:null}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __summaryOptions(){var e;const{array:t,count:r}=null!==(e=this.__items)&&void 0!==e?e:{};if(t&&r)return{firstItem:t[0],count:r,countMinus1:r-1}}get __summaryKey(){const e=this.__items;if(e)return e.isApproximateCount?"summary_approximate":"summary"}get __currencyCode(){var e,t,r;const s=this.__transactionTemplate;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,o=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,i=o?null==s?void 0:s.values[o]:void 0;if(i)return null===(r=/Currency: ([A-Z]{3})/g.exec(i))||void 0===r?void 0:r[1]}}get __priceOptions(){var t,r;const s=this.__currencyDisplay;if(void 0===s)return;const i=this.__currencyCode;if(void 0===i)return;const a=null===(t=this.__transactionTemplate)||void 0===t?void 0:t.total_order;if(void 0===a)return;const d=null===(r=this.data)||void 0===r?void 0:r.frequency;return void 0!==d?e(e({},o(d)),{},{amount:`${a} ${i}`,currencyDisplay:s}):void 0}get __priceKey(){var e;const t=null===(e=this.data)||void 0===e?void 0:e.frequency;if(t)return"price_"+(".5m"===t?"twice_a_month":"recurring")}}customElements.define("foxy-admin-subscription-card",v);export{v as AdminSubscriptionCard};
@@ -1 +1 @@
1
- import"./foxy-transaction.js";import"./shared-3ffa26c1.js";import"./shared-6a65acb4.js";import"./shared-1b627cc5.js";import"./shared-02acac7f.js";import{I as r}from"./shared-3558bfae.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{a as e}from"./shared-049295b7.js";import"./foxy-copy-to-clipboard.js";import"./shared-7b5bdf0e.js";import{_ as t,B as o}from"./shared-7fec42f2.js";import{R as s,a}from"./shared-ddda911c.js";import{h as i,s as n}from"./shared-ba5c42c7.js";import{g as d}from"./shared-ada5e9f5.js";import{i as l}from"./shared-53e42a77.js";import"./foxy-billing-address-card.js";import"./shared-88a59a2e.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-0ea750af.js";import"./shared-a715e3e5.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./foxy-custom-field-form.js";import"./shared-6eebe353.js";import"./shared-1c252319.js";import"./shared-12bab9de.js";import"./shared-03b67a3d.js";import"./shared-2db6b377.js";import"./shared-2c00e6b1.js";import"./shared-21a445d9.js";import"./shared-5fd5805c.js";import"./foxy-custom-field-card.js";import"./shared-5212ef4f.js";import"./shared-bdbdf963.js";import"./shared-c782b9fa.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-12973e93.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./shared-bab2ea2c.js";import"./foxy-webhook-form.js";import"./shared-2ebcaabc.js";import"./shared-264bea6b.js";import"./shared-0993c2f5.js";import"./shared-8dd6f543.js";import"./shared-ab0bbad5.js";import"./shared-13ba9f3a.js";import"./shared-206d3153.js";import"./shared-6ebe5ef5.js";import"./shared-9006bac2.js";import"./shared-cd0ae051.js";import"./shared-90a8d5cf.js";import"./shared-2557c0c4.js";import"./shared-aedaf182.js";import"./shared-ee689ddc.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./foxy-item-card.js";import"./shared-2f1ced90.js";import"./foxy-item-form.js";import"./shared-109cfbba.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-f497cd69.js";import"./shared-3e0b2588.js";import"./shared-cd3cfea5.js";import"./shared-1af6aa1d.js";import"./shared-6540a584.js";import"./shared-2061be9a.js";import"./shared-43e2c3f6.js";import"./shared-b2bd7666.js";let c,m=r=>r;class f extends(s(e)){constructor(){super(...arguments),this.search=null}static get properties(){return t(t({},super.properties),{},{search:{}})}renderControl(){var r,e;const t=this.nucleon;let o;try{const s=new URL(null!==(e=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r._links["fx:sub_token_url"].href)&&void 0!==e?e:"");if(this.search){const r=new URLSearchParams(s.search);s.search=this.search,r.forEach(((r,e)=>s.searchParams.set(e,r)))}o=s.toString()}catch(r){o=void 0}return i(c||(c=m` <div class="leading-xs flex items-center gap-xs"> <foxy-i18n class="truncate min-w-0" infer="" key="label"></foxy-i18n> <span class="text-tertiary"> &bull; </span> <foxy-copy-to-clipboard layout="complete" theme="tertiary-inline" infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="leading-xs block text-xs text-secondary" infer="" key="helper_text"> </foxy-i18n> `),o)}}customElements.define("foxy-internal-admin-subscription-form-link-control",f);let p,u,h=r=>r;customElements.define("foxy-internal-admin-subscription-form-error",class extends e{renderControl(){var r,e;return i(p||(p=h` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),n(u||(u=h`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(e=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===e?void 0:e.error_message)}});let y,x,j,b,v,g,w=r=>r;const _=a(r,"admin-subscription-form");class k extends _{constructor(){super(...arguments),this.uoeSettingsPage=null}static get properties(){return t(t({},super.properties),{},{uoeSettingsPage:{attribute:"uoe-settings-page"}})}get hiddenSelector(){const r=["delete",super.hiddenSelector.toString()],e=this.data;return(null==e?void 0:e.error_message)&&e.past_due_amount||r.unshift("error-message"),(null==e?void 0:e.is_active)||r.unshift("view-action","cancel-action"),new o(r.join(" ").trim())}get headerSubtitleKey(){const r=d(this.data);return r?`subtitle_${r}`:super.headerSubtitleKey}renderBody(){var r,e,t,o,s,a,d,c,m;let f;try{const t=new URL(null!==(e=null===(r=this.data)||void 0===r?void 0:r._links["fx:transactions"].href)&&void 0!==e?e:"");t.searchParams.set("zoom","items"),f=t.toString()}catch(r){f=void 0}const p=null===(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:charge_past_due"])||void 0===o?void 0:o.href,u=null===(s=this.data)||void 0===s?void 0:s.past_due_amount,h=null===(a=this.data)||void 0===a?void 0:a.error_message,_=null===(d=this.data)||void 0===d?void 0:d._embedded["fx:transaction_template"].currency_code;return i(y||(y=w` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="self-service-links"> <foxy-internal-admin-subscription-form-link-control infer="load-in-cart"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="cart=checkout" infer="load-on-checkout"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=next_transaction_date" infer="cancel-at-end-of-billing-period"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=true" infer="cancel-next-day"> </foxy-internal-admin-subscription-form-link-control> <div class="flex items-start leading-xs text-xs text-secondary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="uoe_hint_text"></foxy-i18n> ${0} </p> </div> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),l(_),p&&_&&u?i(x||(x=w` <foxy-internal-post-action-control message-options="${0}" theme="tertiary-inline" infer="charge-past-due" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),JSON.stringify({amount:`${u} ${_}`}),p,(()=>this.refresh())):h&&!u?i(j||(j=w` <details class="leading-xs text-xs text-secondary rounded-b focus-within-ring-2 focus-within-ring-inset focus-within-ring-primary-50" style="--gap:calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"> <summary class="cursor-pointer transition-colors hover-text-body focus-outline-none"> <span class="flex items-start" style="gap:var(--gap)"> ${0} <foxy-i18n infer="" key="error_with_zero_past_due_hint"></foxy-i18n> </span> </summary> <p style="padding-left:calc(1.25em + var(--gap))" class="pt-xs"> <span class="whitespace-pre-line">${0}</span> </p> </details> `),n(b||(b=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),h):"",n(v||(v=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),this.uoeSettingsPage?i(g||(g=w` <a target="_blank" class="inline-block rounded font-medium text-body cursor-pointer hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="uoe_link_text"></foxy-i18n> </a> `),this.uoeSettingsPage):"",this.renderTemplateOrSlot(),l(null===(m=null===(c=this.data)||void 0===c?void 0:c._links)||void 0===m?void 0:m["fx:attributes"].href),l(f),super.renderBody())}}customElements.define("foxy-admin-subscription-form",k);export{k as AdminSubscriptionForm};
1
+ import"./foxy-transaction.js";import"./shared-8530fbae.js";import"./shared-69c7ad04.js";import"./shared-8a743005.js";import"./shared-c16f05d9.js";import{I as r}from"./shared-070211c0.js";import"./foxy-transaction-card.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import{a as e}from"./shared-f7b4a4f6.js";import"./foxy-copy-to-clipboard.js";import"./shared-1b4a3e56.js";import{_ as t,B as o}from"./shared-7fec42f2.js";import{R as s,a}from"./shared-a89e8a07.js";import{h as i,s as n}from"./shared-ba5c42c7.js";import{g as d}from"./shared-ada5e9f5.js";import{i as l}from"./shared-53e42a77.js";import"./foxy-billing-address-card.js";import"./shared-dfe59df6.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./foxy-custom-field-form.js";import"./shared-e126cf44.js";import"./shared-f2be9863.js";import"./shared-3f4549ba.js";import"./shared-6313b188.js";import"./shared-b15efc37.js";import"./shared-3c64ecdd.js";import"./shared-34a7df04.js";import"./shared-5fd5805c.js";import"./foxy-custom-field-card.js";import"./shared-5212ef4f.js";import"./shared-7d1512e1.js";import"./shared-c782b9fa.js";import"./foxy-nucleon-element.js";import"./foxy-shipment-card.js";import"./shared-12973e93.js";import"./foxy-payment-card.js";import"./shared-cf613436.js";import"./foxy-webhook-card.js";import"./shared-bab2ea2c.js";import"./foxy-webhook-form.js";import"./shared-28253ef3.js";import"./shared-48129732.js";import"./shared-1f95aa71.js";import"./shared-ce0df878.js";import"./shared-9bfb584b.js";import"./shared-f3590d20.js";import"./shared-0fa21237.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-e02936f0.js";import"./shared-8a570d01.js";import"./shared-cf6122d9.js";import"./shared-a4871405.js";import"./shared-4388f7ea.js";import"./shared-d0aed1c1.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import"./foxy-address-form.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-item-card.js";import"./shared-2d3bdc6b.js";import"./foxy-item-form.js";import"./shared-f2e8070b.js";import"./foxy-form-dialog.js";import"./shared-53e476fd.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-customer-card.js";import"./foxy-swipe-actions.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-acee789f.js";import"./shared-fa482a7d.js";import"./shared-0fb90a71.js";import"./shared-a0fbe3ef.js";import"./shared-140c6b70.js";import"./shared-2061be9a.js";import"./shared-43e2c3f6.js";import"./shared-db50afd9.js";let m,c=r=>r;class f extends(s(e)){constructor(){super(...arguments),this.search=null}static get properties(){return t(t({},super.properties),{},{search:{}})}renderControl(){var r,e;const t=this.nucleon;let o;try{const s=new URL(null!==(e=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r._links["fx:sub_token_url"].href)&&void 0!==e?e:"");if(this.search){const r=new URLSearchParams(s.search);s.search=this.search,r.forEach(((r,e)=>s.searchParams.set(e,r)))}o=s.toString()}catch(r){o=void 0}return i(m||(m=c` <div class="leading-xs flex items-center gap-xs"> <foxy-i18n class="truncate min-w-0" infer="" key="label"></foxy-i18n> <span class="text-tertiary"> &bull; </span> <foxy-copy-to-clipboard layout="complete" theme="tertiary-inline" infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> </div> <foxy-i18n class="leading-xs block text-xs text-secondary" infer="" key="helper_text"> </foxy-i18n> `),o)}}customElements.define("foxy-internal-admin-subscription-form-link-control",f);let p,u,h=r=>r;customElements.define("foxy-internal-admin-subscription-form-error",class extends e{renderControl(){var r,e;return i(p||(p=h` <p class="flex items-start gap-ds p-ds rounded border border-error-50" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <span>${0}</span> </p> `),n(u||(u=h`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" class="flex-shrink-0 text-error" style="width: 1.25em"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>`)),null===(e=null===(r=this.nucleon)||void 0===r?void 0:r.data)||void 0===e?void 0:e.error_message)}});let y,x,j,b,v,g,w=r=>r;const _=a(r,"admin-subscription-form");class k extends _{constructor(){super(...arguments),this.uoeSettingsPage=null}static get properties(){return t(t({},super.properties),{},{uoeSettingsPage:{attribute:"uoe-settings-page"}})}get hiddenSelector(){const r=["delete",super.hiddenSelector.toString()],e=this.data;return(null==e?void 0:e.error_message)&&e.past_due_amount||r.unshift("error-message"),(null==e?void 0:e.is_active)||r.unshift("view-action","cancel-action"),new o(r.join(" ").trim())}get headerSubtitleKey(){const r=d(this.data);return r?`subtitle_${r}`:super.headerSubtitleKey}renderBody(){var r,e,t,o,s,a,d,m,c;let f;try{const t=new URL(null!==(e=null===(r=this.data)||void 0===r?void 0:r._links["fx:transactions"].href)&&void 0!==e?e:"");t.searchParams.set("zoom","items"),f=t.toString()}catch(r){f=void 0}const p=null===(o=null===(t=this.data)||void 0===t?void 0:t._links["fx:charge_past_due"])||void 0===o?void 0:o.href,u=null===(s=this.data)||void 0===s?void 0:s.past_due_amount,h=null===(a=this.data)||void 0===a?void 0:a.error_message,_=null===(d=this.data)||void 0===d?void 0:d._embedded["fx:transaction_template"].currency_code;return i(y||(y=w` ${0} <foxy-internal-admin-subscription-form-error infer="error-message"> </foxy-internal-admin-subscription-form-error> <foxy-internal-summary-control infer="general"> <foxy-internal-date-control layout="summary-item" infer="start-date"> </foxy-internal-date-control> <foxy-internal-frequency-control layout="summary-item" infer="frequency" allow-twice-a-month> </foxy-internal-frequency-control> <foxy-internal-date-control layout="summary-item" infer="next-transaction-date"> </foxy-internal-date-control> <foxy-internal-date-control layout="summary-item" infer="end-date"> </foxy-internal-date-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="overdue"> <foxy-internal-number-control layout="summary-item" suffix="${0}" infer="past-due-amount" min="0"> </foxy-internal-number-control> ${0} </foxy-internal-summary-control> <foxy-internal-summary-control infer="self-service-links"> <foxy-internal-admin-subscription-form-link-control infer="load-in-cart"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="cart=checkout" infer="load-on-checkout"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=next_transaction_date" infer="cancel-at-end-of-billing-period"> </foxy-internal-admin-subscription-form-link-control> <foxy-internal-admin-subscription-form-link-control search="sub_cancel=true" infer="cancel-next-day"> </foxy-internal-admin-subscription-form-link-control> <div class="flex items-start leading-xs text-xs text-secondary" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <p> <foxy-i18n infer="" key="uoe_hint_text"></foxy-i18n> ${0} </p> </div> </foxy-internal-summary-control> ${0} <foxy-internal-async-list-control infer="attributes" class="min-w-0" first="${0}" item="foxy-attribute-card" form="foxy-attribute-form" alert> </foxy-internal-async-list-control> <foxy-internal-async-list-control infer="transactions" class="min-w-0" first="${0}" item="foxy-transaction-card" form="foxy-transaction" hide-create-button hide-delete-button alert wide> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),l(_),p&&_&&u?i(x||(x=w` <foxy-internal-post-action-control message-options="${0}" theme="tertiary-inline" infer="charge-past-due" href="${0}" @success="${0}"> </foxy-internal-post-action-control> `),JSON.stringify({amount:`${u} ${_}`}),p,(()=>this.refresh())):h&&!u?i(j||(j=w` <details class="leading-xs text-xs text-secondary rounded-b focus-within-ring-2 focus-within-ring-inset focus-within-ring-primary-50" style="--gap:calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"> <summary class="cursor-pointer transition-colors hover-text-body focus-outline-none"> <span class="flex items-start" style="gap:var(--gap)"> ${0} <foxy-i18n infer="" key="error_with_zero_past_due_hint"></foxy-i18n> </span> </summary> <p style="padding-left:calc(1.25em + var(--gap))" class="pt-xs"> <span class="whitespace-pre-line">${0}</span> </p> </details> `),n(b||(b=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),h):"",n(v||(v=w`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" class="flex-shrink-0" style="width: 1.25em"><path fill-rule="evenodd" d="M15 8A7 7 0 1 1 1 8a7 7 0 0 1 14 0ZM9 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM6.75 8a.75.75 0 0 0 0 1.5h.75v1.75a.75.75 0 0 0 1.5 0v-2.5A.75.75 0 0 0 8.25 8h-1.5Z" clip-rule="evenodd" /></svg>`)),this.uoeSettingsPage?i(g||(g=w` <a target="_blank" class="inline-block rounded font-medium text-body cursor-pointer hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="uoe_link_text"></foxy-i18n> </a> `),this.uoeSettingsPage):"",this.renderTemplateOrSlot(),l(null===(c=null===(m=this.data)||void 0===m?void 0:m._links)||void 0===c?void 0:c["fx:attributes"].href),l(f),super.renderBody())}}customElements.define("foxy-admin-subscription-form",k);export{k as AdminSubscriptionForm};
@@ -1,4 +1,4 @@
1
- import"./shared-8dd6f543.js";import"./shared-2db6b377.js";import"./shared-76c608e2.js";import"./shared-80dafe85.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-7b5bdf0e.js";import{I as t}from"./shared-3558bfae.js";import"./shared-21a445d9.js";import"./foxy-copy-to-clipboard.js";import"./foxy-swipe-actions.js";import{_ as e}from"./shared-7fec42f2.js";import{a as s,T as r}from"./shared-ddda911c.js";import{c as i}from"./shared-4e709717.js";import{c as o,h as n}from"./shared-ba5c42c7.js";import{C as a}from"./shared-c782b9fa.js";import{N as h}from"./shared-da95bb48.js";import"./shared-12bab9de.js";import"./shared-3e3c5095.js";import"./shared-2c00e6b1.js";import"./shared-0993c2f5.js";import"./shared-ab0bbad5.js";import"./shared-03b67a3d.js";import"./shared-be7af87f.js";import"./foxy-spinner.js";import"./shared-0ea750af.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-13ba9f3a.js";import"./shared-049295b7.js";import"./shared-5212ef4f.js";import"./shared-1b627cc5.js";import"./shared-f497cd69.js";import"./shared-206d3153.js";import"./shared-6ebe5ef5.js";import"./shared-9006bac2.js";import"./shared-cd0ae051.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./shared-bab2ea2c.js";import"./shared-2557c0c4.js";import"./shared-aedaf182.js";let d,l,c,p,f,m,u,_,b,y,g,v,x,$=t=>t;const j=Symbol(),w=Symbol();class k extends(s(t)){constructor(){super(...arguments),this.open=!1}static get properties(){return e(e({},super.properties),{},{open:{type:Boolean,reflect:!0}})}static get styles(){return[...super.styles,o(d||(d=$`.resource{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr));grid-gap:1px}.resource>:first-child{grid-column-start:1;grid-column-end:-2}foxy-internal-source-control::part(editor){border-radius:0;max-height:none;box-shadow:none;border:none}foxy-internal-source-control::part(helper-text),foxy-internal-source-control::part(label){position:absolute;width:1px;height:1px;padding-top:0;margin-top:-1px;overflow-x:hidden;overflow-y:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-top-width:0}`))]}static get v8n(){return[...super.v8n,t=>"string"!=typeof t[j]||"invalid_json"]}renderBody(){return n(l||(l=$` <details class="select-none rounded-t-l rounded-b-l overflow-hidden border border-contrast-10" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center space-x-s p-s pr-m transition-colors cursor-pointer bg-contrast-5 hover-bg-contrast-10"> <foxy-copy-to-clipboard infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> <span class="font-medium truncate">${0}</span> <span class="flex-1"></span> ${0} ${0} ${0} </div> </summary> ${0} </details> `),this.open,(t=>{const e=t.currentTarget;this.open=e.open}),i({"ring-inset ring-primary-50 rounded-t-l":!0,"focus-outline-none focus-ring-2":!0,"rounded-b-l":!this.open}),this.href||this.parent,this.__renderTitle(),this.in({idle:{snapshot:"dirty"}})||this.in({idle:"template"})?n(c||(c=$` <foxy-internal-submit-control infer="${0}" theme="tertiary-inline success"> </foxy-internal-submit-control> `),this.href?"submit":"create"):"",this.in({idle:{snapshot:"dirty"}})||this.in({idle:{template:"dirty"}})?n(p||(p=$` <vaadin-button data-testid="undo" theme="tertiary-inline contrast" class="px-xs" @click="${0}"> <foxy-i18n infer="" key="undo"></foxy-i18n> </vaadin-button> `),(()=>this.undo())):"",this.in({idle:"snapshot"})?n(f||(f=$` <foxy-internal-delete-control infer="delete" theme="tertiary-inline error"> </foxy-internal-delete-control> `)):"",this.open?this.__renderForm():"")}async _fetch(...t){var e;try{const s=t[0]instanceof Request?t[0]:new Request(...t);if("POST"!==s.method)return await super._fetch(...t);const r=null!==(e=this.form[w])&&void 0!==e?e:JSON.stringify(this.form);return await super._fetch(s.url,{method:"POST",body:r})}catch(t){throw["invalid_json"]}}__renderTitle(){if(!this.href)return n(m||(m=$` <span class="text-tertiary">POST</span> <span>${0}</span> `),this.parent);let t="",e="",s="";try{const r=new URL(this.href);t=r.pathname,t.startsWith("/")&&(t=t.substring(1));const i=t.split("/");t=i.slice(0,i.length-1).join("/"),i.length>1&&(t=`${t}/`,e=i[i.length-1]),s=r.search}catch(e){t=this.href}return n(u||(u=$` ${0} `),[n(_||(_=$`<span>${0}</span>`),t),n(b||(b=$`<span class="text-primary">${0}</span>`),e),n(y||(y=$`<span class="text-tertiary">${0}</span>`),s)])}__renderForm(){return n(g||(g=$` <div class="bg-base"> <div class="${0} border-t border-contrast-5 bg-contrast-10"> <foxy-internal-source-control infer="editor" class="flex-1 bg-base" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> ${0} </div> </div> `),this.data?"resource":"",(()=>this.__formAsString),(t=>this.__formAsString=t),this.data?n(v||(v=$` <div class="bg-base"> <ul class="bg-contrast-5 p-xs h-full"> ${0} </ul> </div> `),this.__links.map((([t,e])=>this.__renderLink(t,e.href,e.title)))):"")}get __links(){var t,e;const s=Object.entries(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links)&&void 0!==e?e:{}).filter((([t,e])=>"self"!==t&&!Array.isArray(e)&&!e.templated));try{s.sort((([t],[e])=>t.localeCompare(e,this.lang)))}catch(t){s.sort((([t],[e])=>t.localeCompare(e)))}return s}get __formAsString(){const t=this.form,e=t[w],s=t[j];return"string"==typeof s?s:"string"==typeof e?e:JSON.stringify(t,((t,e)=>t.startsWith("_")?void 0:e),2)}set __formAsString(t){this.undo();try{const e=JSON.parse(t);"object"==typeof e&&this.edit(e),this.edit({[w]:t})}catch(e){this.edit({[j]:t})}}__renderLink(t,e,s){return n(x||(x=$` <li data-testclass="link" class="m-xs rounded overflow-hidden transition-colors hover-bg-contrast-5"> <foxy-swipe-actions> <button class="${0}" @click="${0}"> <div class="flex items-center"> <div class="flex-1 space-y-xs px-s min-w-0 text-s"> <div class="truncate font-medium">${0}</div> <div class="opacity-75 truncate">${0}</div> </div> <iron-icon class="icon-inline text-xl text-tertiary mr-s flex-shrink-0" icon="icons:chevron-right"> </iron-icon> </div> </button> <div slot="action" class="h-full flex"> <vaadin-button theme="secondary success" class="h-full rounded-none" @click="${0}"> POST </vaadin-button> </div> </foxy-swipe-actions> </li> `),i({"rounded leading-none space-y-xs block text-left w-full py-s":!0,"ring-inset ring-primary-50":!0,"focus-outline-none focus-ring-2 ":!0}),(()=>{const t=new CustomEvent("navigate:get",{bubbles:!0,detail:e});this.dispatchEvent(t)}),s||e,t,(()=>{const t=new CustomEvent("navigate:post",{bubbles:!0,detail:e});this.dispatchEvent(t)}))}}customElements.define("foxy-internal-api-browser-resource-form",k);let C,S,E,T,U,O,B,P,A,G=t=>t;const H=a(r(s(h,"api-browser")));class R extends H{constructor(){super(...arguments),this.home=null,this.__newCurrentUrl=null,this.__history=[],this.__renderItem=({href:t,html:e})=>t?e(S||(S=G`
1
+ import"./shared-ce0df878.js";import"./shared-b15efc37.js";import"./shared-9884fb7d.js";import"./shared-ad8d209a.js";import"./foxy-collection-page.js";import"./foxy-pagination.js";import"./shared-1b4a3e56.js";import{I as t}from"./shared-070211c0.js";import"./shared-34a7df04.js";import"./foxy-copy-to-clipboard.js";import"./foxy-swipe-actions.js";import{_ as e}from"./shared-7fec42f2.js";import{a as s,T as r}from"./shared-a89e8a07.js";import{c as i}from"./shared-4e709717.js";import{c as o,h as n}from"./shared-ba5c42c7.js";import{C as a}from"./shared-c782b9fa.js";import{N as h}from"./shared-da95bb48.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-3c64ecdd.js";import"./shared-1f95aa71.js";import"./shared-9bfb584b.js";import"./shared-6313b188.js";import"./shared-d3f37507.js";import"./foxy-spinner.js";import"./shared-0ea750af.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-f3590d20.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-8a743005.js";import"./shared-acee789f.js";import"./shared-0fa21237.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-e02936f0.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./shared-bab2ea2c.js";import"./shared-cf6122d9.js";import"./shared-a4871405.js";let l,d,c,p,f,m,u,_,b,y,g,v,x,$=t=>t;const j=Symbol(),w=Symbol();class k extends(s(t)){constructor(){super(...arguments),this.open=!1}static get properties(){return e(e({},super.properties),{},{open:{type:Boolean,reflect:!0}})}static get styles(){return[...super.styles,o(l||(l=$`.resource{display:grid;grid-template-columns:repeat(auto-fill,minmax(calc(18.75 * var(--lumo-space-m)),1fr));grid-gap:1px}.resource>:first-child{grid-column-start:1;grid-column-end:-2}foxy-internal-source-control::part(editor){border-radius:0;max-height:none;box-shadow:none;border:none}foxy-internal-source-control::part(helper-text),foxy-internal-source-control::part(label){position:absolute;width:1px;height:1px;padding-top:0;margin-top:-1px;overflow-x:hidden;overflow-y:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-top-width:0}`))]}static get v8n(){return[...super.v8n,t=>"string"!=typeof t[j]||"invalid_json"]}renderBody(){return n(d||(d=$` <details class="select-none rounded-t-l rounded-b-l overflow-hidden border border-contrast-10" ?open="${0}" @toggle="${0}"> <summary class="${0}"> <div class="flex items-center space-x-s p-s pr-m transition-colors cursor-pointer bg-contrast-5 hover-bg-contrast-10"> <foxy-copy-to-clipboard infer="copy-to-clipboard" text="${0}"> </foxy-copy-to-clipboard> <span class="font-medium truncate">${0}</span> <span class="flex-1"></span> ${0} ${0} ${0} </div> </summary> ${0} </details> `),this.open,(t=>{const e=t.currentTarget;this.open=e.open}),i({"ring-inset ring-primary-50 rounded-t-l":!0,"focus-outline-none focus-ring-2":!0,"rounded-b-l":!this.open}),this.href||this.parent,this.__renderTitle(),this.in({idle:{snapshot:"dirty"}})||this.in({idle:"template"})?n(c||(c=$` <foxy-internal-submit-control infer="${0}" theme="tertiary-inline success"> </foxy-internal-submit-control> `),this.href?"submit":"create"):"",this.in({idle:{snapshot:"dirty"}})||this.in({idle:{template:"dirty"}})?n(p||(p=$` <vaadin-button data-testid="undo" theme="tertiary-inline contrast" class="px-xs" @click="${0}"> <foxy-i18n infer="" key="undo"></foxy-i18n> </vaadin-button> `),(()=>this.undo())):"",this.in({idle:"snapshot"})?n(f||(f=$` <foxy-internal-delete-control infer="delete" theme="tertiary-inline error"> </foxy-internal-delete-control> `)):"",this.open?this.__renderForm():"")}async _fetch(...t){var e;try{const s=t[0]instanceof Request?t[0]:new Request(...t);if("POST"!==s.method)return await super._fetch(...t);const r=null!==(e=this.form[w])&&void 0!==e?e:JSON.stringify(this.form);return await super._fetch(s.url,{method:"POST",body:r})}catch(t){throw["invalid_json"]}}__renderTitle(){if(!this.href)return n(m||(m=$` <span class="text-tertiary">POST</span> <span>${0}</span> `),this.parent);let t="",e="",s="";try{const r=new URL(this.href);t=r.pathname,t.startsWith("/")&&(t=t.substring(1));const i=t.split("/");t=i.slice(0,i.length-1).join("/"),i.length>1&&(t=`${t}/`,e=i[i.length-1]),s=r.search}catch(e){t=this.href}return n(u||(u=$` ${0} `),[n(_||(_=$`<span>${0}</span>`),t),n(b||(b=$`<span class="text-primary">${0}</span>`),e),n(y||(y=$`<span class="text-tertiary">${0}</span>`),s)])}__renderForm(){return n(g||(g=$` <div class="bg-base"> <div class="${0} border-t border-contrast-5 bg-contrast-10"> <foxy-internal-source-control infer="editor" class="flex-1 bg-base" .getValue="${0}" .setValue="${0}"> </foxy-internal-source-control> ${0} </div> </div> `),this.data?"resource":"",(()=>this.__formAsString),(t=>this.__formAsString=t),this.data?n(v||(v=$` <div class="bg-base"> <ul class="bg-contrast-5 p-xs h-full"> ${0} </ul> </div> `),this.__links.map((([t,e])=>this.__renderLink(t,e.href,e.title)))):"")}get __links(){var t,e;const s=Object.entries(null!==(e=null===(t=this.data)||void 0===t?void 0:t._links)&&void 0!==e?e:{}).filter((([t,e])=>"self"!==t&&!Array.isArray(e)&&!e.templated));try{s.sort((([t],[e])=>t.localeCompare(e,this.lang)))}catch(t){s.sort((([t],[e])=>t.localeCompare(e)))}return s}get __formAsString(){const t=this.form,e=t[w],s=t[j];return"string"==typeof s?s:"string"==typeof e?e:JSON.stringify(t,((t,e)=>t.startsWith("_")?void 0:e),2)}set __formAsString(t){this.undo();try{const e=JSON.parse(t);"object"==typeof e&&this.edit(e),this.edit({[w]:t})}catch(e){this.edit({[j]:t})}}__renderLink(t,e,s){return n(x||(x=$` <li data-testclass="link" class="m-xs rounded overflow-hidden transition-colors hover-bg-contrast-5"> <foxy-swipe-actions> <button class="${0}" @click="${0}"> <div class="flex items-center"> <div class="flex-1 space-y-xs px-s min-w-0 text-s"> <div class="truncate font-medium">${0}</div> <div class="opacity-75 truncate">${0}</div> </div> <iron-icon class="icon-inline text-xl text-tertiary mr-s flex-shrink-0" icon="icons:chevron-right"> </iron-icon> </div> </button> <div slot="action" class="h-full flex"> <vaadin-button theme="secondary success" class="h-full rounded-none" @click="${0}"> POST </vaadin-button> </div> </foxy-swipe-actions> </li> `),i({"rounded leading-none space-y-xs block text-left w-full py-s":!0,"ring-inset ring-primary-50":!0,"focus-outline-none focus-ring-2 ":!0}),(()=>{const t=new CustomEvent("navigate:get",{bubbles:!0,detail:e});this.dispatchEvent(t)}),s||e,t,(()=>{const t=new CustomEvent("navigate:post",{bubbles:!0,detail:e});this.dispatchEvent(t)}))}}customElements.define("foxy-internal-api-browser-resource-form",k);let C,S,E,T,U,O,B,P,A,G=t=>t;const H=a(r(s(h,"api-browser")));class R extends H{constructor(){super(...arguments),this.home=null,this.__newCurrentUrl=null,this.__history=[],this.__renderItem=({href:t,html:e})=>t?e(S||(S=G`
2
2
  <foxy-internal-api-browser-resource-form infer="" href=${0}>
3
3
  </foxy-internal-api-browser-resource-form>
4
4
  `),t):e(C||(C=G``)),this.__handleExistingResourceFetch=t=>{"DELETE"===t.request.method&&(t.preventDefault(),t.respondWith(new R.API(this).fetch(t.request).then((t=>(t.ok&&(this.__canGoBack?this.__goBack():this.__canGoHome?this.__goHome():(this.parent="",this.href="")),t)))))}}static get properties(){return e(e({},super.properties),{},{__newCurrentUrl:{attribute:!1},__history:{attribute:!1},home:{type:String}})}render(){var t;return n(E||(E=G` <div class="space-y-m"> <div class="flex items-center gap-s flex-wrap-reverse"> <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:arrow-back"></iron-icon> </vaadin-button> <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:home"></iron-icon> </vaadin-button> <vaadin-text-field placeholder="https://api.foxy.io/stores/0" aria-label="${0}" class="flex-1" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} <div class="grid grid-cols-2"> <vaadin-button title="${0}" theme="${0}" class="rounded-r-none p-0" ?disabled="${0}" @click="${0}"> GET </vaadin-button> <vaadin-button title="${0}" theme="${0}" class="rounded-l-none p-0" ?disabled="${0}" @click="${0}"> POST </vaadin-button> </div> </div> <div @navigate:get="${0}" @navigate:post="${0}"> ${0} </div> </div> `),this.t("go_back"),this.disabled||!this.__canGoBack,(()=>this.__goBack()),this.t("go_home"),this.disabled||!this.__canGoHome,(()=>this.__goHome()),this.t("current_url"),this.disabled,this.readonly,this.__newCurrentUrl||this.href||this.parent,(t=>"Enter"===t.key&&this.__go()),(t=>{const e=t.currentTarget;this.__newCurrentUrl=e.value}),this.__newCurrentUrl?n(T||(T=G` <vaadin-button title="${0}" theme="icon primary" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:arrow-forward"></iron-icon> </vaadin-button> `),this.t("navigate"),this.disabled||this.in("busy"),this.__go):n(U||(U=G` <vaadin-button title="${0}" theme="icon contrast" class="p-0" ?disabled="${0}" @click="${0}"> <iron-icon class="icon-inline text-m" icon="icons:refresh"></iron-icon> </vaadin-button> `),this.t("refresh"),this.disabled||this.in("busy"),(()=>this.refresh())),this.t("get_mode"),this.href?"contrast primary":"contrast",this.disabled||"get"===this.__mode,(()=>this.__mode="get"),this.t("post_mode"),this.href?"contrast":"contrast primary",this.disabled||"post"===this.__mode,(()=>this.__mode="post"),(t=>{t.stopPropagation(),this.__history.push({href:this.href,parent:this.parent}),this.__newCurrentUrl=null,this.parent="",this.href=t.detail}),(t=>{t.stopPropagation(),this.__history.push({href:this.href,parent:this.parent}),this.__newCurrentUrl=null,this.parent=t.detail,this.href=""}),this.href?n(O||(O=G` ${0} `),(null===(t=this.data)||void 0===t?void 0:t._links.first)?n(B||(B=G` <foxy-pagination first="${0}" infer=""> <foxy-collection-page class="block space-y-m mb-m" infer="" .item="${0}"> </foxy-collection-page> </foxy-pagination> `),this.href,this.__renderItem):n(P||(P=G` <foxy-internal-api-browser-resource-form infer="" href="${0}" open @fetch="${0}"> </foxy-internal-api-browser-resource-form> `),this.href,this.__handleExistingResourceFetch)):n(A||(A=G` <foxy-internal-api-browser-resource-form infer="" parent="${0}" open @update="${0}"> </foxy-internal-api-browser-resource-form> `),this.parent,(t=>{const e=t.currentTarget;e.in({idle:"snapshot"})&&(this.href=e.data._links.self.href,this.parent="")})))}get __canGoBack(){return this.__history.length>0}get __canGoHome(){return this.href!==this.home}get __mode(){return this.href?"get":"post"}set __mode(t){"get"===t?(this.href=this.parent,this.parent=""):(this.parent=this.href,this.href="")}__goBack(){var t,e;const s=this.__history.length-1,r=this.__history[s];this.parent=null!==(t=null==r?void 0:r.parent)&&void 0!==t?t:"",this.href=null!==(e=null==r?void 0:r.href)&&void 0!==e?e:"",this.__history=this.__history.slice(0,s)}__goHome(){var t;this.__history=[],this.parent="",this.href=null!==(t=this.home)&&void 0!==t?t:""}__go(){if("string"==typeof this.__newCurrentUrl){this.__history.push({href:this.href,parent:this.parent});this[this.href?"href":"parent"]=this.__newCurrentUrl,this.__newCurrentUrl=null}}}customElements.define("foxy-api-browser",R);export{R as ApiBrowser};
@@ -1 +1 @@
1
- import"./shared-88a59a2e.js";import"./foxy-nucleon-element.js";import{a as e}from"./shared-ddda911c.js";import{T as r}from"./shared-bdbdf963.js";import{i as o}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-7b5bdf0e.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-a715e3e5.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";let d,a,t,i=e=>e;const p=e(r,"applied-coupon-code-card");class n extends p{constructor(){super(...arguments),this.__couponLoaderId="couponLoader"}renderBody(){var e;return s(d||(d=i` <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(null===(e=this.data)||void 0===e?void 0:e._links["fx:coupon"].href),this.__couponLoaderId,(()=>this.requestUpdate()),super.renderBody({title:e=>s(a||(a=i`${0}`),e.code),subtitle:()=>{var e;return s(t||(t=i`${0}`),null===(e=this.__coupon)||void 0===e?void 0:e.name)}}))}get isBodyReady(){return super.isBodyReady&&!!this.__coupon}get __couponLoader(){return this.renderRoot.querySelector(`#${this.__couponLoaderId}`)}get __coupon(){var e;return null===(e=this.__couponLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-applied-coupon-code-card",n);export{n as AppliedCouponCodeCard};
1
+ import"./shared-dfe59df6.js";import"./foxy-nucleon-element.js";import{a as e}from"./shared-a89e8a07.js";import{T as r}from"./shared-7d1512e1.js";import{i as o}from"./shared-53e42a77.js";import{h as s}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-1b4a3e56.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-c782b9fa.js";let d,a,t,i=e=>e;const p=e(r,"applied-coupon-code-card");class n extends p{constructor(){super(...arguments),this.__couponLoaderId="couponLoader"}renderBody(){var e;return s(d||(d=i` <foxy-nucleon infer="" class="hidden" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> ${0} `),o(null===(e=this.data)||void 0===e?void 0:e._links["fx:coupon"].href),this.__couponLoaderId,(()=>this.requestUpdate()),super.renderBody({title:e=>s(a||(a=i`${0}`),e.code),subtitle:()=>{var e;return s(t||(t=i`${0}`),null===(e=this.__coupon)||void 0===e?void 0:e.name)}}))}get isBodyReady(){return super.isBodyReady&&!!this.__coupon}get __couponLoader(){return this.renderRoot.querySelector(`#${this.__couponLoaderId}`)}get __coupon(){var e;return null===(e=this.__couponLoader)||void 0===e?void 0:e.data}}customElements.define("foxy-applied-coupon-code-card",n);export{n as AppliedCouponCodeCard};
@@ -1 +1 @@
1
- import"./shared-6eebe353.js";import"./shared-ee689ddc.js";import{I as e}from"./shared-3558bfae.js";import{a as r}from"./shared-ddda911c.js";import{B as s}from"./shared-7fec42f2.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-1c252319.js";import"./shared-12bab9de.js";import"./shared-3e3c5095.js";import"./shared-03b67a3d.js";import"./shared-2db6b377.js";import"./shared-2c00e6b1.js";import"./shared-be7af87f.js";import"./shared-049295b7.js";import"./shared-5212ef4f.js";import"./shared-7b5bdf0e.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-8dd6f543.js";import"./shared-0993c2f5.js";import"./shared-ab0bbad5.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./foxy-copy-to-clipboard.js";import"./shared-2557c0c4.js";import"./shared-80dafe85.js";import"./shared-aedaf182.js";import"./shared-76c608e2.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let o,a,i=e=>e;const d=r(e,"applied-coupon-code-form");class p extends d{constructor(){super(...arguments),this.__ignoreUsageLimitsOptions=[{value:"checked",label:"option_checked"}],this.__getIgnoreUsageLimitsValue=()=>this.form.ignore_usage_limits?["checked"]:[],this.__setIgnoreUsageLimitsValue=e=>{this.edit({ignore_usage_limits:e.includes("checked")})}}static get v8n(){return[({code:e})=>!!e||"code:v8n_required"]}get readonlySelector(){return this.data?new s("not=delete"):super.readonlySelector}get hiddenSelector(){return new s(`timestamps ${super.hiddenSelector}`)}renderBody(){return t(o||(o=i` ${0} <foxy-internal-text-control helper-text="${0}" infer="code"> </foxy-internal-text-control> ${0} ${0} `),this.renderHeader(),this.t(this.data?"code.helper_text_existing":"code.helper_text_new"),this.data?"":t(a||(a=i` <foxy-internal-checkbox-group-control infer="ignore-usage-limits" class="-my-xs" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__getIgnoreUsageLimitsValue,this.__setIgnoreUsageLimitsValue,this.__ignoreUsageLimitsOptions),super.renderBody())}}customElements.define("foxy-applied-coupon-code-form",p);export{p as AppliedCouponCodeForm};
1
+ import"./shared-e126cf44.js";import"./shared-4388f7ea.js";import{I as e}from"./shared-070211c0.js";import{a as r}from"./shared-a89e8a07.js";import{B as s}from"./shared-7fec42f2.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-f2be9863.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-b15efc37.js";import"./shared-3c64ecdd.js";import"./shared-d3f37507.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-1b4a3e56.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-ce0df878.js";import"./shared-1f95aa71.js";import"./shared-9bfb584b.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-copy-to-clipboard.js";import"./shared-cf6122d9.js";import"./shared-ad8d209a.js";import"./shared-a4871405.js";import"./shared-9884fb7d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let o,a,i=e=>e;const d=r(e,"applied-coupon-code-form");class p extends d{constructor(){super(...arguments),this.__ignoreUsageLimitsOptions=[{value:"checked",label:"option_checked"}],this.__getIgnoreUsageLimitsValue=()=>this.form.ignore_usage_limits?["checked"]:[],this.__setIgnoreUsageLimitsValue=e=>{this.edit({ignore_usage_limits:e.includes("checked")})}}static get v8n(){return[({code:e})=>!!e||"code:v8n_required"]}get readonlySelector(){return this.data?new s("not=delete"):super.readonlySelector}get hiddenSelector(){return new s(`timestamps ${super.hiddenSelector}`)}renderBody(){return t(o||(o=i` ${0} <foxy-internal-text-control helper-text="${0}" infer="code"> </foxy-internal-text-control> ${0} ${0} `),this.renderHeader(),this.t(this.data?"code.helper_text_existing":"code.helper_text_new"),this.data?"":t(a||(a=i` <foxy-internal-checkbox-group-control infer="ignore-usage-limits" class="-my-xs" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> `),this.__getIgnoreUsageLimitsValue,this.__setIgnoreUsageLimitsValue,this.__ignoreUsageLimitsOptions),super.renderBody())}}customElements.define("foxy-applied-coupon-code-form",p);export{p as AppliedCouponCodeForm};
@@ -1 +1 @@
1
- import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-7b5bdf0e.js";import{h as r}from"./shared-ba5c42c7.js";import{a as s}from"./shared-ddda911c.js";import{T as e}from"./shared-bdbdf963.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-a715e3e5.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,t,i=r=>r;class o extends(s(e,"applied-tax-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(a||(a=i`${0}`),s.name),subtitle:s=>r(t||(t=i` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> <span>&bull;</span> <foxy-i18n options="${0}" lang="${0}" key="percent" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:`${s.amount} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),this.lang,this.ns,JSON.stringify({fraction:s.rate/100}),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-applied-tax-card",o);export{o as AppliedTaxCard};
1
+ import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import{h as r}from"./shared-ba5c42c7.js";import{a as s}from"./shared-a89e8a07.js";import{T as e}from"./shared-7d1512e1.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-160072f2.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,t,i=r=>r;class o extends(s(e,"applied-tax-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}renderBody(){return super.renderBody({title:s=>r(a||(a=i`${0}`),s.name),subtitle:s=>r(t||(t=i` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> <span>&bull;</span> <foxy-i18n options="${0}" lang="${0}" key="percent" ns="${0}"> </foxy-i18n> `),JSON.stringify({amount:`${s.amount} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),this.lang,this.ns,JSON.stringify({fraction:s.rate/100}),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-applied-tax-card",o);export{o as AppliedTaxCard};
@@ -1 +1 @@
1
- import"./shared-76c608e2.js";import"./shared-80dafe85.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{h as e}from"./shared-ba5c42c7.js";import{C as t}from"./shared-c782b9fa.js";import{N as s}from"./shared-da95bb48.js";import{R as i,a as r,T as a}from"./shared-ddda911c.js";import{c as n}from"./shared-4e709717.js";import"./shared-3e3c5095.js";import"./shared-be7af87f.js";import"./shared-7b5bdf0e.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let d,o,l,m,c,h,p=e=>e;const f=i(r(t(a(s)),"attribute-card"));class u extends f{constructor(){super(...arguments),this.__renderName=()=>{var t,s;const{data:i}=this;return e(d||(d=p` <div> ${0} <div class="flex items-center space-x-xs font-medium"> <div class="truncate" title="${0}" data-testid="name"> ${0} </div> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("name:before"),null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.name)&&void 0!==s?s:e(o||(o=p`&nbsp;`)),i&&"public"!==i.visibility?e(l||(l=p` <div class="flex items-center" style="height:1px"> <iron-icon icon="icons:lock" class="icon-inline"></iron-icon> </div> `)):"",this.renderTemplateOrSlot("name:after"))},this.__renderValue=()=>{var t,s;const{data:i}=this;return e(m||(m=p` <div> ${0} <div class="truncate text-secondary text-s sm-text-m" title="${0}" data-testid="value"> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("value:before"),null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.value)&&void 0!==s?s:e(c||(c=p`&nbsp;`)),this.renderTemplateOrSlot("value:after"))}}render(){const t=this.hiddenSelector,s=this.in({idle:"snapshot"}),i=this.in({idle:"template"});return e(h||(h=p` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-xs sm-flex sm-items-center sm-justify-between"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),t.matches("name",!0)?"":this.__renderName(),t.matches("value",!0)?"":this.__renderValue(),n({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":s}),this.in("fail")?"error":i?"empty":"busy",this.lang,this.ns)}}customElements.define("foxy-attribute-card",u);export{u as AttributeCard};
1
+ import"./shared-9884fb7d.js";import"./shared-ad8d209a.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import{h as e}from"./shared-ba5c42c7.js";import{C as t}from"./shared-c782b9fa.js";import{N as s}from"./shared-da95bb48.js";import{R as i,a,T as r}from"./shared-a89e8a07.js";import{c as n}from"./shared-4e709717.js";import"./shared-5af5ab06.js";import"./shared-d3f37507.js";import"./shared-1b4a3e56.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-53e42a77.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";let d,o,l,m,c,h,p=e=>e;const f=i(a(t(r(s)),"attribute-card"));class u extends f{constructor(){super(...arguments),this.__renderName=()=>{var t,s;const{data:i}=this;return e(d||(d=p` <div> ${0} <div class="flex items-center space-x-xs font-medium"> <div class="truncate" title="${0}" data-testid="name"> ${0} </div> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("name:before"),null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.name)&&void 0!==s?s:e(o||(o=p`&nbsp;`)),i&&"public"!==i.visibility?e(l||(l=p` <div class="flex items-center" style="height:1px"> <iron-icon icon="icons:lock" class="icon-inline"></iron-icon> </div> `)):"",this.renderTemplateOrSlot("name:after"))},this.__renderValue=()=>{var t,s;const{data:i}=this;return e(m||(m=p` <div> ${0} <div class="truncate text-secondary text-s sm-text-m" title="${0}" data-testid="value"> ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("value:before"),null!==(t=null==i?void 0:i.value)&&void 0!==t?t:"",null!==(s=null==i?void 0:i.value)&&void 0!==s?s:e(c||(c=p`&nbsp;`)),this.renderTemplateOrSlot("value:after"))}}render(){const t=this.hiddenSelector,s=this.in({idle:"snapshot"}),i=this.in({idle:"template"});return e(h||(h=p` <div aria-live="polite" aria-busy="${0}" class="relative text-body text-m font-lumo leading-xs sm-flex sm-items-center sm-justify-between"> ${0} ${0} <div class="${0}"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),t.matches("name",!0)?"":this.__renderName(),t.matches("value",!0)?"":this.__renderValue(),n({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":s}),this.in("fail")?"error":i?"empty":"busy",this.lang,this.ns)}}customElements.define("foxy-attribute-card",u);export{u as AttributeCard};
@@ -1 +1 @@
1
- import"./shared-b2bd7666.js";import"./shared-21a445d9.js";import{I as e}from"./shared-3558bfae.js";import{a as r}from"./shared-ddda911c.js";import{B as t}from"./shared-7fec42f2.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-12bab9de.js";import"./shared-3e3c5095.js";import"./shared-03b67a3d.js";import"./shared-2db6b377.js";import"./shared-2c00e6b1.js";import"./shared-be7af87f.js";import"./shared-049295b7.js";import"./shared-5212ef4f.js";import"./shared-7b5bdf0e.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./foxy-copy-to-clipboard.js";import"./shared-2557c0c4.js";import"./shared-80dafe85.js";import"./shared-aedaf182.js";import"./shared-76c608e2.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,o=e=>e;const a=r(e,"attribute-form");class d extends a{constructor(){super(...arguments),this.__visibilityGetValue=()=>this.form.visibility||"private",this.__visibilityOptions=[{label:"option_public",value:"public"},{label:"option_restricted",value:"restricted"},{label:"option_private",value:"private"}]}static get v8n(){return[({value:e})=>e&&e.length>0||"value:v8n_required",({value:e})=>!e||e.length<=1e3||"value:v8n_too_long",({name:e})=>e&&e.length>0||"name:v8n_required",({name:e})=>!e||e.length<=500||"name:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.href&&e.unshift("visibility"),new t(e.join(" ").trim())}get headerSubtitleKey(){var e;return`subtitle_${null===(e=this.data)||void 0===e?void 0:e.visibility}`}renderBody(){return i(s||(s=o` ${0} <foxy-internal-source-control infer="name"></foxy-internal-source-control> <foxy-internal-source-control infer="value"></foxy-internal-source-control> <foxy-internal-radio-group-control infer="visibility" .options="${0}" .getValue="${0}"> </foxy-internal-radio-group-control> ${0} `),this.renderHeader(),this.__visibilityOptions,this.__visibilityGetValue,super.renderBody())}}customElements.define("foxy-attribute-form",d);export{d as AttributeForm};
1
+ import"./shared-db50afd9.js";import"./shared-34a7df04.js";import{I as r}from"./shared-070211c0.js";import{a as e}from"./shared-a89e8a07.js";import{B as t}from"./shared-7fec42f2.js";import{h as i}from"./shared-ba5c42c7.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-b15efc37.js";import"./shared-3c64ecdd.js";import"./shared-d3f37507.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-1b4a3e56.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-5fd5805c.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-copy-to-clipboard.js";import"./shared-cf6122d9.js";import"./shared-ad8d209a.js";import"./shared-a4871405.js";import"./shared-9884fb7d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let s,a=r=>r;const o=e(r,"attribute-form");class d extends o{constructor(){super(...arguments),this.__visibilityGetValue=()=>this.form.visibility||"private",this.__visibilityOptions=[{label:"option_public",value:"public"},{label:"option_restricted",value:"restricted"},{label:"option_private",value:"private"}]}static get v8n(){return[({value:r})=>r&&r.length>0||"value:v8n_required",({value:r})=>!r||r.length<=1e3||"value:v8n_too_long",({name:r})=>r&&r.length>0||"name:v8n_required",({name:r})=>!r||r.length<=500||"name:v8n_too_long"]}get hiddenSelector(){const r=[super.hiddenSelector.toString()];return this.href&&r.unshift("visibility"),new t(r.join(" ").trim())}get headerSubtitleKey(){var r;return`subtitle_${null===(r=this.data)||void 0===r?void 0:r.visibility}`}renderBody(){return i(s||(s=a` ${0} <foxy-internal-source-control infer="name"></foxy-internal-source-control> <foxy-internal-source-control infer="value"></foxy-internal-source-control> <foxy-internal-radio-group-control infer="visibility" .options="${0}" .getValue="${0}"> </foxy-internal-radio-group-control> ${0} `),this.renderHeader(),this.__visibilityOptions,this.__visibilityGetValue,super.renderBody())}}customElements.define("foxy-attribute-form",d);export{d as AttributeForm};
@@ -1 +1 @@
1
- import"./shared-88a59a2e.js";import"./shared-7b5bdf0e.js";import{a as s}from"./shared-ddda911c.js";import{I as e}from"./shared-a715e3e5.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,t=s=>s;const d=s(e,"billing-address-card");class o extends d{renderBody(){return r(a||(a=t` <section class="leading-none space-y-xs font-lumo"> <p class="text-m text-body font-medium truncate"> <foxy-i18n infer="" key="full_name" .options="${0}"></foxy-i18n> &ZeroWidthSpace; </p> <p class="text-s text-secondary truncate"> <foxy-i18n infer="" key="full_address" .options="${0}"></foxy-i18n> &ZeroWidthSpace; </p> </section> `),this.data,this.data)}}customElements.define("foxy-billing-address-card",o);export{o as BillingAddressCard};
1
+ import"./shared-dfe59df6.js";import"./shared-1b4a3e56.js";import{a as s}from"./shared-a89e8a07.js";import{I as e}from"./shared-160072f2.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,t=s=>s;const d=s(e,"billing-address-card");class o extends d{renderBody(){return r(a||(a=t` <section class="leading-none space-y-xs font-lumo"> <p class="text-m text-body font-medium truncate"> <foxy-i18n infer="" key="full_name" .options="${0}"></foxy-i18n> &ZeroWidthSpace; </p> <p class="text-s text-secondary truncate"> <foxy-i18n infer="" key="full_address" .options="${0}"></foxy-i18n> &ZeroWidthSpace; </p> </section> `),this.data,this.data)}}customElements.define("foxy-billing-address-card",o);export{o as BillingAddressCard};
@@ -1 +1 @@
1
- import"./shared-2db6b377.js";import"./shared-457789d7.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-7b5bdf0e.js";import"./shared-7fec42f2.js";import"./shared-80dafe85.js";import"./shared-12bab9de.js";import"./shared-aedaf182.js";import{h as e}from"./shared-ba5c42c7.js";import{S as t,T as s,a as r}from"./shared-ddda911c.js";import{c as a}from"./shared-4e709717.js";import"./shared-aab4ed2b.js";import"./shared-998c0ace.js";import{G as i}from"./shared-2f17b0fa.js";import"./shared-ab0bbad5.js";import"./shared-9006bac2.js";import"./shared-2c00e6b1.js";import"./shared-19b43f73.js";import"./shared-0993c2f5.js";import{W as d}from"./shared-9363a954.js";import{C as n}from"./shared-c782b9fa.js";import{N as o}from"./shared-da95bb48.js";import{i as m}from"./shared-53e42a77.js";import{s as l}from"./shared-2061be9a.js";import"./shared-3e3c5095.js";import"./shared-03b67a3d.js";import"./shared-76c608e2.js";import"./shared-43e2c3f6.js";import"./shared-0ea750af.js";import"./shared-be7af87f.js";import"./shared-f497cd69.js";import"./shared-8dd6f543.js";import"./shared-3e0b2588.js";import"./shared-5700fbfd.js";import"./shared-cd3cfea5.js";import"./shared-6ebe5ef5.js";import"./shared-cd0ae051.js";import"./shared-53e476fd.js";import"./shared-e1e4d8f5.js";import"./shared-8b0d25e5.js";import"./shared-6540a584.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";let h,c,p,f,b=e=>e;const u=t(s(n(r(o,"cancellation-form"))));class j extends u{constructor(){super(...arguments),this.__renderWarning=()=>{const{lang:t,ns:s}=this;return e(h||(h=b` <div> ${0} <x-warning> <foxy-i18n data-testid="warning" class="${0}" lang="${0}" key="end_subscription_explainer" ns="${0}"> </foxy-i18n> </x-warning> ${0} </div> `),this.renderTemplateOrSlot("warning:before"),a({"text-disabled":!this.in({idle:"snapshot"})}),t,s,this.renderTemplateOrSlot("warning:after"))},this.__renderEndDate=()=>{var t,s;const{constructor:r,lang:i,ns:d}=this,n=r.__tomorrow.getTime(),o=this.in({idle:"snapshot"});return e(c||(c=b` <div> ${0} <x-group frame> <foxy-i18n data-testid="end-date-label" class="${0}" slot="header" lang="${0}" key="end_date" ns="${0}"> </foxy-i18n> <foxy-internal-calendar data-testid="end-date" .checkAvailability="${0}" ?disabled="${0}" ?readonly="${0}" value="${0}" lang="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),a({"text-disabled":!o}),i,d,(e=>e.getTime()>=n),!o||this.disabledSelector.matches("end-date",!0),!!(null===(t=this.data)||void 0===t?void 0:t.end_date)||this.readonlySelector.matches("end-date",!0),m(null!==(s=this.form.end_date)&&void 0!==s?s:void 0),i,(e=>{this.edit({end_date:e.target.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__renderSubmit=()=>{const t=this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{snapshot:{dirty:"valid"}}});return e(p||(p=b` <div> ${0} <vaadin-button data-testid="submit" ?disabled="${0}" theme="primary error" class="w-full" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="end_subscription"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!t||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get scopedElements(){return{"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-warning":d,"x-group":i}}static get v8n(){return[({end_date:e})=>!!e||"end_date_required"]}render(){var t,s;const r=this.hiddenSelector,i=this.in("busy"),d=this.in("fail");return e(f||(f=b` <div class="space-y-l font-lumo text-m text-body leading-m relative"> ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),r.matches("warning",!0)?"":this.__renderWarning(),r.matches("end-date",!0)?"":this.__renderEndDate(),r.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!i&&!d}),d?"error":i?"busy":"empty",this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"")}submit(){if(!this.form.end_date){const e=this.constructor;this.edit({end_date:l(e.__tomorrow)})}super.submit()}static get __tomorrow(){const e=new Date;return e.setDate(e.getDate()+1),e.setHours(0,0,0,0),e}}customElements.define("foxy-cancellation-form",j);export{j as CancellationForm};
1
+ import"./shared-b15efc37.js";import"./shared-0e605594.js";import"./shared-5212ef4f.js";import"./foxy-spinner.js";import"./shared-1b4a3e56.js";import"./shared-7fec42f2.js";import"./shared-ad8d209a.js";import"./shared-3f4549ba.js";import"./shared-a4871405.js";import{h as e}from"./shared-ba5c42c7.js";import{S as t,T as s,a as r}from"./shared-a89e8a07.js";import{c as a}from"./shared-4e709717.js";import"./shared-364b98a1.js";import"./shared-a16ef278.js";import{G as i}from"./shared-46a20973.js";import"./shared-9bfb584b.js";import"./shared-59c064c2.js";import"./shared-3c64ecdd.js";import"./shared-d4928805.js";import"./shared-1f95aa71.js";import{W as d}from"./shared-5492f8eb.js";import{C as n}from"./shared-c782b9fa.js";import{N as o}from"./shared-da95bb48.js";import{i as m}from"./shared-53e42a77.js";import{s as l}from"./shared-2061be9a.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-9884fb7d.js";import"./shared-43e2c3f6.js";import"./shared-0ea750af.js";import"./shared-d3f37507.js";import"./shared-acee789f.js";import"./shared-ce0df878.js";import"./shared-fa482a7d.js";import"./shared-742899dc.js";import"./shared-0fb90a71.js";import"./shared-d8b0432a.js";import"./shared-e02936f0.js";import"./shared-53e476fd.js";import"./shared-e1e4d8f5.js";import"./shared-2c7e0ed1.js";import"./shared-140c6b70.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";let h,p,c,f,b=e=>e;const u=t(s(n(r(o,"cancellation-form"))));class j extends u{constructor(){super(...arguments),this.__renderWarning=()=>{const{lang:t,ns:s}=this;return e(h||(h=b` <div> ${0} <x-warning> <foxy-i18n data-testid="warning" class="${0}" lang="${0}" key="end_subscription_explainer" ns="${0}"> </foxy-i18n> </x-warning> ${0} </div> `),this.renderTemplateOrSlot("warning:before"),a({"text-disabled":!this.in({idle:"snapshot"})}),t,s,this.renderTemplateOrSlot("warning:after"))},this.__renderEndDate=()=>{var t,s;const{constructor:r,lang:i,ns:d}=this,n=r.__tomorrow.getTime(),o=this.in({idle:"snapshot"});return e(p||(p=b` <div> ${0} <x-group frame> <foxy-i18n data-testid="end-date-label" class="${0}" slot="header" lang="${0}" key="end_date" ns="${0}"> </foxy-i18n> <foxy-internal-calendar data-testid="end-date" .checkAvailability="${0}" ?disabled="${0}" ?readonly="${0}" value="${0}" lang="${0}" @change="${0}"> </foxy-internal-calendar> </x-group> ${0} </div> `),this.renderTemplateOrSlot("end-date:before"),a({"text-disabled":!o}),i,d,(e=>e.getTime()>=n),!o||this.disabledSelector.matches("end-date",!0),!!(null===(t=this.data)||void 0===t?void 0:t.end_date)||this.readonlySelector.matches("end-date",!0),m(null!==(s=this.form.end_date)&&void 0!==s?s:void 0),i,(e=>{this.edit({end_date:e.target.value})}),this.renderTemplateOrSlot("end-date:after"))},this.__renderSubmit=()=>{const t=this.in({idle:{snapshot:{clean:"valid"}}})||this.in({idle:{snapshot:{dirty:"valid"}}});return e(c||(c=b` <div> ${0} <vaadin-button data-testid="submit" ?disabled="${0}" theme="primary error" class="w-full" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="end_subscription"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("submit:before"),!t||this.disabledSelector.matches("submit",!0),(()=>this.submit()),this.ns,this.lang,this.renderTemplateOrSlot("submit:after"))}}static get scopedElements(){return{"foxy-internal-calendar":customElements.get("foxy-internal-calendar"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"x-warning":d,"x-group":i}}static get v8n(){return[({end_date:e})=>!!e||"end_date_required"]}render(){var t,s;const r=this.hiddenSelector,i=this.in("busy"),d=this.in("fail");return e(f||(f=b` <div class="space-y-l font-lumo text-m text-body leading-m relative"> ${0} ${0} ${0} <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),r.matches("warning",!0)?"":this.__renderWarning(),r.matches("end-date",!0)?"":this.__renderEndDate(),r.matches("submit",!0)?"":this.__renderSubmit(),a({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!i&&!d}),d?"error":i?"busy":"empty",this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-spinner"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"")}submit(){if(!this.form.end_date){const e=this.constructor;this.edit({end_date:l(e.__tomorrow)})}super.submit()}static get __tomorrow(){const e=new Date;return e.setDate(e.getDate()+1),e.setHours(0,0,0,0),e}}customElements.define("foxy-cancellation-form",j);export{j as CancellationForm};
@@ -1 +1 @@
1
- import"./shared-88a59a2e.js";import"./foxy-nucleon-element.js";import"./shared-7b5bdf0e.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-bab2ea2c.js";import{a as r}from"./shared-ddda911c.js";import{C as s}from"./shared-c782b9fa.js";import{I as i}from"./shared-a715e3e5.js";import{i as o}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,n,l,_,c,u,f,h,p,m,v=e=>e;const y=s(r(i,"cart-card"));class x extends y{constructor(){super(...arguments),this.localeCodes=null,this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){const e=this.__statusOptions,t=this.__line1Options,r=this.__line2Options,s=this.__line2Key,i=this.data;return d(a||(a=v` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s"> <div class="flex items-center space-x-s"> <span class="flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s text-tertiary"> ${0} </span> </div> <div class="truncate text-s text-secondary"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} </div> </div> `),o(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),t?d(n||(n=v`<foxy-i18n infer="" key="line_1" .options="${0}"></foxy-i18n>`),t):d(l||(l=v`&ZeroWidthSpace;`)),i?d(_||(_=v`<foxy-i18n infer="" key="status" .options="${0}"></foxy-i18n>`),e):d(c||(c=v`&ZeroWidthSpace;`)),s?d(u||(u=v`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,r):d(f||(f=v`&ZeroWidthSpace;`)),i?i.customer_email?d(h||(h=v`${0}`),i.customer_email):d(p||(p=v`<foxy-i18n infer="" key="no_customer"></foxy-i18n>`)):d(m||(m=v`&ZeroWidthSpace;`)))}get isBodyReady(){const e=!!this.__line1Options&&!!this.__statusOptions&&!!this.__line2Key;return super.isBodyReady&&e}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.data)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){var e,t;if(!(null===(e=this.data)||void 0===e?void 0:e.currency_code))return(null===(t=this.data)||void 0===t?void 0:t.template_set_uri)||void 0}get __itemsHref(){const e=this.data;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("order","price desc"),t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __items(){const e=this.data;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);if(null==t?void 0:t.data)return{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __currencyCode(){var e,t,r;const s=this.data;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,i=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,o=i?null==s?void 0:s.values[i]:void 0;if(o)return null===(r=/Currency: ([A-Z]{3})/g.exec(o))||void 0===r?void 0:r[1]}}get __line1Options(){var e,r,s;const i=null===(e=this.data)||void 0===e?void 0:e.total_order;if(void 0===i)return;const o=this.__currencyDisplay;if(void 0===o)return;const d=this.__currencyCode;if(void 0===d)return;const a=null===(r=this.__items)||void 0===r?void 0:r.count;if(void 0===a)return;const n=null===(s=this.data)||void 0===s?void 0:s._links.self.href;return void 0!==n?{currencyDisplay:o,amount:`${i} ${d}`,count:a,id:t(n)}:void 0}get __line2Options(){var e;return null===(e=this.__items)||void 0===e?void 0:e.array[0]}get __line2Key(){const e=this.__items;if(void 0!==e)return 0===e.count?"line_2_empty":1===e.count?"line_2_one":e.count>1?"line_2_many":void 0}get __statusOptions(){const e=this.data;if(e)return{dateCreated:e.date_created}}}customElements.define("foxy-cart-card",x);export{x as CartCard};
1
+ import"./shared-dfe59df6.js";import"./foxy-nucleon-element.js";import"./shared-1b4a3e56.js";import{_ as e}from"./shared-7fec42f2.js";import{g as t}from"./shared-bab2ea2c.js";import{a as r}from"./shared-a89e8a07.js";import{C as s}from"./shared-c782b9fa.js";import{I as i}from"./shared-160072f2.js";import{i as o}from"./shared-53e42a77.js";import{h as d}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let a,n,l,_,u,c,f,h,p,m,v=e=>e;const y=s(r(i,"cart-card"));class x extends y{constructor(){super(...arguments),this.localeCodes=null,this.__defaultTemplateSetLoaderId="defaultTemplateSetLoader",this.__localeCodesHelperLoaderId="localeCodesLoader",this.__templateSetLoaderId="templateSetLoader",this.__itemsLoaderId="itemsLoader",this.__storeLoaderId="storeLoader"}static get properties(){return e(e({},super.properties),{},{localeCodes:{type:String,attribute:"locale-codes"}})}renderBody(){const e=this.__statusOptions,t=this.__line1Options,r=this.__line2Options,s=this.__line2Key,i=this.data;return d(a||(a=v` <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <foxy-nucleon class="hidden" infer="" href="${0}" id="${0}" @update="${0}"> </foxy-nucleon> <div class="text-left leading-s"> <div class="flex items-center space-x-s"> <span class="flex-1 font-medium text-body truncate"> ${0} </span> <span class="text-s text-tertiary"> ${0} </span> </div> <div class="truncate text-s text-secondary"> ${0} </div> <div class="text-tertiary truncate text-s"> ${0} </div> </div> `),o(this.__itemsHref),this.__itemsLoaderId,(()=>this.requestUpdate()),o(this.__defaultTemplateSetHref),this.__defaultTemplateSetLoaderId,(()=>this.requestUpdate()),o(this.__localeCodesHelperHref),this.__localeCodesHelperLoaderId,(()=>this.requestUpdate()),o(this.__templateSetHref),this.__templateSetLoaderId,(()=>this.requestUpdate()),o(this.__storeHref),this.__storeLoaderId,(()=>this.requestUpdate()),t?d(n||(n=v`<foxy-i18n infer="" key="line_1" .options="${0}"></foxy-i18n>`),t):d(l||(l=v`&ZeroWidthSpace;`)),i?d(_||(_=v`<foxy-i18n infer="" key="status" .options="${0}"></foxy-i18n>`),e):d(u||(u=v`&ZeroWidthSpace;`)),s?d(c||(c=v`<foxy-i18n infer="" key="${0}" .options="${0}"></foxy-i18n>`),s,r):d(f||(f=v`&ZeroWidthSpace;`)),i?i.customer_email?d(h||(h=v`${0}`),i.customer_email):d(p||(p=v`<foxy-i18n infer="" key="no_customer"></foxy-i18n>`)):d(m||(m=v`&ZeroWidthSpace;`)))}get isBodyReady(){const e=!!this.__line1Options&&!!this.__statusOptions&&!!this.__line2Key;return super.isBodyReady&&e}get __defaultTemplateSetHref(){var e,t,r;if(""===(null===(e=this.data)||void 0===e?void 0:e.template_set_uri))try{const e=new URL(null!==(r=null===(t=this.__store)||void 0===t?void 0:t._links["fx:template_sets"].href)&&void 0!==r?r:"");return e.searchParams.set("code","DEFAULT"),e.toString()}catch(e){}}get __localeCodesHelperHref(){var e;if(this.__defaultTemplateSetHref||this.__templateSetHref)return null!==(e=this.localeCodes)&&void 0!==e?e:void 0}get __templateSetHref(){var e,t;if(!(null===(e=this.data)||void 0===e?void 0:e.currency_code))return(null===(t=this.data)||void 0===t?void 0:t.template_set_uri)||void 0}get __itemsHref(){const e=this.data;if(!e)return;if("_embedded"in e&&"fx:items"in e._embedded)return;const t=new URL(e._links["fx:items"].href);return t.searchParams.set("order","price desc"),t.searchParams.set("limit","1"),t.toString()}get __storeHref(){var e,t;return null===(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:store"])||void 0===t?void 0:t.href}get __defaultTemplateSet(){var e,t;const r=`#${this.__defaultTemplateSetLoaderId}`,s=this.renderRoot.querySelector(r);return null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e._embedded["fx:template_sets"][0])&&void 0!==t?t:null}get __localeCodesHelper(){var e,t;const r=`#${this.__localeCodesHelperLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __templateSet(){var e,t;const r=`#${this.__templateSetLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __items(){const e=this.data;if(e&&"_embedded"in e&&"fx:items"in e._embedded){const t=e._embedded["fx:items"];return{array:t,count:t.length,isApproximateCount:20===t.length}}const t=this.renderRoot.querySelector(`#${this.__itemsLoaderId}`);if(null==t?void 0:t.data)return{array:t.data._embedded["fx:items"],count:t.data.total_items,isApproximateCount:!1}}get __store(){var e,t;const r=`#${this.__storeLoaderId}`;return null!==(t=null===(e=this.renderRoot.querySelector(r))||void 0===e?void 0:e.data)&&void 0!==t?t:null}get __currencyDisplay(){var e;const t=null===(e=this.__store)||void 0===e?void 0:e.use_international_currency_symbol;return!0===t?"code":!1===t?"symbol":void 0}get __currencyCode(){var e,t,r;const s=this.data;if(null==s?void 0:s.currency_code)return s.currency_code;{const s=this.__localeCodesHelper,i=null===(t=null!==(e=this.__templateSet)&&void 0!==e?e:this.__defaultTemplateSet)||void 0===t?void 0:t.locale_code,o=i?null==s?void 0:s.values[i]:void 0;if(o)return null===(r=/Currency: ([A-Z]{3})/g.exec(o))||void 0===r?void 0:r[1]}}get __line1Options(){var e,r,s;const i=null===(e=this.data)||void 0===e?void 0:e.total_order;if(void 0===i)return;const o=this.__currencyDisplay;if(void 0===o)return;const d=this.__currencyCode;if(void 0===d)return;const a=null===(r=this.__items)||void 0===r?void 0:r.count;if(void 0===a)return;const n=null===(s=this.data)||void 0===s?void 0:s._links.self.href;return void 0!==n?{currencyDisplay:o,amount:`${i} ${d}`,count:a,id:t(n)}:void 0}get __line2Options(){var e;return null===(e=this.__items)||void 0===e?void 0:e.array[0]}get __line2Key(){const e=this.__items;if(void 0!==e)return 0===e.count?"line_2_empty":1===e.count?"line_2_one":e.count>1?"line_2_many":void 0}get __statusOptions(){const e=this.data;if(e)return{dateCreated:e.date_created}}}customElements.define("foxy-cart-card",x);export{x as CartCard};
@@ -1,4 +1,4 @@
1
- import"./shared-109cfbba.js";import"./shared-3ffa26c1.js";import"./shared-13ba9f3a.js";import"./shared-90a8d5cf.js";import"./shared-206d3153.js";import"./shared-ee689ddc.js";import{I as e}from"./shared-3558bfae.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-7b5bdf0e.js";import{a as t,I as r}from"./shared-049295b7.js";import{_ as o,B as i}from"./shared-7fec42f2.js";import{c as s}from"./shared-4e709717.js";import{h as n,c as a}from"./shared-ba5c42c7.js";import"./shared-2db6b377.js";import{R as l,a as d}from"./shared-ddda911c.js";import{i as c}from"./shared-53e42a77.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-53e476fd.js";import"./shared-88a59a2e.js";import{g as p}from"./shared-bab2ea2c.js";import{T as _}from"./shared-bdbdf963.js";import{T as f}from"./shared-8874ec69.js";import"./foxy-copy-to-clipboard.js";import"./shared-2557c0c4.js";import"./shared-3e3c5095.js";import"./shared-03b67a3d.js";import"./shared-12bab9de.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-aedaf182.js";import"./shared-76c608e2.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-form-dialog.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./shared-65b2760f.js";import"./shared-da95bb48.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-1c252319.js";import"./shared-6ebe5ef5.js";import"./shared-9006bac2.js";import"./shared-0993c2f5.js";import"./shared-cd0ae051.js";import"./shared-ab0bbad5.js";import"./shared-8dd6f543.js";import"./shared-2c00e6b1.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-1b627cc5.js";import"./shared-f497cd69.js";import"./shared-5212ef4f.js";import"./shared-d0aed1c1.js";import"./shared-a715e3e5.js";import"./shared-6eebe353.js";import"./shared-21a445d9.js";import"./shared-b2bd7666.js";import"./shared-2f1ced90.js";import"./shared-12973e93.js";import"./shared-6a65acb4.js";import"./shared-3e0b2588.js";import"./shared-cd3cfea5.js";import"./shared-02acac7f.js";import"./shared-1af6aa1d.js";import"./shared-6540a584.js";import"./shared-2061be9a.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-19b43f73.js";import"./shared-3b4148ad.js";import"./shared-7dc40542.js";let h,y,v=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends t{constructor(){super(...arguments),this.__loader=null}static get properties(){return o(o({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,o=null===(t=this.__loader)||void 0===t?void 0:t.result;return o?n(h||(h=v` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),o):n(y||(y=v` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),s({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,o=null==r?void 0:r.data,i=null!==(t=null==o?void 0:o._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(i)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},o=new r.constructor.API(this);this.__loader=t;try{const r=await o.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let g;const x=a(g||(g=(e=>e)`
1
+ import"./shared-f2e8070b.js";import"./shared-8530fbae.js";import"./shared-f3590d20.js";import"./shared-8a570d01.js";import"./shared-0fa21237.js";import"./shared-4388f7ea.js";import{I as e}from"./shared-070211c0.js";import"./foxy-applied-coupon-code-card.js";import"./foxy-applied-coupon-code-form.js";import"./foxy-custom-field-card.js";import"./foxy-custom-field-form.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./foxy-item-form.js";import"./shared-1b4a3e56.js";import{a as t,I as r}from"./shared-f7b4a4f6.js";import{_ as o,B as i}from"./shared-7fec42f2.js";import{c as s}from"./shared-4e709717.js";import{h as n,c as a}from"./shared-ba5c42c7.js";import"./shared-b15efc37.js";import{R as l,a as d}from"./shared-a89e8a07.js";import{i as c}from"./shared-53e42a77.js";import"./foxy-update-payment-method-form.js";import{U as u}from"./shared-cd96ff03.js";import{s as m}from"./shared-53e476fd.js";import"./shared-dfe59df6.js";import{g as p}from"./shared-bab2ea2c.js";import{T as _}from"./shared-7d1512e1.js";import{T as f}from"./shared-8874ec69.js";import"./foxy-copy-to-clipboard.js";import"./shared-cf6122d9.js";import"./shared-5af5ab06.js";import"./shared-6313b188.js";import"./shared-3f4549ba.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-a4871405.js";import"./shared-9884fb7d.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-form-dialog.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./shared-65b2760f.js";import"./shared-da95bb48.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-f2be9863.js";import"./shared-d8b0432a.js";import"./shared-59c064c2.js";import"./shared-1f95aa71.js";import"./shared-e02936f0.js";import"./shared-9bfb584b.js";import"./shared-ce0df878.js";import"./shared-3c64ecdd.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-5fd5805c.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-8a743005.js";import"./shared-acee789f.js";import"./shared-5212ef4f.js";import"./shared-d0aed1c1.js";import"./shared-160072f2.js";import"./shared-e126cf44.js";import"./shared-34a7df04.js";import"./shared-db50afd9.js";import"./shared-2d3bdc6b.js";import"./shared-12973e93.js";import"./shared-69c7ad04.js";import"./shared-fa482a7d.js";import"./shared-0fb90a71.js";import"./shared-c16f05d9.js";import"./shared-a0fbe3ef.js";import"./shared-140c6b70.js";import"./shared-2061be9a.js";import"./shared-43e2c3f6.js";import"./foxy-discount-detail-card.js";import"./foxy-coupon-detail-card.js";import"./foxy-item-category-card.js";import"./foxy-discount-builder.js";import"./shared-63c32024.js";import"./foxy-item-option-card.js";import"./foxy-item-option-form.js";import"./foxy-payment-card-embed.js";import"./shared-d4928805.js";import"./shared-3b4148ad.js";import"./shared-7dc40542.js";let h,y,v=e=>e;customElements.define("foxy-internal-cart-form-create-session-action",class extends t{constructor(){super(...arguments),this.__loader=null}static get properties(){return o(o({},super.properties),{},{__loader:{attribute:!1}})}renderControl(){var e,t;const r=null===(e=this.__loader)||void 0===e?void 0:e.state,o=null===(t=this.__loader)||void 0===t?void 0:t.result;return o?n(h||(h=v` <a target="_blank" class="rounded font-medium transition-colors text-body focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="state_idle"></foxy-i18n> </a> `),o):n(y||(y=v` <div class="${0}"> <foxy-i18n infer="" key="${0}"> </foxy-i18n> </div> `),s({"transition-colors font-medium rounded":!0,"text-tertiary":"fail"!==r,"text-error":"fail"===r}),"fail"===r?"state_fail":"state_busy")}updated(e){var t;super.updated(e);const r=this.nucleon,o=null==r?void 0:r.data,i=null!==(t=null==o?void 0:o._links["fx:create_session"].href)&&void 0!==t?t:null;this.__reloadSessionHref(i)}async __reloadSessionHref(e){var t;if((null===(t=this.__loader)||void 0===t?void 0:t.href)===e)return;const r=this.nucleon;if(r)if(e){const t={result:null,state:"busy",href:e},o=new r.constructor.API(this);this.__loader=t;try{const r=await o.fetch(e,{method:"POST"});if(!r.ok)throw new Error;t.result=(await r.json()).cart_link,t.state="idle"}catch(e){t.state="fail"}finally{this.requestUpdate()}}else this.__loader=null}});let g;const x=a(g||(g=(e=>e)`
2
2
  #dialog{
3
3
  width:100dvw;
4
4
  max-height:calc(100dvh - var(--lumo-space-m));
@@ -1 +1 @@
1
- import"./shared-88a59a2e.js";import{a as e}from"./shared-ddda911c.js";import{I as t}from"./shared-a715e3e5.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-3e3c5095.js";import"./shared-76c608e2.js";import"./shared-7b5bdf0e.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let i,a,s,o,d=e=>e;const C=e(t,"client-card");class l extends C{static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2168_15479)'%3E%3Crect width='40' height='40' fill='%23E8E8E8'/%3E%3Cpath d='M6.93609 0H0V6.93609L6.93609 0Z' fill='white'/%3E%3Cpath d='M0 8.35031V16.2326L16.2326 0H8.35031L0 8.35031Z' fill='white'/%3E%3Cpath d='M23.4667 20C23.4667 21.9146 21.9146 23.4667 20 23.4667C18.0854 23.4667 16.5333 21.9146 16.5333 20C16.5333 18.0854 18.0854 16.5333 20 16.5333C21.9146 16.5333 23.4667 18.0854 23.4667 20Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.6468 0L0 17.6468V25.529L5.75703 19.772C5.9523 19.5767 6.26888 19.5767 6.46414 19.772C6.6594 19.9673 6.6594 20.2839 6.46414 20.4791L0 26.9433V34.8255L7.67907 27.1464C7.87433 26.9512 8.19091 26.9512 8.38617 27.1464C8.58144 27.3417 8.58144 27.6583 8.38617 27.8536L0 36.2397V40H4.12198L12.4755 31.6464C12.6708 31.4512 12.9874 31.4512 13.1826 31.6464C13.3779 31.8417 13.3779 32.1583 13.1826 32.3536L5.5362 40H13.4185L19.8826 33.5359C20.0779 33.3406 20.3944 33.3406 20.5897 33.5359C20.785 33.7311 20.785 34.0477 20.5897 34.243L14.8327 40H22.7149L40 22.7149V14.8327L34.3536 20.4791C34.1583 20.6744 33.8417 20.6744 33.6464 20.4791C33.4512 20.2839 33.4512 19.9673 33.6464 19.772L40 13.4185V5.5362L32.3536 13.1826C32.1583 13.3779 31.8417 13.3779 31.6464 13.1826C31.4512 12.9874 31.4512 12.6708 31.6464 12.4755L40 4.12198V0H36.2397L27.8536 8.38617C27.6583 8.58144 27.3417 8.58144 27.1464 8.38617C26.9512 8.19091 26.9512 7.87433 27.1464 7.67907L34.8255 0H26.9433L20.5897 6.35355C20.3944 6.54882 20.0779 6.54882 19.8826 6.35355C19.6873 6.15829 19.6873 5.84171 19.8826 5.64645L25.529 0H17.6468ZM12.6461 28.5796L11.4204 27.3539C10.7435 26.677 10.7435 25.5795 11.4204 24.9026L11.7742 24.5489C12.0955 24.2275 12.1662 23.7396 11.992 23.3199C11.8178 22.9003 11.421 22.6 10.9668 22.6H10.4667C9.50938 22.6 8.73334 21.824 8.73334 20.8667V19.1333C8.73334 18.176 9.50938 17.4 10.4667 17.4H10.9668C11.421 17.4 11.8178 17.0997 11.992 16.6801C12.1662 16.2604 12.0955 15.7725 11.7742 15.4511L11.4204 15.0974C10.7435 14.4205 10.7435 13.323 11.4204 12.6461L12.6461 11.4204C13.323 10.7435 14.4205 10.7435 15.0974 11.4204L15.4511 11.7742C15.7725 12.0955 16.2604 12.1662 16.6801 11.992C17.0997 11.8178 17.4 11.421 17.4 10.9668V10.4667C17.4 9.50938 18.176 8.73334 19.1333 8.73334H20.8667C21.824 8.73334 22.6 9.50938 22.6 10.4667V10.9668C22.6 11.421 22.9003 11.8178 23.3199 11.992C23.7396 12.1662 24.2275 12.0955 24.5489 11.7742L24.9026 11.4204C25.5795 10.7435 26.677 10.7435 27.3539 11.4204L28.5796 12.6461C29.2565 13.323 29.2565 14.4205 28.5796 15.0974L28.2259 15.4511C27.9045 15.7725 27.8338 16.2604 28.0081 16.6801C28.1822 17.0997 28.579 17.4 29.0333 17.4H29.5333C30.4906 17.4 31.2667 18.176 31.2667 19.1333V20.8667C31.2667 21.824 30.4906 22.6 29.5333 22.6H29.0332C28.579 22.6 28.1822 22.9003 28.0081 23.3199C27.8338 23.7396 27.9045 24.2275 28.2259 24.5489L28.5796 24.9026C29.2565 25.5795 29.2565 26.677 28.5796 27.3539L27.3539 28.5796C26.677 29.2565 25.5795 29.2565 24.9026 28.5796L24.5489 28.2259C24.2275 27.9045 23.7396 27.8338 23.3199 28.0081C22.9003 28.1822 22.6 28.579 22.6 29.0333V29.5333C22.6 30.4906 21.824 31.2667 20.8667 31.2667H19.1333C18.176 31.2667 17.4 30.4906 17.4 29.5333V29.0333C17.4 28.579 17.0997 28.1822 16.6801 28.0081C16.2604 27.8338 15.7725 27.9045 15.4511 28.2259L15.0974 28.5796C14.4205 29.2565 13.323 29.2565 12.6461 28.5796Z' fill='white'/%3E%3Cpath d='M40 24.1291L24.1291 40H32.0114L40 32.0114V24.1291Z' fill='white'/%3E%3Cpath d='M40 33.4256L33.4256 40H40V33.4256Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2168_15479'%3E%3Crect width='40' height='40' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"}renderBody(){const e=l.defaultImageSrc,t=this.data;return r(i||(i=d` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium"> ${0} </p> <p class="text-s truncate text-secondary"> ${0} </p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0} </p> </figcaption> </figure> `),(null==t?void 0:t.company_logo)||e,this.t("image_alt"),(t=>t.currentTarget.src=e),(null==t?void 0:t.project_name.trim())||r(a||(a=d`<foxy-i18n infer="" key="no_project_name"></foxy-i18n>`)),(null==t?void 0:t.project_description.trim())||r(s||(s=d`<foxy-i18n infer="" key="no_project_description"></foxy-i18n>`)),t?new URL(t.redirect_uri).host:"",(null==t?void 0:t.company_name)||r(o||(o=d`<foxy-i18n infer="" key="no_company_name"></foxy-i18n>`)))}}customElements.define("foxy-client-card",l);export{l as ClientCard};
1
+ import"./shared-dfe59df6.js";import{a as e}from"./shared-a89e8a07.js";import{I as t}from"./shared-160072f2.js";import{h as r}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-5af5ab06.js";import"./shared-9884fb7d.js";import"./shared-1b4a3e56.js";import"./shared-7fec42f2.js";import"./shared-0ea750af.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";let i,a,s,o,d=e=>e;const C=e(t,"client-card");class l extends C{static get defaultImageSrc(){return"data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg clip-path='url(%23clip0_2168_15479)'%3E%3Crect width='40' height='40' fill='%23E8E8E8'/%3E%3Cpath d='M6.93609 0H0V6.93609L6.93609 0Z' fill='white'/%3E%3Cpath d='M0 8.35031V16.2326L16.2326 0H8.35031L0 8.35031Z' fill='white'/%3E%3Cpath d='M23.4667 20C23.4667 21.9146 21.9146 23.4667 20 23.4667C18.0854 23.4667 16.5333 21.9146 16.5333 20C16.5333 18.0854 18.0854 16.5333 20 16.5333C21.9146 16.5333 23.4667 18.0854 23.4667 20Z' fill='white'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M17.6468 0L0 17.6468V25.529L5.75703 19.772C5.9523 19.5767 6.26888 19.5767 6.46414 19.772C6.6594 19.9673 6.6594 20.2839 6.46414 20.4791L0 26.9433V34.8255L7.67907 27.1464C7.87433 26.9512 8.19091 26.9512 8.38617 27.1464C8.58144 27.3417 8.58144 27.6583 8.38617 27.8536L0 36.2397V40H4.12198L12.4755 31.6464C12.6708 31.4512 12.9874 31.4512 13.1826 31.6464C13.3779 31.8417 13.3779 32.1583 13.1826 32.3536L5.5362 40H13.4185L19.8826 33.5359C20.0779 33.3406 20.3944 33.3406 20.5897 33.5359C20.785 33.7311 20.785 34.0477 20.5897 34.243L14.8327 40H22.7149L40 22.7149V14.8327L34.3536 20.4791C34.1583 20.6744 33.8417 20.6744 33.6464 20.4791C33.4512 20.2839 33.4512 19.9673 33.6464 19.772L40 13.4185V5.5362L32.3536 13.1826C32.1583 13.3779 31.8417 13.3779 31.6464 13.1826C31.4512 12.9874 31.4512 12.6708 31.6464 12.4755L40 4.12198V0H36.2397L27.8536 8.38617C27.6583 8.58144 27.3417 8.58144 27.1464 8.38617C26.9512 8.19091 26.9512 7.87433 27.1464 7.67907L34.8255 0H26.9433L20.5897 6.35355C20.3944 6.54882 20.0779 6.54882 19.8826 6.35355C19.6873 6.15829 19.6873 5.84171 19.8826 5.64645L25.529 0H17.6468ZM12.6461 28.5796L11.4204 27.3539C10.7435 26.677 10.7435 25.5795 11.4204 24.9026L11.7742 24.5489C12.0955 24.2275 12.1662 23.7396 11.992 23.3199C11.8178 22.9003 11.421 22.6 10.9668 22.6H10.4667C9.50938 22.6 8.73334 21.824 8.73334 20.8667V19.1333C8.73334 18.176 9.50938 17.4 10.4667 17.4H10.9668C11.421 17.4 11.8178 17.0997 11.992 16.6801C12.1662 16.2604 12.0955 15.7725 11.7742 15.4511L11.4204 15.0974C10.7435 14.4205 10.7435 13.323 11.4204 12.6461L12.6461 11.4204C13.323 10.7435 14.4205 10.7435 15.0974 11.4204L15.4511 11.7742C15.7725 12.0955 16.2604 12.1662 16.6801 11.992C17.0997 11.8178 17.4 11.421 17.4 10.9668V10.4667C17.4 9.50938 18.176 8.73334 19.1333 8.73334H20.8667C21.824 8.73334 22.6 9.50938 22.6 10.4667V10.9668C22.6 11.421 22.9003 11.8178 23.3199 11.992C23.7396 12.1662 24.2275 12.0955 24.5489 11.7742L24.9026 11.4204C25.5795 10.7435 26.677 10.7435 27.3539 11.4204L28.5796 12.6461C29.2565 13.323 29.2565 14.4205 28.5796 15.0974L28.2259 15.4511C27.9045 15.7725 27.8338 16.2604 28.0081 16.6801C28.1822 17.0997 28.579 17.4 29.0333 17.4H29.5333C30.4906 17.4 31.2667 18.176 31.2667 19.1333V20.8667C31.2667 21.824 30.4906 22.6 29.5333 22.6H29.0332C28.579 22.6 28.1822 22.9003 28.0081 23.3199C27.8338 23.7396 27.9045 24.2275 28.2259 24.5489L28.5796 24.9026C29.2565 25.5795 29.2565 26.677 28.5796 27.3539L27.3539 28.5796C26.677 29.2565 25.5795 29.2565 24.9026 28.5796L24.5489 28.2259C24.2275 27.9045 23.7396 27.8338 23.3199 28.0081C22.9003 28.1822 22.6 28.579 22.6 29.0333V29.5333C22.6 30.4906 21.824 31.2667 20.8667 31.2667H19.1333C18.176 31.2667 17.4 30.4906 17.4 29.5333V29.0333C17.4 28.579 17.0997 28.1822 16.6801 28.0081C16.2604 27.8338 15.7725 27.9045 15.4511 28.2259L15.0974 28.5796C14.4205 29.2565 13.323 29.2565 12.6461 28.5796Z' fill='white'/%3E%3Cpath d='M40 24.1291L24.1291 40H32.0114L40 32.0114V24.1291Z' fill='white'/%3E%3Cpath d='M40 33.4256L33.4256 40H40V33.4256Z' fill='white'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2168_15479'%3E%3Crect width='40' height='40' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E%0A"}renderBody(){const e=l.defaultImageSrc,t=this.data;return r(i||(i=d` <figure class="flex" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <img class="relative h-s w-s object-cover rounded-full bg-contrast-20 flex-shrink-0 shadow-xs" src="${0}" alt="${0}" @error="${0}"> <figcaption class="min-w-0 flex-1 leading-s -my-xs"> <p class="text-m truncate text-body font-medium"> ${0} </p> <p class="text-s truncate text-secondary"> ${0} </p> <p class="text-s truncate text-tertiary"> ${0} &bull; ${0} </p> </figcaption> </figure> `),(null==t?void 0:t.company_logo)||e,this.t("image_alt"),(t=>t.currentTarget.src=e),(null==t?void 0:t.project_name.trim())||r(a||(a=d`<foxy-i18n infer="" key="no_project_name"></foxy-i18n>`)),(null==t?void 0:t.project_description.trim())||r(s||(s=d`<foxy-i18n infer="" key="no_project_description"></foxy-i18n>`)),t?new URL(t.redirect_uri).host:"",(null==t?void 0:t.company_name)||r(o||(o=d`<foxy-i18n infer="" key="no_company_name"></foxy-i18n>`)))}}customElements.define("foxy-client-card",l);export{l as ClientCard};
@@ -1 +1 @@
1
- import"./shared-dd7e85be.js";import"./shared-ee689ddc.js";import{I as e}from"./shared-3558bfae.js";import{R as t,a as r}from"./shared-ddda911c.js";import{B as o}from"./shared-7fec42f2.js";import{h as n}from"./shared-ba5c42c7.js";import"./shared-5700fbfd.js";import"./shared-12bab9de.js";import"./shared-3e3c5095.js";import"./shared-8dd6f543.js";import"./shared-2c00e6b1.js";import"./shared-0993c2f5.js";import"./shared-ab0bbad5.js";import"./shared-2db6b377.js";import"./shared-03b67a3d.js";import"./shared-049295b7.js";import"./shared-5212ef4f.js";import"./shared-7b5bdf0e.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-e52d2fdd.js";import"./shared-998c0ace.js";import"./foxy-copy-to-clipboard.js";import"./shared-2557c0c4.js";import"./shared-80dafe85.js";import"./shared-be7af87f.js";import"./shared-aedaf182.js";import"./shared-76c608e2.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,s=e=>e;const i=t(r(e,"client-form"));class d extends i{get headerSubtitleOptions(){var e,t;try{return{context:"with_domain",domain:new URL(null!==(t=null===(e=this.data)||void 0===e?void 0:e.redirect_uri)&&void 0!==t?t:"").hostname}}catch(e){return super.headerSubtitleOptions}}get readonlySelector(){const e=["client-secret"];return(this.data||this.in({busy:"fetching"}))&&e.push("client-id"),new o(`${e.join(" ")} ${super.readonlySelector.toString()}`)}get hiddenSelector(){const e=[];return this.data||this.in({busy:"fetching"})||e.push("client-secret"),new o(`${e.join(" ")} ${super.hiddenSelector.toString()}`)}renderBody(){return n(a||(a=s` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="client-id"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="client-secret"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="redirect-uri"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="project-name"> </foxy-internal-text-control> <foxy-internal-text-area-control class="col-span-2" infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-text-control infer="company-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company-url"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="company-logo"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="contact-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="contact-email"></foxy-internal-text-control> <foxy-internal-text-control infer="contact-phone"></foxy-internal-text-control> </div> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-client-form",d);export{d as ClientForm};
1
+ import"./shared-dc1fc2e6.js";import"./shared-4388f7ea.js";import{I as t}from"./shared-070211c0.js";import{R as e,a as r}from"./shared-a89e8a07.js";import{B as o}from"./shared-7fec42f2.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-742899dc.js";import"./shared-3f4549ba.js";import"./shared-5af5ab06.js";import"./shared-ce0df878.js";import"./shared-3c64ecdd.js";import"./shared-1f95aa71.js";import"./shared-9bfb584b.js";import"./shared-b15efc37.js";import"./shared-6313b188.js";import"./shared-f7b4a4f6.js";import"./shared-5212ef4f.js";import"./shared-1b4a3e56.js";import"./shared-0ea750af.js";import"./shared-c782b9fa.js";import"./shared-53e42a77.js";import"./shared-da95bb48.js";import"./shared-65b2760f.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-d6a0954b.js";import"./shared-1da47f50.js";import"./shared-e1e4d8f5.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-5a6e4a7b.js";import"./shared-a16ef278.js";import"./foxy-copy-to-clipboard.js";import"./shared-cf6122d9.js";import"./shared-ad8d209a.js";import"./shared-d3f37507.js";import"./shared-a4871405.js";import"./shared-9884fb7d.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let n,s=t=>t;const i=e(r(t,"client-form"));class c extends i{get headerSubtitleOptions(){var t,e;try{return{context:"with_domain",domain:new URL(null!==(e=null===(t=this.data)||void 0===t?void 0:t.redirect_uri)&&void 0!==e?e:"").hostname}}catch(t){return super.headerSubtitleOptions}}get readonlySelector(){const t=["client-secret"];return(this.data||this.in({busy:"fetching"}))&&t.push("client-id"),new o(`${t.join(" ")} ${super.readonlySelector.toString()}`)}get hiddenSelector(){const t=[];return this.data||this.in({busy:"fetching"})||t.push("client-secret"),new o(`${t.join(" ")} ${super.hiddenSelector.toString()}`)}renderBody(){return a(n||(n=s` ${0} <div class="grid grid-cols-2 gap-m"> <foxy-internal-text-control class="col-span-2" infer="client-id"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="client-secret"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="redirect-uri"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="project-name"> </foxy-internal-text-control> <foxy-internal-text-area-control class="col-span-2" infer="project-description"> </foxy-internal-text-area-control> <foxy-internal-text-control infer="company-name"></foxy-internal-text-control> <foxy-internal-text-control infer="company-url"></foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="company-logo"> </foxy-internal-text-control> <foxy-internal-text-control class="col-span-2" infer="contact-name"> </foxy-internal-text-control> <foxy-internal-text-control infer="contact-email"></foxy-internal-text-control> <foxy-internal-text-control infer="contact-phone"></foxy-internal-text-control> </div> ${0} `),this.renderHeader(),super.renderBody())}}customElements.define("foxy-client-form",c);export{c as ClientForm};