(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{"g/4G":function(t,n,e){"use strict";e.r(n),e.d(n,"SubaccountsModule",(function(){return Tt}));var c=e("1VvW"),i=e("i2L+"),a=e("D57K"),o=e("zqNl"),s=e("gxtV"),l=e("C05f"),r=e("uJYd"),b=e("rxqU"),u=e("qAYy"),g=e("xVbo"),m=e("J/3c"),d=e("kZht"),f=e("MUfl"),p=e("3kIJ"),h=e("2Xgx"),C=e("anSm"),O=e("An66"),P=e("1etq"),M=e("NxuZ"),_=e("EmXI"),T=e("Tcl6"),v=e("VbQ3"),y=e("IkSM"),U=e("B6Vo"),x=e("aDqW");function w(t,n){if(1&t){const t=d.Vb();d.Ub(0,"fa-icon",10),d.bc("click",(function(){return d.Ec(t),d.fc().onSignUp()})),d.Tb()}}function R(t,n){if(1&t){const t=d.Vb();d.Ub(0,"div",11),d.bc("click",(function(){d.Ec(t);const e=n.$implicit;return d.fc().clickEvent.emit(e)})),d.Ub(1,"p",12),d.Qc(2),d.Tb(),d.Pb(3,"fa-icon",13),d.Tb()}if(2&t){const t=n.$implicit,e=d.fc();d.Gb("selected",t===e.selected),d.Cb(2),d.Rc(t)}}let S=(()=>{let t=class{constructor(t,n){this.formBuilder=t,this.feature=n,this.searchShown=!1,this.clickEvent=new d.o,this.signUp=new d.o}ngOnInit(){this.form=this.formBuilder.group({search:[""]}),this.form.get("search").valueChanges.pipe(Object(s.b)(this)).subscribe(t=>{this.filteredList=t.length?this.list.filter(n=>n.includes(t)):this.list})}ngOnChanges({list:t}){t&&(this.filteredList=this.list)}onSignUp(){this.signUp.emit()}};return t.\u0275fac=function(n){return new(n||t)(d.Ob(p.d),d.Ob(f.a))},t.\u0275cmp=d.Ib({type:t,selectors:[["searchable-list"]],inputs:{title:"title",selected:"selected",list:"list"},outputs:{clickEvent:"clickEvent",signUp:"signUp"},features:[d.Ab],decls:14,vars:10,consts:[["sb-card","",1,"searchable-list"],["body","",1,"search",3,"formGroup"],[1,"title"],["tooltip","","sbTooltip","Create subaccount","icon","plus","size","2x",3,"click",4,"ngIf"],["subheading",""],["icon","search","size","2x",3,"click"],["color","accent","appearance","fill"],["matInput","","autocomplete","off","formControlName","search"],[1,"list",3,"itemSize"],["class","element",3,"selected","click",4,"cdkVirtualFor","cdkVirtualForOf"],["tooltip","","sbTooltip","Create subaccount","icon","plus","size","2x",3,"click"],[1,"element",3,"click"],["body",""],["icon","arrow-right","body","","size","2x"]],template:function(t,n){1&t&&(d.Ub(0,"div",0),d.Ub(1,"form",1),d.Ub(2,"div",2),d.Oc(3,w,1,0,"fa-icon",3),d.Ub(4,"p",4),d.Qc(5),d.Tb(),d.Tb(),d.Ub(6,"fa-icon",5),d.bc("click",(function(){return n.searchShown=!n.searchShown})),d.Tb(),d.Ub(7,"mat-form-field",6),d.Ub(8,"mat-label"),d.Qc(9),d.gc(10,"translate"),d.Tb(),d.Pb(11,"input",7),d.Tb(),d.Tb(),d.Ub(12,"cdk-virtual-scroll-viewport",8),d.Oc(13,R,4,3,"div",9),d.Tb(),d.Tb()),2&t&&(d.Cb(1),d.Gb("search-show",n.searchShown),d.mc("formGroup",n.form),d.Cb(2),d.mc("ngIf",n.feature.isEnabled("createSubAccount")),d.Cb(2),d.Rc(n.title),d.Cb(4),d.Rc(d.hc(10,8,"FORM.SEARCH")),d.Cb(3),d.mc("itemSize",20),d.Cb(1),d.mc("cdkVirtualForOf",n.filteredList))},directives:[h.a,p.z,p.p,C.a,p.h,O.n,P.a,M.b,_.c,_.f,T.b,p.c,p.o,p.g,v.e,v.a,v.d,y.a,U.a],pipes:[x.d],styles:[".searchable-list[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column}.search[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border-colour);padding:var(--spacing-l) var(--spacing)}.search[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{flex:0.3}.search[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{flex:0.7;position:relative;text-align:right;transition:all .15s ease-in-out;transform:translateX(0);z-index:2}.search[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%] >svg{cursor:pointer}.search[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:calc(70% - var(--spacing-l));position:absolute;right:var(--spacing);opacity:.001;transition:all .35s ease-in-out;z-index:1}.search[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%] .mat-form-field-wrapper{padding-bottom:0!important}.search.search-show[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{transform:translateX(-100%);transition:all .15s ease-in-out}.search.search-show[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{opacity:1}.list[_ngcontent-%COMP%]{flex:1}.list[_ngcontent-%COMP%], .list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{padding:var(--spacing)}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{transition:all .15s ease-in-out}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(:last-of-type){border-bottom:1px solid var(--border-colour)}.list[_ngcontent-%COMP%] .element.selected[_ngcontent-%COMP%]{pointer-events:none}.list[_ngcontent-%COMP%] .element.selected[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{font-weight:700}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(.selected){cursor:pointer}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(.selected) fa-icon[_ngcontent-%COMP%]{opacity:.001}.list[_ngcontent-%COMP%] .element[_ngcontent-%COMP%]:not(.selected):hover fa-icon[_ngcontent-%COMP%]{opacity:.3}.title[_ngcontent-%COMP%]{display:flex;align-items:center}.title[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}"],changeDetection:0}),t=Object(a.d)([Object(s.a)()],t),t})();var k=e("hCLc"),A=e("icqo"),D=e("aaFr"),E=e("O30t"),L=e("nXdR"),$=e("sq1e"),Q=e("yPvj"),j=e("1o0v"),I=e("+I9z"),V=e("fvDn"),N=e("DpwM"),F=e("P0Um");function W(t,n){1&t&&d.Qc(0," Holding ")}function z(t,n){1&t&&d.Pb(0,"tr",13)}function H(t,n){1&t&&d.Pb(0,"tr",14)}function q(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("HOLDING WALLET"))}function G(t,n){if(1&t&&(d.Ub(0,"td",16),d.Pb(1,"market-icon",17),d.Ub(2,"div"),d.Ub(3,"p"),d.Qc(4),d.gc(5,"cryptoName"),d.Tb(),d.Ub(6,"p",18),d.Qc(7),d.gc(8,"cryptoAbbreviation"),d.gc(9,"uppercase"),d.Tb(),d.Tb(),d.Tb()),2&t){const t=n.$implicit;d.Cb(1),d.mc("pair",t.name),d.Cb(3),d.Rc(d.hc(5,3,t.name)),d.Cb(3),d.Rc(d.hc(8,5,d.hc(9,7,t.name)))}}function B(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("BALANCE"))}function J(t,n){if(1&t&&(d.Ub(0,"td",19),d.Ub(1,"div"),d.Pb(2,"ghost-trail",20),d.gc(3,"cryptoPrecise"),d.Ub(4,"p",18),d.Qc(5),d.gc(6,"cryptoAbbreviation"),d.gc(7,"uppercase"),d.Tb(),d.Tb(),d.Tb()),2&t){const t=n.$implicit;d.Cb(2),d.nc("content",d.ic(3,2,t.balance,t.currency)),d.Cb(3),d.Rc(d.hc(6,5,d.hc(7,7,t.name)))}}function X(t,n){1&t&&d.Pb(0,"th",15)}function Y(t,n){if(1&t){const t=d.Vb();d.Ub(0,"td",21),d.Ub(1,"div"),d.Ub(2,"div",22),d.bc("click",(function(){d.Ec(t);const e=n.$implicit;return d.fc(2).openWalletTransactionDialog("subaccount-transfer",e)})),d.Pb(3,"fa-icon",23),d.Ub(4,"p"),d.Qc(5),d.gc(6,"translate"),d.Tb(),d.Tb(),d.Tb(),d.Tb()}2&t&&(d.Cb(5),d.Rc(d.hc(6,1,"WALLETS.FUTURES.TRANSFER")))}function Z(t,n){if(1&t&&(d.Ub(0,"table",3),d.Oc(1,z,1,0,"tr",4),d.Oc(2,H,1,0,"tr",5),d.Sb(3,6),d.Oc(4,q,2,1,"th",7),d.Oc(5,G,10,9,"td",8),d.Rb(),d.Sb(6,9),d.Oc(7,B,2,1,"th",7),d.Oc(8,J,8,9,"td",10),d.Rb(),d.Sb(9,11),d.Oc(10,X,1,0,"th",7),d.Oc(11,Y,7,3,"td",12),d.Rb(),d.Tb()),2&t){const t=d.fc();d.mc("dataSource",t.holdingData),d.Cb(1),d.mc("matHeaderRowDef",t.holdingColumns)("matHeaderRowDefSticky",!0),d.Cb(1),d.mc("matRowDefColumns",t.holdingColumns)}}function K(t,n){1&t&&d.Qc(0," Single Collateral ")}function tt(t,n){1&t&&d.Pb(0,"tr",13)}function nt(t,n){1&t&&d.Pb(0,"tr",14)}function et(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("SINGLE COLLATERAL WALLET"))}function ct(t,n){if(1&t&&(d.Ub(0,"td",16),d.Pb(1,"market-icon",17),d.gc(2,"walletName"),d.Ub(3,"p"),d.Qc(4),d.gc(5,"walletName"),d.Tb(),d.Tb()),2&t){const t=n.$implicit;d.Cb(1),d.mc("pair",d.hc(2,2,t.name)),d.Cb(3),d.Rc(d.hc(5,4,t.name))}}function it(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("AVAILABLE MARGIN"))}function at(t,n){if(1&t&&(d.Ub(0,"td",19),d.Ub(1,"div"),d.Pb(2,"ghost-trail",20),d.gc(3,"cryptoPrecise"),d.Ub(4,"p",18),d.Qc(5),d.gc(6,"cryptoAbbreviation"),d.Tb(),d.Tb(),d.Tb()),2&t){const t=n.$implicit,e=d.fc(2);d.Cb(2),d.nc("content",d.ic(3,2,t.balance,t.currency)),d.Cb(3),d.Rc(d.hc(6,5,e.getMarginWalletCollateral(t.name)))}}function ot(t,n){1&t&&d.Pb(0,"th",15)}function st(t,n){if(1&t){const t=d.Vb();d.Ub(0,"td",21),d.Ub(1,"div"),d.Ub(2,"div",22),d.bc("click",(function(){d.Ec(t);const e=n.$implicit;return d.fc(2).openWalletTransactionDialog("subaccount-transfer",e)})),d.Pb(3,"fa-icon",23),d.Ub(4,"p"),d.Qc(5),d.gc(6,"translate"),d.Tb(),d.Tb(),d.Tb(),d.Tb()}2&t&&(d.Cb(5),d.Rc(d.hc(6,1,"WALLETS.FUTURES.TRANSFER")))}function lt(t,n){if(1&t&&(d.Ub(0,"table",24),d.Oc(1,tt,1,0,"tr",4),d.Oc(2,nt,1,0,"tr",5),d.Sb(3,25),d.Oc(4,et,2,1,"th",7),d.Oc(5,ct,6,6,"td",8),d.Rb(),d.Sb(6,26),d.Oc(7,it,2,1,"th",7),d.Oc(8,at,7,7,"td",10),d.Rb(),d.Sb(9,11),d.Oc(10,ot,1,0,"th",7),d.Oc(11,st,7,3,"td",12),d.Rb(),d.Tb()),2&t){const t=d.fc();d.mc("dataSource",t.futuresData),d.Cb(1),d.mc("matHeaderRowDef",t.futuresColumns)("matHeaderRowDefSticky",!0),d.Cb(1),d.mc("matRowDefColumns",t.futuresColumns)}}function rt(t,n){1&t&&d.Qc(0," Multi Collateral ")}function bt(t,n){1&t&&d.Pb(0,"tr",13)}function ut(t,n){1&t&&d.Pb(0,"tr",14)}function gt(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("MULTI-COLLATERAL WALLET"))}function mt(t,n){if(1&t&&(d.Ub(0,"td",16),d.Pb(1,"market-icon",27),d.Ub(2,"div"),d.Ub(3,"p"),d.Qc(4),d.gc(5,"cryptoName"),d.Tb(),d.Ub(6,"p",18),d.Qc(7),d.gc(8,"cryptoAbbreviation"),d.gc(9,"uppercase"),d.Tb(),d.Tb(),d.Tb()),2&t){const t=n.$implicit;d.Cb(1),d.mc("base",t.currency),d.Cb(3),d.Rc(d.hc(5,3,t.currency)),d.Cb(3),d.Rc(d.hc(8,5,d.hc(9,7,t.currency)))}}function dt(t,n){1&t&&(d.Ub(0,"th",15),d.Qc(1),d.Tb()),2&t&&(d.Cb(1),d.Rc("AVAILABLE MARGIN"))}function ft(t,n){if(1&t&&(d.Ub(0,"td",19),d.Ub(1,"div"),d.Pb(2,"ghost-trail",20),d.gc(3,"cryptoPrecise"),d.Ub(4,"p",18),d.Qc(5),d.Tb(),d.Tb(),d.Tb()),2&t){const t=n.$implicit;d.Cb(2),d.nc("content",d.ic(3,2,t.balance,t.currency)),d.Cb(3),d.Rc(t.currency)}}function pt(t,n){1&t&&d.Pb(0,"th",15)}function ht(t,n){if(1&t){const t=d.Vb();d.Ub(0,"td",21),d.Ub(1,"div"),d.Ub(2,"div",22),d.bc("click",(function(){d.Ec(t);const e=n.$implicit;return d.fc(2).openWalletTransactionDialog("subaccount-transfer",e)})),d.Pb(3,"fa-icon",23),d.Ub(4,"p"),d.Qc(5),d.gc(6,"translate"),d.Tb(),d.Tb(),d.Tb(),d.Tb()}2&t&&(d.Cb(5),d.Rc(d.hc(6,1,"WALLETS.FUTURES.TRANSFER")))}function Ct(t,n){if(1&t&&(d.Ub(0,"table",24),d.Oc(1,bt,1,0,"tr",4),d.Oc(2,ut,1,0,"tr",5),d.Sb(3,25),d.Oc(4,gt,2,1,"th",7),d.Oc(5,mt,10,9,"td",8),d.Rb(),d.Sb(6,26),d.Oc(7,dt,2,1,"th",7),d.Oc(8,ft,6,5,"td",10),d.Rb(),d.Sb(9,11),d.Oc(10,pt,1,0,"th",7),d.Oc(11,ht,7,3,"td",12),d.Rb(),d.Tb()),2&t){const t=d.fc();d.mc("dataSource",t.flexData),d.Cb(1),d.mc("matHeaderRowDef",t.futuresColumns)("matHeaderRowDefSticky",!0),d.Cb(1),d.mc("matRowDefColumns",t.futuresColumns)}}let Ot=(()=>{class t{constructor(t){this.store=t,this.holdingData=new E.k([]),this.futuresData=new E.k([]),this.flexData=new E.k([]),this.holdingColumns=["currency","balance","actions"],this.futuresColumns=["name","available","actions"]}ngOnChanges({selected:t}){t&&t.currentValue&&(this.holdingData.data=this.selected.holdingAccounts,this.futuresData.data=this.selected.futuresAccounts,this.flexData.data=this.selected.flexAccount)}getCurrency(t){return"usd"===t.split(":")[1]?t.split("-")[1].split(":")[0]:t.split(":")[1]}getMarginWalletCollateral(t){return Object(L.d)(t)||""}openWalletTransactionDialog(t,n){this.store.dispatch(Object(r.g)({name:"wallet-transaction",inputs:{type:t,originWallet:n,subAccount:this.selected}}))}}return t.\u0275fac=function(n){return new(n||t)(d.Ob(o.b))},t.\u0275cmp=d.Ib({type:t,selectors:[["subaccount-details"]],inputs:{selected:"selected",subaccounts:"subaccounts",tickers:"tickers",flexEnabled:"flexEnabled"},features:[d.Ab],decls:11,vars:0,consts:[["sb-card","",1,"subaccount-details"],["mat-tab-label",""],["matTabContent",""],["mat-table","",1,"holding-wallets",3,"dataSource"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["matColumnDef","currency"],["mat-header-cell","",4,"matHeaderCellDef"],["class","currency","mat-cell","","body","",4,"matCellDef"],["matColumnDef","balance"],["class","balance","mat-cell","","body","",4,"matCellDef"],["matColumnDef","actions"],["class","actions","mat-cell","","body","",4,"matCellDef"],["mat-header-row",""],["mat-row",""],["mat-header-cell",""],["mat-cell","","body","",1,"currency"],[3,"pair"],["ghost",""],["mat-cell","","body","",1,"balance"],[3,"content"],["mat-cell","","body","",1,"actions"],[1,"button",3,"click"],["icon","transfer","size","lg"],["mat-table","",1,"futures-wallets",3,"dataSource"],["matColumnDef","name"],["matColumnDef","available"],[3,"base"]],template:function(t,n){1&t&&(d.Ub(0,"div",0),d.Ub(1,"mat-tab-group"),d.Ub(2,"mat-tab"),d.Oc(3,W,1,0,"ng-template",1),d.Oc(4,Z,12,4,"ng-template",2),d.Tb(),d.Ub(5,"mat-tab"),d.Oc(6,K,1,0,"ng-template",1),d.Oc(7,lt,12,4,"ng-template",2),d.Tb(),d.Ub(8,"mat-tab"),d.Oc(9,rt,1,0,"ng-template",1),d.Oc(10,Ct,12,4,"ng-template",2),d.Tb(),d.Tb(),d.Tb())},directives:[h.a,$.c,$.a,$.d,$.b,E.j,E.g,E.i,E.c,E.e,E.b,E.f,E.h,E.d,E.a,C.a,Q.a,j.a,I.a,M.b],pipes:[V.b,V.a,O.x,N.b,x.d,F.a],styles:[".subaccount-details[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;overflow-y:scroll}.account-details[_ngcontent-%COMP%]{display:flex;align-items:center;padding:var(--spacing-l) var(--spacing);border-bottom:1px solid var(--border-colour)}.account-details[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--spacing)}table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:var(--spacing)}table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:15px}@media (max-width:1024px){table[_ngcontent-%COMP%] .mat-column-estimate[_ngcontent-%COMP%]{display:none!important}}table[_ngcontent-%COMP%] .mat-column-available[_ngcontent-%COMP%], table[_ngcontent-%COMP%] .mat-column-balance[_ngcontent-%COMP%], table[_ngcontent-%COMP%] .mat-column-estimate[_ngcontent-%COMP%]{text-align:right}table[_ngcontent-%COMP%] .mat-row[_ngcontent-%COMP%]{border-bottom:1px solid var(--border-colour)}table[_ngcontent-%COMP%] .mat-cell[_ngcontent-%COMP%]{border-bottom:none!important}.balance[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .currency[_ngcontent-%COMP%] > div[_ngcontent-%COMP%], .estimate[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:column}.balance[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child), .currency[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child), .estimate[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:first-child){margin-top:var(--spacing-xs)}.currency[_ngcontent-%COMP%]{display:flex;align-items:center}.currency[_ngcontent-%COMP%] market-icon[_ngcontent-%COMP%]{margin-right:var(--spacing);font-size:2em}.actions[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.actions[_ngcontent-%COMP%] .button[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.actions[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] + .button[_ngcontent-%COMP%]{margin-left:var(--spacing)}.actions[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--brand)}.actions[_ngcontent-%COMP%] .button[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{padding-left:var(--spacing-s)}"],changeDetection:0}),t})();var Pt=e("ROO/");function Mt(t,n){if(1&t){const t=d.Vb();d.Ub(0,"button",6),d.bc("click",(function(){d.Ec(t);const e=n.$implicit;return d.fc().selectAccount(e)})),d.Qc(1),d.Tb()}if(2&t){const t=n.$implicit;d.Cb(1),d.Sc(" ",t," ")}}const _t=[i.a,c.h.forChild([{path:"",component:(()=>{let t=class{constructor(t,n,e){this.store=t,this.router=n,this.activatedRoute=e,this.selected$=new l.a(void 0),this.subaccounts$=this.store.pipe(Object(o.m)(b.t)),this.emails$=this.store.pipe(Object(o.m)(b.s)),this.tickers$=this.store.pipe(Object(o.m)(u.k)),this.flexEnabled$=this.store.pipe(Object(o.m)(m.f))}ngOnInit(){this.store.dispatch(Object(r.x)("NAV.SUBACCOUNTS")),this.activatedRoute.queryParamMap.subscribe(t=>{const n=t.get("account");n?this.subaccounts$.pipe(Object(g.a)(t=>!!t.length),Object(s.b)(this)).subscribe(t=>this.selected$.next(t.find(t=>t.email===n))):this.subaccounts$.pipe(Object(g.a)(t=>!!t.length),Object(s.b)(this)).subscribe(t=>this.selected$.next(t[0]))})}selectAccount(t){this.router.navigate(["subaccounts"],{queryParams:{account:t}})}signUp(){this.store.dispatch(Object(r.g)({name:"subaccount-sign-up"}))}};return t.\u0275fac=function(n){return new(n||t)(d.Ob(o.b),d.Ob(c.d),d.Ob(c.a))},t.\u0275cmp=d.Ib({type:t,selectors:[["subaccounts"]],decls:15,vars:22,consts:[["title","Users",3,"selected","list","clickEvent","signUp"],[1,"mobile-selector"],["mat-raised-button","","body","",3,"sbMenuTriggerFor"],["subAccountMenu","sbMenu"],["body","","sb-menu-item","",3,"click",4,"ngFor","ngForOf"],[3,"selected","subaccounts","flexEnabled"],["body","","sb-menu-item","",3,"click"]],template:function(t,n){if(1&t&&(d.Ub(0,"searchable-list",0),d.bc("clickEvent",(function(t){return n.selectAccount(t)}))("signUp",(function(){return n.signUp()})),d.gc(1,"async"),d.gc(2,"async"),d.Tb(),d.Ub(3,"section",1),d.Ub(4,"button",2),d.Qc(5),d.gc(6,"async"),d.Tb(),d.Ub(7,"sb-menu",null,3),d.Oc(9,Mt,2,1,"button",4),d.gc(10,"async"),d.Tb(),d.Tb(),d.Pb(11,"subaccount-details",5),d.gc(12,"async"),d.gc(13,"async"),d.gc(14,"async")),2&t){const t=d.Ac(8);var e,c;d.mc("selected",null==(e=d.hc(1,8,n.selected$))?null:e.email)("list",d.hc(2,10,n.emails$)),d.Cb(4),d.mc("sbMenuTriggerFor",t),d.Cb(1),d.Sc(" ",null==(c=d.hc(6,12,n.selected$))?null:c.email," "),d.Cb(4),d.mc("ngForOf",d.hc(10,14,n.emails$)),d.Cb(2),d.mc("selected",d.hc(12,16,n.selected$))("subaccounts",d.hc(13,18,n.subaccounts$))("flexEnabled",d.hc(14,20,n.flexEnabled$))}},directives:[S,k.b,C.a,A.b,D.a,O.m,Ot,Pt.a],pipes:[O.b],styles:["[_nghost-%COMP%]{display:flex;height:100%}@media (max-width:1024px){[_nghost-%COMP%]{flex-direction:column;overflow:scroll}}searchable-list[_ngcontent-%COMP%]{flex:0.25}@media (max-width:1024px){searchable-list[_ngcontent-%COMP%]{display:none}}.mobile-selector[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:var(--spacing-s);margin-bottom:var(--spacing);width:100%}@media (min-width:1025px){.mobile-selector[_ngcontent-%COMP%]{display:none!important}}subaccount-details[_ngcontent-%COMP%]{flex:0.75;margin-left:var(--spacing)}@media (max-width:1024px){subaccount-details[_ngcontent-%COMP%]{flex:1;margin-left:0}}"],changeDetection:0}),t=Object(a.d)([Object(s.a)()],t),t})()}])];let Tt=(()=>{class t{}return t.\u0275mod=d.Mb({type:t}),t.\u0275inj=d.Lb({factory:function(n){return new(n||t)},imports:[_t]}),t})()}}]);