PageSourceSearch

https://www.faytogo.com/glue/8159.06c6cba2de55e913.js

js faytogo.com collected 2026-09-24 14:44:23 UTC 12,229 bytes, 6 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a062fb-bdfe-7ee3-aa21-3ba0547d1e91")}catch(e){}}();"use strict";
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="9dccf915-5769-54f9-8500-ca2c9e5616b5")}catch(e){}}();
3(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8159],{28159:(tt,h,a)=>{a.r(h),a.d(h,{CreditCardsPageModule:()=>j});var m=a(94666),P=a(2508),y=a(81258),g=a(43475),C=a(71670),x=a(94137),t=a(92135),b=a(49670),D=a(73071),M=a(59162),Z=a(63370),p=a(38699),I=a(53305),A=a(96256),T=a(32853),O=a(51933),F=a(72835),U=a(9052),Y=a(92256);function w(i,c){1&i&&(t.TgZ(0,"ion-col",8),t._UZ(1,"app-my-account-menu"),t.qZA())}function S(i,c){if(1&i){const s=t.EpF();t.TgZ(0,"ion-button",9),t.NdJ("click",function(){t.CHM(s);const r=t.oxw();return t.KtG(r.showStripeForm(!0))}),t._uU(1),t.ALo(2,"translate"),t.qZA()}2&i&&(t.xp6(1),t.hij(" + ",t.lcZ(2,1,"addNewPaymentMethod")," "))}function N(i,c){1&i&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.hij(" ",t.lcZ(2,1,"profileFirstCreditCardDisabled")," "))}function z(i,c){1&i&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"translate"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.lcZ(2,1,"noCreditCard")))}function B(i,c){if(1&i){const s=t.EpF();t.TgZ(0,"ion-button",22),t.NdJ("click",function(){t.CHM(s);const r=t.oxw().$implicit,n=t.oxw(2);return t.KtG(n.confirmMakeDefaultCard(r.uccid,r.uid,r.lastFour))}),t._uU(1,"Make Default"),t.qZA()}}function J(i,c){1&i&&(t.TgZ(0,"ion-button",23),t._uU(1,"Default Card"),t.qZA())}function k(i,c){if(1&i){const s=t.EpF();t.TgZ(0,"ion-item",13)(1,"div",14)(2,"div",15),t._uU(3),t._UZ(4,"br"),t.TgZ(5,"div")(6,"img",16),t.NdJ("error",function(r){return r.target.src="assets/imgs/cc_generic.png"}),t.qZA(),t._uU(7),t.qZA(),t._UZ(8,"br"),t._uU(9),t.ALo(10,"translate"),t.qZA(),t.TgZ(11,"div",17)(12,"div",18)(13,"ion-icon",19),t.NdJ("click",function(){const n=t.CHM(s).$implicit,d=t.oxw(2);return t.KtG(d.confirmDelete(n.uccid,n.uid))}),t.qZA()(),t.YNc(14,B,2,0,"ion-button",20),t.YNc(15,J,2,0,"ion-button",21),t.qZA()()()}if(2&i){const s=c.$implicit,e=t.oxw(2);t.xp6(3),t.AsE(" ",s.fname," ",s.lname,""),t.xp6(3),t.Q6J("src",e.getCardImage(s.cardType),t.LSH),t.xp6(1),t.hij(" **** ",s.lastFour,""),t.xp6(2),t.AsE(" ",t.lcZ(10,8,"added")," ",s.added," "),t.xp6(5),t.Q6J("ngIf",!s.isDeafult),t.xp6(1),t.Q6J("ngIf",s.isDeafult)}}
3function E(i,c){if(1&i&&(t.TgZ(0,"ion-grid",11)(1,"ion-row"),t.YNc(2,k,16,10,"ion-item",12),t.qZA()()),2&i){const s=t.oxw();t.Q6J("ngClass",s.cart&&s._user?"has-cart-user":s.cart||s._user?"has-cart-or-user":""),t.xp6(2),t.Q6J("ngForOf",s.credit_cards)}}let L=(()=>{var i;class c{constructor(e,r,n,d,o,l,u,f,R,H,_,K,$,G,X){var W=this;this.config=e,this.userAPI=r,this.loadingCtrl=n,this.modalCtrl=d,this.alertCtrl=o,this.statusBar=l,this.toastCtrl=u,this.storage=f,this.translate=R,this.screenResize=H,this.sharedService=_,this.cdr=K,this.platform=$,this.gtmService=G,this.vendorService=X,this.creditCardsLoaded=!1,this.isStripeFormVisible=!1,this.sharedService.statusBar.subscribe(v=>{this.setStatusBarColor()}),_.closePrevOpen.subscribe(function(){var v=(0,C.Z)(function*(q){yield W.showStripeForm(!1)});return function(q){return v.apply(this,arguments)}}())}setStatusBarColor(){this.platform.is("cordova")&&this.statusBar.backgroundColorByHexString("#f2f2f2")}ionViewDidEnter(){var e=this;return(0,C.Z)(function*(){e.gtmService.pushCustomEventNoParams("ViewSavedPayments"),e.setStatusBarColor(),yield e.initBottomMargin()})()}initBottomMargin(){var e=this;return(0,C.Z)(function*(){e.cart=yield e.storage.get("cart"),e._user=yield e.storage.get("user")})()}ngOnInit(){var e=this;return(0,C.Z)(function*(){e.isMobileView=e.screenResize.isMobileView,e.screenSizeEvent=e.screenResize.screenSizeChange.subscribe(r=>{e.isMobileView=r}),yield e.getUserCreditCards()})()}get isProfileFirstCardAddDisabled(){return this.creditCardsLoaded&&this.vendorService.DISABLE_PROFILE_FIRST_CREDIT_CARD&&(!this.credit_cards||0===this.credit_cards.length)}get showAddPaymentMethodButton(){return this.creditCardsLoaded&&!this.isStripeFormVisible&&!this.isProfileFirstCardAddDisabled}onNewCreditCardsAdded(e){this.getUserCreditCards().then(r=>{this.presentToast("added"),this.isStripeFormVisible=!1})}showStripeForm(e){var r=this;return(0,C.Z)(function*(){if(e){if(r.isProfileFirstCardAddDisabled)return void(yield r.presentProfileFirstCardDisabledAlert());const n=yield r.modalCtrl.create({component:x.D,componentProps:{usePaymentMethods:!1,checkIsAlreadyOpen:!1,updateOrder:!0},cssClass:"fullscreen-modal"});n.onDidDismiss().then(d=>{d.data&&r.getUserCreditCards().then(()=>{r.presentToast("added")})}),yield n.present()}})()}presentProfileFirstCardDisabledAlert(){var e=this;return(0,C.Z)(function*(){yield(yield e.alertCtrl.create({header:e.translate.instant("profileFirstCreditCardDisabledTitle"),message:e.translate.instant("profileFirstCreditCardDisabled"),buttons:[e.translate.instant("ok")]})).present()})()}getUserCreditCards(){let e;return new Promise((r,n)=>{this.storage.get("user").then(d=>{this.user=d,this.userAPI.getUserPayments(d.email).subscribe(o=>{o.default_UCCID?(e=o.default_UCCID,this.storage.remove("userDefaultUCCID"),this.storage.set("userDefaultUCCID",o.default_UCCID)):(this.storage.remove("userDefaultUCCID"),this.storage.remove("defaultCardIndex")),o.cards&&o.cards.length>0&&o.cards.map((l,u)=>{l&&(e&&l.uccid&&Number(e)==Number(l.uccid)?(l.isDeafult=!0,this.storage.get("order").then(f=>{null!=f?(this.storage.remove("order"),f.payments=[],f.payments.push({method:"CREDIT",UCCID:l.uccid}),this.storage.set("payment",l),this.storage.set("defaultCardIndex",u),this.storage.set("order",f)):(this.storage.set("payment",l),this.storage.set("defaultCardIndex",u))})):l.isDeafult=!1)}),this.credit_cards=o.cards,this.creditCardsLoaded=!0,this.cdr.detectChanges(),r(o)},o=>{this.creditCardsLoaded=!0,this.cdr.detectChanges(),n(o)})})})}makeCreditCardDefault(e,r){var n=this;this.userAPI.makeCreditCardDefault(e,r).subscribe(function(){var d=(0,C.Z)(function*(o){200==o.status&&((yield n.toastCtrl.create({message:"Your default payment card has been updated.",duration:5e3,position:"top",color:"dark"})).present(),yield n.getUserCreditCards())});return function(o){return d.apply(this,arguments)}}())}confirmMakeDefaultCard(e,r,n){var d=this;return(0,C.Z)(function*(){yield(yield d.alertCtrl.create({header:d.translate.instant("confirmDefaultCard"),message:"Are you sure you want the card ending in <b>"+n+"</b> as your default payment card?",backdropDismiss:!1,buttons:[{text:d.translate.instant("cancel"),role:"cancel",cssClass:"secondary",handler:()=>{}},{text:"Confirm",handler:()=>{d.makeCreditCardDefault(e,r)}}]})).present()})()}removeCreditCard(e,r){var n=this;this.userAPI.removeCreditCard(e,r).subscribe(function(){var d=(0,C.Z)(function*(o){if(2
300==o.status){if(n.credit_cards.length>0){var l=[];n.credit_cards.forEach(u=>{u.uccid!=e&&l.push(u)}),n.credit_cards=l}n.storage.get("order").then(u=>{u&&u.payments&&u.payments.length>0&&u.payments[0].UCCID==e&&(u.payments=[],n.storage.set("order",u),n.storage.set("payment",null))}),n.presentToast("deleted"),yield n.getUserCreditCards()}});return function(o){return d.apply(this,arguments)}}())}confirmDelete(e,r){var n=this;return(0,C.Z)(function*(){yield(yield n.alertCtrl.create({header:n.translate.instant("confirmDelete"),message:n.translate.instant("deleteCard"),backdropDismiss:!1,buttons:[{text:n.translate.instant("cancel"),role:"cancel",cssClass:"secondary",handler:()=>{}},{text:n.translate.instant("delete"),handler:()=>{n.removeCreditCard(e,r)}}]})).present()})()}addCreditCardModal(){}presentToast(e){var r=this;return(0,C.Z)(function*(){(yield r.toastCtrl.create({message:"Your credit card has been "+e,duration:5e3,position:"top",color:"dark"})).present()})()}ngOnDestroy(){this.screenSizeEvent.unsubscribe()}getCardImage(e){return e?`assets/imgs/cc_${e.toLowerCase()}.png`:"assets/imgs/cc_generic.png"}}return(i=c).\u0275fac=function(e){return new(e||i)(t.Y36(b.D),t.Y36(D.K),t.Y36(g.HT),t.Y36(g.IN),t.Y36(g.Br),t.Y36(M.A),t.Y36(g.yF),t.Y36(Z.Ke),t.Y36(p.sK),t.Y36(I.v),t.Y36(A.B),t.Y36(t.sBO),t.Y36(g.t4),t.Y36(T.b),t.Y36(O.n))},i.\u0275cmp=t.Xpm({type:i,selectors:[["app-credit-cards"]],decls:10,vars:8,consts:[[3,"pageTitle"],[1,"ion-padding"],["size-md","3",4,"ngIf"],["size-xs","12","size-md","9",1,"cards"],[3,"icon","title"],["class","new_address_btn new-button","fill","outline","shape","square",3,"click",4,"ngIf"],["class","no-address",4,"ngIf"],["class","credit_cards","style","overflow: auto !important;",3,"ngClass",4,"ngIf"],["size-md","3"],["fill","outline","shape","square",1,"new_address_btn","new-button",3,"click"],[1,"no-address"],[1,"credit_cards",2,"overflow","auto !important",3,"ngClass"],["class","item-card",4,"ngFor","ngForOf"],[1,"item-card"],[1,"cards-content"],[1,"info"],[1,"cc_image",3,"src","error"],[1,"actions"],[1,"card_delete"],["name","trash-outline",1,"delete_icon",3,"click"],["class","make_default",3,"click",4,"ngIf"],["class","default_card",4,"ngIf"],[1,"make_default",3,"click"],[1,"default_card"]],template:function(e,r){1&e&&(t._UZ(0,"app-main-header",0),t.TgZ(1,"ion-content",1)(2,"ion-row"),t.YNc(3,w,2,0,"ion-col",2),t.TgZ(4,"ion-col",3),t._UZ(5,"app-account-header",4),t.YNc(6,S,3,3,"ion-button",5),t.YNc(7,N,3,3,"div",6),t.YNc(8,z,3,3,"div",6),t.YNc(9,E,3,2,"ion-grid",7),t.qZA()()()),2&e&&(t.Q6J("pageTitle",r.translate.instant("creditCards")),t.xp6(3),t.Q6J("ngIf",!r.isMobileView),t.xp6(2),t.Q6J("icon","card-outline")("title","creditCards"),t.xp6(1),t.Q6J("ngIf",r.showAddPaymentMethodButton),t.xp6(1),t.Q6J("ngIf",r.isProfileFirstCardAddDisabled&&!r.isStripeFormVisible),t.xp6(1),t.Q6J("ngIf",r.creditCardsLoaded&&(!r.credit_cards||0==r.credit_cards.length)&&!r.isStripeFormVisible&&!r.isProfileFirstCardAddDisabled),t.xp6(1),t.Q6J("ngIf",!r.isStripeFormVisible))},dependencies:[m.mk,m.sg,m.O5,g.YG,g.wI,g.W2,g.jY,g.gu,g.Ie,g.Nd,F.$,U.H,Y.w,p.X$],styles:["ion-item[_ngcontent-%COMP%]{width:100%;font-size:14px;--padding-start: 0;--border-color: transparent}.delete_cc[_ngcontent-%COMP%]{font-size:36px}.default_card[_ngcontent-%COMP%]{--background: var(--ion-color-secondary);pointer-events:none}.make_default[_ngcontent-%COMP%]{--background:var(--ion-color-primary) }ion-chip[_ngcontent-%COMP%]{border:1px solid var(--ion-color-primary);border-radius:10px;margin-bottom:20px}.delete_icon[_ngcontent-%COMP%]{color:var(--ion-color-secondary);font-size:20px!important;top:0%!important}.card_delete[_ngcontent-%COMP%]{display:flex;justify-content:end}.actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between}.cc_image[_ngcontent-%COMP%]{height:20px;vertical-align:bottom}.cc_info[_ngcontent-%COMP%]{text-transform:capitalize}.credit_cards[_ngcontent-%COMP%], .no-address[_ngcontent-%COMP%]{margin-top:10px}.credit_cards[_ngcontent-%COMP%]{overflow:scroll;margin-bottom:100px}.cards[_ngcontent-%COMP%]{text-align:center}.cards-content[_ngcontent-%COMP%]{display:flex;width:100%;justify-content:space-between}@media (min-width: 768px){ion-content[_ngcontent-%COMP%]{--padding-top: 40px}}.actions[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{cursor:pointer}.stripe-form-row[_ngcontent-%COMP%]{min-height:600px}.stripe-form-row[_ngcontent-%COMP%]   ion-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.stripe-form-row[_ngcontent-%COMP%]   app-stripe-form[_ngcontent-%COMP%]{flex:1;display:block;width:100%}.fullscreen-modal[_ngcontent-%COMP%]{--width: 100%;--height: 100%}"]}),c})();var Q=a(77147);const V=[{path:"",component:L}];let j=(()=>{var i;class c{}return(i=c).\u0275fac=function(e){return new(e||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[m.ez,P.u5,g.Pc,Q.m,y.Bz.forChild(V)]}),c})()}}]);
4//# debugId=9dccf915-5769-54f9-8500-ca2c9e5616b5
5
6//# chunkId=01a062fb-bdfe-7ee3-aa21-3ba0547d1e91

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.