1import{E as e,_ as t,l as n,x as r}from"./institution-DyFDvNu6.js";import{t as i}from"./page-B8YwBOEr.js";import{Sr as a,_r as o,o as s,vr as c}from"./main-5Sl8yySz.js";import"./jha-card-DC-UH8vN.js";import"./bannoweb-page-container-G_uPsQAr.js";import{a as l,i as u,n as d,t as f}from"./sso-utils-BtlATq0e.js";import"./bannoweb-iframe-window-B9Ld4m6C.js";import{t as p}from"./bannoweb-sso-error-toast-B0FNHvJw.js";var m=s.ssoController,h=f(c(t,`fadeinup`));window.BannowebFSCCPaymentSsoElement=class extends h{static get is(){return`bannoweb-fscc-payment`}static get properties(){return{accountId:{type:String,attribute:`account-id`},accounts:{type:Object},_iframeSrc:{type:String,state:!0}}}constructor(){super(),this.boundOnMessage_=this.onMessage.bind(this),this.accountId=``,this.accounts=s.store.accounts,this._iframeSrc=``}connectedCallback(){super.connectedCallback(),this.fetchUrl(),d(),u(this.boundOnMessage_)}disconnectedCallback(){super.disconnectedCallback(),l(this.boundOnMessage_)}onMessage({data:e}){let t=e.type,n=e.data;if(t===`request-close`)history.back();else if(t===`request-resize`){let e=this.shadowRoot?.querySelector(`jha-card`);e&&(e.style.height=`${n.height}px`)}}fetchUrl(){let e=this.accounts.get(this.accountId);if(!e){this.displayError();return}let t=this.getAccountSsoLink(n.FSCC_PAYMENT,e,this.accounts.entitlementsLoaded);if(!t){this.displayError();return}m.getSsoUrl(t,this.accountId).then(e=>this.loadIframe(e)).catch(e=>this.displayError())}loadIframe(e){if(!e){this.displayError();return}this._iframeSrc=e}displayError(){let e=new p;e.returnUrl=this.accountId?`/account/${this.accountId}`:`/`,this.dispatchEvent(new a(e,{id:`bannoweb-sso-error-toast`,ttl:-1}))}async routeEnter(e,t,r,a){let s=this.accounts.get(this.accountId),c=s&&this.getAccountSsoLink(n.FSCC_PAYMENT,s,this.accounts.entitlementsLoaded),l=c&&c.title||`FSCC payment`;return i.setTitleAndTrack(l,o.getRouteUrlWithoutParams(a),r),super.routeEnter(e,t,r,a)}static get styles(){return e`:host{flex:1 0 auto;display:flex}bannoweb-page-container{width:100%}bannoweb-iframe-window{min-height:600px}jha-card{flex-direction:column;width:90%;max-width:650px;min-height:500px;margin:32px auto;display:flex}`}render(){return r`<bannoweb-page-container> <jha-card> <bannoweb-iframe-window internet-explorer-post-fallback .src="${this._iframeSrc}"></bannoweb-iframe-window> </jha-card> </bannoweb-page-container>`}},customElements.define(window.BannowebFSCCPaymentSsoElement.is,window.BannowebFSCCPaymentSsoElement);var g=window.BannowebFSCCPaymentSsoElement;export{g as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.