@foxy.io/elements 1.14.0-beta.10 → 1.14.0-beta.11
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.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +18 -15
- package/dist/cdn/foxy-customer.js +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +2 -2
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-4ba926ca.js → shared-05956f55.js} +1 -1
- package/dist/cdn/{shared-7007dedb.js → shared-05b473a7.js} +1 -1
- package/dist/cdn/{shared-da787055.js → shared-1177fd2a.js} +1 -1
- package/dist/cdn/{shared-c5ae5d33.js → shared-2b685624.js} +1 -1
- package/dist/cdn/{shared-d01035c5.js → shared-4168c6cd.js} +1 -1
- package/dist/cdn/{shared-d05c93a5.js → shared-5d1314d7.js} +1 -1
- package/dist/cdn/{shared-0f9809ab.js → shared-70631d0a.js} +1 -1
- package/dist/cdn/{shared-ca7c3b9a.js → shared-775b37f9.js} +1 -1
- package/dist/cdn/{shared-a3d2c48e.js → shared-8730c141.js} +1 -1
- package/dist/cdn/{shared-5d94bacb.js → shared-93f23978.js} +1 -1
- package/dist/cdn/{shared-007c4e34.js → shared-a94b7271.js} +1 -1
- package/dist/cdn/{shared-daf6b763.js → shared-bda600d6.js} +1 -1
- package/dist/cdn/{shared-b24377bf.js → shared-d3167239.js} +1 -1
- package/dist/cdn/shared-e36452b9.js +1 -0
- package/dist/cdn/{shared-31d03530.js → shared-f968379d.js} +7 -7
- package/dist/cdn/{shared-00070cc4.js → shared-fbeb1de3.js} +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.d.ts +1 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js +17 -8
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLink.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +11 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/ItemsForm/private/Picture.d.ts +1 -0
- package/dist/elements/public/ItemsForm/private/Picture.js +2 -0
- package/dist/elements/public/ItemsForm/private/Picture.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +12 -4
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +20 -13
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/dist/mixins/themeable.js +10 -8
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-fe8a7aa2.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee.js";import"./shared-46ee137f.js";import"./shared-9221e6b2.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import{_ as e,h as t,L as
|
|
1
|
+
import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee.js";import"./shared-46ee137f.js";import"./shared-9221e6b2.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import"./foxy-transactions-table.js";import"./foxy-subscription-card.js";import"./foxy-subscription-form.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import{_ as e,h as t,L as s,j as r,w as o}from"./shared-63eaded9.js";import{A as i}from"./shared-e7f8ffe9.js";import"./shared-59e44f29.js";import{C as n}from"./shared-34b2c1e2.js";import{a,T as l,R as d}from"./shared-4168c6cd.js";import{A as c}from"./shared-00563cb0.js";import{c as m}from"./shared-4e709717.js";import{C as h}from"./shared-593f7e2c.js";import{N as p}from"./shared-44cfc617.js";import{i as u}from"./shared-6d45a07b.js";import"./shared-ff79f3f9.js";import"./foxy-attribute-card.js";import"./foxy-i18n.js";import"./shared-1761daef.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";import"./foxy-attribute-form.js";import"./shared-f968379d.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import"./shared-bb824ab4.js";import"./shared-ec861f31.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-bda600d6.js";import"./shared-05956f55.js";import"./shared-8730c141.js";import"./shared-1177fd2a.js";import"./shared-d3167239.js";import"./foxy-customer-form.js";import"./foxy-nucleon-element.js";import"./shared-b738ee96.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-table.js";import"./shared-2b685624.js";import"./shared-fbeb1de3.js";import"./shared-6b7602c7.js";import"./shared-218ba06e.js";import"./foxy-cancellation-form.js";import"./shared-775b37f9.js";import"./shared-2061be9a.js";import"./shared-e36452b9.js";import"./shared-93f23978.js";import"./shared-05b473a7.js";import"./shared-b710881a.js";import"./shared-200f613b.js";import"./shared-94b0ae99.js";import"./shared-16f72e27.js";let g,f,$=e=>e;class y extends(a(l(n),"customer-portal")){constructor(){super(...arguments),this.group=""}static get properties(){return e(e({},super.properties),{},{group:{type:String}})}render(){return this.api.storage.getItem(i.SESSION)?t(g||(g=$` <foxy-internal-customer-portal-logged-in-view disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" customer="${0}" group="${0}" class="h-full" lang="${0}" href="${0}" ns="${0}" .templates="${0}"> </foxy-internal-customer-portal-logged-in-view> `),this.disabledSelector.toString(),this.readonlySelector.toString(),this.hiddenSelector.toString(),this.base,this.group,this.lang,new URL("./customer_portal_settings",this.base).toString(),this.ns,this.templates):t(f||(f=$` <foxy-internal-customer-portal-logged-out-view disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" group="${0}" class="h-full" lang="${0}" ns="${0}" .templates="${0}"> </foxy-internal-customer-portal-logged-out-view> `),this.disabledSelector.toString(),this.readonlySelector.toString(),this.hiddenSelector.toString(),this.group,this.lang,this.ns,this.templates)}}let b,v,S=e=>e;const _=d(l(a(s)));let x,j,T,w,O=e=>e;class k extends(l(s)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return e(e({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=m({"flex-auto font-medium tracking-wide text-s rounded-s transition-colors":!0,"hover-text-primary hover-cursor-pointer":!this.disabled,"focus-outline-none focus-ring-2 ring-primary-50 ring-offset-2":!this.disabled,"text-disabled cursor-default":this.disabled}),s=t(x||(x=O` ${0} <slot></slot> `),this.icon?t(j||(j=O`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?t(T||(T=O`<button class="${0}" disabled="disabled">${0}</button>`),e,s):t(w||(w=O` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,s)}}let R,z,E,A,F,I,N,H,U,q,L=e=>e;const P=l(h(a(p)));let C,D,V,J,W,B,G,K,M,Q,X=e=>e;const Y=l(h(a(s)));const Z=["html"],ee=["html"];let te,se,re,oe,ie,ne,ae,le,de,ce,me,he,pe=e=>e;const ue=a(h(l(s)));let ge,fe,$e,ye=e=>e;const be=h(l(a(s,"customer-portal")));customElements.define("foxy-internal-customer-portal-logged-in-view",class extends P{constructor(){var e;super(...arguments),e=this,this.templates={},this.customer="",this.loggingOutState="idle",this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var s,r,o;const i="customer:header:actions:sign-out",n=this.loggingOutState,a=!!(null===(s=this.__customerElement)||void 0===s?void 0:s.in({idle:"snapshot"}));return t(R||(R=L` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="padding:var(--lumo-space-xs);margin:0;border-radius:100%;display:flex" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${i}:before`),this.t("sign_out").toString(),this.disabledSelector.matches(i)||!a||"idle"!==n,(async function(){try{e.loggingOutState="busy",await new c(e).fetch("foxy://customer-api/session",{method:"DELETE"}),e.loggingOutState="idle"}catch(t){e.loggingOutState="fail",e.loggingOutStateResetTimeout=setTimeout((()=>{e.loggingOutState="idle",e.loggingOutStateResetTimeout=null}),1e3)}}),"idle"===n?t(z||(z=L`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):t(E||(E=L` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0} ${0}"> </foxy-spinner> `),"fail"===n?"error":"busy",this.lang,this.ns,null!==(o=null===(r=customElements.get("foxy-customer"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:""),this.renderTemplateOrSlot(`${i}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(A||(A=L`
|
|
2
2
|
${0}
|
|
3
3
|
|
|
4
4
|
<foxy-internal-customer-portal-subscriptions
|
|
@@ -15,7 +15,7 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
15
15
|
</foxy-internal-customer-portal-subscriptions>
|
|
16
16
|
|
|
17
17
|
${0}
|
|
18
|
-
`),this.renderTemplateOrSlot(`${
|
|
18
|
+
`),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),this.data,t.data,this.renderTemplateOrSlot(`${s}:after`))},this.__renderTransactions=(e,t)=>{const s="customer:transactions";return e(F||(F=L`
|
|
19
19
|
${0}
|
|
20
20
|
|
|
21
21
|
<foxy-internal-customer-portal-transactions
|
|
@@ -31,12 +31,12 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
31
31
|
</foxy-internal-customer-portal-transactions>
|
|
32
32
|
|
|
33
33
|
${0}
|
|
34
|
-
`),this.renderTemplateOrSlot(`${
|
|
34
|
+
`),this.renderTemplateOrSlot(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),this.hiddenSelector.zoom(s).toString(),t.group,t.lang,t.ns,this.getNestedTemplates(s),t.data,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return e(e({},super.properties),{},{customer:{type:String},loggingOutState:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}render(){var e,s;const r=this.hiddenSelector.zoom("customer"),o=[r.toString(),"header:actions:edit:form:delete","attributes","transactions","subscriptions","addresses:actions:create","payment-methods:list:card"],i=this.getNestedTemplates("customer"),n=i["header:actions:after"],a=i["header:actions:edit:form:timestamps:after"],l=i.default;return i["header:actions:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions:sign-out",!0);return e(I||(I=L`
|
|
35
35
|
<div style="display:flex">
|
|
36
36
|
${0}
|
|
37
37
|
${0}
|
|
38
38
|
</div>
|
|
39
|
-
`),
|
|
39
|
+
`),s?"":this.__renderHeaderActionsSignOut(),null==n?void 0:n(e,t))},i.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(N||(N=L`
|
|
40
40
|
<style>
|
|
41
41
|
.space-y-m > :not([hidden]) ~ :not([hidden]) {
|
|
42
42
|
--tw-space-y-reverse: 0;
|
|
@@ -51,10 +51,10 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
51
51
|
${0}
|
|
52
52
|
${0}
|
|
53
53
|
</div>
|
|
54
|
-
`),
|
|
54
|
+
`),r.matches("default",!0)?"":null==l?void 0:l(e,t),r.matches("subscriptions",!0)?"":s(e,t),r.matches("transactions",!0)?"":o(e,t))},i["header:actions:edit:form:timestamps:after"]=(e,t)=>{var s,r;const o="change-password";return e(H||(H=L`
|
|
55
55
|
${0}
|
|
56
56
|
${0}
|
|
57
|
-
`),null==a?void 0:a(e,t),t.hiddenSelector.matches(o,!0)?"":e(
|
|
57
|
+
`),null==a?void 0:a(e,t),t.hiddenSelector.matches(o,!0)?"":e(U||(U=L`
|
|
58
58
|
${0}
|
|
59
59
|
|
|
60
60
|
<foxy-internal-customer-portal-change-password
|
|
@@ -69,31 +69,33 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
69
69
|
</foxy-internal-customer-portal-change-password>
|
|
70
70
|
|
|
71
71
|
${0}
|
|
72
|
-
`),t.renderTemplateOrSlot(`${o}:before`),t.href,null!==(
|
|
72
|
+
`),t.renderTemplateOrSlot(`${o}:before`),t.href,null!==(r=null===(s=t.data)||void 0===s?void 0:s.email)&&void 0!==r?r:"",t.lang,t.ns,t.in("busy")||t.disabledSelector.matches(o,!0),t.renderTemplateOrSlot(`${o}:after`)))},t(q||(q=L` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),o.join(" ").trim(),this.group,this.customer,this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-customer"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"",i,(()=>this.requestUpdate()))}disconnectedCallback(){super.disconnectedCallback(),this.loggingOutStateResetTimeout&&clearTimeout(this.loggingOutStateResetTimeout)}get __customerElement(){return this.renderRoot.querySelector("#customer")}}),customElements.define("foxy-internal-customer-portal-logged-out-view",class extends Y{constructor(){super(...arguments),this.group="",this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{const{lang:e,ns:s}=this,r=this.renderRoot.querySelector("#access-recovery-form"),o=!!(null==r?void 0:r.in("busy"));return t(C||(C=X` <div class="flex flex-col leading-m font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-bold ${0}" lang="${0}" key="recover_access" ns="${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),o?"text-disabled":"text-body",e,s,o?"text-disabled":"text-secondary",e,s,this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{const e=this.renderRoot.querySelector("#access-recovery-form"),s=this.disabledSelector.zoom("access-recovery");return t(D||(D=X` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="back"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==e?void 0:e.in("busy"))||s.matches("back",!0),(()=>this.page="sign-in"),this.ns,this.lang,this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,s;const r="access-recovery:form",o=this.hiddenSelector.zoom(r);return t(V||(V=X` <div> ${0} <foxy-access-recovery-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="access-recovery:form" parent="foxy://customer-api/recover" group="${0}" lang="${0}" ns="${0} ${0}" id="access-recovery-form" .templates="${0}" @update="${0}"> </foxy-access-recovery-form> ${0} </div> `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),o.toString(),this.group,this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"",this.getNestedTemplates(r),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${r}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",s=this.hiddenSelector.zoom(e);return t(J||(J=X` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-20rem flex-1"> ${0} <div class="space-y-l"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),s.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),s.matches("form",!0)?"":this.__renderAccessRecoveryForm(),s.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{const{lang:e,ns:s}=this,r=this.renderRoot.querySelector("#sign-in-form"),o=!!(null==r?void 0:r.in("busy"));return t(W||(W=X` <div class="flex flex-col leading-m font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-bold ${0}" lang="${0}" key="sign_in" ns="${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),o?"text-disabled":"text-body",e,s,o?"text-disabled":"text-secondary",e,s,this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),s=this.disabledSelector.zoom("sign-in");return t(B||(B=X` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="recover_access"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==e?void 0:e.in("busy"))||s.matches("recover",!0),(()=>this.page="access-recovery"),this.ns,this.lang,this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInForm=()=>{var e,s;const r="sign-in:form",o=this.hiddenSelector.zoom(r);return t(G||(G=X` <div> ${0} <foxy-sign-in-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-in:form" parent="foxy://customer-api/session" group="${0}" lang="${0}" id="sign-in-form" ns="${0} ${0}" .templates="${0}" @update="${0}"> </foxy-sign-in-form> ${0} </div> `),this.renderTemplateOrSlot(`${r}:before`),this.readonlySelector.zoom(r).toString(),this.disabledSelector.zoom(r).toString(),o.toString(),this.group,this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"",this.getNestedTemplates("sign-in:form"),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${r}:after`))},this.__renderSignIn=()=>{const e="sign-in",s=this.hiddenSelector.zoom(e);return t(K||(K=X` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-20rem flex-1"> ${0} <div class="space-y-l"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot("sign-in:before"),s.matches("header",!0)?"":this.__renderSignInHeader(),s.matches("form",!0)?"":this.__renderSignInForm(),s.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot("sign-in:after"))}}static get properties(){return e(e({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,r(M||(M=X`.max-w-20rem{max-width:20rem}`))]}render(){const{page:e,hiddenSelector:s}=this;return"access-recovery"!==e||s.matches("access-recovery",!0)?"sign-in"!==e||s.matches("sign-in",!0)?t(Q||(Q=X``)):this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-subscriptions",class extends ue{constructor(){super(...arguments),this.settings=null,this.customer=null,this.group="",this.__renderFormHeaderActionsUpdate=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();let o="";if(!r&&t.in({idle:"snapshot"})){const e=t.data._links["fx:sub_token_url"].href,s=new URL(e);s.searchParams.set("cart","checkout"),s.searchParams.set("sub_restart","auto"),o=s.toString()}return e(te||(te=pe`
|
|
73
73
|
${0}
|
|
74
74
|
|
|
75
75
|
<foxy-internal-customer-portal-link
|
|
76
76
|
data-testid="header:actions:update"
|
|
77
77
|
href=${0}
|
|
78
78
|
icon="icons:credit-card"
|
|
79
|
+
?disabled=${0}
|
|
79
80
|
>
|
|
80
81
|
<foxy-i18n lang=${0} key="update_billing" ns=${0}></foxy-i18n>
|
|
81
82
|
</foxy-internal-customer-portal-link>
|
|
82
83
|
|
|
83
84
|
${0}
|
|
84
|
-
`),t.renderTemplateOrSlot("header:actions:update:before"),r,t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{
|
|
85
|
+
`),t.renderTemplateOrSlot("header:actions:update:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:update:after"))},this.__renderFormHeaderActionsEnd=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s.end_date);let o="";if(!r&&t.in({idle:"snapshot"})){const e=new URL(t.data._links["fx:sub_token_url"].href);e.searchParams.set("sub_cancel","true"),o=e.toString()}return e(se||(se=pe`
|
|
85
86
|
${0}
|
|
86
87
|
|
|
87
88
|
<foxy-internal-customer-portal-link
|
|
88
89
|
data-testid="header:actions:end"
|
|
89
90
|
href=${0}
|
|
90
91
|
icon="icons:block"
|
|
92
|
+
?disabled=${0}
|
|
91
93
|
>
|
|
92
94
|
<foxy-i18n lang=${0} key="end_subscription" ns=${0}></foxy-i18n>
|
|
93
95
|
</foxy-internal-customer-portal-link>
|
|
94
96
|
|
|
95
97
|
${0}
|
|
96
|
-
`),t.renderTemplateOrSlot("header:actions:end:before"),r,t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const
|
|
98
|
+
`),t.renderTemplateOrSlot("header:actions:end:before"),o,r||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("header:actions:end:after"))},this.__renderFormHeaderActions=(e,t)=>{const s=t.hiddenSelector.matches("header:actions:update"),r=t.hiddenSelector.matches("header:actions:end");return e(re||(re=pe`
|
|
97
99
|
<style>
|
|
98
100
|
main {
|
|
99
101
|
display: flex;
|
|
@@ -113,25 +115,26 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
113
115
|
</main>
|
|
114
116
|
|
|
115
117
|
${0}
|
|
116
|
-
`),t.renderTemplateOrSlot("header:actions:before"),
|
|
118
|
+
`),t.renderTemplateOrSlot("header:actions:before"),s?"":this.__renderFormHeaderActionsUpdate(e,t),r?"":this.__renderFormHeaderActionsEnd(e,t),t.renderTemplateOrSlot("header:actions:after"))},this.__renderFormItemsActionsUpdate=(e,t)=>{var s,r,o,i;const n=null!==(o=null===(r=null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"])||void 0===r?void 0:r.href)&&void 0!==o?o:"",a=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(oe||(oe=pe`
|
|
117
119
|
${0}
|
|
118
120
|
|
|
119
121
|
<foxy-internal-customer-portal-link
|
|
120
122
|
data-testid="items:actions:update"
|
|
121
123
|
class="text-primary"
|
|
122
124
|
href=${0}
|
|
125
|
+
?disabled=${0}
|
|
123
126
|
>
|
|
124
127
|
<foxy-i18n lang=${0} key="update_items" ns=${0}></foxy-i18n>
|
|
125
128
|
</foxy-internal-customer-portal-link>
|
|
126
129
|
|
|
127
130
|
${0}
|
|
128
|
-
`),t.renderTemplateOrSlot("items:actions:update:before"),
|
|
131
|
+
`),t.renderTemplateOrSlot("items:actions:update:before"),n,a||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=s=>{const r=e({},s.dialog.templates),o=r["header:after"],i=r["items:actions:after"];return r["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(ie||(ie=pe`
|
|
129
132
|
${0}
|
|
130
133
|
${0}
|
|
131
|
-
`),
|
|
134
|
+
`),s?"":this.__renderFormHeaderActions(e,t),null==o?void 0:o(e,t))},r["items:actions:after"]=(e,t)=>{var s;const r=!!(null===(s=t.data)||void 0===s?void 0:s._links["fx:sub_modification_url"]),o=t.hiddenSelector.matches("items:actions:update",!0);return e(ne||(ne=pe`
|
|
132
135
|
${0}
|
|
133
136
|
${0}
|
|
134
|
-
`),
|
|
137
|
+
`),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==i?void 0:i(e,t))},t(ae||(ae=pe` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),s.dialog.disabledControls.toString(),s.dialog.readonlyControls.toString(),s.dialog.hiddenControls.toString(),JSON.stringify(this.settings),s.dialog.parent,s.dialog.group,s.dialog.lang,s.dialog.href,s.dialog.ns,r,s.handleUpdate,s.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=o(e,Z);var r,i;return t(le||(le=pe`
|
|
135
138
|
<button
|
|
136
139
|
class=${0}
|
|
137
140
|
?disabled=${0}
|
|
@@ -147,7 +150,7 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
147
150
|
>
|
|
148
151
|
</foxy-subscription-card>
|
|
149
152
|
</button>
|
|
150
|
-
`),
|
|
153
|
+
`),m({"block w-full border border-contrast-10 p-m rounded-t-l rounded-b-l":!0,"focus-outline-none focus-border-primary":!0,"hover-border-contrast-30":null!==s.data}),null===s.data,(e=>{const t=new URL(s.href);t.searchParams.set("zoom","last_transaction,transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),s.parent,s.group,s.lang,s.href,s.ns,null!==(i=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==i?i:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=o(e,ee);return t(de||(de=pe`
|
|
151
154
|
<foxy-collection-page
|
|
152
155
|
ns=${0}
|
|
153
156
|
href=${0}
|
|
@@ -158,4 +161,4 @@ import"./foxy-customer.js";import"./shared-0ced76a0.js";import"./shared-60126eee
|
|
|
158
161
|
.templates=${0}
|
|
159
162
|
>
|
|
160
163
|
</foxy-collection-page>
|
|
161
|
-
`),
|
|
164
|
+
`),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>t(ce||(ce=pe` ${0} <foxy-i18n class="block text-l font-semibold" lang="${0}" key="subscription_plural" ns="${0}"> </foxy-i18n> ${0} `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{var e;const s=this.disabledSelector.zoom("list"),r=this.readonlySelector.zoom("list"),o=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return t(me||(me=pe` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" .form="${0}" .templates="${0}"> </foxy-form-dialog> <foxy-collection-pages class="block space-y-m" first="${0}" group="${0}" lang="${0}" ns="${0}" manual .page="${0}" .templates="${0}"> </foxy-collection-pages> ${0} `),this.renderTemplateOrSlot("list:before"),r.zoom("form").toString(),s.zoom("form").toString(),o.join(" ").trim(),u(null===(e=this.customer)||void 0===e?void 0:e._links["fx:subscriptions"].href),this.group,this.lang,this.ns,this.__renderForm,this.getNestedTemplates("list:form"),this.__activeSubscriptionsLink,this.group,this.lang,this.ns,this.__renderPage,this.getNestedTemplates("list:card"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return e(e({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return t(he||(he=pe` <div class="space-y-s" data-testid="subscriptions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header",!0)?"":this.__renderHeader(),this.hiddenSelector.matches("list",!0)?"":this.__renderList())}get __subscriptionDialog(){return this.renderRoot.querySelector("#subscription-dialog")}get __activeSubscriptionsLink(){try{const e=new URL(this.customer._links["fx:subscriptions"].href);return e.searchParams.set("zoom","last_transaction,transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends be{constructor(){super(...arguments),this.customer=null,this.group="",this.__renderHeader=()=>t(ge||(ge=ye` <div> ${0} <foxy-i18n class="text-l font-semibold" lang="${0}" key="transaction_plural" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("header:before"),this.lang,this.ns,this.renderTemplateOrSlot("header:after")),this.__renderList=()=>{let e="";if(this.customer){const t=new URL(this.customer._links["fx:transactions"].href);t.searchParams.set("zoom","items"),e=t.toString()}return t(fe||(fe=ye` <div> ${0} <foxy-collection-pages spinner="foxy-spinner" group="${0}" first="${0}" class="block divide-y divide-contrast-10 px-m border border-contrast-10 rounded-t-l rounded-b-l" page="foxy-transactions-table" lang="${0}" ns="${0}" manual .templates="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),this.renderTemplateOrSlot("list:after"))}}static get properties(){return e(e({},super.properties),{},{customer:{attribute:!1},group:{type:String}})}render(){return t($e||($e=ye` <div class="space-y-s" data-testid="transactions"> ${0} ${0} </div> `),this.hiddenSelector.matches("header")?"":this.__renderHeader(),this.hiddenSelector.matches("list")?"":this.__renderList())}}),customElements.define("foxy-internal-customer-portal-change-password",class extends _{constructor(){super(...arguments),this.isErrorVisible=!1,this.disabled=!1,this.customer="",this.session="",this.email="",this.step=1,this.__handleTriggerClick=e=>{const t=e.currentTarget,s=this.renderRoot.querySelector("#dialog");this.isErrorVisible=!1,this.step=1,s.show(t)},this.__handleSignInFormUpdate=(e,t)=>{var s,r,o,i;t.handleUpdate(e);const n=e.currentTarget;!(null===(s=n.form.credential)||void 0===s?void 0:s.email)&&this.email&&n.edit({type:null!==(r=n.form.type)&&void 0!==r?r:"password",credential:{email:this.email,password:null!==(i=null===(o=n.form.credential)||void 0===o?void 0:o.password)&&void 0!==i?i:""}})},this.__handleSignInFormFetch=e=>{e.defaultPrevented||"POST"===e.request.method&&e.request.url===this.session&&(e.preventDefault(),e.stopImmediatePropagation(),e.respondWith(this.__getResponse(e.request)))},this.__renderSignInForm=e=>{const s=[],r=["email"];let o="bg-primary-10",i="text-primary",n="icons:lock-outline",a="password:before";return 2===this.step&&(r.push("password"),a="new-password:before",n="icons:lock-open"),3===this.step&&(s.push("new-password"),r.push("password","submit"),o="bg-success-10",i="text-success",a="new-password:before",n="icons:done-all"),this.isErrorVisible||r.push("error"),t(b||(b=S` <foxy-sign-in-form readonlycontrols="${0}" hiddencontrols="${0}" parent="${0}" class="mt-s sm-w-narrow-modal" lang="${0}" ns="${0}" @update="${0}" @fetch="${0}"> <div class="mx-auto flex mb-m w-l h-l rounded-t-l rounded-b-l ${0}" slot="${0}"> <iron-icon icon="${0}" class="m-auto ${0}"></iron-icon> </div> <foxy-i18n class="block text-center text-m text-secondary leading-m mb-m" lang="${0}" slot="${0}" key="change_password_step_${0}" ns="${0}"> </foxy-i18n> </foxy-sign-in-form> `),s.join(" "),r.join(" "),this.session,e.dialog.lang,e.dialog.ns,(t=>this.__handleSignInFormUpdate(t,e)),this.__handleSignInFormFetch,o,a,n,i,e.dialog.lang,a,this.step,e.dialog.ns)}}static get properties(){return e(e({},super.properties),{},{isErrorVisible:{attribute:!1},disabled:{type:Boolean},customer:{type:String},session:{type:String},email:{type:String},step:{attribute:!1},fail:{attribute:!1}})}render(){return t(v||(v=S` <foxy-form-dialog hiddencontrols="save-button" header="change_password" lang="${0}" ns="${0}" alert id="dialog" .form="${0}"> </foxy-form-dialog> <vaadin-button class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="change_password" ns="${0}"></foxy-i18n> </vaadin-button> `),this.lang,this.ns,this.__renderSignInForm,this.disabled,this.__handleTriggerClick,this.lang,this.ns)}async __getResponse(e){const t=await e.clone().json(),s=new c(this);if(this.isErrorVisible=!1,1===this.step){const r=await s.fetch(e.url,{method:e.method,body:JSON.stringify(t)});if(r.ok){this.step=2;const e={_embedded:{"fx:errors":[{code:"new_password_required_error"}]}};return new c.WHATWGResponse(JSON.stringify(e),{status:400})}return this.isErrorVisible=!0,r}if(2===this.step){const r=await s.fetch(this.customer,{method:"PATCH",body:JSON.stringify({password:t.credential.new_password,password_old:t.credential.password})});return r.ok?(this.step=3,t._links={self:{href:e.url}},new c.WHATWGResponse(JSON.stringify(t))):(this.isErrorVisible=!0,r)}return s.fetch(e)}}),customElements.define("foxy-internal-customer-portal-link",k),customElements.define("foxy-customer-portal",y);export{y as CustomerPortal};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-46ee137f.js";import"./shared-60126eee.js";import{h as t}from"./shared-ff79f3f9.js";import"./shared-0ced76a0.js";import"./shared-9221e6b2.js";import"./foxy-payment-method-card.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-form.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./foxy-i18n.js";import{L as e,h as s,j as r,w as a}from"./shared-63eaded9.js";import{C as o}from"./shared-593f7e2c.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{b as h,S as i,T as d,a as n}from"./shared-
|
|
1
|
+
import"./shared-46ee137f.js";import"./shared-60126eee.js";import{h as t}from"./shared-ff79f3f9.js";import"./shared-0ced76a0.js";import"./shared-9221e6b2.js";import"./foxy-payment-method-card.js";import"./foxy-subscription-form.js";import"./foxy-form-dialog.js";import"./foxy-transactions-table.js";import"./foxy-collection-pages.js";import"./foxy-collection-page.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./foxy-customer-form.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./foxy-spinner.js";import"./foxy-table.js";import"./foxy-i18n.js";import{L as e,h as s,j as r,w as a}from"./shared-63eaded9.js";import{C as o}from"./shared-593f7e2c.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{b as h,S as i,T as d,a as n}from"./shared-4168c6cd.js";import{c as l}from"./shared-4e709717.js";import"./shared-f968379d.js";import"./shared-05956f55.js";import{S as m}from"./shared-8730c141.js";import"./shared-ec861f31.js";import"./shared-bb824ab4.js";import{G as c}from"./shared-1177fd2a.js";import{N as v}from"./shared-44cfc617.js";import{S as p}from"./shared-fbeb1de3.js";import{i as g}from"./shared-6d45a07b.js";import"./shared-bda600d6.js";import"./shared-218ba06e.js";import"./shared-1761daef.js";import"./foxy-nucleon-element.js";import"./foxy-cancellation-form.js";import"./shared-775b37f9.js";import"./shared-2061be9a.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-e36452b9.js";import"./shared-93f23978.js";import"./shared-e7f8ffe9.js";import"./shared-59e44f29.js";import"./shared-05b473a7.js";import"./shared-2b685624.js";import"./shared-6b7602c7.js";import"./shared-b710881a.js";import"./shared-d3167239.js";import"./shared-b738ee96.js";let z,f,u,b=t=>t;class $ extends e{constructor(){super(...arguments),this.value=0,this.size=0}static get properties(){return{value:{type:Number},size:{type:Number}}}static get styles(){return h.styles}render(){const t=[],e=[];for(let r=0;r<this.size;++r)t.push(s(z||(z=b` <button id="tab-${0}" role="tab" class="${0}" aria-controls="panel-${0}" aria-selected="${0}" @click="${0}" @keydown="${0}"> <slot name="tab-${0}"></slot> </button> `),r,l({"text-l font-semibold px-s rounded focus-outline-none focus-shadow-outline":!0,"text-tertiary hover-text-body focus-text-body":this.value!==r}),r,this.value===r,(()=>this.value=r),this.__handleKeyDown,r)),e.push(s(f||(f=b` <slot id="panel-${0}" role="tabpanel" name="panel-${0}" class="${0}" aria-hidden="${0}" aria-labelledby="tab-${0}"> </slot> `),r,r,l({hidden:this.value!==r}),this.value!==r,r));return s(u||(u=b` <div role="tablist" aria-orientation="horizontal" class="-mx-s mb-s">${0}</div> ${0} `),t,e)}__handleKeyDown(t){if(t.key.startsWith("Arrow")){t.preventDefault();const e=t.target;let s=null;"ArrowRight"===t.key||"ArrowDown"===t.key?s=e.nextElementSibling:"ArrowLeft"!==t.key&&"ArrowUp"!==t.key||(s=e.previousElementSibling),null==s||s.click(),null==s||s.focus()}}}
|
|
2
2
|
/**
|
|
3
3
|
@license
|
|
4
4
|
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import"./foxy-i18n.js";import{T as s}from"./shared-
|
|
1
|
+
import"./foxy-spinner.js";import"./foxy-i18n.js";import{T as s}from"./shared-2b685624.js";import{a as e}from"./shared-4168c6cd.js";import{h as a}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import"./shared-ff79f3f9.js";import"./shared-60126eee.js";import"./shared-1761daef.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./foxy-nucleon-element.js";import"./shared-44cfc617.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";import"./shared-4e709717.js";let t,n,o,m,r=s=>s;class d extends(e(s,"customers-table")){constructor(){super(...arguments),this.columns=[d.nameColumn,d.idColumn,d.dateColumn,d.emailColumn]}}d.nameColumn={cell:s=>a(t||(t=r` <span data-testclass="names">${0} ${0}</span> `),s.data.first_name,s.data.last_name)},d.idColumn={hideBelow:"md",cell:s=>a(n||(n=r` <span role="presentation" class="text-m text-tertiary">ID </span> <span data-testclass="ids" class="text-m text-secondary font-tnum">${0}</span> `),s.data.id)},d.dateColumn={hideBelow:"md",cell:s=>a(o||(o=r` <span class="text-m text-secondary font-tnum"> <foxy-i18n data-testclass="i18n" lang="${0}" key="date_created" ns="${0}"> </foxy-i18n> <foxy-i18n data-testclass="dates i18n" lang="${0}" key="date" ns="${0}" .options="${0}"> </foxy-i18n> </span> `),s.lang,s.ns,s.lang,s.ns,{value:s.data.date_created})},d.emailColumn={cell:s=>a(m||(m=r`<span data-testclass="emails" class="text-m text-secondary">${0}</span>`),s.data.email)},d.__ns="customers-table",customElements.define("foxy-customers-table",d);export{d as CustomersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{h as r}from"./shared-63eaded9.js";import{a as s}from"./shared-
|
|
1
|
+
import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{h as r}from"./shared-63eaded9.js";import{a as s}from"./shared-4168c6cd.js";import{T as e}from"./shared-5d1314d7.js";import"./shared-46ee137f.js";import"./shared-ff79f3f9.js";import"./shared-60126eee.js";import"./shared-1761daef.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./shared-44cfc617.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";import"./shared-4e709717.js";let t,i,a=r=>r;class o extends(s(e,"discount-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}render(){return super.render({title:s=>r(t||(t=a`${0} • ${0}`),s.name,s.code),subtitle:s=>r(i||(i=a` <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"> </foxy-i18n> `),JSON.stringify({currencyDisplay:this.__currencyDisplay,amount:`${Math.abs(s.amount)} ${this.__currency}`}),this.lang,this.ns)})}async _sendGet(){const r=await super._sendGet(),[s,e]=await Promise.all([super._fetch(r._links["fx:transaction"].href),super._fetch(r._links["fx:store"].href)]);return this.__currency=s.currency_code,this.__currencyDisplay=e.use_international_currency_symbol?"code":"symbol",r}}customElements.define("foxy-discount-card",o);export{o as DiscountCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as t,h as e}from"./shared-63eaded9.js";import"./shared-0ced76a0.js";import{C as s}from"./shared-
|
|
1
|
+
import{_ as t,h as e}from"./shared-63eaded9.js";import"./shared-0ced76a0.js";import{C as s}from"./shared-f968379d.js";import"./shared-bb824ab4.js";import{c as n}from"./shared-4168c6cd.js";import{p as i}from"./shared-87ca7818.js";import{C as r}from"./shared-a94b7271.js";import"./shared-05956f55.js";import{D as a,I as o}from"./shared-8730c141.js";import{E as c}from"./shared-93f23978.js";import"./shared-ec861f31.js";import"./foxy-i18n.js";import{G as m}from"./shared-1177fd2a.js";import"./shared-df573cea.js";import"./shared-46ee137f.js";import"./shared-f0a83bd6.js";import"./shared-ff79f3f9.js";import"./shared-1761daef.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-4e709717.js";import"./shared-00563cb0.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";class h extends CustomEvent{constructor(t){super("change",{detail:t})}}class u extends CustomEvent{constructor(){super("submit",{cancelable:!0})}}let d,l,p,y,g,f,$,x,_=t=>t;class b extends n{constructor(){super("donation"),this.currency=null,this.amount=null,this.store=null,this.name=null,this.custom=null,this.amounts=null,this.frequency=null,this.frequencies=null,this.designation=null,this.designations=null,this.comment=null,this.anonymity=!1,this.anonymous=!1,this.image=null,this.code=null,this.url=null,this.cart="checkout",this.target="_top"}static get scopedElements(){return{"vaadin-text-area":customElements.get("vaadin-text-area"),"x-error-screen":c,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":a,"x-checkbox":r,"x-choice":s,"x-group":m,"x-i18n":o}}static get properties(){return t(t({},super.properties),{},{currency:{type:String},custom:{type:Array},amount:{type:Number},amounts:{type:Array},frequency:{type:String},frequencies:{type:Array},designation:{type:Array},designations:{type:Array},comment:{type:String},anonymity:{reflect:!0,type:Boolean},anonymous:{reflect:!0,type:Boolean},image:{type:String},store:{type:String},name:{type:String},code:{type:String},url:{type:String},cart:{type:String},target:{type:String},empty:{type:String}})}static get events(){return{change:h,submit:u}}submit(){this.dispatchEvent(new u)&&this.__form.submit()}render(){var t,s;if(!(this.currency&&this.amount&&this.store&&this.name))return e(d||(d=_` <x-error-screen data-testid="error" type="setup_needed" class="relative"></x-error-screen> `));const n=this.store.includes(".")?this.store:`${this.store}.foxycart.com`;return e(l||(l=_` <form target="${0}" class="sr-only" method="POST" action="https://${0}/cart" data-testid="form"> ${0} </form> <section> ${0} </section> <section> ${0} </section> <section> ${0} </section> <section> ${0} <div class="flex flex-wrap -m-s"> ${0} <div class="flex-1 p-s"> <vaadin-button class="w-full" theme="primary" data-testid="submit" @click="${0}"> <x-i18n .opts="${0}" lang="${0}" key="${0}" ns="${0}"> </x-i18n> </vaadin-button> </div> </div> </section> `),this.target,n,[...this.__data.entries()].map((([t,s])=>e(p||(p=_`<input type="hidden" name="${0}" value="${0}">`),t,s))),this.amounts&&this.amounts.length>0?e(y||(y=_` <x-group frame> <x-i18n ns="${0}" lang="${0}" key="amount" slot="header"></x-i18n> <x-choice ?custom="${0}" .getText="${0}" .items="${0}" .value="${0}" type="integer" lang="${0}" min="1" ns="${0}" data-testid="amount" @change="${0}"> </x-choice> </x-group> <slot name="amount" class="block my-m"></slot> `),this.ns,this.lang,!!(null===(t=this.custom)||void 0===t?void 0:t.includes("amount")),(t=>this.__translateAmount(parseInt(t,10))),this.amounts.map(String),this.amount.toString(),this.lang,this.ns,(t=>{const e=parseInt(t.detail);this.amount=isNaN(e)?1:e})):"",this.designations&&this.designations.length>0?e(g||(g=_` <x-dropdown .label="${0}" .items="${0}" .value="${0}" data-testid="designation" @change="${0}"> </x-dropdown> <slot name="designation" class="block my-m"></slot> `),this._t("designation").toString(),this.designations,Array.isArray(this.designation)?"${this.designation[0]}: ${this.designation[1]}":this.designation,(t=>{this.designation=t.detail})):"","string"==typeof this.comment?e(f||(f=_` <vaadin-text-area placeholder="${0}" value="${0}" label="${0}" class="w-full" data-testid="comment" @input="${0}"> </vaadin-text-area> <slot name="comment" class="block my-m"></slot> `),this._t("comment_placeholder").toString(),this.comment,this._t("comment_label").toString(),(t=>{t.stopPropagation(),this.comment=t.target.value})):"",this.anonymity?e($||($=_` <x-checkbox class="my-m" data-testid="anonymity" ?checked="${0}" @change="${0}"> ${0} </x-checkbox> `),this.anonymous,(t=>this.anonymous=t.detail),this._t("anonymous")):"",this.frequencies&&this.frequencies.length>0?e(x||(x=_` <div class="flex-1 p-s"> <x-dropdown .value="${0}" .items="${0}" .getText="${0}" data-testid="frequency" @change="${0}"> </x-dropdown> </div> `),this.frequency,this.frequencies,this.__translateFrequency.bind(this),(t=>{this.frequency=t.detail})):"",(()=>this.submit()),{amount:this.__translateAmount(this.amount),frequency:this.frequency?this.__translateFrequency(this.frequency):""},this.lang,this.frequency&&!(null===(s=this.frequencies)||void 0===s?void 0:s.length)?"donate_recurrently":"donate",this.ns)}updated(){this.dispatchEvent(new h(this.__data))}get __data(){const t=new FormData;return"string"==typeof this.designation&&t.set("Designation",this.designation.trim()),"number"==typeof this.amount&&"string"==typeof this.currency&&t.set("price",`${this.amount.toFixed(2)}${this.currency}`),this.frequency&&t.set("sub_frequency",this.frequency),"string"==typeof this.comment&&t.set("Comment",this.comment.trim()),"string"==typeof this.image&&t.set("image",this.image),"string"==typeof this.code&&t.set("code",this.code),"string"==typeof this.name&&t.set("name",this.name.trim()),"string"==typeof this.url&&t.set("url",this.url),"string"==typeof this.cart&&t.set("cart",this.cart),this.empty&&t.set("empty",this.empty),this.anonymous&&t.set("Anonymous","true"),t.set("quantity","1"),t}get __form(){return this.shadowRoot.querySelector("form")}__translateFrequency(t){if(!t||t.match(/^\s*$/))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:s}=i(t);return this._t("frequency",{units:this._t(s,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:0,currency:this.currency,style:"currency"})}}customElements.define("foxy-donation",b);export{b as Donation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-bb824ab4.js";import{C as e,a as t}from"./shared-
|
|
1
|
+
import"./shared-bb824ab4.js";import{C as e,a as t}from"./shared-f968379d.js";import"./shared-0ced76a0.js";import"./shared-bda600d6.js";import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{_ as a,j as i,h as s}from"./shared-63eaded9.js";import"./shared-46ee137f.js";import"./shared-df573cea.js";import"./shared-f0a83bd6.js";import{S as r,T as n,a as d}from"./shared-4168c6cd.js";import{c as o}from"./shared-4e709717.js";import"./shared-05956f55.js";import"./shared-8730c141.js";import"./shared-ec861f31.js";import{G as l}from"./shared-1177fd2a.js";import{P as c}from"./shared-d3167239.js";import{C as h}from"./shared-593f7e2c.js";import{N as m}from"./shared-44cfc617.js";import{i as p}from"./shared-6d45a07b.js";import"./shared-ff79f3f9.js";import"./shared-1761daef.js";import"./shared-87ca7818.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-60126eee.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";let f,u,$,v,y,_,b,x,g=e=>e;const j=r(n(h(d(m,"email-template-form"))));class S extends j{constructor(){super(...arguments),this.templates={},this.__cacheState="idle",this.__contentChoice="default"}static get properties(){return a(a({},super.properties),{},{__cacheState:{attribute:!1},__contentChoice:{attribute:!1}})}static get styles(){return[...super.styles,i(f||(f=g`#cached-content::part(input-field){max-height:15em}`))]}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"foxy-internal-sandbox":customElements.get("foxy-internal-sandbox"),"foxy-spinner":customElements.get("foxy-spinner"),"foxy-i18n":customElements.get("foxy-i18n"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-text-area":customElements.get("vaadin-text-area"),"vaadin-button":customElements.get("vaadin-button"),"x-property-table":c,"x-choice":e,"x-group":l}}render(){var e,t;const{hiddenSelector:a,href:i,lang:r,ns:n}=this,d=i?"delete":"create",l=this.in("busy"),c=this.in("fail");return s(u||(u=g` <div class="space-y-m"> ${0} ${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> `),a.matches("description",!0)?"":this.__renderDescription(),a.matches("content",!0)?"":this.__renderContent(),a.matches("timestamps",!0)||!i?"":this.__renderTimestamps(),a.matches(d)?"":this.__renderAction(d),o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!l&&!c}),c?"error":l?"busy":"empty",r,n,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}__renderDescription(){var e,t;const a="description";return s($||($=g` <div> ${0} <vaadin-text-field data-testid="${0}" class="w-full mb-s" label="${0}" ?disabled="${0}" ?readonly="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> ${0} </div> `),this.renderTemplateOrSlot(`${a}:before`),a,this.t(a),!this.in("idle")||this.disabledSelector.matches(a),this.readonlySelector.matches(a),null!==(t=null===(e=this.form)||void 0===e?void 0:e.description)&&void 0!==t?t:"",(e=>"Enter"===e.key&&this.submit()),(e=>{this.edit({description:e.currentTarget.value})}),this.renderTemplateOrSlot(`${a}:after`))}__renderContent(){return s(v||(v=g` <div data-testid="content"> ${0} <div class="space-y-l"> ${0} ${0} </div> ${0} </div> `),this.renderTemplateOrSlot("content:before"),this.__renderContentVariant("content_text_url","content_text","text_template"),this.__renderContentVariant("content_html_url","content_html","html_template"),this.renderTemplateOrSlot("content:after"))}__renderContentVariant(e,a,i){var r;const n=!this.in("idle")||this.disabledSelector.matches("content",!0),d=this.readonlySelector.matches("content",!0),l=this.form[e]?"url":this.form[a]?"clipboard":this.__contentChoice;return s(y||(y=g` <x-group frame> <foxy-i18n class="${0}" lang="${0}" slot="header" key="${0}" ns="${0}"> </foxy-i18n> <x-choice data-testid="${0}-type" .value="${0}" .items="${0}" ?readonly="${0}" ?disabled="${0}" @change="${0}"> ${0} <div slot="url" ?hidden="${0}"> <div class="flex items-center mt-0 mb-m"> <vaadin-text-field data-testid="${0}-url" value="${0}" class="mr-s flex-grow" ?readonly="${0}" ?disabled="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> <vaadin-button data-testid="${0}-cache" class="relative" ?disabled="${0}" ?hidden="${0}" @click="${0}"> <foxy-i18n class="${0}" lang="${0}" key="cache" ns="${0}"> </foxy-i18n> <div class="${0}"> <foxy-spinner layout="no-label" class="m-auto" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </vaadin-button> </div> </div> <div slot="clipboard" ?hidden="${0}"> <vaadin-text-area data-testid="${0}-clipboard" id="cached-content" class="w-full mb-m" ?readonly="${0}" ?disabled="${0}" .value="${0}" @input="${0}"> </vaadin-text-area> </div> </x-choice> </x-group> `),o({"transition-colors":!0,"text-disabled":n}),this.lang,i,this.ns,a.replace("_","-"),l,["default","url","clipboard"],d,n,(i=>{i instanceof t&&(this.edit({[a]:"",[e]:""}),this.__contentChoice=i.detail)}),["default","url","clipboard"].map((e=>s(_||(_=g` <div slot="${0}-label" class="py-s leading-s"> <foxy-i18n class="block" lang="${0}" key="template_${0}" ns="${0}"> </foxy-i18n> <foxy-i18n class="block text-s opacity-70" lang="${0}" key="template_${0}_explainer" ns="${0}"> </foxy-i18n> </div> `),e,this.lang,e,this.ns,this.lang,e,this.ns))),"url"!==l,a.replace("_","-"),p(this.form[e]),d,n,(e=>"Enter"===e.key&&this.submit()),(t=>{const i=t.currentTarget.value;this.edit({[a]:"",[e]:i})}),a.replace("_","-"),n||"busy"===this.__cacheState,d||this.form[e]!==(null===(r=this.data)||void 0===r?void 0:r[e]),this.__cache,o({"relative transition-opacity":!0,"opacity-0":"idle"!==this.__cacheState}),this.lang,this.ns,o({"absolute inset-0 flex transition-opacity":!0,"opacity-0":"idle"===this.__cacheState}),"fail"===this.__cacheState?"error":"busy",this.lang,this.ns,"clipboard"!==l,a.replace("_","-"),d,n,this.form[a],(t=>{const i=t.currentTarget.value;this.edit({[a]:i,[e]:""})}))}__renderTimestamps(){const e="timestamps";return s(b||(b=g` <div> ${0} <x-property-table data-testid="timestamps" .items="${0}"> </x-property-table> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),["date_modified","date_created"].map((e=>{var t;return{name:this.t(e),value:(null===(t=this.data)||void 0===t?void 0:t[e])?this.t("date",{value:new Date(this.data[e])}):""}})),this.renderTemplateOrSlot(`${e}:after`))}__renderAction(e){const{disabledSelector:t,href:a,lang:i,ns:r}=this,n=this.in({idle:{template:{dirty:"valid"}}}),d=this.in({idle:{snapshot:{dirty:"valid"}}}),o=!this.in("idle")||t.matches(e,!0),l=n||d;return s(x||(x=g` <div> ${0} <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" data-testid="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button class="w-full" theme="${0}" data-testid="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="${0}" lang="${0}"></foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),i,r,(e=>{e.detail.cancelled||this.delete()}),this.in("idle")?"primary "+(a?"error":"success"):"",e,this.in({idle:"template"})&&!l||o,(t=>{if("delete"===e){this.renderRoot.querySelector("#confirm").show(t.currentTarget)}else this.submit()}),r,e,i,this.renderTemplateOrSlot(`${e}:after`))}async __cache(){var e,t;this.__cacheState="busy";try{const a=null!==(t=null===(e=this.data)||void 0===e?void 0:e._links["fx:cache"].href)&&void 0!==t?t:"",i=await new S.API(this).fetch(a,{method:"POST"});this.__cacheState=i.ok?"idle":"fail"}catch(e){this.__cacheState="fail"}}}customElements.define("foxy-email-template-form",S);export{S as EmailTemplateForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e,j as s,h as t,w as r,_ as a}from"./shared-63eaded9.js";import{T as i,a as n,S as o}from"./shared-
|
|
1
|
+
import{L as e,j as s,h as t,w as r,_ as a}from"./shared-63eaded9.js";import{T as i,a as n,S as o}from"./shared-4168c6cd.js";import{c as l}from"./shared-4e709717.js";import{G as d}from"./shared-1177fd2a.js";import"./foxy-nucleon-element.js";import{N as c}from"./shared-44cfc617.js";import"./shared-1761daef.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";let p,u,m,f=e=>e;class x extends(i(e)){constructor(){super(...arguments),this.data=[]}static get properties(){return{data:{type:Array}}}static get styles(){return[super.styles,s(p||(p=f`dd,dt{display:inline-block;overflow:hidden;vertical-align:top;overflow-wrap:anywhere}dt{min-width:calc(5 * var(--lumo-size-l));padding-right:.5em}dd{max-width:calc(15 * var(--lumo-size-l));min-width:calc(10 * var(--lumo-size-l))}`))]}render(){return t(u||(u=f` <dl class="space-y-s"> ${0} </dl> `),this.data.map((e=>{const s=String(e[1]).trim();return t(m||(m=f` <div> <dt class="text-secondary truncate">${0}</dt> <dd class="${0}">${0}</dd> </div> `),e[0],l({"text-tertiary":!s}),s||"–")})))}}let y,h,g=e=>e;const v=["_links","_embedded"],$=n(i(o(c)));class _ extends ${static get scopedElements(){return{"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x}}render(){if(this.in({idle:"snapshot"})){const e=this.data,s=r(e,v);return t(y||(y=g` <x-data-list aria-live="polite" aria-busy="false" class="leading-s text-s" data="${0}"> </x-data-list> `),JSON.stringify(Array.from(Object.entries(s))))}const e=this.in("busy");return t(h||(h=g` <div aria-live="polite" aria-busy="${0}" data-testid="wrapper" class="flex justify-center"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> `),e,this.in("fail")?"error":e?"busy":"empty",this.lang,this.ns)}}let b,w,j,k,S,E,O,N,T,z=e=>e;const G=n(i(o(c)),"error-entry-card");class J extends G{constructor(){super(...arguments),this.open=!1}static get scopedElements(){return{"x-resource-viewer":_,"foxy-spinner":customElements.get("foxy-spinner"),"x-data-list":x,"iron-icon":customElements.get("iron-icon"),"foxy-i18n":customElements.get("foxy-i18n"),"x-group":d}}static get properties(){return a(a({},super.properties),{},{open:{type:Boolean,reflect:!0}})}render(){const e=this.data,s=this.in("busy");if(e){const{hide_error:r}=e,{open:a}=this;return t(b||(b=z` <details aria-busy="${0}" aria-live="polite" class="text-body w-full" ?open="${0}" @toggle="${0}"> <summary class="rounded-s ring-offset-4 ring-offset-base ring-primary-50 focus-outline-none focus-ring-2"> <div style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="${0}"> ${0} </div> </summary> ${0} </details> `),s,a,this.__handleToggle,l({"border-l-2 leading-s relative cursor-pointer":!0,"border-contrast":r&&!a,"border-primary":!r,"border-error":r&&a,"h-l":!a}),this.__renderSummary(e),a?this.__renderDetails(e):"")}return t(w||(w=z` <div aria-busy="${0}" aria-live="polite" style="padding-left:calc(var(--lumo-space-xs) + var(--lumo-space-s) - 1px)" class="flex items-center justify-center border-l-2 leading-s relative border-contrast-10 h-l"> <foxy-spinner data-testid="spinner" layout="horizontal" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> `),s,s?"busy":this.in("fail")?"error":"empty",this.lang,this.ns)}__renderGetOrPostValues(e,s){const r=e||s,a=new URLSearchParams(this.__decodeHtml(r));return t(j||(j=z` <div class="relative leading-xs pt-s"> <div class="absolute font-semibold right-0 text-tertiary text-xs top-0 mt-s">${0}</div> <x-data-list data="${0}"></x-data-list> </div> `),e?"GET":"POST",JSON.stringify(Array.from(a.entries())))}__renderReferrer(e){return t(k||(k=z` <span class="text-secondary">Navigated from</span> <a target="_blank" class="font-semibold text-primary hover-underline" href="${0}" rel="nofollow noopener noreferrer"> ${0} </a> `),e,e)}__renderSummary(e){return t(S||(S=z` <div class="text-s absolute right-0 top-0 text-tertiary"> <iron-icon icon="icons:expand-${0}"></iron-icon> </div> <div class="text-s mb-xs ${0}"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </div> <p class="${0} overflow-hidden font-medium"> ${0} </p> `),this.open?"less":"more",e.hide_error?"text-error":"text-primary",JSON.stringify({value:e.date_created}),this.lang,this.ns,JSON.stringify({value:e.date_created}),this.lang,this.ns,this.open?"":"truncate",e.error_message)}__renderDetails(e){return t(E||(E=z` <div class="space-y-m pt-m"> <x-group frame> <foxy-i18n slot="header" lang="${0}" key="request" ns="${0}"></foxy-i18n> <div class="mx-xs p-s text-s divide-y divide-contrast-10 space-y-s"> <p> <span class="block font-semibold">${0}</span> ${0} </p> ${0} </div> </x-group> <x-group frame> <foxy-i18n slot="header" lang="${0}" key="client" ns="${0}"></foxy-i18n> <div class="text-s flex flex-col mx-xs p-s"> <span class="font-semibold"> ${0} ${0} </span> ${0} </div> </x-group> ${0} </div> `),this.lang,this.ns,e.url,e.referrer?this.__renderReferrer(e.referrer):"",e.get_values||e.post_values?this.__renderGetOrPostValues(e.get_values,e.post_values):"",this.lang,this.ns,e.ip_address,e.ip_country?t(O||(O=z`<span class="text-tertiary"> • </span>${0}`),e.ip_country):"",e.user_agent?t(N||(N=z`<span class="text-secondary">${0}</span>`),e.user_agent):"",Object.entries(e._links).map((([e,s])=>["self","fx:store","curies"].includes(e)?"":t(T||(T=z` <x-group frame> <foxy-i18n slot="header" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <x-resource-viewer class="p-s mx-xs" href="${0}" lang="${0}" ns="${0}"> </x-resource-viewer> </x-group> `),this.lang,e.substr(3),this.ns,s.href,this.lang,this.ns))))}__handleToggle(e){var s;const t=e.target;t.open&&!1===(null===(s=this.data)||void 0===s?void 0:s.hide_error)&&(this.edit({hide_error:!0}),this.submit()),this.open=t.open}__decodeHtml(e){const s=document.createElement("textarea");return s.innerHTML=e,s.value}}customElements.define("foxy-error-entry-card",J);export{J as ErrorEntryCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./foxy-i18n.js";import"./shared-
|
|
1
|
+
import"./foxy-i18n.js";import"./shared-bda600d6.js";import{_ as e,h as t}from"./shared-63eaded9.js";import{A as r}from"./shared-00563cb0.js";import{D as o}from"./shared-05956f55.js";import{F as n}from"./shared-1761daef.js";import{U as s}from"./shared-7684cb05.js";import"./shared-4168c6cd.js";import"./shared-0ced76a0.js";import"./shared-df573cea.js";import"./shared-ff79f3f9.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./shared-4e709717.js";let i,d,a=e=>e;class l extends o{constructor(){super(...arguments),this.related=[],this.parent="",this.group="",this.href="",this.__form=null,this.__renderForm=null,this.__handleFetch=e=>{e instanceof n&&(e.stopImmediatePropagation(),e.preventDefault(),e.respondWith(new r(this).fetch(e.request).then((t=>{const r=e.request.url===this.href&&"DELETE"===e.request.method,o=e.request.url===this.parent&&"POST"===e.request.method;return t.ok&&(r||o)&&(this.open=!1),t}))))},this.__handleUpdate=e=>{if(!(e instanceof s))return;const t=e.target;this.closable=!t.in("busy"),this.editable=t.in({idle:{template:{clean:"valid"}}})||t.in({idle:{template:{dirty:"valid"}}})||t.in({idle:{snapshot:{dirty:"valid"}}})}}static get properties(){return e(e({},super.properties),{},{href:{type:String},form:{type:String,noAccessor:!0},group:{type:String},parent:{type:String},related:{type:Array}})}get form(){return this.__form}set form(e){this.__form=e,this.__renderForm="string"==typeof e?new Function("options",`return options.html\`\n <${e}\n id="form"\n ns="\${options.dialog.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n href=\${options.dialog.href}\n lang=\${options.dialog.lang}\n group=\${options.dialog.group}\n parent=\${options.dialog.parent}\n disabledcontrols=\${options.dialog.disabledControls.toString()}\n readonlycontrols=\${options.dialog.readonlyControls.toString()}\n hiddencontrols=\${options.dialog.hiddenControls.toString()}\n ?disabled=\${options.dialog.disabled}\n ?readonly=\${options.dialog.readonly}\n ?hidden=\${options.dialog.hidden}\n .templates=\${options.dialog.templates}\n .related=\${options.dialog.related}\n @fetch=\${options.handleFetch}\n @update=\${options.handleUpdate}\n >\n </${e}>\``):e,this.requestUpdate()}render(){return t(i||(i=a` <foxy-internal-confirm-dialog message="undo_message" confirm="undo_confirm" cancel="undo_cancel" header="undo_header" theme="error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> ${0} `),this.lang,this.ns,(e=>!e.detail.cancelled&&super.hide(!0)),super.render((()=>{var e;return t(d||(d=a`${0}`),null===(e=this.__renderForm)||void 0===e?void 0:e.call(this,{handleUpdate:this.__handleUpdate,handleFetch:this.__handleFetch,dialog:this,html:t}))})))}async hide(e=!1){if(!e)return super.hide(e);this.renderRoot.querySelector("#confirm").show()}async save(){this.renderRoot.querySelector("#form").submit()}}customElements.define("foxy-form-dialog",l);export{l as FormDialog};
|
package/dist/cdn/foxy-i18n.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{L as e,_ as t,h as r}from"./shared-63eaded9.js";import{i as n,a as s}from"./shared-
|
|
1
|
+
import{L as e,_ as t,h as r}from"./shared-63eaded9.js";import{i as n,a as s}from"./shared-4168c6cd.js";import{F as a,A as o}from"./shared-1761daef.js";const i={type:"backend",init:()=>{},read:(e,t,r)=>{const n=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},s=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},i=new a("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new o.WHATWGRequest(`foxy://i18n/${t}/${e}`),resolve:n,reject:s});dispatchEvent(i),i.defaultPrevented||fetch(i.request).then(n).catch(s)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}},c={percent:(e,t,r)=>{let n=null;try{"number"==typeof e&&(n=e.toLocaleString(r,{style:"percent"}))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return n||String(e)},price:(e,t,r,n)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(r,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==n?void 0:n.currencyDisplay)&&void 0!==s?s:"symbol",style:"currency",currency:a})}catch(t){return e}},date:(e,t,r)=>{const n=new Date(e);return n.toLocaleDateString(r,{month:"long",year:(new Date).getFullYear()===n.getFullYear()?void 0:"numeric",day:"numeric"})},time:(e,t,r)=>new Date(e).toLocaleTimeString(r,{hour:"numeric",minute:"numeric"})};let l,u=e=>e;class d extends(s(e,"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],r=["removed","added"];return t.forEach((t=>d.i18next.on(t,e))),r.forEach((t=>d.i18next.store.on(t,e))),()=>{t.forEach((t=>d.i18next.off(t,e))),r.forEach((t=>d.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof a&&t.request.url.startsWith("foxy://i18n/")){const[r,n]=t.request.url.split("/").reverse();t.respondWith(e(n,r))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=d.onTranslationChange((()=>this.requestUpdate()))}render(){return r(l||(l=u`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}d.FetchEvent=a,d.i18next=n.createInstance().use(i),d.i18next.init({interpolation:{format:(e,t="",r="en",n={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=c[t])||void 0===s?void 0:s.call(c,e,t,r,n))&&void 0!==a?a:e}),e)},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",d);export{d as I18n};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as Item,I as ItemsForm}from"./shared-
|
|
1
|
+
export{a as Item,I as ItemsForm}from"./shared-e36452b9.js";import"./shared-63eaded9.js";import"./shared-0ced76a0.js";import"./shared-df573cea.js";import"./shared-ff79f3f9.js";import"./shared-87ca7818.js";import"./shared-46ee137f.js";import"./shared-f0a83bd6.js";import"./shared-4168c6cd.js";import"./shared-f968379d.js";import"./shared-bb824ab4.js";import"./shared-ec861f31.js";import"./foxy-i18n.js";import"./shared-1761daef.js";import"./shared-b0f0e8b5.js";import"./shared-a46edf4b.js";import"./shared-05956f55.js";import"./shared-00563cb0.js";import"./shared-593f7e2c.js";import"./shared-6d45a07b.js";import"./shared-4e709717.js";import"./shared-8730c141.js";import"./shared-93f23978.js";import"./shared-60126eee.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-9221e6b2.js";import"./foxy-i18n.js";import"./foxy-spinner.js";import{l as e,u as t}from"./shared-218ba06e.js";import{h as s}from"./shared-63eaded9.js";import{C as r}from"./shared-593f7e2c.js";import{N as i}from"./shared-44cfc617.js";import{T as a,a as n}from"./shared-
|
|
1
|
+
import"./shared-9221e6b2.js";import"./foxy-i18n.js";import"./foxy-spinner.js";import{l as e,u as t}from"./shared-218ba06e.js";import{h as s}from"./shared-63eaded9.js";import{C as r}from"./shared-593f7e2c.js";import{N as i}from"./shared-44cfc617.js";import{T as a,a as n}from"./shared-4168c6cd.js";import{c as o}from"./shared-4e709717.js";import"./shared-1761daef.js";import"./shared-46ee137f.js";import"./shared-ff79f3f9.js";import"./shared-60126eee.js";import"./shared-6d45a07b.js";import"./shared-00563cb0.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";let d,l,c,p,u,f,h,m=e=>e;const v=a(r(n(i,"payment-card")));class y extends v{constructor(){super(...arguments),this.templates={},this.__currencyDisplay="",this.__currency=""}render(){var e,t;const r=this.hiddenSelector,i=r.matches("card-info",!0),a=r.matches("fraud-risk",!0);return s(d||(d=m` <div aria-busy="${0}" aria-live="polite" class="relative text-body text-m font-lumo leading-m focus-outline-none"> <div class="${0}"> ${0} ${0} ${0} ${0} </div> <div class="${0}"> <foxy-spinner data-testid="spinner" class="m-auto" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),!this.data&&this.in("busy"),o({"relative transition duration-250 ease-in-out":!0,"opacity-0 pointer-events-none":!this.data}),r.matches("title",!0)?"":this.__renderTitle(),r.matches("subtitle",!0)?"":this.__renderSubtitle(),i&&a?"":s(l||(l=m` <div class="my-s flex space-x-s"> ${0} ${0} </div> `),i?"":this.__renderCardInfo(),a?"":this.__renderFraudRisk()),r.matches("processor-response",!0)?"":this.__renderProcessorResponse(),o({"transition duration-250 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!!this.data}),this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"")}async _sendGet(){const e=await super._sendGet(),[t,s]=await Promise.all([super._fetch(e._links["fx:transaction"].href),super._fetch(e._links["fx:store"].href)]);return this.__currency=t.currency_code,this.__currencyDisplay=s.use_international_currency_symbol?"code":"symbol",e}__renderTitle(){const e=this.data?`gateways.${this.data.gateway_type}`:"",t=`${this.ns} gateways`;return s(c||(c=m` <div class="text-m flex text-secondary" data-testid="title"> ${0} <foxy-i18n lang="${0}" key="${0}" ns="${0}"></foxy-i18n>​ ${0} </div> `),this.renderTemplateOrSlot("title:before"),this.lang,e,t,this.renderTemplateOrSlot("title:after"))}__renderSubtitle(){var e,t,r,i;const a=`${null!==(t=null===(e=this.data)||void 0===e?void 0:e.amount)&&void 0!==t?t:""} ${this.__currency}`,n=JSON.stringify({amount:a,currencyDisplay:this.__currencyDisplay}),o=null!==(i=null===(r=this.data)||void 0===r?void 0:r.date_created)&&void 0!==i?i:"",d=JSON.stringify({value:o}),l=this.lang,c=this.ns;return s(p||(p=m` <div class="flex font-semibold text-m" data-testid="subtitle"> ${0} <foxy-i18n options="${0}" lang="${0}" key="price" ns="${0}"></foxy-i18n> <span> • </span> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"></foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("subtitle:before"),n,l,c,d,l,c,this.renderTemplateOrSlot("subtitle:after"))}__renderCardInfo(){var r,i,a,n;const o=this.data,d=(null!==(r=null==o?void 0:o.cc_type)&&void 0!==r?r:"unknown").toLowerCase(),l=null===(i=null==o?void 0:o.cc_exp_year)||void 0===i?void 0:i.substring(2),c=null==o?void 0:o.cc_exp_month,p=null===(a=null==o?void 0:o.cc_number_masked)||void 0===a?void 0:a.replace(/x/gi,"");if(c&&l&&p)return s(u||(u=m` <div class="flex" data-testid="card-info"> ${0} <div class="truncate flex items-center h-s rounded overflow-hidden bg-contrast-5"> <div class="h-s">${0}</div> <div class="text-m font-semibold px-s">•••• ${0} ${0}/${0}</div> </div> ${0} </div> `),this.renderTemplateOrSlot("card-info:before"),null!==(n=e[d])&&void 0!==n?n:t,p,c,l,this.renderTemplateOrSlot("card-info:after"))}__renderFraudRisk(){var e,t;const r=null!==(t=null===(e=this.data)||void 0===e?void 0:e.fraud_protection_score)&&void 0!==t?t:0,i=r>0?"text-error":"text-success",a=r>0?"bg-error-10":"bg-success-10";return s(f||(f=m` <div class="flex" data-testid="fraud-risk"> ${0} <foxy-i18n options="${0}" class="truncate flex font-semibold h-s items-center px-s rounded text-m ${0} ${0}" lang="${0}" key="fraud_risk" ns="${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("fraud-risk:before"),JSON.stringify({score:r}),i,a,this.lang,this.ns,this.renderTemplateOrSlot("fraud-risk:after"))}__renderProcessorResponse(){var e;return s(h||(h=m` <div class="text-m text-tertiary" data-testid="processor-response"> ${0} ${0}​ ${0} </div> `),this.renderTemplateOrSlot("processor-response:before"),null===(e=this.data)||void 0===e?void 0:e.processor_response,this.renderTemplateOrSlot("processor-response:after"))}}customElements.define("foxy-payment-card",y);export{y as PaymentCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-46ee137f.js";import"./shared-60126eee.js";import"./shared-0ced76a0.js";import"./shared-
|
|
1
|
+
import"./shared-46ee137f.js";import"./shared-60126eee.js";import"./shared-0ced76a0.js";import"./shared-bda600d6.js";import"./shared-9221e6b2.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{l as e,u as t}from"./shared-218ba06e.js";import{x as s,h as i,j as a}from"./shared-63eaded9.js";import{B as r}from"./shared-1761daef.js";import{C as n}from"./shared-593f7e2c.js";import"./foxy-nucleon-element.js";import{T as o,a as d}from"./shared-4168c6cd.js";import{c as l}from"./shared-4e709717.js";import{N as c}from"./shared-44cfc617.js";import"./shared-ff79f3f9.js";import"./shared-df573cea.js";import"./shared-05956f55.js";import"./shared-00563cb0.js";import"./shared-6d45a07b.js";import"./shared-7684cb05.js";import"./shared-a46edf4b.js";const m=s("\n repeating-radial-gradient(\n circle at -100% 500%,\n rgba(255, 255, 255, 0),\n rgba(255, 255, 255, 0.05) 4px\n )\n"),h=s(Object.entries({unknown:"#797c85",amex:"#2557d6",diners:"#0079be",discover:"#4d4d4d",jcb:"#0e4c96",maestro:"#181818",mastercard:"#16366f",unionpay:"#0dadb5",visa:"#0e4595"}).map((([e,t])=>`.bg-${e} { background: ${t} ${m} }`)).join(" "));let p,f,u,b,v,y,_,g=e=>e;const x=o(n(d(c,"payment-method-card")));class j extends x{constructor(){super(...arguments),this.templates={},this.__renderActionsDelete=()=>i(p||(p=g` <div class="flex"> ${0} <vaadin-button class="px-xs rounded" theme="icon" style="--lumo-primary-text-color:#fff;--lumo-primary-color-50pct:rgba(255, 255, 255, 0.5);--lumo-contrast-5pct:rgba(255, 255, 255, 0.05)" aria-label="${0}" data-testid="actions:delete" ?disabled="${0}" @click="${0}"> <iron-icon icon="icons:delete"></iron-icon> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("actions:delete:before"),this.t("delete").toString(),this.disabledSelector.matches("actions:delete",!0),this.__handleDelete,this.renderTemplateOrSlot("actions:delete:after")),this.__renderActions=()=>i(f||(f=g` <div class="flex" data-testid="actions"> ${0} ${0} ${0} </div> `),this.renderTemplateOrSlot("actions:before"),this.hiddenSelector.matches("actions:delete",!0)?"":this.__renderActionsDelete(),this.renderTemplateOrSlot("actions:after"))}static get styles(){return[super.styles,h,a(u||(u=g`.ratio-card{padding-top:63%;position:relative;height:0}.ratio-card>*{position:absolute;top:0;right:0;bottom:0;left:0}`))]}render(){var s,a,n,o,d,c;const{data:m,lang:h,ns:p}=this;if(this.in({idle:"template"})||!(null==m?void 0:m.save_cc)||!this.in("idle")){const e=this.in("fail")?"error":this.in("busy")?"busy":"empty";return i(b||(b=g` <div class="ratio-card" aria-live="polite" aria-busy="${0}" data-testid="wrapper"> <div class="h-full bg-contrast-5"></div> <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.in("busy"),e,this.lang,p,null!==(a=null===(s=customElements.get("foxy-spinner"))||void 0===s?void 0:s.defaultNS)&&void 0!==a?a:"")}const f=null!==(o=null===(n=m.cc_type)||void 0===n?void 0:n.toLowerCase())&&void 0!==o?o:"unknown",u=null!==(d=e[f])&&void 0!==d?d:t,x=null===(c=m.cc_number_masked)||void 0===c?void 0:c.substring(m.cc_number_masked.length-4);return i(v||(v=g` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div class="ratio-card" data-testid="wrapper" aria-busy="${0}" aria-live="polite"> <div class="flex flex-col justify-between text-base text-m leading-m font-lumo p-m bg-unknown bg-${0}"> <div class="${0}"> ${0} <div class="ml-auto rounded h-m">${0}</div> </div> <div class="font-tnum leading-none flex justify-between"> <div data-testid="expiry"> ${0} </div> <div data-testid="number"> ${0} </div> </div> </div> </div> `),h,p,this.__handleConfirmHide,this.in("busy"),f,l({"flex items-start":!0,"justify-between":this.readonlyControls===r.False,"justify-end":this.readonlyControls===r.True}),this.hiddenSelector.matches("actions",!0)?"":this.__renderActions(),u,m.cc_exp_month&&m.cc_exp_year?i(y||(y=g` <span class="sr-only">${0} </span> <span>${0} / ${0}</span> `),this.t("expires").toString(),m.cc_exp_month,m.cc_exp_year):"",x?i(_||(_=g` <span class="sr-only">${0} </span> <span aria-hidden="true">••••</span> <span>${0}</span> `),this.t("last_4_digits").toString(),x):"")}async _sendDelete(){const e=JSON.stringify({save_cc:!1}),t=await this._fetch(this.href,{method:"PATCH",body:e});return c.Rumour(this.group).share({data:null,source:this.href,related:[this.parent]}),t}__handleDelete(e){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}__handleConfirmHide(e){e.detail.cancelled||this.delete()}}customElements.define("foxy-payment-method-card",j);export{j as PaymentMethodCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-60126eee.js";import"./shared-46ee137f.js";import{s as e,h as l,_ as t,j as n,L as s}from"./shared-63eaded9.js";import{c as a}from"./shared-4e709717.js";import{i}from"./shared-6d45a07b.js";import{s as o}from"./shared-2061be9a.js";import{r}from"./shared-b710881a.js";import{R as d,T as u,a as c}from"./shared-
|
|
1
|
+
import"./shared-60126eee.js";import"./shared-46ee137f.js";import{s as e,h as l,_ as t,j as n,L as s}from"./shared-63eaded9.js";import{c as a}from"./shared-4e709717.js";import{i}from"./shared-6d45a07b.js";import{s as o}from"./shared-2061be9a.js";import{r}from"./shared-b710881a.js";import{R as d,T as u,a as c}from"./shared-4168c6cd.js";import"./shared-ff79f3f9.js";var v,p;!function(e){e.Attribute="attribute",e.Boolean="boolean",e.String="string",e.Number="number",e.Date="date",e.Any="any"}(v||(v={})),function(e){e.LessThanOrEqual="lessthanorequal",e.LessThan="lessthan",e.GreaterThanOrEqual="greaterthanorequal",e.GreaterThan="greaterthan",e.IsDefined="isdefined",e.Not="not",e.In="in"}(p||(p={}));let f;const h=e(f||(f=(e=>e)`
|
|
2
2
|
<svg class="w-full h-full" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
3
|
<path d="M26.4 14.7399C26.4 15.2922 25.9523 15.7399 25.4 15.7399H10.6C10.0477 15.7399 9.60001 15.2922 9.60001 14.7399V14.2C9.60001 13.6477 10.0477 13.2 10.6 13.2H25.4C25.9523 13.2 26.4 13.6477 26.4 14.2V14.7399ZM26.4 21.8C26.4 22.3523 25.9523 22.8 25.4 22.8H10.6C10.0477 22.8 9.60001 22.3523 9.60001 21.8V21.2601C9.60001 20.7078 10.0477 20.2601 10.6 20.2601H25.4C25.9523 20.2601 26.4 20.7078 26.4 21.2601V21.8Z" class="fill-current"/>
|
|
4
4
|
</svg>
|