PageSourceSearch

https://sociallab.sa/chunk-CFXU5g9K.js

js sociallab.sa collected 2026-10-01 23:54:08 UTC 10,962 bytes, 1 lines download raw bytes

1import {d}from'./chunk-CJiSKH-S.js';import {w}from'./chunk-DBJEWKx2.js';import {c as ce}from'./chunk-BRsHFk4j.js';import'./chunk-C0DmzTpz.js';import {g,ck as $e$1,d9 as s,V,dn as p$1,bK as P,bI as Gt,dp as o$1,d5 as d$1,X as Xb,T as Tt,h as ea,i as ai,j as Xv,N as Ng,z as zg,w as w0,H as H0,Z as Zx,k as dn,l as zw,s as sk,n as nd,r as rC,m as wC,o as mv,p as GC,t as tD,q as vD,u as al,x as tM,y as dM,L as Lb,A as r1,P as P1,B as xS,C as Vs,F as zs,J as GS,K as iI,M as RI,Q as us,S as ms,Y as UI,_ as tE,$ as Dn,a0 as ME,a1 as ny,a2 as go,a3 as Kd,a4 as XE,a5 as LT,a6 as mA,a7 as mt,aM as QM,cx as WM,a8 as fy,a9 as ZT,ai as dy,bn as nS,ag as SC,ah as YT,aa as Js,ac as H_,ad as gd,ae as pS,aj as jy,al as gS,ak as Ed,aT as d_,bg as mS,dl as Hy,af as XT,aV as KT,am as JT,aD as By,c8 as Vy,bf as Ny}from'./main-4WA6AAHG.js';import'./chunk-CkU8oUfw.js';var We=()=>["Your plan gives you points at the start of every billing cycle.","You can buy more at any time \u2014 top-up points stay valid for a year.","The history below shows exactly what each deduction was for."];function Le(o,m){o&1&&(Js(0,"div",1)(1,"mat-icon"),H_(2,"ac_unit"),gd(),Js(3,"div")(4,"b"),H_(5),pS(6,"translate"),gd(),Js(7,"div",4),H_(8),pS(9,"translate"),gd()()()),o&2&&(SC(5),jy(gS(6,2,"Your points are on hold")),SC(3),Ed(" ",gS(9,4,"Your account is on a subscription plan, so your points are kept safe but cannot be spent right now. They do not expire while on hold, and become available again if you move back to points billing.")," "));}function Oe(o,m){o&1&&(Js(0,"div",1)(1,"mat-icon"),H_(2,"info"),gd(),Js(3,"div")(4,"b"),H_(5),pS(6,"translate"),gd(),Js(7,"div",4),H_(8),pS(9,"translate"),gd()()()),o&2&&(SC(5),jy(gS(6,2,"Your account is on subscription billing")),SC(3),Ed(" ",gS(9,4,"Templates and messages are counted against your plan's limits, so points are not used on your account. Contact support about any points shown here.")," "));}function Fe(o,m){if(o&1&&(Js(0,"div",11)(1,"span",18),H_(2),pS(3,"number"),pS(4,"translate"),gd(),Js(5,"span",19),H_(6),pS(7,"translate"),pS(8,"number"),pS(9,"translate"),gd()()),o&2){let e=d_(2);SC(2),By(" \u2248 ",mS(3,5,e.wallet.currentBalance*e.pointValueSar,"1.2-2")," ",gS(4,8,"SAR")," "),SC(4),Vy(" ",gS(7,10,"Point value"),": ",mS(8,12,e.pointValueSar,"1.2-2")," ",gS(9,15,"SAR")," ");}}function Ae(o,m){if(o&1&&(Js(0,"span",10),H_(1),pS(2,"date"),gd()),o&2){let e=d_(2);SC(),Ed(" ",mS(2,1,e.wallet.nextExpiryDate,"yyyy/MM/dd")," ");}}function Ve(o,m){o&1&&(Js(0,"a",16),H_(1),pS(2,"translate"),gd()),o&2&&(SC(),Ed(" ",gS(2,1,"Buy Points")," "));}function Ye(o,m){o&1&&(Js(0,"a",17),H_(1),pS(2,"translate"),gd()),o&2&&(SC(),Ed(" ",gS(2,1,"Plans")," "));}function je(o,m){if(o&1&&(Js(0,"div",2)(1,"div",5)(2,"div",6)(3,"mat-icon",7),H_(4,"account_balance_wallet"),gd(),Js(5,"h6",8),H_(6),pS(7,"translate"),gd(),Js(8,"h3",9),H_(9),pS(10,"number"),gd(),Js(11,"span",10),H_(12),pS(13,"translate"),gd(),ZT(14,Fe,10,17,"div",11),gd()(),Js(15,"div",5)(16,"div",6)(17,"mat-icon",12),H_(18,"check_circle"),gd(),Js(19,"h6",8),H_(20),pS(21,"translate"),gd(),Js(22,"h3",9),H_(23),pS(24,"number"),gd(),Js(25,"span",10),H_(26),pS(27,"translate"),gd()()(),Js(28,"div",5)(29,"div",6)(30,"mat-icon",13),H_(31,"warning"),gd(),Js(32,"h6",8),H_(33),pS(34,"translate"),gd(),Js(35,"h3",9),H_(36),pS(37,"number"),gd(),ZT(38,Ae,3,4,"span",10),gd()(),Js(39,"div",5)(40,"div",6)(41,"mat-icon",14),H_(42,"bolt"),gd(),Js(43,"h6",8),H_(44),pS(45,"translate"),gd(),Js(46,"div",15),ZT(47,Ve,3,3,"a",16)(48,Ye,3,3,"a",17),gd()()()()),o&2){let e=d_();SC(6),jy(gS(7,12,"Current Balance")),SC(3),jy(mS(10,14,e.wallet.currentBalance,"1.0-2")),SC(3),jy(gS(13,17,"Points")),SC(2),YT(e.pointValueSar?14:-1),SC(6),jy(gS(21,19,"Available Balance")),SC(3),jy(mS(24,21,e.wallet.availableBalance,"1.0-2")),SC(3),jy(gS(27,24,"Points")),SC(7),jy(gS(34,26,"Expiring Soon")),SC(3),jy(mS(37,28,e.wallet.expiringSoonPoints,"1.0-2")),SC(2),YT(e.wallet.expiringSoonPoints>0&&e.wallet.nextExpiryDate?38:-1),SC(6),jy(gS(45,31,"Quick Actions")),SC(3),YT(e.isSubscriptionBilling?48:47);}}function ze(o,m){if(o&1&&(Js(0,"div",3)(1,"div",20)(2,"div",21)(3,"mat-icon",22),H_(4,"schedule"),gd(),Js(5,"span",23),H_(6),pS(7,"translate"),pS(8,"number"),pS(9,"translate"),pS(10,"date"),gd()()()()),o&2){let e=d_();SC(6),Hy(" ",gS(7,4,"You have")," ",mS(8,6,e.wallet.expiringSoonPoints,"1.0-2")," ",gS(9,9,"points expiring on")," ",mS(10,11,e.wallet.nextExpiryDate,"yyyy/MM/dd")," ");}}function He(o,m){if(o&1&&(Js(0,"div",28)(1,"div",29)(2,"mat-icon",30),H_(3),gd(),Js(4,"div")(5,"h6",31),H_(6),pS(7,"translate"),gd(),Js(8,"h4",9),H_(9),pS(10,"number"),gd()()()()),o&2){let e=m.$implicit,c=d_(2);SC(2),Ny("color",c.getSourceColor(e.sourceType)),SC(),Ed(" ",c.getSourceIcon(e.sourceType)," "),SC(3),jy(gS(7,5,c.getSourceLabel(e.sourceType))),SC(3),jy(mS(10,7,e.remainingPoints,"1.0-2"));}}function Ue(o,m){if(o&1&&(Js(0,"div",3)(1,"div",20)(2,"div",24)(3,"div",25)(4,"span",26)(5,"mat-icon"),H_(6,"account_balance"),gd()(),Js(7,"span",27),H_(8),pS(9,"translate"),gd()(),Js(10,"div",2),XT(11,He,11,10,"div",28,KT),gd()()()()),o&2){let e=d_();SC(8),jy(gS(9,1,"Balance Breakdown")),SC(3),JT(e.wallet.breakdownBySource);}}function $e(o,m){o&1&&(Js(0,"div",3)(1,"div",32)(2,"div",33)(3,"mat-icon",34),H_(4,"view_list"),gd(),Js(5,"span",35),H_(6),pS(7,"translate"),gd()()(),Js(8,"div",32)(9,"div",36)(10,"mat-icon",37),H_(11,"receipt_long"),gd(),Js(12,"span",35),H_(13),pS(14,"translate"),gd()()(),Js(15,"div",32)(16,"div",38)(17,"mat-icon",22),H_(18,"bar_chart"),gd(),Js(19,"span",35),H_(20),pS(21,"translate"),gd()()(),Js(22,"div",32)(23,"div",39)(24,"mat-icon",40),H_(25,"description"),gd(),Js(26,"span",35),H_(27),pS(28,"translate"),gd()()()()),o&2&&(SC(6),jy(gS(7,4,"Points Buckets")),SC(7),jy(gS(14,6,"Transaction History")),SC(7),jy(gS(21,8,"Usage Summary")),SC(7),jy(gS(28,10,"Invoices")));}var Qt=(()=>{class o{constructor(e,c,s,Re,De){this.pointsService=e,this.loadingService=c,this.errorService=s,this.pointsState=Re,this.appInitService=De,this.wallet=null,this.EnumPointsSourceType=d,this.isSubscriptionBilling=false,this.destroyRef=g($e$1),this.pointV
1alueSar=null;}ngOnInit(){this.appInitService.appInitData$.pipe(w(this.destroyRef)).subscribe(e=>{this.isSubscriptionBilling=e?.clientStatus?.billingMode===s.SubscriptionLimits;}),this.loadWallet(),this.loadPointValue();}loadPointValue(){this.pointsService.getAvailablePackages().subscribe({next:e=>{if(!e.succeeded||!e.data?.length)return;let c=e.data.map(s=>s.basePointValueSar).filter(s=>s>0);this.pointValueSar=c.length?Math.min(...c):null;},error:()=>{}});}loadWallet(){this.loadingService.loadingOn(),this.pointsService.getMyWallet().subscribe({next:e=>{this.loadingService.loadingOff(),e.succeeded&&(this.wallet=e.data,this.pointsState.updateBalance(this.wallet.currentBalance));},error:e=>{this.loadingService.loadingOff(),this.errorService.setError(e,"Failed to load");}});}getSourceLabel(e){return {[d.SubscriptionIncluded]:"Subscription Included",[d.Cashback]:"Cashback",[d.Purchased]:"Purchased",[d.Free]:"Free",[d.Referral]:"Referral",[d.MigrationIncentive]:"Migration Incentive",[d.Refund]:"Refund"}[e]||""}getSourceIcon(e){return {[d.SubscriptionIncluded]:"card_membership",[d.Cashback]:"currency_exchange",[d.Purchased]:"shopping_cart",[d.Free]:"redeem",[d.Referral]:"group_add",[d.MigrationIncentive]:"card_giftcard",[d.Refund]:"restore"}[e]||"stars"}getSourceColor(e){return {[d.SubscriptionIncluded]:"#1976d2",[d.Cashback]:"#f57c00",[d.Purchased]:"#388e3c",[d.Free]:"#7b1fa2",[d.Referral]:"#0097a7",[d.MigrationIncentive]:"#7b1fa2",[d.Refund]:"#2e7d32"}[e]||"#616161"}static{this.\u0275fac=function(c){return new(c||o)(V(p$1),V(P),V(Gt),V(o$1),V(d$1))};}static{this.\u0275cmp=Xb({type:o,selectors:[["app-points-wallet"]],decls:7,vars:7,consts:[["helpKey","client-points-wallet","title","Your points","intro","Points are the single balance used to pay for messages, templates and other paid actions.","warning","Points included with your plan expire at the end of the cycle and do not carry over. Points you buy are used only after the included ones run out.",3,"steps"],[1,"frozen-banner"],[1,"row"],[1,"row","m-t-16"],[1,"f-s-13"],[1,"col-lg-3","col-md-6"],[1,"sl-card","text-center"],[1,"icon-48",2,"color","var(--color-primary)"],[1,"mat-subtitle-2","f-w-400","m-t-8"],[1,"f-w-600","m-0"],[1,"mat-body-1"],[1,"m-t-8"],[1,"icon-48",2,"color","var(--color-success)"],[1,"icon-48",2,"color","var(--color-error)"],[1,"icon-48",2,"color","var(--color-accent)"],[1,"d-flex","flex-column","gap-8","m-t-8"],["mat-stroked-button","","color","primary","routerLink","/apps/points/purchase"],["mat-stroked-button","","color","primary","routerLink","/apps/pricing"],[1,"mat-body-2","text-muted","d-block"],[1,"f-s-12","text-muted"],[1,"col-12"],[1,"sl-card","d-flex","align-items-center",2,"background","var(--color-light-warning)"],[1,"m-r-16",2,"color","var(--color-warning)"],[1,"f-s-14"],[1,"sl-card"],[1,"sl-card__header"],[1,"sl-card__icon"],[1,"sl-card__title"],[1,"col-lg-4","col-md-6","m-b-16"],[1,"d-flex","align-items-center","p-16","rounded",2,"background","var(--color-surface-2)"],[1,"m-r-16"],[1,"mat-subtitle-2","f-w-400","m-0"],[1,"col-lg-3","col-md-6","m-b-16"],["routerLink","/apps/points/buckets",1,"sl-card","sl-card--interactive","d-flex","align-items-center"],[1,"m-r-16",2,"color","var(--color-primary)"],[1,"f-s-14","f-w-500"],["routerLink","/apps/points/ledger",1,"sl-card","sl-card--interactive","d-flex","align-items-center"],[1,"m-r-16",2,"color","var(--color-success)"],["routerLink","/apps/points/usage",1,"sl-card","sl-card--interactive","d-flex","align-items-center"],["routerLink","/apps/points/invoices",1,"sl-card","sl-card--interactive","d-flex","align-items-center"],[1,"m-r-16",2,"color","var(--color-accent)"]],template:function(c,s){c&1&&(fy(0,"app-page-help",0),ZT(1,Le,10,6,"div",1)(2,Oe,10,6,"div",1),ZT(3,je,49,33,"div",2),ZT(4,ze,11,14,"div",3),ZT(5,Ue,13,3,"div",3),ZT(6,$e,29,12,"div",3)),c&2&&(dy("steps",nS(6,We)),SC(),YT(s.wallet?.frozenOn?1:s.wallet&&s.isSubscriptionBilling?2:-1),SC(2),YT(s.wallet?3:-1),SC(),YT(s.wallet&&s.wallet.expiringSoonPoints>0?4:-1),SC(),YT(s.wallet?5:-1),SC(),YT(s.wallet?6:-1));},dependencies:[Tt,ce,ea,ai,Xv,Ng,zg,w0,H0,Zx,dn,zw,sk,nd,rC,wC,mv,GC,tD,vD,al,tM,dM,Lb,r1,P1,xS,Vs,zs,GS,iI,RI,us,ms,UI,tE,Dn,ME,ny,go,Kd,XE,LT,mA,mt,QM,WM],styles:[".frozen-banner[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:flex-start;background:#eaf4ff;border:1px solid #b9d8f8;border-radius:10px;padding:14px 16px;margin-bottom:16px}.frozen-banner[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:#1d6fd1;flex:none}.cursor-pointer[_ngcontent-%COMP%]{cursor:pointer;transition:transform .2s}.cursor-pointer[_ngcontent-%COMP%]:hover{transform:translateY(-2px)}.icon-48[_ngcontent-%COMP%]{font-size:var(--font-size-5xl);width:48px;height:48px}.gap-8[_ngcontent-%COMP%]{gap:8px}"],changeDetection:1});}}return o}
1)();export{Qt as PointsWalletComponent};

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.