PageSourceSearch

https://my.xnce.com/3230.a9600d71f0d5467d.js

js xnce.com collected 2026-10-07 23:00:45 UTC 50,225 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkb2core=self.webpackChunkb2core||[]).push([[3230],{3230(G,$,a){a.d($,{FEATURE_BONUSES_ROUTES:()=>ge});var m=a(65145),f=a(36841),g=a(188),A=a(54736),F=a(57941),T=a(6903),L=a(33148),d=a(43383),v=a(9921),C=a(32348),j=a(9755),I=a(5382),S=a(32167),y=a(88103),_=a(48540),x=a(15980),E=a(85562),u=a(22778),s=a(80968);const r=[{id:"all",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.All%%"),value:null},{id:"active",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.Active%%"),value:s.t.Active},{id:"queued",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.Pending%%"),value:s.t.Pending},{id:"completed",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.Completed%%"),value:s.t.Completed},{id:"expired",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.Expired%%"),value:s.t.Expired},{id:"error",labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.Consts.ActiveBonusFilterOptions.Error%%"),value:s.t.Error}];var l=a(47551),h=a(86970),B=a(15954),R=a(59224),N=a(34539),X=a(55981),U=a(39565),t=a(88463);let W=(()=>{class e{constructor(){this.type="active",this.percent=0}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["ds-progress-bar"]],hostVars:2,hostBindings:function(o,i){2&o&&t.HbH(i.type)},inputs:{type:"type",percent:"percent"},decls:4,vars:3,consts:[[1,"bar-container"],[1,"bar"],["data-testId","percent",1,"percent"]],template:function(o,i){1&o&&(t.rj2(0,"div",0),t.Hgh(1,"div",1),t.eux(),t.rj2(2,"div",2),t.EFF(3),t.eux()),2&o&&(t.R
17$(),t.xc7("width",i.percent,"%"),t.R7$(2),t.SpI("",i.percent,"%"))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;height:20px;gap:8px}.completed[_nghost-%COMP%]   .bar[_ngcontent-%COMP%]{background-color:var(--positive)}.active[_nghost-%COMP%]   .bar[_ngcontent-%COMP%]{background-color:var(--accent)}.error[_nghost-%COMP%]   .bar[_ngcontent-%COMP%]{background-color:var(--negative)}.expired[_nghost-%COMP%]   .bar[_ngcontent-%COMP%]{background-color:var(--text-secondary)}.expired[_nghost-%COMP%]   .percent[_ngcontent-%COMP%]{color:var(--text-secondary)}[_nghost-%COMP%]   .bar-container[_ngcontent-%COMP%]{width:100%;height:4px;overflow:hidden;background-color:var(--field);border-radius:16px}[_nghost-%COMP%]   .bar[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]   .percent[_ngcontent-%COMP%]{width:32px;min-width:32px;font-size:12px;font-weight:400;line-height:20px;color:var(--text-main);text-align:right}[dir=rtl]   [_nghost-%COMP%]   .percent[_ngcontent-%COMP%], [_nghost-%COMP%]   .percent[dir=rtl][_ngcontent-%COMP%]{text-align:left}"]})}}return e})();var Q=a(48176);const J={[s.t.Active]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusIconTooltipTranslateKeys.Active%%"),[s.t.Completed]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusIconTooltipTranslateKeys.Completed%%"),[s.t.Expired]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusIconTooltipTranslateKeys.Expired%%"),[s.t.Pending]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusIconTooltipTranslateKeys.Pending%%"),[s.t.Error]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusIconTooltipTranslateKeys.Error%%")},Z={[s.t.Active]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusTranslateKeys.Active%%"),[s.t.Completed]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusTranslateKeys.Completed%%"),[s.t.Expired]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusTranslateKeys.Expired%%"),[s.t.Pending]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusTranslateKeys.Pending%%"),[s.t.Error]:(0,d.x)("%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.Consts.BonusStatusTranslateKeys.Error%%")},q=e=>({id:e}),tt=(e,c)=>({accountCaption:e,accountNumber:c}),et=e=>({platformCaption:e}),V=()=>({isTimeLeftLabel:!0,isExpired:!1}),nt=()=>({isTimeLeftLabel:!1,isExpired:!1}),ot=()=>({isTimeLeftLabel:!0,isExpired:!0}),st=(e,c)=>({position:e,total:c}),it=e=>({blockingBonusId:e});function at(e,c){if(1&e&&t.EFF(0),2&e){t.XpG();const n=t.r8f(0);t.SpI(" ",n.temporaryBonusName," ")}}function rt(e,c){if(1&e&&t.EFF(0),2&e){t.XpG();const n=t.r8f(0);t.SpI(" ",n.caption," ")}}function ct(e,c){if(1&e&&(t.EFF(0),t.nI1(1,"translate")),2&e){t.XpG();const n=t.r8f(0);t.SpI(" ",t.i5U(1,1,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.DefaultTitle [platformCaption]%%",t.eq3(4,et,n.platformCaption))," ")}}function ut(e,c){1&e&&t.eu8(0)}function lt(e,c){1&e&&t.eu8(0)}function dt(e,c){if(1&e&&t.DNE(0,ut,1,0,"ng-container",18)(1,lt,1,0,"ng-container",19),2&e){t.XpG();const n=t.sdS(44),o=t.sdS(48);t.Y8G("ngTemplateOutlet",n),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.lJ4(3,V))}}function pt(e,c){1&e&&t.eu8(0)}function mt(e,c){1&e&&t.eu8(0)}function gt(e,c){if(1&e&&t.DNE(0,pt,1,0,"ng-container",18)(1,mt,1,0,"ng-container",19),2&e){t.XpG();const n=t.sdS(46),o=t.sdS(48);t.Y8G("ngTemplateOutlet",n),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.lJ4(3,nt))}}function Ct(e,c){1&e&&t.eu8(0)}function ft(e,c){if(1&e&&t.DNE(0,Ct,1,0,"ng-container",18),2&e){t.XpG();const n=t.sdS(44);t.Y8G("ngTemplateOutlet",n)}}function vt(e,c){1&e&&t.eu8(0)}function ht(e,c){1&e&&t.eu8(0)}function bt(e,c){if(1&e&&t.DNE(0,vt,1,0,"ng-container",18)(1,ht,1,0,"ng-container",19),2&e){t.XpG();const n=t.sdS(44),o=t.sdS(48);t.Y8G("ngTemplateOutlet",n),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.lJ4(3,ot))}}function Bt(e,c){1&e&&t.eu8(0)}function Tt(e,c){1&e&&t.eu8(0)}function _t(e,c){if(1&e&&t.DNE(0,Bt,1,0,"ng-container",18)(1,Tt,1,0,"ng-container",19),2&e){t.XpG();const n=t.sdS(44),o=t.sdS(48);t.Y8G("ngTemplateOutlet",n),t.R7$(),t.Y8G("ngTemplateOutlet",o)("ngTemplateOutletContext",t.lJ4(3,V))}}function xt(e,c){if(1&e&&(t.j41(0,"div",13)(1,"dl")(2,"dt"),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.j41(5,"dd"),t.EFF(6),t.nI1(7,"dateFormat"),t.k0s()(),t.j41(8,"dl")(9,"dt"),t.EFF(10),t.nI1(11,"translate"),t.k0s(),t.j41(12,"dd"),t.EFF(13),t.nI1(14,"dateFormat"),t.k0s()(),t.j41(15,"dl")(16,"dt"),t.EFF(17),t.nI1(18,"translate"),t.k0s(),t.j41(19,"dd"),t.EFF(20),t.nI1(21,"dateFormat"),t.k0s()()()),2&e){t.XpG();const n=t.r8f(0);t.R7$(3),t.JRh(t.bMT(4,6,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.CreatedAt%%")),t.R7$(3),t.JRh(t.i5U(7,8,n.createdAt,"dd/MM/yy")),t.R7$(4),t.JRh(t.bMT(11,11,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.ActivatedAt%%")),t.R7$(3),t.JRh(n.activatedAt?t.i5U(14,13,n.activatedAt,"dd/MM/yy"):"\u2014"),t.R7$(4),t.JRh(t.bMT(18,16,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.ExpiresAt%%")),t.R7$(3),t.JRh(n.expiresAt?t.i5U(21,18,n.expiresAt,"dd/MM/yy"):"\u2014")}}function yt(e,c){if(1&e&&(t.EFF(0),t.nI1(1,"translate")),2&e){t.XpG(2);const n=t.r8f(3);t.SpI(" ",t.i5U(1,1,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.QueueBlockedBy [blockingBonu
1sId]%%",t.eq3(4,it,n.blockingBonusId))," ")}}function Mt(e,c){if(1&e&&(t.j41(0,"span",21),t.EFF(1),t.nI1(2,"translate"),t.nVh(3,yt,2,6),t.k0s()),2&e){t.XpG();const n=t.r8f(3);t.R7$(),t.SpI(" ",t.i5U(2,2,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.QueuePosition [position, total]%%",t.l_i(5,st,n.position,n.total))," "),t.R7$(2),t.vxM(n.blockingBonusId?3:-1)}}function Pt(e,c){if(1&e&&(t.j41(0,"span",20),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.SS7(3),t.nVh(4,Mt,4,8,"span",21)),2&e){const n=t.XpG(),o=t.r8f(0);t.R7$(),t.SpI(" ",t.bMT(2,2,c)," "),t.R7$(2);const i=t.bH3(n.queueInfo());t.R7$(),t.vxM(o.status===n.bonusStatusEnum.Pending&&i?4:-1)}}function Ot(e,c){if(1&e&&(t.j41(0,"dl")(1,"dt"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"dd",22),t.EFF(5),t.k0s()()),2&e){t.XpG();const n=t.r8f(0);t.R7$(2),t.SpI(" ",t.bMT(3,3,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.TradingLots%%")," "),t.R7$(3),t.Lme(" ",n.volumeComplete.toString()," / ",n.volumeThreshold.toString()," ")}}function At(e,c){if(1&e&&(t.j41(0,"dl")(1,"dt"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"dd",22),t.EFF(5),t.k0s()()),2&e){t.XpG();const n=t.r8f(0);t.R7$(2),t.SpI(" ",t.bMT(3,2,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.TradedLots%%")," "),t.R7$(3),t.SpI(" ",n.volumeThreshold.toString()," ")}}function Ft(e,c){if(1&e&&(t.j41(0,"dl")(1,"dt"),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"dd",23),t.EFF(5),t.k0s()()),2&e){const n=c.isExpired,o=c.isTimeLeftLabel;t.XpG();const i=t.r8f(0);t.R7$(2),t.SpI(" ",t.bMT(3,2,o?"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.TimeLeft%%":"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.ActiveTime%%")," "),t.R7$(3),t.SpI(" ",n?"0d 0h 0m":i.timeLeft," ")}}let $t=(()=>{class e{constructor(){this.bonusStatusTranslateKeys=Z,this.bonusStatusIconTooltipTranslateKeys=J,this.bonusStatusEnum=s.t,this.iconNames={[s.t.Active]:"lightning-24",[s.t.Completed]:"check-24",[s.t.Expired]:"expired-24",[s.t.Pending]:"sand-24",[s.t.Error]:"error-24"},this.progressBarTypes={[s.t.Active]:"active",[s.t.Completed]:"completed",[s.t.Expired]:"expired",[s.t.Pending]:"active",[s.t.Error]:"error"},this.bonus=B.hFB.required(),this.queueInfo=(0,B.hFB)(null),this.$getPercent=(0,f.EW)(()=>{const n=this.bonus(),o=n.volumeComplete,i=n.volumeThreshold;if(o.greaterThan(0)){const p=o.divide(i).multiply(100).toPrecision(0);return Math.max(0,Math.min(Number(p),100))}return 0})}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["feature-bonuses-active-bonus-card"]],inputs:{bonus:[1,"bonus"],queueInfo:[1,"queueInfo"]},decls:49,vars:34,consts:[["tradingLotsTemplate",""],["tradedLotsTemplate",""],["timeLeftTemplate",""],[1,"bonus-card"],[1,"title"],[1,"name"],["data-testId","bonus-name"],[1,"bonus-icon",3,"dsTooltip","name"],[1,"caption"],[1,"currency-amount"],["data-testId","currency-amount"],["data-testId","currency-alphabetic-code"],[1,"info"],[1,"dates"],[1,"selected-account"],["data-testId","selected-account-info"],[1,"status-progress"],[3,"percent","type"],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-testId","status-progress"],[1,"queue-info","ds-text-12-reg-il","ds-color-accent"],["data-testId","trading-lots"],["data-testId","time-left"]],template:function(o,i){if(1&o&&(t.SS7(0),t.j41(1,"div",3)(2,"div")(3,"div",4)(4,"span",5)(5,"ds-ellipsis-container",6),t.nVh(6,at,1,1)(7,rt,1,1)(8,ct,2,6),t.k0s()(),t.nrm(9,"ds-icon",7),t.nI1(10,"translate"),t.k0s(),t.j41(11,"div",8)(12,"span"),t.EFF(13),t.k0s(),t.EFF(14," \u2022 "),t.j41(15,"span"),t.EFF(16),t.nI1(17,"translate"),t.k0s()()(),t.j41(18,"dl",9)(19,"dt",10)(20,"ds-ellipsis-container"),t.EFF(21),t.nI1(22,"thousandSeparator"),t.k0s()(),t.j41(23,"dd",11),t.EFF(24),t.k0s()(),t.j41(25,"div",12),t.nVh(26,dt,2,4)(27,gt,2,4)(28,ft,1,1,"ng-container")(29,bt,2,4)(30,_t,2,4),t.k0s(),t.nVh(31,xt,22,21,"div",13),t.j41(32,"dl",14)(33,"dt"),t.EFF(34),t.nI1(35,"translate"),t.k0s(),t.j41(36,"dd",15)(37,"ds-ellipsis-container"),t.EFF(38),t.nI1(39,"translate"),t.k0s()()(),t.j41(40,"div",16),t.nVh(41,Pt,5,5),t.nrm(42,"ds-progress-bar",17),t.k0s()(),t.DNE(43,Ot,6,5,"ng-template",null,0,t.C5r)(45,At,6,4,"ng-template",null,1,t.C5r)(47,Ft,6,4,"ng-template",null,2,t.C5r)),2&o){let p,P;const b=t.bH3(i.bonus());t.R7$(6),t.vxM(b.temporaryBonusName?6:b.caption?7:8),t.R7$(3),t.HbH(b.status.toLowerCase()),t.Y8G("dsTooltip",t.bMT(10,17,i.bonusStatusIconTooltipTranslateKeys[b.status]))("name",i.iconNames[b.status]),t.R7$(4),t.SpI(" ",b.platformCaption," "),t.R7$(3),t.SpI(" ",t.i5U(17,19,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.BonusID [id]%%",t.eq3(29,q,b.id))," "),t.R7$(5),t.SpI(" ",t.bMT(22,22,b.amount)," "),t.R7$(3),t.SpI(" ",b.currency.alphabeticCode," "),t.R7$(2),t.vxM((p=b.status)===i.bonusStatusEnum.Active?26:p===i.bonusStatusEnum.Pending?27:p===i.bonusStatusEnum.Completed?28:p===i.bonusStatusEnum.Expired?29:p===i.bonusStatusEnum.Error?30:-1),t.R7$(5),t.vxM(b.status===i.bonusStatusEnum.Active||b.status===i.bonusStatusEnum.Pending?31:-1),t.R7$(3),t.SpI(" ",t.bMT(35,24,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.SelectedAccount%%")," "),t.R7$(4),t.SpI(" ",t.i5U(39,26,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusCard.SelectedAccountInfo [accountCaption, accountNumber]%%",t.l_i(31,tt,b.accountCaption,b.accountNumber))," "),t.R7$(3),t.vxM((P=i.bonusStatusTranslateKeys[b.status])?41:-1,P),t.R7$(),t.Y8G("percent",i.$getPercent())("type",i.progressBarTypes[b.status])}},dependencies:[W,Q.E,N.mK,R.z,h.T3,v.D,U.w,X.az],styles:['[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]{margin-left:auto}[dir=rtl]   [_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%], [_nghost-%COMP%]   .bonus-icon[dir=rtl][_ngcontent-%COMP%]{margin-left:0;margin-right:auto}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after{inset:-16px -16px auto auto}[dir=rtl]   [_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   .bonus-icon[dir=rtl][_ngcontent-%COMP%]:after{inset:-16px auto auto -16px}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after{content:"";position:absolute;display:block;filter:blur(40px);width:50px;height:50px}.bonus-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;padding:16px;overflow:hidden;background-color:var(--card);border-radius:4px;box-sizing:border-box;gap:16px}.title[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;white-space:nowrap;gap:24px}.title[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:20px;line-height:24px}.caption[_ngcontent-%COMP%]{font-size:12px;line-height:20px;color:var(--text-secondary)}
1.currency-amount[_ngcontent-%COMP%]{display:flex;align-items:end;gap:12px}.currency-amount[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:32px;line-height:40px;word-break:break-all}.currency-amount[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{font-size:24px;line-height:34px;color:var(--text-secondary)}.info[_ngcontent-%COMP%]{display:flex;align-items:baseline;margin-bottom:8px;gap:8px}.info[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]{flex:1;overflow:hidden}.info[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{color:var(--text-secondary)}.title[_ngcontent-%COMP%]{margin-bottom:8px}.bonus-icon[_ngcontent-%COMP%]{color:var(--medium)}.bonus-icon[_ngcontent-%COMP%]:after{background-color:var(--medium)}.bonus-icon.active[_ngcontent-%COMP%], .bonus-icon.queued[_ngcontent-%COMP%], .bonus-icon.pending[_ngcontent-%COMP%]{color:var(--accent)}.bonus-icon.active[_ngcontent-%COMP%]:after, .bonus-icon.queued[_ngcontent-%COMP%]:after, .bonus-icon.pending[_ngcontent-%COMP%]:after{background-color:var(--accent-40)}.bonus-icon.error[_ngcontent-%COMP%]{color:var(--negative)}.bonus-icon.error[_ngcontent-%COMP%]:after{background-color:var(--negative)}.bonus-icon.completed[_ngcontent-%COMP%]{color:var(--positive)}.bonus-icon.completed[_ngcontent-%COMP%]:after{background-color:var(--positive)}.bonus-icon.expired[_ngcontent-%COMP%]{color:var(--text-secondary)}.bonus-icon.expired[_ngcontent-%COMP%]:after{background-color:var(--text-secondary)}.caption[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.queue-info[_ngcontent-%COMP%]{margin-inline-start:4px}.dates[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px}.dates[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]{flex:1}.dates[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%], .selected-account[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{color:var(--text-secondary)}.status-progress[_ngcontent-%COMP%]{margin-top:auto}'],changeDetection:0})}}return e})();const H=(e,c)=>c.id;function It(e,c){if(1&e&&(t.nrm(0,"feature-bonuses-active-bonus-card",6),t.nI1(1,"executeWith")),2&e){const n=c.$implicit,o=t.XpG(3);t.Y8G("bonus",n)("queueInfo",t.i5U(1,2,o.getQueueInfo,n.id))}}function St(e,c){if(1&e&&(t.j41(0,"div",2)(1,"div",5),t.Z7z(2,It,2,5,"feature-bonuses-active-bonus-card",6,H),t.k0s()()),2&e){t.XpG(2);const n=t.r8f(3);t.R7$(2),t.Dyx(n)}}function Et(e,c){1&e&&t.nrm(0,"feature-bonuses-active-bonus-card",8),2&e&&t.Y8G("bonus",c.$implicit)}function Rt(e,c){if(1&e&&(t.j41(0,"div",4)(1,"h3",7),t.EFF(2),t.nI1(3,"translate"),t.k0s(),t.j41(4,"div",5),t.Z7z(5,Et,1,1,"feature-bonuses-active-bonus-card",8,H),t.k0s()()),2&e){t.XpG(2);const n=t.r8f(4);t.R7$(2),t.SpI(" ",t.bMT(3,1,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusesCardList.HistorySection%%")," "),t.R7$(3),t.Dyx(n)}}function Lt(e,c){if(1&e&&(t.nVh(0,St,4,0,"div",2),t.nVh(1,Rt,7,3,"div",4)),2&e){t.XpG();const n=t.r8f(3),o=t.r8f(4);t.vxM(n.length>0?0:-1),t.R7$(),t.vxM(o.length>0?1:-1)}}function jt(e,c){if(1&e&&(t.nrm(0,"feature-bonuses-active-bonus-card",6),t.nI1(1,"executeWith")),2&e){const n=c.$implicit,o=t.XpG(2);t.Y8G("bonus",n)("queueInfo",t.i5U(1,2,o.getQueueInfo,n.id))}}function Dt(e,c){if(1&e&&(t.j41(0,"div",2)(1,"div",5),t.Z7z(2,jt,2,5,"feature-bonuses-active-bonus-card",6,H),t.k0s()()),2&e){t.XpG();const n=t.r8f(2);t.R7$(2),t.Dyx(n)}}function kt(e,c){1&e&&(t.j41(0,"div",3),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusesCardList.NoBonuses%%")," "))}let Nt=(()=>{class e{constructor(){this.bonusesService=(0,m.WQX)(l.x),this.filterControl=new C.MJ(null),this.$isLoading=(0,m.vPA)(!1),this.filterChange$=(0,y.Ow)(this.filterControl,{debounceTimeMs:j.D6}),this.bonuses$=this.filterChange$.pipe((0,_.n)(n=>this.bonusesService.getBonuses(n).pipe((0,T.nU)(this.$isLoading),(0,x.T)(o=>null===n?o:o.filter(i=>i.status===n)),(0,E.Z)([]))),(0,u.t)({bufferSize:1,refCount:!0})),this.filterOptions=r,this.$filterValue=(0,g.ot)(this.filterChange$,{initialValue:null}),this.$bonuses=(0,g.ot)(this.bonuses$),this.$activePendingBonuses=(0,f.EW)(()=>(this.$bonuses()??[]).filter(o=>o.status===s.t.Active||o.status===s.t.Pending)),this.$historyBonuses=(0,f.EW)(()=>(this.$bonuses()??[]).filter(o=>o.status!==s.t.Active&&o.status!==s.t.Pending)),this.$queueMap=(0,f.EW)(()=>{const n=this.$activePendingBonuses(),o=new Map;for(const p of n){const P=o.get(p.accountNumber);P?P.push(p):o.set(p.accountNumber,[p])}const i=new Map;for(const p of o.values()){const P=p.find(O=>O.status===s.t.Active),b=p.filter(O=>O.status===s.t.Pending).sort((O,Ce)=>new Date(O.createdAt).getTime()-new Date(Ce.createdAt).getTime());if(0!==b.length&&(1!==b.length||P))for(let O=0;O<b.length;
1O++)i.set(b[O].id,{position:O+1,total:b.length,blockingBonusId:0===O?P?.id??null:b[O-1].id})}return i}),this.getQueueInfo=n=>this.$queueMap().get(n)??null}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["feature-bonuses-active-bonuses-card-list"]],decls:8,vars:8,consts:[[3,"isLoading"],["featureTourTemplateTooltip","","labelTourTooltipTranslateKey","%%B2Core.FeatureBonuses.Components.ActiveBonus.ActiveBonusesCardList.TooltipTour.PillGroup.Label%%","tourTooltipPosition","bottom-left","triggerKey","isActiveBonusesPillsTooltipCompleted",1,"bonuses-filter-pills",3,"formControl","items","offsetY"],[1,"bonuses"],[1,"no-bonuses-template"],[1,"bonuses","history-section"],[1,"card-list"],[3,"bonus","queueInfo"],[1,"ds-color-secondary"],[3,"bonus"]],template:function(o,i){if(1&o&&(t.nrm(0,"feature-spinner",0)(1,"ds-pill-group",1),t.SS7(2)(3)(4),t.nVh(5,Lt,2,2)(6,Dt,4,0,"div",2)(7,kt,3,3,"div",3)),2&o){t.Y8G("isLoading",i.$isLoading()),t.R7$(),t.Y8G("formControl",i.filterControl)("items",i.filterOptions)("offsetY",10),t.R7$();const p=t.bH3(i.$bonuses());t.R7$(),t.bH3(i.$activePendingBonuses()),t.R7$(),t.bH3(i.$historyBonuses()),t.R7$(),t.vxM(null===i.$filterValue()&&p&&p.length>0?5:p&&p.length>0?6:i.$isLoading()?-1:7)}},dependencies:[C.X1,C.BC,C.l_,$t,I.T5,A.t,F.B,v.D,S.O],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%;padding-bottom:40px;box-sizing:border-box}@media (max-width: 960px){[_nghost-%COMP%]{padding-bottom:24px}}@media (max-width: 640px){[_nghost-%COMP%]{padding-bottom:16px}}.bonuses[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.bonuses[_ngcontent-%COMP%]   .card-list[_ngcontent-%COMP%]{display:grid;flex:1;grid-template-columns:repeat(auto-fill,minmax(288px,1fr));grid-auto-rows:min-content;gap:16px}@media (max-width: 640px){.bonuses[_ngcontent-%COMP%]   .card-list[_ngcontent-%COMP%]{grid-template-rows:auto}}.no-bonuses-template[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex:1;padding:16px;text-align:center;color:var(--text-secondary);border:1px solid var(--divider);border-radius:4px}.bonuses-filter-pills[_ngcontent-%COMP%]{margin:8px 0 24px;padding-bottom:8px;overflow-x:auto}.history-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:24px;gap:16px}"],changeDetection:0})}}return e})();var K=a(8785),M=a(24525),Gt=a(39282),Y=a(5171),Ut=a(26950),Ht=a(29397),Xt=a(6512),Vt=a(88073),w=a(68359),Kt=a(61909),k=a(85165),Yt=a(47421),wt=a(35996),zt=a(58419),Wt=a(29239),Qt=a(6458);let Jt=(()=>{class e{constructor(){this.translateKeysMap={[M.f.Demo]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Demo%%"),[M.f.External]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.External%%"),[M.f.Exchange]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Exchange%%"),[M.f.Liquidity]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Liquidity%%"),[M.f.Partner]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Partner%%"),[M.f.Personal]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Personal%%"),[M.f.Trade]:(0,d.x)("%%B2Core.FeatureBonuses.Pipes.ProductType.Trade%%")}}transform(n){return this.translateKeysMap[n.product.type]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275pipe=t.EJ8({name:"productType",type:e,pure:!0})}}return e})();const z=e=>({id:e});function Zt(e,c){if(1&e){const n=t.RV6();t.j41(0,"div",15),t.nrm(1,"ds-currency-icon",16),t.j41(2,"div",17)(3,"ds-ellipsis-container",18),t.EFF(4),t.k0s(),t.j41(5,"ds-ellipsis-container",19)(6,"span",20),t.EFF(7),t.k0s(),t.EFF(8," \u2022 "),t.j41(9,"span",21),t.EFF(10),t.nI1(11,"translate"),t.k0s()()(),t.nrm(12,"ds-icon",22),t.k0s(),t.j41(13,"div",23)(14,"p"),t.EFF(15),t.nI1(16,"translate"),t.k0s(),t.j41(17,"ds-plain-button",24),t.bIt("click",function(){m.eBV(n);const i=t.XpG();return m.Njj(i.showActiveBonuses())}),t.k0s()()}if(2&e){t.XpG();const n=t.r8f(0);t.R7$(),t.Y8G("currency",n.account.alphabeticCode),t.R7$(3),t.SpI(" ",n.account.name," "),t.R7$(3),t.JRh(n.account.platformCaption),t.R7$(3),t.SpI(" ",t.i5U(11,6,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.ClaimedAccount.ID [id]%%",t.eq3(11,z,n.account.number))," "),t.R7$(2),t.Y8G("customSizePx",16),t.R7$(3),t.SpI(" ",t.bMT(16,9,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.BonusAlreadyClaimed%%")," ")}}function qt(e,c){if(1&e&&(t.j41(0,"div",27),t.nrm(1,"ds-currency-icon",16),t.j41(2,"div",17)(3,"ds-ellipsis-container"),t.EFF(4),t.k0s(),t.j41(5,"div",19)(6,"ds-ellipsis-container")(7,"span"),t.EFF(8),t.k0s(),t.EFF(9," \u2022 "),t.j41(10,"span"),t.EFF(11),t.nI1(12,"productType"),t.nI1(13,"translate"),t.k0s(),t.EFF(14," \u2022 "),t.j41(15,"span"),t.EFF(16),t.nI1(17,"translate"),t.k0s()()()()()),2&e){const n=c.$implicit;t.R7$(),t.Y8G("currency",n.value.product.currency.alphabeticCode),t.R7$(3),t.SpI(" ",n.value.name," "),t.R7$(4),t.JRh(n.value.product.platform.caption),t.R7$(3),t.JRh(t.bMT(13,7,t.bMT(12,5,n.value))),t.R7$(5),t.SpI(" ",t.i5U(17,9,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.Account.ID [id]%%",t.eq3(12,z,n.value.number))," ")}}function te(e,c){if(1&e){const n=t.RV6();t.j41(0,"ds-select",25),t.DNE(1,qt,18,14,"ng-template",null,0,t.C5r),t.k0s(),t.j41(3,"ds-button",26),t.bIt("click",function(){m.eBV(n);const i=t.XpG();return m.Njj(i.claim())}),t.k0s()}if(2&e){const n=t.sdS(2),o=t.XpG(),i=t.r8f(1);t.Y8G("formControl",o.accountControl)("isDisabled",o.$isLoading())("options",i)("optionTemplateRef",n),t.R7$(3),t.Y8G("isDisabled",o.$isClaimUnavailable())("isLoading",o.$isLoading())}}function ee(e,c){if(1&e){const n=t.RV6();t.j41(0,"ds-plain-button",30),t.bIt("click",function(){m.eBV(n);const i=t.XpG(2);return m.Njj(i.goToPlatform())}),t.k0s()}}function ne(e,c){if(1&e&&(t.j41(0,"div",28),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.nVh(3,ee,1,0,"ds-plain-button",29)),2&e){const n=t.XpG();t.R7$(),t.SpI(" ",t.bMT(2,2,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.NoAvailableAccount%%")," "),t.R7$(2),t.vxM(n.isShowCreateAccountLink()?3:-1)}}let oe=(()=>{class e{constructor(){this.destroyer=(0,Qt.M)(),this.bonusesService=(0,m.WQX)(l.x),this.snackBarService=(0,m.WQX)(Vt.vH),this.analyticsFacadeService=(0,m.WQX)(w.O),this.feedbackService=(0,m.WQX)(Kt.n),this.router=(0,m.WQX)(Ht.Ix),this.$isLoading=(0,m.vPA)(!1),this.dateFormat="dd/MM/yy",this.accountControl=new C.MJ(null),this.platformsLinks={[M.tz.MetaTrader4]:k._Q.mt4Platform,[M.tz.MetaTrader5]:k._Q.mt5Platform,[M.tz.OneZero]:k._Q.oneZeroPlatform,[M.tz.Prime
1Xm]:k._Q.primeXmPlatform,[M.tz.MatchTrader]:k._Q.matchTraderPlatform,[M.tz.Ctrader]:k._Q.ctraderPlatform},this.$account=(0,g.ot)((0,y.Ow)(this.accountControl)),this.temporaryBonus=B.geq.required(),this.accountOptions=(0,B.hFB)([]),this.showActiveBonusesEvent=(0,B.CGW)(),this.$isClaimUnavailable=(0,f.EW)(()=>null===this.$account()),this.$isHighlight=(0,f.EW)(()=>!this.$isClaimed()&&this.accountOptions().length>0),this.$isClaimed=(0,f.EW)(()=>this.temporaryBonus().isClaimed)}claim(){const n=this.accountControl.value;n&&this.bonusesService.claimTemporaryBonus({temporaryBonusId:this.temporaryBonus().id,accountId:n.id}).pipe((0,T.nU)(this.$isLoading),this.destroyer()).subscribe(o=>{o instanceof Xt.tr?this.snackBarService.error(o.data.message):this.handleClaimedBonus(o)})}showActiveBonuses(){this.showActiveBonusesEvent.emit()}goToPlatform(){this.router.navigate([this.platformsLinks[this.temporaryBonus().platform.type]])}isShowCreateAccountLink(){return!this.temporaryBonus().platform.isDemo&&!!this.platformsLinks[this.temporaryBonus().platform.type]}handleClaimedBonus(n){this.temporaryBonus.set(n),this.snackBarService.success((0,d.x)("%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCard.BonusClaimedSuccessfully [bonusName]%%"),{bonusName:n.name}),this.analyticsFacadeService.logEvent({name:w.p.BonusClaimed}),this.feedbackService.showDialog()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["feature-bonuses-temporary-bonus-card"]],inputs:{temporaryBonus:[1,"temporaryBonus"],accountOptions:[1,"accountOptions"]},outputs:{temporaryBonus:"temporaryBonusChange",showActiveBonusesEvent:"showActiveBonusesEvent"},decls:44,vars:23,consts:[["statusItem",""],[1,"bonus-card"],[1,"title"],[1,"name"],["data-testId","bonus-name"],["name","bonus-24",1,"bonus-icon"],[1,"caption"],[1,"currency-amount"],["data-testId","currency-amount"],["data-testId","currency-alphabetic-code"],[1,"info"],["data-testId","traded-lots"],["data-testId","ending-in"],["data-testId","active-time"],[1,"bonus-status-wrap"],[1,"option-template","claimed"],[3,"currency"],[1,"currency-info"],["data-testId","account-name"],[1,"entity"],["data-testId","platform-caption"],["data-testId","account-number"],["name","check-24",3,"customSizePx"],[1,"redirect-block"],["data-testId","show-active-bonuses-button","iconName","chevron-right-min-16","iconSide","right","labelTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.ShowActiveBonuses%%",3,"click"],["data-testId","account-selector","placeholderTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.SelectAccountPlaceholder%%",1,"account-selector",3,"formControl","isDisabled","options","optionTemplateRef"],["appearance","secondary","data-testId","claim-button","labelTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.Claim%%",1,"claim-button",3,"click","isDisabled","isLoading"],[1,"option-template"],[1,"no-available-account-template"],["data-testId","create-account-for-the-program-button","iconName","chevron-right-min-16","iconSide","right","labelTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.CreateAccountForTheProgram%%",1,"no-available-account-button"],["data-testId","create-account-for-the-program-button","iconName","chevron-right-min-16","iconSide","right","labelTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.CreateAccountForTheProgram%%",1,"no-available-account-button",3,"click"]],template:function(o,i){if(1&o&&(t.SS7(0)(1),t.j41(2,"div",1)(3,"div")(4,"div",2)(5,"span",3)(6,"ds-ellipsis-container",4),t.EFF(7),t.k0s()(),t.nrm(8,"ds-icon",5),t.k0s(),t.j41(9,"span",6),t.EFF(10),t.k0s()(),t.j41(11,"dl",7)(12,"dt")(13,"ds-ellipsis-container",8),t.EFF(14),t.nI1(15,"thousandSeparator"),t.k0s()(),t.j41(16,"dd",9),t.EFF(17),t.k0s()(),t.j41(18,"div",10)(19,"dl")(20,"dt"),t.EFF(21),t.nI1(22,"translate"),t.k0s(),t.j41(23,"dd")(24,"ds-ellipsis-container",11),t.EFF(25),t.k0s()()(),t.j41(26,"dl")(27,"dt"),t.EFF(28),t.nI1(29,"translate"),t.k0s(),t.j41(30,"dd")(31,"ds-ellipsis-container",12),t.EFF(32),t.k0s()()(),t.j41(33,"dl")(34,"dt"),t.EFF(35),t.nI1(36,"translate"),t.k0s(),t.j41(37,"dd")(38,"ds-ellipsis-container",13),t.EFF(39),t.k0s()()()(),t.j41(40,"div",14),t.nVh(41,Zt,18,13)(42,te,4,6)(43,ne,4,4),t.k0s()()),2&o){const p=t.bH3(i.temporaryBonus());t.R7$();const P=t.bH3(i.accountOptions());t.R7$(6),t.SpI(" ",p.name," "),t.R7$(),t.AVh("highlight",i.$isHighlight()),t.R7$(2),t.SpI(" ",p.platform.caption," "),t.R7$(4),t.SpI(" ",t.bMT(15,15,p.amount)," "),t.R7$(3),t.SpI(" ",p.currency.alphabeticCode," "),t.R7$(4),t.SpI(" ",t.bMT(22,17,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.TradedLots%%")," "),t.R7$(4),t.SpI(" ",p.tradedLots," "),t.R7$(3),t.SpI(" ",t.bMT(29,19,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.EndingIn%%")," "),t.R7$(4),t.SpI(" ",p.endingIn," "),t.R7$(3),t.SpI(" ",t.bMT(36,21,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusCard.ActiveTime%%")," "),t.R7$(4),t.SpI(" ",p.activeTime," "),t.R7$(2),t.vxM(i.$isClaimed()&&p.account?41:!i.$isClaimed()&&P.length>0?42:i.$isClaimed()||0!==P.length?-1:43)}},dependencies:[C.X1,C.BC,C.l_,Wt.t,wt.z,Yt.D,zt.J,N.mK,R.z,v.D,U.w,Jt],styles:['[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]{margin-left:auto}[dir=rtl]   [_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%], [_nghost-%COMP%]   .bonus-icon[dir=rtl][_ngcontent-%COMP%]{margin-left:0;margin-right:auto}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after{inset:-16px -16px auto auto}[dir=rtl]   [_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after, [_nghost-%COMP%]   .bonus-icon[dir=rtl][_ngcontent-%COMP%]:after{inset:-16px auto auto -16px}[_nghost-%COMP%]   .bonus-icon[_ngcontent-%COMP%]:after{content:"";position:absolute;display:block;filter:blur(40px);width:50px;height:50px}.bonus-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;padding:16px;overflow:hidden;background-color:var(--card);border-radius:4px;box-sizing:border-box;gap:16px}.title[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;white-space:nowrap;gap:24px}.title[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{font-size:20px;line-height:24px}.caption[_ngcontent-%COMP%]{font-size:12px;line-height:20px;color:var(--text-secondary)}
1.currency-amount[_ngcontent-%COMP%]{display:flex;align-items:end;gap:12px}.currency-amount[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%]{font-size:32px;line-height:40px;word-break:break-all}.currency-amount[_ngcontent-%COMP%]   dd[_ngcontent-%COMP%]{font-size:24px;line-height:34px;color:var(--text-secondary)}.info[_ngcontent-%COMP%]{display:flex;align-items:baseline;margin-bottom:8px;gap:8px}.info[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]{flex:1;overflow:hidden}.info[_ngcontent-%COMP%]   dl[_ngcontent-%COMP%]   dt[_ngcontent-%COMP%], .bonus-icon[_ngcontent-%COMP%]{color:var(--text-secondary)}.bonus-icon[_ngcontent-%COMP%]:after{background-color:var(--text-secondary)}.bonus-icon.highlight[_ngcontent-%COMP%]{color:var(--medium)}.bonus-icon.highlight[_ngcontent-%COMP%]:after{background-color:var(--medium)}.bonus-status-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:space-between;flex:1;gap:16px}.bonus-status-wrap[_ngcontent-%COMP%]   .claim-button[_ngcontent-%COMP%]{width:100%}.bonus-status-wrap[_ngcontent-%COMP%]   ds-select.account-selector[_ngcontent-%COMP%]  mat-form-field.mat-mdc-form-field .mdc-text-field .mat-mdc-form-field-infix{padding:8px 0 8px 16px}.option-template[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:32px minmax(100px,1fr);gap:8px}.option-template[_ngcontent-%COMP%]   ds-currency-icon[_ngcontent-%COMP%]{width:32px;height:32px;min-width:32px}.option-template[_ngcontent-%COMP%]   .currency-info[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-template[_ngcontent-%COMP%]   .entity[_ngcontent-%COMP%]{font-size:12px;line-height:20px;color:var(--text-secondary)}.option-template.claimed[_ngcontent-%COMP%]{width:100%;height:56px;padding:5px 16px;color:var(--text-main);border:1px solid var(--divider);border-radius:4px;box-sizing:border-box;grid-template-columns:32px minmax(100px,1fr) 16px}.option-template.claimed[_ngcontent-%COMP%]   ds-icon[_ngcontent-%COMP%]{color:var(--positive)}.no-available-account-template[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:56px;padding:16px;text-align:center;color:var(--text-secondary);border:1px solid var(--divider);border-radius:4px;box-sizing:border-box}.no-available-account-button[_ngcontent-%COMP%]{margin:16px auto}.redirect-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;text-align:center;color:var(--text-secondary)}'],changeDetection:0})}}return e})();const se=(e,c)=>c.id;function ie(e,c){if(1&e){const n=t.RV6();t.j41(0,"feature-bonuses-temporary-bonus-card",7),t.bIt("showActiveBonusesEvent",function(){m.eBV(n);const i=t.XpG(3);return m.Njj(i.showActiveBonuses())}),t.k0s()}if(2&e){const n=c.$implicit,o=c.$index,i=t.XpG(3);t.Y8G("accountOptions",i.getAvailableAccountOptions(n))("isTooltipActive",0===o)("offsetY",-20)("temporaryBonus",n)}}function ae(e,c){if(1&e&&(t.j41(0,"div",3)(1,"div",5),t.Z7z(2,ie,1,4,"feature-bonuses-temporary-bonus-card",6,se),t.k0s()()),2&e){t.XpG(2);const n=t.r8f(1);t.R7$(2),t.Dyx(n)}}function re(e,c){1&e&&(t.j41(0,"div",4),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCardList.NoBonuses%%")," "))}function ce(e,c){if(1&e){const n=t.RV6();t.j41(0,"p",1),t.EFF(1),t.nI1(2,"translate"),t.k0s(),t.j41(3,"ds-checkbox",2),t.bIt("ngModelChange",function(){m.eBV(n);const i=t.XpG();return m.Njj(i.toggleHideUnavailable())}),t.k0s(),t.nVh(4,ae,4,0,"div",3)(5,re,3,3,"div",4)}if(2&e){const n=t.XpG(),o=t.r8f(1);t.R7$(),t.SpI(" ",t.bMT(2,3,"%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCardList.Message%%")," "),t.R7$(2),t.Y8G("ngModel",n.$isHideUnavailable()),t.R7$(),t.vxM(o&&o.length>0?4:5)}}let ue=(()=>{class e{constructor(){this.accountsService=(0,m.WQX)(K.u4),this.clientSettingsService=(0,m.WQX)(K.s8),this.temporaryBonuses=B.hFB.required(),this.$isHideUnavailable=this.clientSettingsService.selectSignal("isHideUnavailableBonusesPrograms",!1),this.temporaryBonuses$=(0,g.br)(this.temporaryBonuses).pipe((0,Y.s)(1)),this.accounts$=this.accountsService.accounts$.pipe((0,x.T)(n=>n.data),(0,Y.s)(1)),this.$isInitCompleted=(0,g.ot)((0,Ut.p)([this.temporaryBonuses$,this.accounts$]).pipe((0,x.T)(()=>!0)),{initialValue:!1}),this.$filteredTemporaryBonuses=(0,f.EW)(()=>{const n=this.temporaryBonuses(),o=this.$isHideUnavailable();return n.filter(i=>!o||i.isClaimed||this.getAvailableAccounts(i).length>0)}),this.$accounts=(0,g.ot)(this.accounts$),this.showActiveBonusesEvent=(0,B.CGW)()}toggleHideUnavailable(){this.clientSettingsService.update({isHideUnavailableBonu
1sesPrograms:!this.$isHideUnavailable()})}getAvailableAccountOptions(n){return this.getAvailableAccounts(n).map(o=>({id:o.id.toString(),value:o}))}showActiveBonuses(){this.showActiveBonusesEvent.emit()}isAccountMatchBonus(n,o){return 0===n.platformBonusMatchingStrings.length||n.platformBonusMatchingStrings.some(i=>o.settings.platformBonusMatchingStrings.includes(i))}getAvailableAccounts(n){const o=this.$accounts();return o&&o.length?o.filter(i=>{const p=i.product,P=this.isAccountMatchBonus(n,i);return p.currency.numericCode===n.currency.numericCode&&p.platform.id===n.platform.id&&p.platform.name===n.platform.name&&p.type===M.f.Trade&&P}):[]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["feature-bonuses-temporary-bonuses-card-list"]],inputs:{temporaryBonuses:[1,"temporaryBonuses"]},outputs:{showActiveBonusesEvent:"showActiveBonusesEvent"},decls:3,vars:3,consts:[[3,"isLoading"],[1,"message"],["data-testId","hide-unavailable-programs-checkbox","labelTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCardList.HideUnavailablePrograms%%",1,"hide-programs-checkbox",3,"ngModelChange","ngModel"],[1,"bonuses"],[1,"no-bonuses-template"],[1,"card-list"],["featureTourTemplateTooltip","","labelTourTooltipTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCardList.TooltipTour.BonusesCard.Label%%","tourTooltipPosition","top-left","triggerKey","isBonusesCartTooltipCompleted",3,"accountOptions","isTooltipActive","offsetY","temporaryBonus"],["featureTourTemplateTooltip","","labelTourTooltipTranslateKey","%%B2Core.FeatureBonuses.Components.TemporaryBonus.TemporaryBonusesCardList.TooltipTour.BonusesCard.Label%%","tourTooltipPosition","top-left","triggerKey","isBonusesCartTooltipCompleted",3,"showActiveBonusesEvent","accountOptions","isTooltipActive","offsetY","temporaryBonus"]],template:function(o,i){1&o&&(t.nrm(0,"feature-spinner",0),t.SS7(1),t.nVh(2,ce,6,5)),2&o&&(t.Y8G("isLoading",!i.$isInitCompleted()),t.R7$(),t.bH3(i.$filteredTemporaryBonuses()),t.R7$(),t.vxM(i.$isInitCompleted()?2:-1))},dependencies:[oe,Gt.A,C.YN,C.BC,C.vS,A.t,F.B,v.D],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100%;padding-bottom:40px;box-sizing:border-box}@media (max-width: 960px){[_nghost-%COMP%]{padding-bottom:24px}}@media (max-width: 640px){[_nghost-%COMP%]{padding-bottom:16px}}.bonuses[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1}.bonuses[_ngcontent-%COMP%]   .card-list[_ngcontent-%COMP%]{display:grid;flex:1;grid-template-columns:repeat(auto-fill,minmax(288px,1fr));grid-auto-rows:min-content;gap:16px}@media (max-width: 640px){.bonuses[_ngcontent-%COMP%]   .card-list[_ngcontent-%COMP%]{grid-template-rows:auto}}.no-bonuses-template[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;flex:1;padding:16px;text-align:center;color:var(--text-secondary);border:1px solid var(--divider);border-radius:4px}.message[_ngcontent-%COMP%]{margin-top:8px;color:var(--text-secondary)}.hide-programs-checkbox[_ngcontent-%COMP%]{margin:32px 0}"],changeDetection:0})}}return e})();var D=function(e){return e.Temporary="Temporary",e.Active="Active",e}(D||{});function le(e,c){if(1&e&&(t.j41(0,"div",5),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&e){const n=c.$implicit,o=t.XpG(2);t.Y8G("isTooltipActive",o.$tabs()[0]===n)("offsetY",35),t.R7$(),t.SpI(" ",t.bMT(2,3,n.labelTranslateKey)," ")}}function de(e,c){if(1&e){const n=t.RV6();t.qex(0),t.j41(1,"feature-bonuses-temporary-bonuses-card-list",6),t.bIt("showActiveBonusesEvent",function(){m.eBV(n);const i=t.XpG(2);return m.Njj(i.switchToActiveTab())}),t.k0s(),t.bVm()}if(2&e){const n=t.XpG(2);t.R7$(),t.Y8G("temporaryBonuses",n.$temporaryBonuses())}}function pe(e,c){1&e&&(t.qex(0),t.nrm(1,"feature-bonuses-active-bonuses-card-list"),t.bVm())}function me(e,c){if(1&e){const n=t.RV6();t.j41(0,"ds-tabs",3),t.mxI("activeTabIdChange",function(i){m.eBV(n);const p=t.XpG();return t.DH7(p.$activeTabId,i)||(p.$activeTabId=i),m.Njj(i)}),t.DNE(1,le,3,5,"ng-template",null,0,t.C5r)(3,de,2,1,"ng-container",4)(4,pe,2,0,"ng-container",4),t.k0s()}if(2&e){const n=t.sdS(2),o=t.XpG();t.R50("activeTabId",o.$activeTabId),t.Y8G("tabLabelTemplate",n)("tabs",o.$tabs()),t.R7$(3),t.Y8G("dsTabContent",o.tabEnum.Temporary),t.R7$(),t.Y8G("dsTabContent",o.tabEnum.Active)}}const ge=[{path:"",component:(()=>{class e{constructor(){this.bonusesService=(0,m.WQX)(l.x),this.tabEnum=D,this.$isTemporaryBonusesLoading=(0,m.vPA)(!1),this.$temporaryBonuses=(0,g.ot)(this.bonusesService.getTemporaryBonuses().pipe((0,T.nU)(this.$isTemporaryBonusesLoading)),{initialValue:[]}),this.$activeTabId=(0,f.uu)(()=>this.$temporaryBonuses().length>0?D.Temporary:D.Active),this.$tabs=(0,f.EW)(()=>{const n=[];return this.$temporaryBonuses().length>0&&n.push({id:D.Temporary,labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.AvailablePrograms%%")}),n.push({id:D.Active,labelTranslateKey:(0,d.x)("%%B2Core.FeatureBonuses.MyBonuses%%")}),n})}switchToActiveTab(){this.$activeTabId.set(D.Active)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["feature-bonuses"]
1],decls:2,vars:2,consts:[["label",""],[3,"isLoading"],[1,"programs-bonuses-tabs",3,"activeTabId","tabLabelTemplate","tabs"],[1,"programs-bonuses-tabs",3,"activeTabIdChange","activeTabId","tabLabelTemplate","tabs"],[4,"dsTabContent"],["featureTourTemplateTooltip","","labelTourTooltipTranslateKey","%%B2Core.FeatureBonuses.TooltipTour.TabBonuses.Label%%","tourTooltipPosition","bottom-left","triggerKey","isTabBonusesTooltipCompleted",1,"tab-label",3,"isTooltipActive","offsetY"],[3,"showActiveBonusesEvent","temporaryBonuses"]],template:function(o,i){1&o&&(t.nrm(0,"feature-spinner",1),t.nVh(1,me,5,5,"ds-tabs",2)),2&o&&(t.Y8G("isLoading",i.$isTemporaryBonusesLoading()),t.R7$(),t.vxM(i.$isTemporaryBonusesLoading()?-1:1))},dependencies:[L.jq,F.B,L.Tl,ue,Nt,A.t,v.D],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:1180px;height:100%;margin:0 auto}[_nghost-%COMP%]   .programs-bonuses-tabs[_ngcontent-%COMP%], [_nghost-%COMP%]   .programs-bonuses-tabs[_ngcontent-%COMP%]  .content-container{overflow:unset}"],changeDetection:0})}}return e})()}]},80968(G,$,a){a.d($,{t:()=>m});var m=function(f){return f.Active="Active",f.Pending="Pending",f.Completed="Completed",f.Expired="Expired",f.Error="Error",f}(m||{})},47551(G,$,a){a.d($,{x:()=>E});var m=a(37796),f=a(65145),g=a(6512),A=a(61334),F=a(17978),T=a(15980),L=a(59378),d=function(u){return u.Pending="pending",u.Queued="queued",u.Completed="completed",u.Expired="expired",u.Error="error",u}(d||{}),v=function(u){return u.Queued="Queued",u.Deleted="Deleted",u.Active="Active",u.Pending="Pending",u.Processing="Processing",u.Completed="Completed",u.Expired="Expired",u.Error="Error",u.Hold="Hold",u.OnCompleting="OnCompleting",u}(v||{}),C=a(80968),j=a(8785),I=a(67940);let S=(()=>{class u{static{this.MS_IN_HOUR=36e5}static{this.HOURS_IN_DAY=24}static getDaysWithHoursString(r,l){if(!r||!l)return"0h";const h=u.getHoursDifference(r,l);if(h<=0)return"0h";if(h<1)return"<1h";const B=Math.trunc(h);return B<=u.HOURS_IN_DAY?`${B}h`:this.getFormattedHoursString(B)}static getHoursDifference(r,l){return(l.getTime()-r.getTime())/u.MS_IN_HOUR}static getFormattedHoursString(r){if(r<=0)return"0h";if(r<24)return`${Math.floor(r)}h`;const l=Math.floor(r/u.HOURS_IN_DAY),h=Math.floor(r%u.HOURS_IN_DAY);return 0===h?`${l}d`:`${l}d ${h}h`}static daysToHours(r){return r*u.HOURS_IN_DAY}}return u})();class y{static fromBonusDto(s){const r=s.amount,l=s.activatedAt?new Date(s.activatedAt):null;return{id:s.id,amount:I.mi.from(r.value).toPrecision(r.scale),accountCaption:s.accountCaption,accountNumber:s.accountNumber,timeLeft:y.getTimeLeft(l,s.lifetime),volumeComplete:I.mi.from(s.volumeComplete),volumeThreshold:I.mi.from(s.volumeThreshold),status:y.getStatus(s.status,l),temporaryBonusName:s.temporaryBonus,platformCaption:s.platform.caption,caption:s.caption,createdAt:new Date(s.createdAt).toISOString(),activatedAt:l?.toISOString()??null,expiresAt:y.getExpiresAt(l,s.lifetime),currency:{numericCode:s.currency.numericCode,alphabeticCode:s.currency.alphabeticCode}}}static fromTemporaryBonusDto(s){const r=s.amount,l=s.volumeToComplete,h=`${s.lifetime}d`;return{id:s.id,name:s.name,amount:I.mi.from(r.value).toPrecision(r.scale),tradedLots:I.mi.from(l.value).toPrecision(l.scale),endingIn:y.getEndingIn(s),activeTime:h,platformBonusMatchingStrings:s.platformGroups,isClaimed:s.claimed,currency:{numericCode:s.currency.numericCode,alphabeticCode:s.currency.alphabeticCode},platform:{id:s.platform.id,name:s.platform.name,caption:s.platform.caption,type:j.B1.fromDto(s.platform.type),isDemo:s.platform.isDemo,terminalUrl:s.platform.terminalUrl},account:y.getAccountInfo(s)}}static getStatus(s,r){switch(s){case v.Pending:return r?C.t.Active:C.t.Pending;case v.Queued:case v.Hold:return C.t.Pending;case v.Active:case v.Processing:case v.OnCompleting:return C.t.Active;case v.Completed:return C.t.Completed;case v.Error:return C.t.Error;case v.Expired:return C.t.Expired;default:return C.t.Error}}static getExpiresAt(s,r){if(!s)return null;const l=new Date(s.getTime());return l.setUTCDate(l.getUTCDate()+r),l.toISOString()}static getAccountInfo(s){const r=s.account;return r?{name:r.caption,alphabeticCode:r.currency.alphabeticCode,platformCaption:r.platform.caption,number:r.displayNumber}:null}static getEndingIn(s){const r=s.expiredAt?new Date(s.expiredAt):null;return S.getDaysWithHoursString(new Date,r)}static getTimeLeft(s,r){const l=S.daysToHours(r);if(null===s)return S.getFormattedHoursString(l);const h=S.getHoursDifference(s,new Date);return S.getFormattedHoursString(l-h)}}var _=a(34544);let x=(()=>{class u{constructor(){this.apiUrl=(0,f.WQX)(_.iW).apiUrl,this.http=(0,f.WQX)(m.Qq)}getMyBonuses(r){return this.http.get(`${this.apiUrl}/api/v2/my/bonuses`,{params:r,observe:"response"}).pipe((0,g.gA)(g.Oe))}getTemporaryBonuses(r){return this.http.get(`${this.apiUrl}/api/v2/my/bonuses/temporary`,{params:r,observe:"response"}).pipe((0,g.gA)(g.Oe))}claimTemporaryBonus(r){return this.http.post(`${this.apiUrl}/api/v2/my/bonuses/temporary/${r.temporaryBonusId}/claim`,{accountId:r.accountId},{observe:"response"}).pipe((0,g.gA)(g.Oe,g.tr))}static{this.\u0275fac=function(l){return new(l||u)}}static{this.\u0275prov=f.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})(),E=(()=>{class u{constructor(){this.limit=100,this.bonusesApiService=(0,f.WQX)(x)}getBonuses(r){const h=this.getBackendFilterStatuses(r).map(B=>{const R=this.getHttpParams({status:B,isApplySorting:!1});return this.bonusesApiService.getMyBonuses(R).pipe((0,T.T)(N=>N instanceof g.Oe?N.data.data.filter(t=>t.status!==v.Active&&t.status!==v.OnCompleting&&t.status!==v.Processing&&t.status!==v.Deleted).map(t=>y.fromBonusDto(t)):[]))});return(0,L.z)(h).pipe((0,T.T)(B=>A.A(F.A(B),R=>R.id)))}getTemporaryBonuses(){const r=this.getHttpParams({status:null,isApplySorting:!0});return this.bonusesApiService.getTemporaryBonuses(r).pipe((0,T.T)(l=>l instanceof g.Oe?l.data.data.map(R=>y.fromTemporaryBonusDto(R)):[]))}claimTemporaryBonus(r){return this.bonusesApiService.claimTemporaryBonus(r).pipe((0,T.T)(l=>l instanceof g.Oe?y.fromTemporaryBonusDto(l.data):l))}getBackendFilterStatuses(r){return null===r?[null]:{[C.t.Active]:[d.Pending],[C.t.Pending]:[d.Queued,d.Pending],[C.t.Completed]:[d.Completed],[C.t.Error]:[d.Error],[C.t.Expired]:[d.Expired]}[r]}getHttpParams(r){const{status:l,isApplySorting:h}=r;return(new m.Nl).appendAll({limit:this.limit,...l?{"filter[status]":l}:{},...h?{sort_by:"expireTime",sort_order:"asc"}:{}})}static{this.\u0275fac=function(l){return new(l||u)}}static{this.\u0275prov=f.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}}return u})()},54736(G,$,a){a.d($,{t:()=>F});
1var m=a(15954),f=a(34539),g=a(88463);function A(T,L){1&T&&(g.j41(0,"div",0)(1,"div",1),g.nrm(2,"ds-icon",2),g.k0s()()),2&T&&(g.R7$(2),g.Y8G("customSizePx",64))}let F=(()=>{class T{constructor(){this.isLoading=m.hFB.required()}static{this.\u0275fac=function(v){return new(v||T)}}static{this.\u0275cmp=g.VBU({type:T,selectors:[["feature-spinner"]],inputs:{isLoading:[1,"isLoading"]},decls:1,vars:1,consts:[[1,"spinner-container"],[1,"spinner"],["name","loader-24",3,"customSizePx"]],template:function(v,C){1&v&&g.nVh(0,A,3,1,"div",0),2&v&&g.vxM(C.isLoading()?0:-1)},dependencies:[f.mK],styles:[".spinner-container[_ngcontent-%COMP%]{position:absolute;width:100%;margin:auto;background:rgba(var(--background),.2);z-index:100;inset:0}.spinner[_ngcontent-%COMP%]{width:64px;height:64px;position:absolute;display:block;margin:auto;inset:0}ds-icon[_ngcontent-%COMP%]{color:var(--accent);animation:_ngcontent-%COMP%_spinnerRotate 2s linear infinite}@keyframes _ngcontent-%COMP%_spinnerRotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"],changeDetection:0})}}return T})()},88103(G,$,a){a.d($,{Ow:()=>I,s_:()=>S,ST:()=>y});var m=a(16019),f=a(87623),g=a(65256),A=a(85562),F=a(54624),T=a(26072),L=a(37537),d=a(1650),v=a(59592);function j(_){return function C(_){return(0,T.N)((x,E)=>{let u=!1,s=null,r=null;const l=()=>{if(r?.unsubscribe(),r=null,u){u=!1;const h=s;s=null,E.next(h)}};x.subscribe((0,d._)(E,h=>{r?.unsubscribe(),u=!0,s=h,r=(0,d._)(E,l,L.l),(0,v.Tg)(_(h)).subscribe(r)},()=>{l(),E.complete()},void 0,()=>{s=r=null}))})}(()=>_&&_>0?(0,m.O)(_):(0,f.of)(null))}function I(_,x){return(0,g.v)(()=>_.valueChanges.pipe(j(x?.debounceTimeMs),(0,A.Z)(_.value),(0,F.F)(x?.compareFn)))}function S(_,x){return(0,g.v)(()=>_.statusChanges.pipe(j(x?.debounceTimeMs),(0,A.Z)(_.status),(0,F.F)(x?.compareFn)))}function y(_,x){return(0,g.v)(()=>_.valueChanges.pipe((0,A.Z)(_.value),j(x?.debounceTimeMs),(0,F.F)(x?.compareFn)))}}}]);

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.