@foxy.io/elements 1.39.0-beta.7 → 1.39.0-beta.8

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.
@@ -1 +1 @@
1
- import{C as s}from"./shared-1d0839af.js";export{C as CustomerApi}from"./shared-1d0839af.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";customElements.define("foxy-customer-api",s);
1
+ import{C as s}from"./shared-d0363ae9.js";export{C as CustomerApi}from"./shared-d0363ae9.js";import"./shared-cb58dfcd.js";import"./shared-ba5c42c7.js";import"./shared-99a8889a.js";import"./shared-673d668a.js";import"./shared-5afb584d.js";import"./shared-53e42a77.js";import"./shared-343d1fd7.js";import"./shared-2aa23b5f.js";customElements.define("foxy-customer-api",s);
@@ -1,4 +1,4 @@
1
- import"./foxy-customer.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import"./shared-4a4f6eb9.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-5b4e2567.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./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{u as s}from"./shared-2508187b.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{_ as r,B as o,aH as i}from"./shared-cb58dfcd.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-99a8889a.js";import"./shared-673d668a.js";import{C as c}from"./shared-1d0839af.js";import{a as m,T as u}from"./shared-11351c00.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-5592ec6e.js";import{C as y}from"./shared-5afb584d.js";import{I as $}from"./shared-2aa23b5f.js";import"./shared-21e68b72.js";import"./foxy-update-payment-method-form.js";import"./shared-27cfa174.js";import"./shared-0c134ce7.js";import"./shared-f9ac8763.js";import"./shared-315d7620.js";import"./shared-6957b8e6.js";import"./shared-3556f4b7.js";import"./shared-7dc9c80b.js";import"./shared-c25538f1.js";import"./shared-80a1bf6f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./shared-048d5cae.js";import"./foxy-copy-to-clipboard.js";import"./shared-d807cb20.js";import"./shared-360d6a20.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-0df46275.js";import"./shared-f1a70f51.js";import"./foxy-payment-card-embed.js";import"./shared-be442f26.js";import"./shared-8b0f00fa.js";import"./shared-c1e86ea4.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-9e8ed3af.js";import"./shared-eea8debb.js";import"./shared-243456aa.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-afe24913.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-e3421ca1.js";import"./shared-c46affa4.js";import"./shared-b65d169b.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";import"./shared-84eb85dd.js";import"./shared-230dee11.js";import"./shared-8eeddc22.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-3661a086.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-8b25a098.js";import"./shared-b738ee96.js";import"./shared-f1033d78.js";
1
+ import"./foxy-customer.js";import"./shared-8ef0ca65.js";import"./shared-c18f681b.js";import"./shared-37348820.js";import"./shared-4a4f6eb9.js";import"./shared-5212ef4f.js";import{I as e}from"./shared-5b4e2567.js";import"./foxy-access-recovery-form.js";import"./foxy-payment-method-card.js";import{TransactionsTable as t}from"./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{u as s}from"./shared-2508187b.js";import"./foxy-sign-in-form.js";import"./foxy-form-dialog.js";import"./foxy-spinner.js";import"./shared-4d32d19e.js";import{_ as r,B as o,aH as i}from"./shared-cb58dfcd.js";import{h as a,L as n,c as d}from"./shared-ba5c42c7.js";import{A as l}from"./shared-99a8889a.js";import"./shared-673d668a.js";import{C as c}from"./shared-d0363ae9.js";import{a as m,T as u}from"./shared-11351c00.js";import{U as p}from"./shared-cd96ff03.js";import{i as h}from"./shared-53e42a77.js";import{c as f}from"./shared-4e709717.js";import{A as g}from"./shared-5592ec6e.js";import{C as y}from"./shared-5afb584d.js";import{I as $}from"./shared-2aa23b5f.js";import"./shared-21e68b72.js";import"./foxy-update-payment-method-form.js";import"./shared-27cfa174.js";import"./shared-0c134ce7.js";import"./shared-f9ac8763.js";import"./shared-315d7620.js";import"./shared-6957b8e6.js";import"./shared-3556f4b7.js";import"./shared-7dc9c80b.js";import"./shared-c25538f1.js";import"./shared-80a1bf6f.js";import"./foxy-swipe-actions.js";import"./foxy-pagination.js";import"./shared-f83207fb.js";import"./shared-343d1fd7.js";import"./shared-5e4a03d1.js";import"./shared-7594e563.js";import"./shared-0aedd809.js";import"./shared-5ef40e86.js";import"./shared-e5546d55.js";import"./shared-048d5cae.js";import"./foxy-copy-to-clipboard.js";import"./shared-d807cb20.js";import"./shared-360d6a20.js";import"./foxy-nucleon-element.js";import"./shared-53e476fd.js";import"./shared-bab2ea2c.js";import"./foxy-template-set-card.js";import"./shared-0df46275.js";import"./shared-f1a70f51.js";import"./foxy-payment-card-embed.js";import"./shared-be442f26.js";import"./shared-8b0f00fa.js";import"./shared-c1e86ea4.js";import"./shared-f989c70e.js";import"./shared-bd5285ff.js";import"./shared-5fd5805c.js";import"./foxy-attribute-card.js";import"./foxy-attribute-form.js";import"./shared-cc7e1dc6.js";import"./shared-3a952968.js";import"./foxy-address-card.js";import"./foxy-address-form.js";import"./shared-9e8ed3af.js";import"./shared-eea8debb.js";import"./shared-243456aa.js";import"./shared-651c44fa.js";import"./shared-edeeb089.js";import"./shared-1c355fac.js";import"./shared-cf12f33b.js";import"./shared-afe24913.js";import"./shared-d0aed1c1.js";import"./foxy-table.js";import"./shared-e3421ca1.js";import"./shared-c46affa4.js";import"./shared-b65d169b.js";import"./shared-83c5e004.js";import"./shared-495860b4.js";import"./shared-6683daed.js";import"./shared-a03facdf.js";import"./shared-a587fd4b.js";import"./shared-84eb85dd.js";import"./shared-230dee11.js";import"./shared-8eeddc22.js";import"./shared-ada5e9f5.js";import"./shared-cf613436.js";import"./shared-c05643e6.js";import"./shared-f69aacbc.js";import"./shared-43e2c3f6.js";import"./shared-79d0699c.js";import"./foxy-transaction-card.js";import"./shared-3661a086.js";import"./foxy-customer-card.js";import"./foxy-item-card.js";import"./shared-eb963ba3.js";import"./shared-a6b2bd14.js";import"./shared-8b25a098.js";import"./shared-b738ee96.js";import"./shared-f1033d78.js";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,7 +12,7 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */function v(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}let b,x,S,_=e=>e;var j;class w extends(m(u(c),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],j.set(this,null),this.skipPasswordReset=!1,this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},skipPasswordReset:{type:Boolean,attribute:"skip-password-reset"},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e,t;let s;try{s=new URL("./customer_portal_settings",this.base)}catch(e){s=void 0}return this.api.storage.getItem(l.SESSION)?!this.skipPasswordReset&&this.api.usesTemporaryPassword?a(b||(b=_` <foxy-internal-customer-portal-password-reset-view password-old="${0}" infer="password-reset" href="${0}" @update="${0}"> </foxy-internal-customer-portal-password-reset-view> `),h(null!==(e=function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,j))&&void 0!==e?e:void 0),this.base,(e=>{var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===p.UpdateResult.ResourceUpdated&&(this.api.usesTemporaryPassword=!1,v(this,j,null),this.requestUpdate())})):a(x||(x=_` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),h(null!==(t=this.embedUrl)&&void 0!==t?t:void 0),this.base,h(null==s?void 0:s.toString()),this.transactionsTableColumns):a(S||(S=_` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}" @password="${0}"> </foxy-internal-customer-portal-logged-out-view> `),h(null==s?void 0:s.toString()),(e=>{v(this,j,e.detail)}))}updated(e){super.updated(e);!(null!==this.api.storage.getItem(l.SESSION))||!this.skipPasswordReset&&this.api.usesTemporaryPassword||v(this,j,null)}}j=new WeakMap;let T,k,O,R,U=e=>e;class z extends(u(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=f({"flex-auto leading-m font-medium tracking-wide text-m rounded-s transition-colors":!0,"text-primary hover-underline 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}),t=a(T||(T=U` ${0} <slot></slot> `),this.icon?a(k||(k=U`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?a(O||(O=U`<button class="${0}" disabled="disabled">${0}</button>`),e,t):a(R||(R=U` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let E,N,A,C,H,I,P,F,q=e=>e;const L=m(e);let B,D,G,J,M,W,K,Q,V,X,Y,Z,ee,te,se,re=e=>e;const oe=m(e);const ie=["html"],ae=["html"];let ne,de,le,ce,me,ue,pe,he,fe,ge,ye,$e,ve=e=>e;const be=m(y(u($(n))));let xe,Se,_e,je=e=>e;const we=y(u(m($(n),"customer-portal")));let Te,ke,Oe=e=>e;const Re=s.passwordStrength;class Ue extends(m(e)){constructor(){super(...arguments),this.passwordOld=null,this.__generatorOptions={checkStrength:e=>Re(e).id>=2}}static get properties(){return r(r({},super.properties),{},{passwordOld:{attribute:"password-old"}})}static get styles(){return[super.styles,d(Te||(Te=Oe`.max-w-25rem{max-width:25rem}`))]}static get v8n(){return[({password:e})=>!!e||"password:v8n_required",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({password:e})=>!e||Re(e).id>=2||"password:v8n_too_weak"]}renderBody(){return a(ke||(ke=Oe` <div class="m-auto max-w-25rem leading-s"> <p class="text-xxl font-medium ${0}"> <foxy-i18n infer="" key="title"></foxy-i18n> </p> <p class="text-l ${0}"> <foxy-i18n infer="" key="subtitle"></foxy-i18n> </p> <foxy-internal-password-control infer="password" class="mt-m" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <vaadin-button class="w-full mt-l" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="submit"></foxy-i18n> </vaadin-button> </div> `),this.in("busy")?"text-disabled":"text-body",this.in("busy")?"text-disabled":"text-secondary",this.__generatorOptions,this.disabled||!this.in("idle"),(()=>this.submit()))}submit(){var e;this.edit({password_old:null!==(e=this.passwordOld)&&void 0!==e?e:""}),super.submit()}async _fetch(...e){const t=new Request(...e);if("PATCH"!==t.method)return super._fetch(...e);const s=await t.json(),r=await super._fetch(...e);return r.password_old=s.password_old,r.password=s.password,r}}customElements.define("foxy-internal-customer-portal-logged-in-view",class extends L{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,s,r,o,i;const n="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(n)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return a(E||(E=q` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${n}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),l,(async function(){try{e.loggingOutState="busy",await new g(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"===d?a(N||(N=q`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):a(A||(A=q` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(r=null===(s=customElements.get("foxy-customer"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",null!==(i=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==i?i:""].join(" ")),this.renderTemplateOrSlot(`${n}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(C||(C=q`
15
+ ***************************************************************************** */function v(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function b(e,t,s){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,s),s}let x,S,_,j=e=>e;var w;class T extends(m(u(c),"customer-portal")){constructor(){super(...arguments),this.transactionsTableColumns=[t.priceColumn,t.summaryColumn,t.statusColumn,t.idColumn,t.dateColumn,t.receiptColumn],w.set(this,null),this.skipPasswordReset=!1,this.embedUrl=null,this.group=""}static get properties(){return r(r({},super.properties),{},{transactionsTableColumns:{attribute:!1},skipPasswordReset:{type:Boolean,attribute:"skip-password-reset"},embedUrl:{attribute:"embed-url"},group:{type:String}})}render(){var e,t;let s;try{s=new URL("./customer_portal_settings",this.base)}catch(e){s=void 0}return this.api.storage.getItem(l.SESSION)?!this.skipPasswordReset&&this.api.usesTemporaryPassword&&v(this,w)?a(x||(x=j` <foxy-internal-customer-portal-password-reset-view password-old="${0}" infer="password-reset" href="${0}" @update="${0}" @skip="${0}"> </foxy-internal-customer-portal-password-reset-view> `),h(null!==(e=v(this,w))&&void 0!==e?e:void 0),this.base,this.__handlePasswordResetUpdate,this.__handlePasswordResetSkip):a(S||(S=j` <foxy-internal-customer-portal-logged-in-view embed-url="${0}" customer="${0}" class="h-full" infer="" href="${0}" .transactionsTableColumns="${0}"> </foxy-internal-customer-portal-logged-in-view> `),h(null!==(t=this.embedUrl)&&void 0!==t?t:void 0),this.base,h(null==s?void 0:s.toString()),this.transactionsTableColumns):a(_||(_=j` <foxy-internal-customer-portal-logged-out-view class="h-full" infer="" href="${0}" @password="${0}"> </foxy-internal-customer-portal-logged-out-view> `),h(null==s?void 0:s.toString()),(e=>{b(this,w,e.detail)}))}updated(e){super.updated(e);!(null!==this.api.storage.getItem(l.SESSION))||!this.skipPasswordReset&&this.api.usesTemporaryPassword||b(this,w,null)}__handlePasswordResetUpdate(e){var t;(null===(t=e.detail)||void 0===t?void 0:t.result)===p.UpdateResult.ResourceUpdated&&(this.api.usesTemporaryPassword=!1,b(this,w,null),this.requestUpdate(),this.dispatchEvent(new T.PasswordResetEvent("passwordreset",{detail:{result:"completed"}})))}__handlePasswordResetSkip(){b(this,w,null),this.requestUpdate(),this.dispatchEvent(new T.PasswordResetEvent("passwordreset",{detail:{result:"skipped"}}))}}w=new WeakMap,T.PasswordResetEvent=class extends CustomEvent{};let k,O,R,E,U=e=>e;class z extends(u(n)){constructor(){super(...arguments),this.disabled=!1,this.href="",this.icon=""}static get properties(){return r(r({},super.properties),{},{disabled:{type:Boolean},href:{type:String},icon:{type:String}})}render(){const e=f({"flex-auto leading-m font-medium tracking-wide text-m rounded-s transition-colors":!0,"text-primary hover-underline 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}),t=a(k||(k=U` ${0} <slot></slot> `),this.icon?a(O||(O=U`<iron-icon icon="${0}" class="icon-inline"></iron-icon>`),this.icon):"");return this.disabled?a(R||(R=U`<button class="${0}" disabled="disabled">${0}</button>`),e,t):a(E||(E=U` <a class="${0}" href="${0}" rel="nofollow noopener">${0}</a> `),e,this.href,t)}}let N,P,C,A,H,I,q,F,L=e=>e;const B=m(e);let D,G,J,M,W,K,Q,V,X,Y,Z,ee,te,se,re,oe=e=>e;const ie=m(e);const ae=["html"],ne=["html"];let de,le,ce,me,ue,pe,he,fe,ge,ye,$e,ve,be=e=>e;const xe=m(y(u($(n))));let Se,_e,je,we=e=>e;const Te=y(u(m($(n),"customer-portal")));let ke,Oe,Re=e=>e;const Ee=s.passwordStrength;class Ue extends(m(e)){constructor(){super(...arguments),this.passwordOld=null,this.__generatorOptions={checkStrength:e=>Ee(e).id>=2}}static get properties(){return r(r({},super.properties),{},{passwordOld:{attribute:"password-old"}})}static get styles(){return[super.styles,d(ke||(ke=Re`.max-w-25rem{max-width:25rem}`))]}static get v8n(){return[({password:e})=>!!e||"password:v8n_required",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({password:e})=>!e||Ee(e).id>=2||"password:v8n_too_weak"]}renderBody(){return a(Oe||(Oe=Re` <div class="m-auto max-w-25rem leading-s"> <p class="text-xxl font-medium ${0}"> <foxy-i18n infer="" key="title"></foxy-i18n> </p> <p class="text-l ${0}"> <foxy-i18n infer="" key="subtitle"></foxy-i18n> </p> <foxy-internal-password-control infer="password" class="mt-m" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <vaadin-button class="w-full mt-l" theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="submit"></foxy-i18n> </vaadin-button> <vaadin-button class="w-full mt-s" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="skip"></foxy-i18n> </vaadin-button> </div> `),this.in("busy")?"text-disabled":"text-body",this.in("busy")?"text-disabled":"text-secondary",this.__generatorOptions,this.disabled||!this.in("idle"),(()=>this.submit()),this.disabled||!this.in("idle"),(()=>this.dispatchEvent(new CustomEvent("skip"))))}submit(){var e;this.edit({password_old:null!==(e=this.passwordOld)&&void 0!==e?e:""}),super.submit()}async _fetch(...e){const t=new Request(...e);if("PATCH"!==t.method)return super._fetch(...e);const s=await t.json(),r=await super._fetch(...e);return r.password_old=s.password_old,r.password=s.password,r}}customElements.define("foxy-internal-customer-portal-logged-in-view",class extends B{constructor(){var e;super(...arguments),e=this,this.customer="",this.embedUrl=null,this.loggingOutState="idle",this.transactionsTableColumns=[],this.loggingOutStateResetTimeout=null,this.__renderHeaderActionsSignOut=()=>{var t,s,r,o,i;const n="customer:header:actions:sign-out",d=this.loggingOutState,l=this.disabledSelector.matches(n)||!(null===(t=this.__customerElement)||void 0===t?void 0:t.in({idle:"snapshot"}))||"idle"!==d,c={"border-radius":"100%",padding:"var(--lumo-space-xs)",display:"flex",margin:"0",cursor:l?"default":"pointer"};return a(N||(N=L` <div style="display:flex;margin-left:var(--lumo-space-m)"> ${0} <vaadin-button data-testid="sign-out" aria-label="${0}" style="${0}" theme="icon" ?disabled="${0}" @click="${0}"> ${0} </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot(`${n}:before`),this.t("sign_out").toString(),Object.entries(c).reduce(((e,[t,s])=>`${e}${t}:${s};`),""),l,(async function(){try{e.loggingOutState="busy",await new g(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"===d?a(P||(P=L`<iron-icon icon="icons:exit-to-app"></iron-icon>`)):a(C||(C=L` <foxy-spinner layout="no-label" state="${0}" style="margin:auto" lang="${0}" ns="${0}"> </foxy-spinner> `),"fail"===d?"error":"busy",this.lang,[this.ns,null!==(r=null===(s=customElements.get("foxy-customer"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",null!==(i=null===(o=customElements.get("foxy-spinner"))||void 0===o?void 0:o.defaultNS)&&void 0!==i?i:""].join(" ")),this.renderTemplateOrSlot(`${n}:after`))},this.__renderSubscriptions=(e,t)=>{const s="customer:subscriptions";return e(A||(A=L`
16
16
  ${0}
17
17
 
18
18
  <foxy-internal-customer-portal-subscriptions
@@ -29,7 +29,7 @@ PERFORMANCE OF THIS SOFTWARE.
29
29
  </foxy-internal-customer-portal-subscriptions>
30
30
 
31
31
  ${0}
32
- `),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(H||(H=q`
32
+ `),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(H||(H=L`
33
33
  ${0}
34
34
 
35
35
  <foxy-internal-customer-portal-transactions
@@ -46,12 +46,12 @@ PERFORMANCE OF THIS SOFTWARE.
46
46
  </foxy-internal-customer-portal-transactions>
47
47
 
48
48
  ${0}
49
- `),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.transactionsTableColumns,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,s;const r=this.hiddenSelector.zoom("customer"),i=new o(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),n=this.getNestedTemplates("customer"),d=n["header:actions:after"],l=n.default;return n["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(I||(I=q`
49
+ `),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.transactionsTableColumns,this.renderTemplateOrSlot(`${s}:after`))}}static get properties(){return r(r({},super.properties),{},{customer:{type:String},embedUrl:{attribute:"embed-url"},loggingOutState:{attribute:!1},transactionsTableColumns:{attribute:!1},loggingOutStateResetTimeout:{attribute:!1}})}renderBody(){var e,t,s;const r=this.hiddenSelector.zoom("customer"),i=new o(["attributes","transactions","subscriptions","addresses:actions:create","addresses:list:form:header","addresses:list:form:ignore-address-restrictions","payment-methods:list:card:actions:update:form:template-set","header:actions:edit:form:header","header:actions:edit:form:is-anonymous","header:actions:edit:form:forgot-password","header:actions:edit:form:create","header:actions:edit:form:delete",r.toString()].join(" ")).toString(),n=this.getNestedTemplates("customer"),d=n["header:actions:after"],l=n.default;return n["header:actions:after"]=(e,t)=>{const s=r.matches("header:actions:sign-out",!0);return e(I||(I=L`
50
50
  <div style="display:flex">
51
51
  ${0}
52
52
  ${0}
53
53
  </div>
54
- `),s?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},n.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(P||(P=q`
54
+ `),s?"":this.__renderHeaderActionsSignOut(),null==d?void 0:d(e,t))},n.default=(e,t)=>{const s=this.__renderSubscriptions,o=this.__renderTransactions;return e(q||(q=L`
55
55
  <style>
56
56
  .space-y-m > :not([hidden]) ~ :not([hidden]) {
57
57
  --tw-space-y-reverse: 0;
@@ -66,7 +66,7 @@ PERFORMANCE OF THIS SOFTWARE.
66
66
  ${0}
67
67
  ${0}
68
68
  </div>
69
- `),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))},a(F||(F=q` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),i,h(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",n,this.data,(()=>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 oe{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==n?void 0:n.in("busy"));return a(B||(B=re` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-access-recovery-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const s=this.renderRoot.querySelector("#access-recovery-form"),r=this.disabledSelector.zoom("access-recovery");return a(D||(D=re` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==s?void 0:s.in("busy"))||r.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const s="access-recovery:form",r=this.hiddenSelector.zoom(s);return a(G||(G=re` <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(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(s),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${s}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return a(J||(J=re` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==n?void 0:n.in("busy"));return a(M||(M=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-sign-in-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const s=this.renderRoot.querySelector("#sign-in-form"),r=this.disabledSelector.zoom("sign-in");return a(W||(W=re` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==s?void 0:s.in("busy"))||r.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return a(K||(K=re` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const s="sign-in:form",r=this.hiddenSelector.zoom(s);return a(Q||(Q=re` <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(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(e=>{var t,s;const r=null!==(s=null===(t=e.currentTarget.form.credential)||void 0===t?void 0:t.password)&&void 0!==s?s:null;this.dispatchEvent(new CustomEvent("password",{detail:r})),this.requestUpdate()}),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignIn=()=>{var e,t;const s="sign-in",r=this.hiddenSelector.zoom(s),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),i=r.matches("signup",!0)||!o;return a(V||(V=re` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${s}:before`),r.matches("header",!0)?"":this.__renderSignInHeader(),r.matches("form",!0)?"":this.__renderSignInForm(),i?"":this.__renderSignInSignUp(),r.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,s=this.renderRoot.querySelector("#sign-up-form"),r=!!(null==s?void 0:s.in("busy"));return a(X||(X=re` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),r?"text-disabled":"text-body",e,t,r?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return a(Y||(Y=re` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return a(Z||(Z=re` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new o(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return a(ee||(ee=re` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,d(te||(te=re`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?a(se||(se=re``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-password-reset-view",Ue),customElements.define("foxy-internal-customer-portal-subscriptions",class extends be{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(ne||(ne=ve`
69
+ `),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))},a(F||(F=L` <foxy-customer readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="customer" embed-url="${0}" group="${0}" href="${0}" lang="${0}" ns="${0} ${0}" id="customer" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer> `),this.readonlySelector.zoom("customer").toString(),this.disabledSelector.zoom("customer").toString(),i,h(null!==(e=this.embedUrl)&&void 0!==e?e:void 0),this.group,this.customer,this.lang,this.ns,null!==(s=null===(t=customElements.get("foxy-customer"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",n,this.data,(()=>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 ie{constructor(){super(...arguments),this.page="sign-in",this.__renderAccessRecoveryHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#access-recovery-form"),d=!!(null==n?void 0:n.in("busy"));return a(D||(D=oe` <div class="flex flex-col leading-s font-lumo" data-testid="access-recovery:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="recover_access_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-access-recovery-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("access-recovery:header:after"))},this.__renderAccessRecoveryBack=()=>{var e,t;const s=this.renderRoot.querySelector("#access-recovery-form"),r=this.disabledSelector.zoom("access-recovery");return a(G||(G=oe` <div> ${0} <vaadin-button data-testid="access-recovery:back" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="back" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("access-recovery:back:before"),!!(null==s?void 0:s.in("busy"))||r.matches("back",!0),(()=>this.page="sign-in"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("access-recovery:back:after"))},this.__renderAccessRecoveryForm=()=>{var e,t;const s="access-recovery:form",r=this.hiddenSelector.zoom(s);return a(J||(J=oe` <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(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-access-recovery-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates(s),(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${s}:after`))},this.__renderAccessRecovery=()=>{const e="access-recovery",t=this.hiddenSelector.zoom(e);return a(M||(M=oe` <div class="h-full flex" data-testid="access-recovery"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} ${0} </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderAccessRecoveryHeader(),t.matches("form",!0)?"":this.__renderAccessRecoveryForm(),t.matches("back",!0)?"":this.__renderAccessRecoveryBack(),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignInHeader=()=>{var e,t,s,r;const{lang:o,ns:i}=this,n=this.renderRoot.querySelector("#sign-in-form"),d=!!(null==n?void 0:n.in("busy"));return a(W||(W=oe` <div class="flex flex-col leading-s font-lumo" data-testid="sign-in:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_in" ns="${0} ${0}"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_in_hint" ns="${0} ${0}"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-in:header:before"),d?"text-disabled":"text-body",o,i,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",d?"text-disabled":"text-secondary",o,i,null!==(r=null===(s=customElements.get("foxy-sign-in-form"))||void 0===s?void 0:s.defaultNS)&&void 0!==r?r:"",this.renderTemplateOrSlot("sign-in:header:after"))},this.__renderSignInRecover=()=>{var e,t;const s=this.renderRoot.querySelector("#sign-in-form"),r=this.disabledSelector.zoom("sign-in");return a(K||(K=oe` <div> ${0} <vaadin-button data-testid="sign-in:recover" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="recover_access" ns="${0} ${0}"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:recover:before"),!!(null==s?void 0:s.in("busy"))||r.matches("recover",!0),(()=>this.page="access-recovery"),this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.renderTemplateOrSlot("sign-in:recover:after"))},this.__renderSignInSignUp=()=>{const e=this.renderRoot.querySelector("#sign-in-form"),t=this.disabledSelector.zoom("sign-in");return a(Q||(Q=oe` <div> ${0} <vaadin-button data-testid="sign-in:signup" class="w-full" theme="tertiary" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="sign_up" ns="${0} sign-in-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-in:signup:before"),!!(null==e?void 0:e.in("busy"))||t.matches("signup",!0),(()=>this.page="sign-up"),this.lang,this.ns,this.renderTemplateOrSlot("sign-in:signup:after"))},this.__renderSignInForm=()=>{var e,t;const s="sign-in:form",r=this.hiddenSelector.zoom(s);return a(V||(V=oe` <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(`${s}:before`),this.readonlySelector.zoom(s).toString(),this.disabledSelector.zoom(s).toString(),r.toString(),this.group,this.lang,this.ns,null!==(t=null===(e=customElements.get("foxy-sign-in-form"))||void 0===e?void 0:e.defaultNS)&&void 0!==t?t:"",this.getNestedTemplates("sign-in:form"),(e=>{var t,s;const r=null!==(s=null===(t=e.currentTarget.form.credential)||void 0===t?void 0:t.password)&&void 0!==s?s:null;this.dispatchEvent(new CustomEvent("password",{detail:r})),this.requestUpdate()}),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignIn=()=>{var e,t;const s="sign-in",r=this.hiddenSelector.zoom(s),o=!0===(null===(t=null===(e=this.data)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled),i=r.matches("signup",!0)||!o;return a(X||(X=oe` <div class="h-full flex" data-testid="sign-in"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} <div class="space-y-s"> ${0} <div class="flex justify-center gap-s"> ${0} ${0} </div> </div> </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${s}:before`),r.matches("header",!0)?"":this.__renderSignInHeader(),r.matches("form",!0)?"":this.__renderSignInForm(),i?"":this.__renderSignInSignUp(),r.matches("recover",!0)?"":this.__renderSignInRecover(),this.renderTemplateOrSlot(`${s}:after`))},this.__renderSignUpHeader=()=>{const{lang:e,ns:t}=this,s=this.renderRoot.querySelector("#sign-up-form"),r=!!(null==s?void 0:s.in("busy"));return a(Y||(Y=oe` <div class="flex flex-col leading-s font-lumo" data-testid="sign-up:header"> ${0} <foxy-i18n class="text-xxl font-medium ${0}" lang="${0}" key="sign_up" ns="${0} sign-up-form"> </foxy-i18n> <foxy-i18n class="text-l ${0}" lang="${0}" key="sign_up_hint" ns="${0} sign-up-form"> </foxy-i18n> ${0} </div> `),this.renderTemplateOrSlot("sign-up:header:before"),r?"text-disabled":"text-body",e,t,r?"text-disabled":"text-secondary",e,t,this.renderTemplateOrSlot("sign-up:header:after"))},this.__renderSignUpGoBack=()=>{const e=this.renderRoot.querySelector("#sign-up-form"),t=this.disabledSelector.zoom("sign-up");return a(Z||(Z=oe` <div> ${0} <vaadin-button data-testid="sign-up:go-back" class="w-full" theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="go_back" ns="${0} sign-up-form"> </foxy-i18n> </vaadin-button> ${0} </div> `),this.renderTemplateOrSlot("sign-up:go-back:before"),!!(null==e?void 0:e.in("busy"))||t.matches("go-back",!0),(()=>this.page="sign-in"),this.lang,this.ns,this.renderTemplateOrSlot("sign-up:go-back:after"))},this.__renderSignUpForm=()=>{const e="sign-up:form",t=["header","tax-id","is-anonymous","password-old","forgot-password","timestamps","delete",this.hiddenSelector.zoom(e).toString()];return a(ee||(ee=oe` <div> ${0} <foxy-customer-form readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" data-testid="sign-up:form" parent="foxy://customer-api/signup" group="${0}" lang="${0}" id="sign-up-form" ns="${0} sign-up-form" .templates="${0}" .settings="${0}" @update="${0}"> </foxy-customer-form> ${0} </div> `),this.renderTemplateOrSlot(`${e}:before`),this.readonlySelector.zoom(e).toString(),this.disabledSelector.zoom(e).toString(),new o(t.join(" ").trim()),this.group,this.lang,this.ns,this.getNestedTemplates("sign-up:form"),this.data,(()=>this.requestUpdate()),this.renderTemplateOrSlot(`${e}:after`))},this.__renderSignUp=()=>{const e="sign-up",t=this.hiddenSelector.zoom(e);return a(te||(te=oe` <div class="h-full flex" data-testid="sign-up"> <div class="m-auto max-w-25rem flex-1"> ${0} <div class="space-y-m"> ${0} ${0} ${0} </div> ${0} </div> </div> `),this.renderTemplateOrSlot(`${e}:before`),t.matches("header",!0)?"":this.__renderSignUpHeader(),t.matches("form",!0)?"":this.__renderSignUpForm(),t.matches("go-back",!0)?"":this.__renderSignUpGoBack(),this.renderTemplateOrSlot(`${e}:after`))}}static get properties(){return r(r({},super.properties),{},{group:{type:String},page:{type:String}})}static get styles(){return[super.styles,d(se||(se=oe`.max-w-25rem{max-width:25rem}`))]}renderBody(){const{page:e,hiddenSelector:t}=this;return"access-recovery"!==e||t.matches("access-recovery",!0)?"sign-in"!==e||t.matches("sign-in",!0)?"sign-up"!==e||t.matches("sign-up",!0)?a(re||(re=oe``)):this.__renderSignUp():this.__renderSignIn():this.__renderAccessRecovery()}}),customElements.define("foxy-internal-customer-portal-password-reset-view",Ue),customElements.define("foxy-internal-customer-portal-subscriptions",class extends xe{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(de||(de=be`
70
70
  ${0}
71
71
 
72
72
  <foxy-internal-customer-portal-link
@@ -78,7 +78,7 @@ PERFORMANCE OF THIS SOFTWARE.
78
78
  </foxy-internal-customer-portal-link>
79
79
 
80
80
  ${0}
81
- `),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)&&"0000-00-00"!==t.data.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(de||(de=ve`
81
+ `),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)&&"0000-00-00"!==t.data.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(le||(le=be`
82
82
  ${0}
83
83
 
84
84
  <foxy-internal-customer-portal-link
@@ -90,7 +90,7 @@ PERFORMANCE OF THIS SOFTWARE.
90
90
  </foxy-internal-customer-portal-link>
91
91
 
92
92
  ${0}
93
- `),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(le||(le=ve`
93
+ `),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(ce||(ce=be`
94
94
  <style>
95
95
  main {
96
96
  display: flex;
@@ -107,7 +107,7 @@ PERFORMANCE OF THIS SOFTWARE.
107
107
  </main>
108
108
 
109
109
  ${0}
110
- `),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 a=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:"",n=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(ce||(ce=ve`
110
+ `),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 a=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:"",n=!!(null===(i=t.data)||void 0===i?void 0:i.end_date)&&new Date(t.data.end_date).getTime()<=Date.now();return e(me||(me=be`
111
111
  ${0}
112
112
 
113
113
  <foxy-internal-customer-portal-link
@@ -120,13 +120,13 @@ PERFORMANCE OF THIS SOFTWARE.
120
120
  </foxy-internal-customer-portal-link>
121
121
 
122
122
  ${0}
123
- `),t.renderTemplateOrSlot("items:actions:update:before"),a,n||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,s;const i=r({},e.dialog.templates),n=i["header:after"],d=i["items:actions:after"];return i["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(me||(me=ve`
123
+ `),t.renderTemplateOrSlot("items:actions:update:before"),a,n||!t.in("idle"),t.lang,t.ns,t.renderTemplateOrSlot("items:actions:update:after"))},this.__renderForm=e=>{var t,s;const i=r({},e.dialog.templates),n=i["header:after"],d=i["items:actions:after"];return i["header:after"]=(e,t)=>{const s=t.hiddenSelector.matches("header:actions",!0);return e(ue||(ue=be`
124
124
  ${0}
125
125
  ${0}
126
- `),s?"":this.__renderFormHeaderActions(e,t),null==n?void 0:n(e,t))},i["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(ue||(ue=ve`
126
+ `),s?"":this.__renderFormHeaderActions(e,t),null==n?void 0:n(e,t))},i["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(pe||(pe=be`
127
127
  ${0}
128
128
  ${0}
129
- `),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},a(pe||(pe=ve` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new o(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(s=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",i,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=i(e,ie);var r,o;return t(he||(he=ve`
129
+ `),r&&!o?this.__renderFormItemsActionsUpdate(e,t):"",null==d?void 0:d(e,t))},a(he||(he=be` <foxy-subscription-form disabledcontrols="${0}" readonlycontrols="${0}" hiddencontrols="${0}" settings="${0}" parent="${0}" group="${0}" lang="${0}" href="${0}" ns="${0} ${0}" id="form" .templates="${0}" @update="${0}" @fetch="${0}"> </foxy-subscription-form> `),e.dialog.disabledControls.toString(),e.dialog.readonlyControls.toString(),new o(`attributes timestamps start-date past-due-amount customer ${e.dialog.hiddenSelector}`),JSON.stringify(this.settings),e.dialog.parent,e.dialog.group,e.dialog.lang,e.dialog.href,e.dialog.ns,null!==(s=null===(t=customElements.get("foxy-subscription-form"))||void 0===t?void 0:t.defaultNS)&&void 0!==s?s:"",i,e.handleUpdate,e.handleFetch)},this.__renderPageItem=e=>{let{html:t}=e,s=i(e,ae);var r,o;return t(fe||(fe=be`
130
130
  <button
131
131
  class=${0}
132
132
  ?disabled=${0}
@@ -144,7 +144,7 @@ PERFORMANCE OF THIS SOFTWARE.
144
144
  >
145
145
  </foxy-subscription-card>
146
146
  </button>
147
- `),f({"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","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),JSON.stringify(this.settings),s.parent,s.group,s.lang,s.href,s.ns,null!==(o=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=i(e,ae);return t(fe||(fe=ve`
147
+ `),f({"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","transaction_template:items"),this.__subscriptionDialog.href=t.toString(),this.__subscriptionDialog.show(e.currentTarget)}),JSON.stringify(this.settings),s.parent,s.group,s.lang,s.href,s.ns,null!==(o=null===(r=customElements.get("foxy-subscription-card"))||void 0===r?void 0:r.defaultNS)&&void 0!==o?o:"",s.templates)},this.__renderPage=e=>{let{html:t}=e,s=i(e,ne);return t(ge||(ge=be`
148
148
  <foxy-collection-page
149
149
  ns=${0}
150
150
  href=${0}
@@ -155,4 +155,4 @@ PERFORMANCE OF THIS SOFTWARE.
155
155
  .templates=${0}
156
156
  >
157
157
  </foxy-collection-page>
158
- `),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>a(ge||(ge=ve` ${0} <foxy-i18n class="block text-l font-medium" 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 t=this.disabledSelector.zoom("list"),s=this.readonlySelector.zoom("list"),r=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return a(ye||(ye=ve` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" alert .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"),s.zoom("form").toString(),t.zoom("form").toString(),r.join(" ").trim(),h(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 r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return a($e||($e=ve` <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","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends we{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>a(xe||(xe=je` <div> ${0} <foxy-i18n class="text-l font-medium" 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 a(Se||(Se=je` <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}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return a(_e||(_e=je` <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-link",z),customElements.define("foxy-customer-portal",w);export{w as CustomerPortal};
158
+ `),s.ns,s.href,s.lang,s.group,this.__renderPageItem,s.templates)},this.__renderHeader=()=>a(ye||(ye=be` ${0} <foxy-i18n class="block text-l font-medium" 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 t=this.disabledSelector.zoom("list"),s=this.readonlySelector.zoom("list"),r=[this.hiddenSelector.zoom("list").zoom("form").toString(),"end-date"];return a($e||($e=be` ${0} <foxy-form-dialog readonlycontrols="${0}" disabledcontrols="${0}" hiddencontrols="${0}" header="update" parent="${0}" group="${0}" lang="${0}" ns="${0}" id="subscription-dialog" alert .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"),s.zoom("form").toString(),t.zoom("form").toString(),r.join(" ").trim(),h(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 r(r({},super.properties),{},{settings:{attribute:!1},customer:{attribute:!1},group:{type:String}})}render(){return a(ve||(ve=be` <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","transaction_template:items"),e.toString()}catch(e){return""}}}),customElements.define("foxy-internal-customer-portal-transactions",class extends Te{constructor(){super(...arguments),this.customer=null,this.columns=[],this.group="",this.__renderHeader=()=>a(Se||(Se=we` <div> ${0} <foxy-i18n class="text-l font-medium" 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 a(_e||(_e=we` <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}" .props="${0}"> </foxy-collection-pages> ${0} </div> `),this.renderTemplateOrSlot("list:before"),this.group,e,this.lang,this.ns,this.getNestedTemplates("table"),{".columns":this.columns},this.renderTemplateOrSlot("list:after"))}}static get properties(){return r(r({},super.properties),{},{customer:{attribute:!1},columns:{attribute:!1},group:{type:String}})}render(){return a(je||(je=we` <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-link",z),customElements.define("foxy-customer-portal",T);export{T as CustomerPortal};
@@ -0,0 +1 @@
1
+ import{c as e,aI as t,_ as r}from"./shared-cb58dfcd.js";import{h as n,L as s}from"./shared-ba5c42c7.js";import{A as o}from"./shared-99a8889a.js";import"./shared-673d668a.js";import{C as i}from"./shared-5afb584d.js";import{F as a}from"./shared-343d1fd7.js";import{I as u}from"./shared-2aa23b5f.js";var l=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var r=function(e){var t=e.path,r=e.domain,n=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==r?"":";domain="+r,null==n?"":";expires="+n.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,n){return[encodeURIComponent(e),"=",encodeURIComponent(t),r(n)].join("")}})),c=e((function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},n=new RegExp("\\s*;\\s*");return e.split(n).forEach((function(e){var n=r(e.split("="),2),s=n[0],o=n[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),h=e((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){var e=this,t=c.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=c.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=c.parseCookies(this._getCookie()),r=Object.keys(t).sort();return e<r.length?r[e]:null}},{key:"removeItem",value:function(e,t){var r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),n=l.formatCookie(e,"",r);this._setCookie(n)}},{key:"setItem",value:function(e,t,r){var n=Object.assign(Object.assign({},this._defaultOptions),r),s=l.formatCookie(e,t,n);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=c.parseCookies(this._getCookie());return Object.keys(e).length}}])&&r(t.prototype,n),o&&r(t,o),e}();t.CookieStorage=n;var s={defineProperty:function(e,t,r){return e.setItem(t.toString(),String(r.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,r){if("string"==typeof t&&t in e)return e[t];var n=e.getItem(t.toString());return null!==n?n:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],r=0;r<e.length;r++){var n=e.key(r);null!==n&&t.push(n)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,r,n){return e.setItem(t.toString(),String(r)),!0}}})),p=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return h.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return l.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return c.parseCookies}})})));class f extends p.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===o.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),r=super.getItem("fx.customer.start"),n=super.getItem("fx.customer.jwt");if(null===e||null===t||null===r||null===n)return null;const s={session_token:e,date_created:r,expires_in:parseInt(t),jwt:n},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,r){if(e!==o.SESSION)return super.setItem(e,t,r);{const e=JSON.parse(t),r=1e3*e.expires_in,n=new Date(new Date(e.date_created).getTime()+r);super.setItem("fx.customer",e.session_token,{expires:n}),super.setItem("fx.customer.jwt",e.jwt,{expires:n}),super.setItem("fx.customer.start",e.date_created,{expires:n}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:n}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:n})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new f;let g,m=e=>e;class _ extends(i(u(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof a))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const r=new a("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:n=>{"foxy://customer-api/session"===r.request.url&&e.requestUpdate(),401===n.status&&e.requestUpdate(),t.respondWith(Promise.resolve(n))}});e.dispatchEvent(r)&&r.respondWith(e.__handleRequest(r.request))}}static get properties(){return r(r({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(o.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return n(g||(g=m` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new o({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let n,s;try{await this.api.signIn(t.credential);const i={forcePasswordReset:!!JSON.parse(this.api.storage.getItem(o.SESSION)).force_password_reset};this.dispatchEvent(new _.SignInEvent("signin",{detail:i})),this.requestUpdate(),n=200,s=r({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof o.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;n=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:n})}async __handleVirtualAuthSessionAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to sign in"}))}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleVirtualAuthRecoverAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to request a password reset"}))}async __handleVirtualAuthSignUpPost(e){const t=await e.clone().json();try{await this.api.signUp(t)}catch(e){if(!(e instanceof o.AuthError))throw e;let t,r;if("UNAUTHORIZED"===e.code)t="Customer registration is disabled for this store.",r=401;else if("UNAVAILABLE"===e.code)t="This email address is already in use by an existing customer of this store.",r=403;else{if("INVALID_FORM"!==e.code)throw e;t="Client verification failed.",r=400}const n=JSON.stringify({total:1,_embedded:{"fx:errors":[{message:t}]}});return new Response(n,{status:r})}return t.password&&await this.api.signIn(t),this.requestUpdate(),this.dispatchEvent(new _.SignUpEvent("signup")),new Response(JSON.stringify({_links:{self:{href:e.url}},message:"Account created"}))}async __handleVirtualAuthSignUpAny(e){return new Response(JSON.stringify({_links:{self:{href:e.url}},message:"POST to this endpoint to create an account"}))}async __handleRequest(e){const t=e.url,r=e.method;try{if(t.startsWith("foxy://customer-api/session"))return"DELETE"===r?this.__handleVirtualAuthSessionDelete():"POST"===r?this.__handleVirtualAuthSessionPost(e):this.__handleVirtualAuthSessionAny(e);if(t.startsWith("foxy://customer-api/recover"))return"POST"===r?this.__handleVirtualAuthRecoverPost(e):this.__handleVirtualAuthRecoverAny(e);if(t.startsWith("foxy://customer-api/signup"))return"POST"===r?this.__handleVirtualAuthSignUpPost(e):this.__handleVirtualAuthSignUpAny(e);const n=await this.api.fetch(e);return 401===n.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),n}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{},_.SignUpEvent=class extends CustomEvent{};export{_ as C};
@@ -0,0 +1,248 @@
1
+ {
2
+ "AD": "安道尔",
3
+ "AE": "阿拉伯联合大公国",
4
+ "AF": "阿富汗",
5
+ "AG": "安提瓜和巴布达",
6
+ "AI": "安圭拉",
7
+ "AL": "阿尔巴尼亚",
8
+ "AM": "亚美尼亚",
9
+ "AO": "安哥拉",
10
+ "AQ": "南极洲",
11
+ "AR": "阿根廷",
12
+ "AS": "美属萨摩亚",
13
+ "AT": "奥地利",
14
+ "AU": "澳大利亚",
15
+ "AW": "阿鲁巴",
16
+ "AX": "奥兰群岛",
17
+ "AZ": "阿塞拜疆",
18
+ "BA": "波斯尼亚和黑塞哥维那",
19
+ "BB": "巴巴多斯",
20
+ "BD": "孟加拉国",
21
+ "BE": "比利时",
22
+ "BF": "布基纳法索",
23
+ "BG": "保加利亚",
24
+ "BH": "巴林",
25
+ "BI": "布隆迪",
26
+ "BJ": "贝宁",
27
+ "BM": "百慕大",
28
+ "BN": "文莱",
29
+ "BO": "玻利维亚",
30
+ "BQ": "加勒比荷兰",
31
+ "BR": "巴西",
32
+ "BS": "巴哈马",
33
+ "BT": "不丹",
34
+ "BV": "布维岛",
35
+ "BW": "博茨瓦纳",
36
+ "BY": "白俄罗斯",
37
+ "BZ": "伯利兹",
38
+ "CA": "加拿大",
39
+ "CC": "科科斯群岛",
40
+ "CD": "刚果民主共和国",
41
+ "CF": "中非共和国",
42
+ "CG": "刚果",
43
+ "CH": "瑞士",
44
+ "CI": "象牙海岸",
45
+ "CK": "库克群岛",
46
+ "CL": "智利",
47
+ "CM": "喀麦隆",
48
+ "CN": "中国",
49
+ "CO": "哥伦比亚",
50
+ "CR": "哥斯达黎加",
51
+ "CU": "古巴",
52
+ "CV": "佛得角",
53
+ "CW": "库拉索",
54
+ "CX": "圣诞岛",
55
+ "CY": "塞浦路斯",
56
+ "CZ": "捷克",
57
+ "DE": "德国",
58
+ "DJ": "吉布提",
59
+ "DK": "丹麦",
60
+ "DM": "多米尼加",
61
+ "DO": "多米尼加共和国",
62
+ "DZ": "阿尔及利亚",
63
+ "EC": "厄瓜多尔",
64
+ "EE": "爱沙尼亚",
65
+ "EG": "埃及",
66
+ "EH": "西撒哈拉",
67
+ "ER": "厄立特里亚",
68
+ "ES": "西班牙",
69
+ "ET": "埃塞俄比亚",
70
+ "FI": "芬兰",
71
+ "FJ": "斐",
72
+ "FK": "福克兰群岛",
73
+ "FM": "密克罗尼西亚",
74
+ "FO": "法罗群岛",
75
+ "FR": "法国",
76
+ "GA": "加蓬",
77
+ "GB": "英国",
78
+ "GD": "格林纳达",
79
+ "GE": "格鲁吉亚",
80
+ "GF": "法属圭亚那",
81
+ "GG": "根西岛",
82
+ "GH": "加纳",
83
+ "GI": "直布罗陀",
84
+ "GL": "格陵兰",
85
+ "GM": "冈比亚",
86
+ "GN": "几内亚",
87
+ "GP": "瓜德罗普岛",
88
+ "GQ": "赤道几内亚",
89
+ "GR": "希腊",
90
+ "GS": "南乔治亚岛和南桑威奇群岛",
91
+ "GT": "危地马拉",
92
+ "GU": "关岛",
93
+ "GW": "几内亚比绍",
94
+ "GY": "圭亚那",
95
+ "HK": "香港",
96
+ "HM": "赫德岛和麦当劳群岛",
97
+ "HN": "洪都拉斯",
98
+ "HR": "克罗地亚",
99
+ "HT": "海地",
100
+ "HU": "匈牙利",
101
+ "ID": "印尼",
102
+ "IE": "爱尔兰",
103
+ "IL": "以色列",
104
+ "IM": "马恩岛",
105
+ "IN": "印度",
106
+ "IO": "英属印度洋领地",
107
+ "IQ": "伊拉克",
108
+ "IR": "伊朗",
109
+ "IS": "冰岛",
110
+ "IT": "意大利",
111
+ "JE": "泽西岛",
112
+ "JM": "牙买加",
113
+ "JO": "约旦",
114
+ "JP": "日本",
115
+ "KE": "肯尼亚",
116
+ "KG": "吉尔吉斯斯坦",
117
+ "KH": "柬埔寨",
118
+ "KI": "基里巴斯",
119
+ "KM": "科摩罗",
120
+ "KN": "圣基茨和尼维斯",
121
+ "KP": "北韩",
122
+ "KR": "韩国",
123
+ "KW": "科威特",
124
+ "KY": "开曼群岛",
125
+ "KZ": "哈萨克斯坦",
126
+ "LA": "老挝",
127
+ "LB": "黎巴嫩",
128
+ "LC": "圣卢西亚",
129
+ "LI": "列支敦士登",
130
+ "LK": "斯里兰卡",
131
+ "LR": "利比里亚",
132
+ "LS": "莱索托",
133
+ "LT": "立陶宛",
134
+ "LU": "卢森堡",
135
+ "LV": "拉脱维亚",
136
+ "LY": "利比亚",
137
+ "MA": "摩洛哥",
138
+ "MC": "摩纳哥",
139
+ "MD": "摩尔多瓦",
140
+ "ME": "黑山",
141
+ "MF": "圣马丁",
142
+ "MG": "马达加斯加",
143
+ "MH": "马绍尔群岛",
144
+ "MK": "马其顿",
145
+ "ML": "马里",
146
+ "MM": "缅甸",
147
+ "MN": "蒙古",
148
+ "MO": "澳门",
149
+ "MP": "北马里亚纳群岛",
150
+ "MQ": "马提尼克岛",
151
+ "MR": "毛里塔尼亚",
152
+ "MS": "蒙特塞拉特",
153
+ "MT": "马耳他",
154
+ "MU": "毛里求斯",
155
+ "MV": "马尔代夫",
156
+ "MW": "马拉维",
157
+ "MX": "墨西哥",
158
+ "MY": "马来西亚",
159
+ "MZ": "莫桑比克",
160
+ "NA": "纳米比亚",
161
+ "NC": "新喀里多尼亚",
162
+ "NE": "尼日尔",
163
+ "NF": "诺福克岛",
164
+ "NG": "尼日利亚",
165
+ "NI": "尼加拉瓜",
166
+ "NL": "荷兰",
167
+ "NO": "挪威",
168
+ "NP": "尼泊尔",
169
+ "NR": "瑙鲁",
170
+ "NU": "纽埃",
171
+ "NZ": "新西兰",
172
+ "OM": "阿曼",
173
+ "PA": "巴拿马",
174
+ "PE": "秘鲁",
175
+ "PF": "法属波利尼西亚",
176
+ "PG": "巴布亚新几内亚",
177
+ "PH": "菲律宾",
178
+ "PK": "巴基斯坦",
179
+ "PL": "波兰",
180
+ "PM": "圣皮埃尔和密克隆",
181
+ "PN": "皮特凯恩",
182
+ "PR": "波多黎各",
183
+ "PS": "巴勒斯坦",
184
+ "PT": "葡萄牙",
185
+ "PW": "帕劳",
186
+ "PY": "巴拉圭",
187
+ "QA": "卡塔尔",
188
+ "RE": "团圆",
189
+ "RO": "罗马尼亚",
190
+ "RS": "塞尔维亚",
191
+ "RU": "俄国",
192
+ "RW": "卢旺达",
193
+ "SA": "沙特阿拉伯",
194
+ "SB": "索罗门群岛",
195
+ "SC": "塞舌尔",
196
+ "SD": "苏丹",
197
+ "SE": "瑞典",
198
+ "SG": "新加坡",
199
+ "SH": "圣赫勒拿岛",
200
+ "SI": "斯洛文尼亚",
201
+ "SJ": "斯瓦尔巴群岛和扬马延岛",
202
+ "SK": "斯洛伐克",
203
+ "SL": "塞拉利昂",
204
+ "SM": "圣马力诺",
205
+ "SN": "塞内加尔",
206
+ "SO": "索马里",
207
+ "SR": "苏里南",
208
+ "ST": "圣多美和普林西比",
209
+ "SV": "萨尔瓦多",
210
+ "SX": "圣马丁",
211
+ "SY": "叙利亚",
212
+ "SZ": "斯威士兰",
213
+ "TC": "特克斯和凯科斯群岛",
214
+ "TD": "乍得",
215
+ "TF": "法国南部领土",
216
+ "TG": "多哥",
217
+ "TH": "泰国",
218
+ "TJ": "塔吉克斯坦",
219
+ "TK": "托克劳",
220
+ "TL": "东帝汶",
221
+ "TM": "土库曼斯坦",
222
+ "TN": "突尼斯",
223
+ "TO": "汤加",
224
+ "TR": "土耳其",
225
+ "TT": "特里尼达和多巴哥",
226
+ "TV": "图瓦卢",
227
+ "TW": "台湾",
228
+ "TZ": "坦桑尼亚",
229
+ "UA": "乌克兰",
230
+ "UG": "乌干达",
231
+ "US": "美国",
232
+ "UY": "乌拉圭",
233
+ "UZ": "乌兹别克斯坦",
234
+ "VA": "教廷",
235
+ "VC": "圣文森特和格林纳丁斯",
236
+ "VE": "委内瑞拉",
237
+ "VG": "英属维尔京群岛",
238
+ "VI": "美国维尔京群岛",
239
+ "VN": "越南",
240
+ "VU": "瓦努阿图",
241
+ "WF": "瓦利斯群岛和富图纳群岛",
242
+ "WS": "萨摩亚",
243
+ "YE": "也门",
244
+ "YT": "马约特岛",
245
+ "ZA": "南非",
246
+ "ZM": "赞比亚",
247
+ "ZW": "津巴布韦"
248
+ }